Skip to content

Commit

Permalink
Fixed script error in new BattleMenu. (#3325)
Browse files Browse the repository at this point in the history
* Fixed script error in new BattleMenu.

* Fixed comment example for controlHC.
  • Loading branch information
CalebSerafin authored Jun 29, 2024
1 parent d16b471 commit 2e43b05
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
29 changes: 29 additions & 0 deletions A3A/addons/core/functions/REINF/fn_controlHCsquad.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
/*
Maintainer: Not Caleb Serafin, somebody else pls
Controls a high-command squad.
Limitations and recommendations are currently unknown.
Arguments:
ARRAY<GROUP> Backwards compatibility.
Scope: Client, Global Arguments, Global Effect
Environment: Scheduled
Public: Yes
Example:
// Easy use.
private _selectedSquads = hcSelected player;
if (count _selectedSquads == 1) then {
[_selectedSquads] spawn A3A_fnc_controlHCSquad;
};
// Intermediate
private _display = findDisplay A3A_IDD_MAINDIALOG;
private _commanderMap = _display displayCtrl A3A_IDC_COMMANDERMAP;
private _group = _commanderMap getVariable ["selectedGroup", grpNull];
if (_group isNotEqualTo grpNull) then {
closeDialog 1;
[[_group]] spawn A3A_fnc_controlHCSquad;
}
*/

private _titleStr = localize "STR_A3A_fn_reinf_controlHQSquad_title";

if (player != theBoss) exitWith {[_titleStr, localize "STR_A3A_fn_reinf_controlHQSquad_no_commander"] call A3A_fnc_customHint;};
Expand Down
6 changes: 4 additions & 2 deletions A3A/addons/gui/functions/GUI/fn_commanderTab.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,10 @@ switch (_mode) do
private _display = findDisplay A3A_IDD_MAINDIALOG;
private _commanderMap = _display displayCtrl A3A_IDC_COMMANDERMAP;
private _group = _commanderMap getVariable ["selectedGroup", grpNull];
closeDialog 1;
[_group] spawn A3A_fnc_controlHCsquad;
if (_group isNotEqualTo grpNull) then {
closeDialog 1;
[[_group]] spawn A3A_fnc_controlHCSquad;
}
};

case ("groupDismissButtonClicked"):
Expand Down

0 comments on commit 2e43b05

Please sign in to comment.