mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update zeus module logic deletion behaviour
The teleport players module is reusable, while the global AI skill and group side modules should be deleted appropriately once the display is closed.
This commit is contained in:
parent
8a70cfbcd8
commit
600b71817f
@ -41,5 +41,3 @@ if (_group) then {
|
||||
[_x, _attached] call BIS_fnc_moveToRespawnPosition;
|
||||
};
|
||||
} forEach _player;
|
||||
|
||||
deleteVehicle _logic;
|
||||
|
@ -49,6 +49,13 @@ private _fnc_sliderMove = {
|
||||
(_display displayCtrl 16188) cbSetChecked (GVAR(GlobalSkillAI) select 4);
|
||||
(_display displayCtrl 16189) cbSetChecked (GVAR(GlobalSkillAI) select 5);
|
||||
|
||||
private _fnc_onUnload = {
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
||||
if (isNull _logic) exitWith {};
|
||||
|
||||
deleteVehicle _logic;
|
||||
};
|
||||
|
||||
private _fnc_onConfirm = {
|
||||
params [["_ctrlButtonOK", controlNull, [controlNull]]];
|
||||
TRACE_1("_fnc_onConfirm params",_this);
|
||||
@ -56,9 +63,6 @@ private _fnc_onConfirm = {
|
||||
private _display = ctrlparent _ctrlButtonOK;
|
||||
if (isNull _display) exitWith {};
|
||||
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
||||
if (isNull _logic) exitWith {};
|
||||
|
||||
GVAR(GlobalSkillAI) = [
|
||||
sliderPosition (_display displayCtrl 16184), // General
|
||||
sliderPosition (_display displayCtrl 16185), // Accuracy
|
||||
@ -71,7 +75,7 @@ private _fnc_onConfirm = {
|
||||
|
||||
// PV EH won't run on local machine
|
||||
[QGVAR(GlobalSkillAI),GVAR(GlobalSkillAI)] call FUNC(moduleGlobalSetSkill);
|
||||
deleteVehicle _logic;
|
||||
};
|
||||
|
||||
_ctrlButtonOK ctrladdeventhandler ["buttonclick", _fnc_onConfirm];
|
||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];
|
||||
|
@ -107,6 +107,15 @@ private _fnc_onSelection = {
|
||||
_ctrl ctrlAddEventHandler ["buttonclick", _fnc_onSelection];
|
||||
} forEach IDCs;
|
||||
|
||||
private _fnc_onUnload = {
|
||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
||||
if (isNull _logic) exitWith {};
|
||||
|
||||
if (_this select 1 == 2) then {
|
||||
deleteVehicle _logic;
|
||||
};
|
||||
};
|
||||
|
||||
private _fnc_onConfirm = {
|
||||
params [["_ctrlButtonOK", controlNull, [controlNull]]];
|
||||
|
||||
@ -123,4 +132,5 @@ private _fnc_onConfirm = {
|
||||
deleteVehicle _logic;
|
||||
};
|
||||
|
||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
||||
_ctrlButtonOK ctrlAddEventHandler ["buttonClick", _fnc_onConfirm];
|
||||
|
Loading…
Reference in New Issue
Block a user