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

Fixed script error in new BattleMenu. #3325

Merged
merged 2 commits into from
Jun 29, 2024
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
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