Update vanilla zeus functions (#5888)

* Cleanup zeus module

* Update zeus BI functions

* Restore accidentally removed setting check
This commit is contained in:
SilentSpike 2017-12-10 18:29:38 +00:00 committed by PabstMirror
parent be67cf0737
commit c1045e4266
24 changed files with 74 additions and 93 deletions

View File

@ -22,7 +22,7 @@
params ["_logic", "_units", "_activated"]; params ["_logic", "_units", "_activated"];
if (_activated) then { if (_activated) then {
_explosive = gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "explosive"); _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive");
if (_explosive != "") then { if (_explosive != "") then {
_explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive = createvehicle [_explosive,position _logic,[],0,"none"];
_explosive attachto [_logic]; _explosive attachto [_logic];
@ -44,7 +44,7 @@ if (_activated) then {
//--- Show hint to curator who placed the object //--- Show hint to curator who placed the object
[[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp; [[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp;
waitUntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic};
if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;}; if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;};
deletevehicle _logic; deletevehicle _logic;
}; };

View File

@ -20,33 +20,30 @@
#include "script_component.hpp" #include "script_component.hpp"
_fnc_scriptNameParentTemp = if !(isNil '_fnc_scriptName') then {_fnc_scriptName} else {'BIS_fnc_moduleProjectile'}; _logic = _this select 0;
private _fnc_scriptNameParent = _fnc_scriptNameParentTemp; _units = _this select 1;
_fnc_scriptNameParentTemp = nil; _activated = _this select 2;
private _fnc_scriptName = 'BIS_fnc_moduleProjectile';
scriptname _fnc_scriptName;
params ["_logic", "_units", "_activated"];
if ({local _x} count (objectcurators _logic) > 0) then { if ({local _x} count (objectcurators _logic) > 0) then {
//--- Reveal the circle to curators //--- Reveal the circle to curators
_logic hideobject false; _logic hideobject false;
_logic setpos position _logic; _logic setpos position _logic;
}; };
if !(isserver) exitWith {}; if !(isserver) exitwith {};
if (_activated) then { if (_activated) then {
_ammo = _logic getVariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")];
if (_ammo != "") then { if (_ammo != "") then {
_CfgAmmo = configFile >> "CfgAmmo" >> _ammo; _cfgAmmo = configfile >> "cfgammo" >> _ammo;
_dirVar = _fnc_scriptname + typeOf _logic; //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;};
_logic setdir (missionnamespace getVariable [_dirVar,direction _logic]); //--- Restore custom direction // It seems BI broke this part...
// _dirVar = _fnc_scriptname + typeof _logic;
// _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction
_pos = getposatl _logic; _pos = getposatl _logic;
_posAmmo = +_pos; _posAmmo = +_pos;
_posAmmo set [2,0]; _posAmmo set [2,0];
_dir = direction _logic; _dir = direction _logic;
_simulation = tolower gettext (configFile >> "CfgAmmo" >> _ammo >> "simulation"); _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation");
_altitude = 0; _altitude = 0;
_velocity = []; _velocity = [];
_attach = false; _attach = false;
@ -107,15 +104,15 @@ if (_activated) then {
}; };
}; };
}; };
} forEach _entities; } foreach _entities;
}; };
}; };
if (count _hint > 0 && {count objectCurators _logic > 0}) then { if (count _hint > 0 && {count objectcurators _logic > 0}) then {
[[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp;
}; };
if (count _velocity == 3) then { if (count _velocity == 3) then {
_altitude = (_logic getVariable ["altitude",_altitude]) call bis_fnc_parsenumber; _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber;
_radio = _logic getVariable ["radio",_radio]; _radio = _logic getvariable ["radio",_radio];
//--- Create projectile //--- Create projectile
_posAmmo set [2,_altitude]; _posAmmo set [2,_altitude];
@ -124,7 +121,7 @@ if (_activated) then {
_projectile setvelocity _velocity; _projectile setvelocity _velocity;
if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];};
// Added by ace_zeus for ace_frag compatibility // Added by ace_zeus for ace_frag compatibility
if (!isNil QEFUNC(frag,addPfhRound)) then { if (!isNil QEFUNC(frag,addPfhRound)) then {
[objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound); [objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound);
}; };
@ -143,13 +140,13 @@ if (_activated) then {
//--- Update //--- Update
if (_attach) then { if (_attach) then {
waitUntil { waituntil {
_soundSource setposatl getposatl _projectile; _soundSource setposatl getposatl _projectile;
sleep 1; sleep 1;
isnull _projectile || isnull _logic isnull _projectile || isnull _logic
}; };
} else { } else {
waitUntil { waituntil {
_soundSource setposatl getposatl _projectile; _soundSource setposatl getposatl _projectile;
if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then { if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then {
@ -161,7 +158,7 @@ if (_activated) then {
_projectile setposasl _posNew; _projectile setposasl _posNew;
_pos = getposatl _logic; _pos = getposatl _logic;
_dir = direction _logic; _dir = direction _logic;
missionnamespace setVariable [_dirVar,_dir]; missionnamespace setvariable [_dirVar,_dir];
}; };
sleep 0.1; sleep 0.1;
isnull _projectile || isnull _logic isnull _projectile || isnull _logic
@ -180,7 +177,7 @@ if (_activated) then {
} else { } else {
//--- Repeat to achieve permanent effect //--- Repeat to achieve permanent effect
_repeat = _logic getVariable ["repeat",0] > 0; _repeat = _logic getvariable ["repeat",0] > 0;
if (_repeat) then { if (_repeat) then {
[_logic,_units,_activated] call bis_fnc_moduleprojectile; [_logic,_units,_activated] call bis_fnc_moduleprojectile;
} else { } else {
@ -191,6 +188,6 @@ if (_activated) then {
deletevehicle _logic; deletevehicle _logic;
}; };
} else { } else {
["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error; ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error;
}; };
}; };

View File

@ -34,13 +34,16 @@ if (_activated && local _logic && !isnull curatorcamera) then {
if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;}; if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;};
_unit = effectivecommander _unit; _unit = effectivecommander _unit;
//--- Temp owner
private _tempOwner = _unit getvariable ["bis_fnc_moduleRemoteControl_owner", objnull];
//--- Check if the unit is suitable //--- Check if the unit is suitable
_error = ""; _error = "";
if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";};
if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";};
if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";};
if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";};
if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (!isnull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";};
if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";};
if (_error == "") then { if (_error == "") then {

View File

@ -40,8 +40,8 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", {
params ["", "_mouseButton", "", "", "_shift", "_ctrl", "_alt"]; params ["", "_mouseButton", "", "", "_shift", "_ctrl", "_alt"];
if (_mouseButton != 0) exitWith {}; // Only watch for LMB if (_mouseButton != 0) exitWith {}; // Only watch for LMB
TRACE_2("placed",_object,_mousePosASL);
//IGNORE_PRIVATE_WARNING ["_thisArgs"]
_thisArgs params ["_object", "_code"]; _thisArgs params ["_object", "_code"];
// Get mouse position on 2D map or 3D world // Get mouse position on 2D map or 3D world
@ -52,6 +52,7 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", {
} else { } else {
AGLToASL (screenToWorld getMousePosition); AGLToASL (screenToWorld getMousePosition);
}; };
TRACE_2("placed",_object,_mousePosASL);
[true, _object, _mousePosASL, _shift, _ctrl, _alt] call _code; [true, _object, _mousePosASL, _shift, _ctrl, _alt] call _code;
GVAR(moduleDestination_running) = false; GVAR(moduleDestination_running) = false;
@ -62,8 +63,8 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", {
params ["", "_keyCode", "_shift", "_ctrl", "_alt"]; params ["", "_keyCode", "_shift", "_ctrl", "_alt"];
if (_keyCode != 1) exitWith {}; // Only watch for ESC if (_keyCode != 1) exitWith {}; // Only watch for ESC
TRACE_2("aborted",_object,_mousePosASL);
//IGNORE_PRIVATE_WARNING ["_thisArgs"]
_thisArgs params ["_object", "_code"]; _thisArgs params ["_object", "_code"];
// Get mouse position on 2D map or 3D world // Get mouse position on 2D map or 3D world
@ -74,6 +75,7 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", {
} else { } else {
AGLToASL (screenToWorld getMousePosition); AGLToASL (screenToWorld getMousePosition);
}; };
TRACE_2("aborted",_object,_mousePosASL);
[false, _object, _mousePosASL, _shift, _ctrl, _alt] call _code; [false, _object, _mousePosASL, _shift, _ctrl, _alt] call _code;
GVAR(moduleDestination_running) = false; GVAR(moduleDestination_running) = false;
@ -83,6 +85,7 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", {
// Add draw EH for the zeus map - draws the 2D icon and line // Add draw EH for the zeus map - draws the 2D icon and line
GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", { GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", {
params ["_mapCtrl"]; params ["_mapCtrl"];
//IGNORE_PRIVATE_WARNING ["_thisArgs"]
_thisArgs params ["_object", "_text", "_icon", "_color"]; _thisArgs params ["_object", "_text", "_icon", "_color"];
private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition);

View File

@ -25,27 +25,23 @@
if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") };
params ["_logic"]; params ["_logic"];
private _removeAddons = []; private _removeAddons = [];
{
private _numCfgs = count (configFile >> "ACE_Curator"); private _addon = _x;
for "_n" from 0 to (_numCfgs - 1) do { if (isArray _addon) then {
private _cfg = (configFile >> "ACE_Curator") select _n;
if (isArray _cfg) then {
_requiredAddon = getArray _cfg;
{ {
if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith { if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith {
_removeAddons pushBack (configName _cfg); _removeAddons pushBack (configName _addon);
}; };
} forEach _requiredAddon; } forEach (getArray _addon);
}; };
if (isText _cfg) then { if (isText _addon) then {
_requiredAddon = getText _cfg; if !(isClass (configFile >> "CfgPatches" >> getText _addon)) then {
if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then { _removeAddons pushBack (configName _addon);
_removeAddons pushBack (configName _cfg);
}; };
}; };
}; } forEach configProperties [configFile >> "ACE_Curator"];
_logic removeCuratorAddons _removeAddons; _logic removeCuratorAddons _removeAddons;

View File

@ -17,9 +17,9 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && {local _logic}) exitWith {}; if !(local _logic) exitWith {};
if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -17,9 +17,9 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -17,9 +17,9 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if (isNil QEFUNC(captives,setHandcuffed)) then { if (isNil QEFUNC(captives,setHandcuffed)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -19,9 +19,9 @@
if (canSuspend) exitWith {[FUNC(moduleConfigurePylons), _this] call CBA_fnc_directCall;}; if (canSuspend) exitWith {[FUNC(moduleConfigurePylons), _this] call CBA_fnc_directCall;};
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && {local _logic}) exitWith {}; if !(local _logic) exitWith {};
private _aircraft = attachedTo _logic; private _aircraft = attachedTo _logic;

View File

@ -17,8 +17,8 @@
#include "script_component.hpp" #include "script_component.hpp"
_this params ["_varName","_varValue"]; params ["_varName", "_varValue"];
_varValue params ["_general","_accuracy","_handling","_spotting","_cover","_combat"]; _varValue params ["_general", "_accuracy", "_handling", "_spotting", "_cover", "_combat"];
TRACE_1("Params",_this); TRACE_1("Params",_this);
TRACE_6("AI settings updated",GVAR(GlobalSkillAI)); TRACE_6("AI settings updated",GVAR(GlobalSkillAI));

View File

@ -17,7 +17,7 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_unit","_newSide"]; params ["_unit", "_newSide"];
private _side = side _unit; private _side = side _unit;
// Nothing to do here // Nothing to do here

View File

@ -19,9 +19,9 @@
if (canSuspend) exitWith {[FUNC(moduleLoadIntoCargo), _this] call CBA_fnc_directCall;}; if (canSuspend) exitWith {[FUNC(moduleLoadIntoCargo), _this] call CBA_fnc_directCall;};
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && {local _logic}) exitWith {}; if !(local _logic) exitWith {};
private _cargo = attachedTo _logic; private _cargo = attachedTo _logic;

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic","_units","_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
//Validate the module target: //Validate the module target:
private _unit = effectiveCommander (attachedTo _logic); private _unit = effectiveCommander (attachedTo _logic);

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if (isNil QEFUNC(captives,setSurrendered)) then { if (isNil QEFUNC(captives,setSurrendered)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -18,9 +18,9 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated && local _logic) exitWith {}; if !(local _logic) exitWith {};
if (isNil QEFUNC(medical,setUnconscious)) then { if (isNil QEFUNC(medical,setUnconscious)) then {
[LSTRING(RequiresAddon)] call FUNC(showMessage); [LSTRING(RequiresAddon)] call FUNC(showMessage);

View File

@ -18,9 +18,7 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_logic", "_units", "_activated"]; params ["_logic"];
if !(_activated) exitWith {};
[_logic, QGVAR(zeusAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(zeusAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(zeusBird), "zeusBird"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(zeusBird), "zeusBird"] call EFUNC(common,readSettingFromModule);

View File

@ -48,7 +48,7 @@ private _fnc_onDraw = {
}; };
private _fnc_onMapClick = { private _fnc_onMapClick = {
params ["_map","_button","_x","_y","_shift","_ctrl","_alt"]; params ["_map","_button"];
if (_button == 0) then { if (_button == 0) then {
private _display = ctrlParent _map; private _display = ctrlParent _map;

View File

@ -115,7 +115,7 @@ private _fnc_onUnload = {
}; };
private _fnc_onConfirm = { private _fnc_onConfirm = {
params [["_ctrlButtonOK", controlNull, [controlNull]]]; params ["_ctrlButtonOK"];
private _display = ctrlparent _ctrlButtonOK; private _display = ctrlparent _ctrlButtonOK;
if (isNull _display) exitWith {}; if (isNull _display) exitWith {};

View File

@ -126,18 +126,7 @@ private _fnc_onConfirm = {
private _target = _combo2 lbValue (lbCurSel _combo2); private _target = _combo2 lbValue (lbCurSel _combo2);
private _gear = _combo3 lbValue (lbCurSel _combo3); private _gear = _combo3 lbValue (lbCurSel _combo3);
[_logic, _toggle == 1, _gear == 1, _target] call FUNC(moduleToggleFlashlight);
_toggle = [
false,
true
] select (_toggle == 1);
_gear = [
false,
true
] select (_gear == 1);
[_logic, _toggle, _gear, _target] call FUNC(moduleToggleFlashlight);
}; };
_display displayAddEventHandler ["unload", _fnc_onUnload]; _display displayAddEventHandler ["unload", _fnc_onUnload];

View File

@ -115,12 +115,7 @@ private _fnc_onConfirm = {
private _toggle = _combo1 lbValue (lbCurSel _combo1); private _toggle = _combo1 lbValue (lbCurSel _combo1);
private _target = _combo2 lbValue (lbCurSel _combo2); private _target = _combo2 lbValue (lbCurSel _combo2);
private _toggle = [ [_logic, _toggle == 1, _target] call FUNC(moduleToggleNvg);
false,
true
] select (_toggle == 1);
[_logic, _toggle, _target] call FUNC(moduleToggleNvg);
}; };
_display displayAddEventHandler ["unload", _fnc_onUnload]; _display displayAddEventHandler ["unload", _fnc_onUnload];