-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add group settings for Attack, Reinforce and Dynamic Reinforcement #441
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -108,6 +108,70 @@ _curCat = LSTRING(Settings_GeneralCat); | |||||
1 | ||||||
] call CBA_fnc_addSetting; | ||||||
|
||||||
addMissionEventHandler ["GroupCreated", { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be in the EventHandlers pbo |
||||||
params ["_group"]; | ||||||
[ | ||||||
{ | ||||||
if (count (units _this) > 0) then { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if (GVAR(autoAddDynamicReinforcement)) then {_this setVariable [QGVAR(enableGroupReinforce), true, true];}; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we maybe should split this up into a more logical system. why should we, for example, wait when all 3 settings are disabled? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a 3-second wait before executing ( |
||||||
if !(GVAR(disableAttackOverride)) then {_this enableAttack false;}; | ||||||
if (GVAR(disableFleeingOverride)) then {_this allowFleeing 0;}; | ||||||
}; | ||||||
}, | ||||||
_group, | ||||||
3 | ||||||
] call CBA_fnc_waitAndExecute; | ||||||
}]; | ||||||
|
||||||
// auto disable enableAttack on groups | ||||||
[ | ||||||
QGVAR(disableAttackOverride), | ||||||
"CHECKBOX", | ||||||
[LSTRING(Settings_AttackOverride), LSTRING(Settings_AttackOverride_ToolTip)], | ||||||
[COMPONENT_NAME, _curCat], | ||||||
false, | ||||||
false, { | ||||||
params ["_value"]; | ||||||
if (_value) exitWith {}; | ||||||
if (!_value && time > 0) then { | ||||||
{_x enableAttack false;} forEach (allGroups select {local (leader _x)}); | ||||||
}; | ||||||
} | ||||||
] call CBA_fnc_addSetting; | ||||||
|
||||||
// auto disable allowFleeing on groups | ||||||
[ | ||||||
QGVAR(disableFleeingOverride), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This and the next setting need a XEH initPost eventhandler instead. People spawn in units all the time, which will not get caught by this. |
||||||
"CHECKBOX", | ||||||
[LSTRING(Settings_FleeingOverride), LSTRING(Settings_FleeingOverride_ToolTip)], | ||||||
[COMPONENT_NAME, _curCat], | ||||||
false, | ||||||
false, { | ||||||
params ["_value"]; | ||||||
if (_value) exitWith {}; | ||||||
if (!_value && time > 0) then { | ||||||
{_x allowFleeing 0;} forEach (allGroups select {local (leader _x)}); | ||||||
}; | ||||||
} | ||||||
] call CBA_fnc_addSetting; | ||||||
|
||||||
// auto add dynamic reinforcement | ||||||
[ | ||||||
QGVAR(autoAddDynamicReinforcement), | ||||||
"CHECKBOX", | ||||||
[LSTRING(Settings_UniversalDynamicReinforcement), LSTRING(Settings_UniversalDynamicReinforcement_ToolTip)], | ||||||
[COMPONENT_NAME, _curCat], | ||||||
false, | ||||||
false, { | ||||||
params ["_value"]; | ||||||
if (!_value) exitWith {}; | ||||||
if (_value) then { | ||||||
{_x setVariable [QGVAR(enableGroupReinforce), true, true];} forEach (allGroups select {local (leader _x)}); | ||||||
}; | ||||||
} | ||||||
] call CBA_fnc_addSetting; | ||||||
|
||||||
|
||||||
/* | ||||||
TEMPORARILY DISABLED FOR VERSION 2.5 RELEASE | ||||||
WAITING BETTER OR OTHER SOLUTION | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can find, the former
personnell
was closer, should just drop the extra trailingl
. Still, I'd go withpeople
instead, since seeminglypersonnel
is people working in a company: