From 75ca4883ab20eab97e9db35e3dceb171bbb5fbbc Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 28 Aug 2019 02:00:17 +0200 Subject: [PATCH] Limited Zeus as lobby parameter Enabled by default --- .../scripts/server/game/zeus_synchro.sqf | 8 +------ .../scripts/server/init_server.sqf | 23 +++++++++++++++++++ .../scripts/shared/fetch_params.sqf | 5 ++++ Missionframework/stringtable.xml | 3 +++ Missionframework/ui/mission_params.hpp | 6 +++++ 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/Missionframework/scripts/server/game/zeus_synchro.sqf b/Missionframework/scripts/server/game/zeus_synchro.sqf index 75bb6446..01b116e2 100644 --- a/Missionframework/scripts/server/game/zeus_synchro.sqf +++ b/Missionframework/scripts/server/game/zeus_synchro.sqf @@ -40,13 +40,7 @@ while { true } do { _zgm addCuratorEditableObjects [_zeusunits,true]; _zgm removeCuratorEditableObjects [_units_to_remove,true]; - _zgm setCuratorCoef ["edit", -1e8]; - _zgm setCuratorCoef ["place", -1e8]; - _zgm setCuratorCoef ["synchronize", 0]; - _zgm setCuratorCoef ["delete", 0]; - _zgm setCuratorCoef ["destroy", -1e8]; - } foreach allCurators; sleep 10; -}; \ No newline at end of file +}; diff --git a/Missionframework/scripts/server/init_server.sqf b/Missionframework/scripts/server/init_server.sqf index 2e6ad647..ce2e2d58 100644 --- a/Missionframework/scripts/server/init_server.sqf +++ b/Missionframework/scripts/server/init_server.sqf @@ -126,3 +126,26 @@ execVM "scripts\server\offloading\group_diag.sqf"; if (KP_liberation_restart > 0) then { execVM "scripts\server\game\server_restart.sqf"; }; + +if (KP_liberation_limited_zeus) then { + zm1 setVariable ["Addons", 0, true]; + removeAllCuratorAddons zm1; + + zm1 setCuratorCoef ["edit", -1e8]; + zm1 setCuratorCoef ["place", -1e8]; + zm1 setCuratorCoef ["synchronize", 0]; + zm1 setCuratorCoef ["delete", 0]; + zm1 setCuratorCoef ["destroy", -1e8]; +} else { + zm1 setVariable ["Addons", 3, true]; + removeAllCuratorAddons zm1; + + private _allAddons = ("true" configClasses (configFile >> "CfgPatches")) apply {configName _x}; + zm1 addCuratorAddons _allAddons; + + zm1 setCuratorCoef ["edit", 0]; + zm1 setCuratorCoef ["place", 0]; + zm1 setCuratorCoef ["synchronize", 0]; + zm1 setCuratorCoef ["delete", 0]; + zm1 setCuratorCoef ["destroy", 0]; +}; diff --git a/Missionframework/scripts/shared/fetch_params.sqf b/Missionframework/scripts/shared/fetch_params.sqf index 0e28b176..61eb4376 100644 --- a/Missionframework/scripts/shared/fetch_params.sqf +++ b/Missionframework/scripts/shared/fetch_params.sqf @@ -54,6 +54,7 @@ if(isServer) then { GET_PARAM_BOOL(KP_liberation_cr_param_buildings, "CR_Building", 0); GET_PARAM_BOOL(KP_liberation_ailogistics, "AiLogistics", 1); GET_PARAM_BOOL(KP_liberation_clear_cargo, "ClearCargo", 1); + GET_PARAM_BOOL(KP_liberation_limited_zeus, "LimitedZeus", 1); GET_PARAM_BOOL(KP_liberation_arsenalUsePreset, "ArsenalUsePreset", 1); GET_PARAM_BOOL(KP_liberation_mapmarkers, "MapMarkers", 1); GET_PARAM_BOOL(KP_liberation_mobilerespawn, "MobileRespawn", 1); @@ -373,6 +374,10 @@ if (!isDedicated && hasInterface) then { _value = if (KP_liberation_clear_cargo) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";}; _text = _text + format ["%1
%2

", _param, _value]; + _param = localize "STR_PARAM_LIMITEDZEUS"; + _value = if (KP_liberation_limited_zeus) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";}; + _text = _text + format ["%1
%2

", _param, _value]; + _param = localize "STR_PERMISSIONS_PARAM"; _value = if (GRLIB_permissions_param) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";}; _text = _text + format ["%1
%2

", _param, _value]; diff --git a/Missionframework/stringtable.xml b/Missionframework/stringtable.xml index 7f578346..4c0e5602 100644 --- a/Missionframework/stringtable.xml +++ b/Missionframework/stringtable.xml @@ -2422,6 +2422,9 @@ Remover carga do veículo requisitado 移除載具上的物品 + + Limited Zeus interface + Deployment in progress... Déploiement en cours... diff --git a/Missionframework/ui/mission_params.hpp b/Missionframework/ui/mission_params.hpp index 400105f8..689e4035 100644 --- a/Missionframework/ui/mission_params.hpp +++ b/Missionframework/ui/mission_params.hpp @@ -258,6 +258,12 @@ class Params texts[] = { $STR_PARAMS_ENABLED, $STR_PARAMS_DISABLED }; default = 1; }; + class LimitedZeus { + title = $STR_PARAM_LIMITEDZEUS; + values[] = {1,0}; + texts[] = { $STR_PARAMS_ENABLED, $STR_PARAMS_DISABLED }; + default = 1; + }; class Spacer3 { title = ""; values[] = { "" };