Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added global BFT toggle #199

Merged
merged 2 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
30 changes: 19 additions & 11 deletions addons/zeus/functions/fnc_moduleToggleBFT.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ 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;
publicVariable "ace_map_BFT_Enabled";

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;
};
18 changes: 11 additions & 7 deletions addons/zeus/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,28 +123,32 @@
</Container>
<Container name="moduleToggleBFT">
<Key ID="STR_GRAD_ZEUS_moduleToggleBFTName">
<German>BFT umschalten</German>
<Original>Toggle BFT</Original>
<German>BFT umschalten</German>
</Key>
<Key ID="STR_GRAD_ZEUS_moduleToggleBFTError1">
<German>Nicht-leeres Objekt auswählen</German>
<Original>Select non-empty object</Original>
<German>Nicht-leeres Objekt auswählen</German>
</Key>
<Key ID="STR_GRAD_ZEUS_moduleToggleBFTResult">
<German>BFT für Gruppe %1.</German>
<Original>Group BFT %1.</Original>
<Original>Global BFT %1</Original>
<German>Globales BFT %1</German>
</Key>
<Key ID="STR_GRAD_ZEUS_moduleToggleBFTGroupResult">
<Original>Group %1 BFT %2.</Original>
<German>BFT für Gruppe %1 %2.</German>
</Key>
<Key ID="STR_GRAD_ZEUS_moduleToggleBFTResultOn">
<German>eingeschaltet</German>
<Original>toggled on</Original>
<German>eingeschaltet</German>
</Key>
<Key ID="STR_GRAD_ZEUS_moduleToggleBFTResultOff">
<German>ausgeschaltet</German>
<Original>toggled off</Original>
<German>ausgeschaltet</German>
</Key>
<Key ID="STR_GRAD_ZEUS_moduleAddPlayersToZeusName">
<German>Spieler zu Zeus hinzufügen</German>
<Original>Add players to Zeus</Original>
<German>Spieler zu Zeus hinzufügen</German>
</Key>
</Container>
<Container name="moduleReloadLoadout">
Expand Down