From d32fb5bd5d636103476016f2aaa35baca7e6219e Mon Sep 17 00:00:00 2001 From: Salbei Date: Thu, 20 Jan 2022 10:29:36 +0100 Subject: [PATCH 1/2] Added global BFT toggle --- .github/workflows/ci.yml | 8 ++--- addons/zeus/functions/fnc_moduleToggleBFT.sqf | 29 ++++++++++++------- addons/zeus/stringtable.xml | 18 +++++++----- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d5999db..c15e3ac3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,11 @@ jobs: uses: actions/checkout@v2 - name: Build with HEMTT - uses: gruppe-adler/action-release-with-hemtt@2.0.0 + uses: gruppe-adler/action-release-with-hemtt@2.2.0 id: build - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@1.0.0 with: - name: ${{ steps.build.outputs.zip_name }} - path: ${{ steps.build.outputs.release_path }} + name: 'gruppe_adler_mod' + path: ${{ steps.build.outputs.zip_path }} diff --git a/addons/zeus/functions/fnc_moduleToggleBFT.sqf b/addons/zeus/functions/fnc_moduleToggleBFT.sqf index 665650d3..0f38d7ae 100644 --- a/addons/zeus/functions/fnc_moduleToggleBFT.sqf +++ b/addons/zeus/functions/fnc_moduleToggleBFT.sqf @@ -4,19 +4,26 @@ params ["_logic", "", "_activated"]; if !(_activated && {local _logic}) exitWith {}; -private _unit = _logic getvariable ["bis_fnc_curatorAttachObject_object",objnull]; +private _unit = _logic getvariable ["bis_fnc_curatorAttachObject_object", objnull]; deleteVehicle _logic; -private _grp = group _unit; +if (isNull _unit) then { + private _current = missionNamespace getVariable ["ace_map_BFT_Enabled", false]; + ace_map_BFT_Enabled = !_current; -private _error = switch (true) do { - case (isNull _unit): {localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506"}; - case (isNull _grp || !(side _grp in [east,west,resistance,civilian])): {localize LSTRING(moduleToggleBFTError1)}; - default {""}; -}; -if (_error != "") exitWith {[objNull,_error] call bis_fnc_showCuratorFeedbackMessage}; + [objNull, format [localize LSTRING(moduleToggleBFTResult), [localize LSTRING(moduleToggleBFTResultOn), localize LSTRING(moduleToggleBFTResultOff)] select _current]] call bis_fnc_showCuratorFeedbackMessage; +} else { + private _grp = group _unit; -private _current = _grp getVariable ["ACE_map_hideBlueForceMarker",false]; -_grp setVariable ["ACE_map_hideBlueForceMarker",!_current,true]; + private _error = switch (true) do { + case (isNull _unit) : {localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506"}; + case (isNull _grp || !(side _grp in [east, west, resistance, civilian])) : {localize LSTRING(moduleToggleBFTError1)}; + default {""}; + }; + if (_error != "") exitWith {[objNull, _error] call bis_fnc_showCuratorFeedbackMessage}; -[objNull,format [localize LSTRING(moduleToggleBFTResult),[localize LSTRING(moduleToggleBFTResultOn),localize LSTRING(moduleToggleBFTResultOff)] select !_current]] call bis_fnc_showCuratorFeedbackMessage; + private _current = _grp getVariable ["ACE_map_hideBlueForceMarker", false]; + _grp setVariable ["ACE_map_hideBlueForceMarker", !_current, true]; + + [objNull, format [localize LSTRING(moduleToggleBFTGroupResult), _grp, [localize LSTRING(moduleToggleBFTResultOn), localize LSTRING(moduleToggleBFTResultOff)] select !_current]] call bis_fnc_showCuratorFeedbackMessage; +}; \ No newline at end of file diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 03defb14..19ed320f 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -123,28 +123,32 @@ - BFT umschalten Toggle BFT + BFT umschalten - Nicht-leeres Objekt auswählen Select non-empty object + Nicht-leeres Objekt auswählen - BFT für Gruppe %1. - Group BFT %1. + Global BFT %1 + Globales BFT %1 + + + Group %1 BFT %2. + BFT für Gruppe %1 %2. - eingeschaltet toggled on + eingeschaltet - ausgeschaltet toggled off + ausgeschaltet - Spieler zu Zeus hinzufügen Add players to Zeus + Spieler zu Zeus hinzufügen From 8365b9ba2d1e1f30056531acde4bee5fc07ffe83 Mon Sep 17 00:00:00 2001 From: Salbei Date: Thu, 20 Jan 2022 16:02:51 +0100 Subject: [PATCH 2/2] Update addons/zeus/functions/fnc_moduleToggleBFT.sqf Co-authored-by: Moritz Schmidt --- addons/zeus/functions/fnc_moduleToggleBFT.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/zeus/functions/fnc_moduleToggleBFT.sqf b/addons/zeus/functions/fnc_moduleToggleBFT.sqf index 0f38d7ae..838f2392 100644 --- a/addons/zeus/functions/fnc_moduleToggleBFT.sqf +++ b/addons/zeus/functions/fnc_moduleToggleBFT.sqf @@ -10,6 +10,7 @@ deleteVehicle _logic; if (isNull _unit) then { private _current = missionNamespace getVariable ["ace_map_BFT_Enabled", false]; ace_map_BFT_Enabled = !_current; + publicVariable "ace_map_BFT_Enabled"; [objNull, format [localize LSTRING(moduleToggleBFTResult), [localize LSTRING(moduleToggleBFTResultOn), localize LSTRING(moduleToggleBFTResultOff)] select _current]] call bis_fnc_showCuratorFeedbackMessage; } else {