mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
All - Fix parentheses around code (#10073)
* Fix Brackets around code * Update fnc_handleFired.sqf * Shouldn't have changed this one --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
8fc093de8f
commit
1c6c4d6bff
@ -19,7 +19,7 @@
|
|||||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
||||||
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
|
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
|
||||||
|
|
||||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
if !(_ammo isKindOf "BulletBase") exitWith {};
|
||||||
if (!alive _projectile) exitWith {};
|
if (!alive _projectile) exitWith {};
|
||||||
if (underwater _unit) exitWith {};
|
if (underwater _unit) exitWith {};
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ if (_transonicStabilityCoef == 0) then {
|
|||||||
_transonicStabilityCoef = 0.5;
|
_transonicStabilityCoef = 0.5;
|
||||||
};
|
};
|
||||||
private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
|
private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
|
||||||
if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
|
if !(_dragModel in [1, 2, 5, 6, 7, 8]) then {
|
||||||
_dragModel = 1;
|
_dragModel = 1;
|
||||||
};
|
};
|
||||||
private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
|
private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
|
||||||
|
@ -13,7 +13,7 @@ GVAR(tempWindInfo) = false;
|
|||||||
// Add keybinds
|
// Add keybinds
|
||||||
["ACE3 Weapons", QGVAR(prepare), localize LSTRING(Prepare), {
|
["ACE3 Weapons", QGVAR(prepare), localize LSTRING(Prepare), {
|
||||||
// Condition
|
// Condition
|
||||||
if (!([ACE_player] call FUNC(canPrepare))) exitWith {false};
|
if !([ACE_player] call FUNC(canPrepare)) exitWith {false};
|
||||||
if (EGVAR(common,isReloading)) exitWith {true};
|
if (EGVAR(common,isReloading)) exitWith {true};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
|
@ -21,7 +21,7 @@ TRACE_1("params",_unit);
|
|||||||
// Select next throwable if one already in hand
|
// Select next throwable if one already in hand
|
||||||
if (_unit getVariable [QGVAR(inHand), false]) exitWith {
|
if (_unit getVariable [QGVAR(inHand), false]) exitWith {
|
||||||
TRACE_1("inHand",_unit);
|
TRACE_1("inHand",_unit);
|
||||||
if (!(_unit getVariable [QGVAR(primed), false])) then {
|
if !(_unit getVariable [QGVAR(primed), false]) then {
|
||||||
TRACE_1("not primed",_unit);
|
TRACE_1("not primed",_unit);
|
||||||
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
|
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
|
||||||
// selectNextGrenade relies on muzzles array (setAmmo 0 removes the muzzle from the array and current can't be found, cycles between 0 and 1 muzzles)
|
// selectNextGrenade relies on muzzles array (setAmmo 0 removes the muzzle from the array and current can't be found, cycles between 0 and 1 muzzles)
|
||||||
|
@ -20,7 +20,7 @@ TRACE_1("params",_unit);
|
|||||||
|
|
||||||
// Prime the throwable if it hasn't been cooking already
|
// Prime the throwable if it hasn't been cooking already
|
||||||
// Next to proper simulation this also has to happen before delay for orientation of the throwable to be set
|
// Next to proper simulation this also has to happen before delay for orientation of the throwable to be set
|
||||||
if (!(_unit getVariable [QGVAR(primed), false])) then {
|
if !(_unit getVariable [QGVAR(primed), false]) then {
|
||||||
[_unit] call FUNC(prime);
|
[_unit] call FUNC(prime);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,6 +72,6 @@ if (_nextAction != GVAR(currentAction)) then {
|
|||||||
GVAR(currentAction) = _nextAction;
|
GVAR(currentAction) = _nextAction;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(GVAR(currentAction) in ["Civil", "Salute"])) then {
|
if !(GVAR(currentAction) in ["Civil", "Salute"]) then {
|
||||||
GVAR(center) selectWeapon ([primaryWeapon GVAR(center), secondaryWeapon GVAR(center), handgunWeapon GVAR(center), binocular GVAR(center)] select GVAR(selectedWeaponType)); // select correct weapon, prevents floating weapons
|
GVAR(center) selectWeapon ([primaryWeapon GVAR(center), secondaryWeapon GVAR(center), handgunWeapon GVAR(center), binocular GVAR(center)] select GVAR(selectedWeaponType)); // select correct weapon, prevents floating weapons
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
params ["_vehicle", "", "", "", "", "_magazine", "_projectile", "_gunner"];
|
params ["_vehicle", "", "", "", "", "_magazine", "_projectile", "_gunner"];
|
||||||
TRACE_4("firedEH",_vehicle,_magazine,_projectile,_gunner);
|
TRACE_4("firedEH",_vehicle,_magazine,_projectile,_gunner);
|
||||||
|
|
||||||
if (!([_gunner] call EFUNC(common,isPlayer))) exitWith {}; // AI don't know how to use (this does give them more range than a player)
|
if !([_gunner] call EFUNC(common,isPlayer)) exitWith {}; // AI don't know how to use (this does give them more range than a player)
|
||||||
if ((gunner _vehicle) != _gunner) exitWith {}; // check if primaryGunner
|
if ((gunner _vehicle) != _gunner) exitWith {}; // check if primaryGunner
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ params ["_menuType"];
|
|||||||
TRACE_1("interactMenuOpened",_menuType);
|
TRACE_1("interactMenuOpened",_menuType);
|
||||||
|
|
||||||
if (_menuType != 1) exitWith {};
|
if (_menuType != 1) exitWith {};
|
||||||
if (!("ACE_artilleryTable" in (ace_player call EFUNC(common,uniqueItems)))) exitWith {};
|
if !("ACE_artilleryTable" in (ace_player call EFUNC(common,uniqueItems))) exitWith {};
|
||||||
|
|
||||||
private _vehicleAdded = ace_player getVariable [QGVAR(vehiclesAdded), []];
|
private _vehicleAdded = ace_player getVariable [QGVAR(vehiclesAdded), []];
|
||||||
private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []];
|
private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []];
|
||||||
|
@ -23,7 +23,7 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
|
|||||||
_resetGunList = false;
|
_resetGunList = false;
|
||||||
{
|
{
|
||||||
// Verify each gun has correct param type
|
// Verify each gun has correct param type
|
||||||
if (!(_x isEqualTypeArray ["", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [], [], false])) exitWith {
|
if !(_x isEqualTypeArray ["", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [], [], false]) exitWith {
|
||||||
_resetGunList = true;
|
_resetGunList = true;
|
||||||
};
|
};
|
||||||
} forEach GVAR(gunList);
|
} forEach GVAR(gunList);
|
||||||
|
@ -74,7 +74,7 @@ private _validate_preset = {
|
|||||||
ERROR(_errorMsg);
|
ERROR(_errorMsg);
|
||||||
_valid = false;
|
_valid = false;
|
||||||
};
|
};
|
||||||
if (!((_this select 17) in ["ASM", "ICAO"])) then {
|
if !((_this select 17) in ["ASM", "ICAO"]) then {
|
||||||
private _errorMsg = format ["Invalid atmosphere model: %1", _this select 17];
|
private _errorMsg = format ["Invalid atmosphere model: %1", _this select 17];
|
||||||
ERROR(_errorMsg);
|
ERROR(_errorMsg);
|
||||||
_valid = false;
|
_valid = false;
|
||||||
|
@ -26,7 +26,7 @@ if !(ctrlVisible 9000) then {
|
|||||||
params ["_args"];
|
params ["_args"];
|
||||||
_args params ["_startTime"];
|
_args params ["_startTime"];
|
||||||
|
|
||||||
if (!(GVAR(speedAssistTimer))) exitWith {
|
if !(GVAR(speedAssistTimer)) exitWith {
|
||||||
GVAR(speedAssistTimer) = true;
|
GVAR(speedAssistTimer) = true;
|
||||||
|
|
||||||
ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
|
ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {};
|
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {};
|
||||||
|
|
||||||
if (ctrlVisible 17000) then {
|
if (ctrlVisible 17000) then {
|
||||||
false call FUNC(show_c1_ballistic_coefficient_data);
|
false call FUNC(show_c1_ballistic_coefficient_data);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {};
|
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {};
|
||||||
|
|
||||||
if (ctrlVisible 16000) then {
|
if (ctrlVisible 16000) then {
|
||||||
false call FUNC(show_muzzle_velocity_data);
|
false call FUNC(show_muzzle_velocity_data);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {};
|
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {};
|
||||||
|
|
||||||
if (ctrlVisible 18000) then {
|
if (ctrlVisible 18000) then {
|
||||||
false call FUNC(show_truing_drop);
|
false call FUNC(show_truing_drop);
|
||||||
|
@ -35,7 +35,7 @@ if (!GVAR(atmosphereModeTBH)) then {
|
|||||||
_relativeHumidity = 0.5;
|
_relativeHumidity = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _scopeBaseAngle = if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then {
|
private _scopeBaseAngle = if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||||
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight];
|
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight];
|
||||||
(parseNumber _zeroAngle)
|
(parseNumber _zeroAngle)
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,7 +28,7 @@ if (_attachedList isEqualTo []) exitWith {};
|
|||||||
TRACE_2("detaching",_xObject,_deadUnit);
|
TRACE_2("detaching",_xObject,_deadUnit);
|
||||||
detach _xObject;
|
detach _xObject;
|
||||||
//If it's a vehicle, also delete the attached
|
//If it's a vehicle, also delete the attached
|
||||||
if (!(_deadUnit isKindOf "CAManBase")) then {
|
if !(_deadUnit isKindOf "CAManBase") then {
|
||||||
_xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]);
|
_xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]);
|
||||||
[{deleteVehicle (_this select 0)}, [_xObject], 2] call CBA_fnc_waitAndExecute;
|
[{deleteVehicle (_this select 0)}, [_xObject], 2] call CBA_fnc_waitAndExecute;
|
||||||
};
|
};
|
||||||
|
@ -44,7 +44,7 @@ if (_state) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
|
if !(_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||||
[objNull, _target, false] call EFUNC(common,claim);
|
[objNull, _target, false] call EFUNC(common,claim);
|
||||||
detach _target;
|
detach _target;
|
||||||
|
@ -58,7 +58,7 @@ if (_state) then {
|
|||||||
// fix anim on mission start (should work on dedicated servers)
|
// fix anim on mission start (should work on dedicated servers)
|
||||||
[{
|
[{
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) exitWith {};
|
if !(_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {};
|
||||||
|
|
||||||
if ((vehicle _unit) == _unit) then {
|
if ((vehicle _unit) == _unit) then {
|
||||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||||
|
@ -81,7 +81,7 @@ if (_state) then {
|
|||||||
|
|
||||||
if (_unit == ACE_player) then {
|
if (_unit == ACE_player) then {
|
||||||
//only re-enable HUD if not handcuffed
|
//only re-enable HUD if not handcuffed
|
||||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
if !(_unit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,7 @@ private _allWeapons = [];
|
|||||||
private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgVehicles");
|
private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgVehicles");
|
||||||
{
|
{
|
||||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
||||||
if (!((toLowerANSI configName _x) in _allUnits)) then {
|
if !((toLowerANSI configName _x) in _allUnits) then {
|
||||||
WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x);
|
WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x);
|
||||||
_testPass = false;
|
_testPass = false;
|
||||||
};
|
};
|
||||||
@ -62,7 +62,7 @@ private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (config
|
|||||||
{
|
{
|
||||||
private _type = toLowerANSI configName _x;
|
private _type = toLowerANSI configName _x;
|
||||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
||||||
if (!((toLowerANSI configName _x) in _allWeapons)) then {
|
if !((toLowerANSI configName _x) in _allWeapons) then {
|
||||||
WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x);
|
WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x);
|
||||||
_testPass = false;
|
_testPass = false;
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi
|
|||||||
|
|
||||||
if (isNil "_defaultGlobal") exitWith {};
|
if (isNil "_defaultGlobal") exitWith {};
|
||||||
|
|
||||||
if (!(_name isEqualType "")) exitwith {
|
if !(_name isEqualType "") exitwith {
|
||||||
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
|
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ private _resultMask = [];
|
|||||||
for "_index" from 0 to 9 do {
|
for "_index" from 0 to 9 do {
|
||||||
private _set = true; //Default to true
|
private _set = true; //Default to true
|
||||||
{
|
{
|
||||||
if (!(_x select _index)) exitWith {
|
if !(_x select _index) exitWith {
|
||||||
_set = false; //Any false will make it false
|
_set = false; //Any false will make it false
|
||||||
};
|
};
|
||||||
} forEach _masks;
|
} forEach _masks;
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_trap"];
|
params ["_trap"];
|
||||||
|
|
||||||
if !(GETEGVAR(medical,enabled,false)) exitWith {};
|
if !(GETEGVAR(medical,enabled,false)) exitWith {};
|
||||||
|
|
||||||
private _radius = getNumber (configOf _trap >> "indirectHitRange");
|
private _radius = getNumber (configOf _trap >> "indirectHitRange");
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
params ["_wire", "", "_damage", "_source", ""];
|
params ["_wire", "", "_damage", "_source", ""];
|
||||||
if (_damage < 0.5) exitWith { 0 };
|
if (_damage < 0.5) exitWith { 0 };
|
||||||
|
|
||||||
if (!(isNull _source)) then {
|
if (!isNull _source) then {
|
||||||
_wire setVariable [QGVAR(lastDamager), _source];
|
_wire setVariable [QGVAR(lastDamager), _source];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ params ["_vehicle", "_turret", "_magSource", "_carryMag", "_ammoReceived", ["_re
|
|||||||
TRACE_6("reload_handleAddTurretMag",_vehicle,_turret,_magSource,_carryMag,_ammoReceived,_returnTo);
|
TRACE_6("reload_handleAddTurretMag",_vehicle,_turret,_magSource,_carryMag,_ammoReceived,_returnTo);
|
||||||
|
|
||||||
TRACE_2("",local _vehicle,_vehicle turretLocal _turret);
|
TRACE_2("",local _vehicle,_vehicle turretLocal _turret);
|
||||||
if (!(_vehicle turretLocal _turret)) exitWith {};
|
if !(_vehicle turretLocal _turret) exitWith {};
|
||||||
|
|
||||||
([_vehicle, _turret, _carryMag] call FUNC(reload_canLoadMagazine)) params ["_canAdd", "_loadedMag", "_neededAmmo", "_isBeltLinking"];
|
([_vehicle, _turret, _carryMag] call FUNC(reload_canLoadMagazine)) params ["_canAdd", "_loadedMag", "_neededAmmo", "_isBeltLinking"];
|
||||||
TRACE_4("canLoad",_canAdd,_loadedMag,_neededAmmo,_isBeltLinking);
|
TRACE_4("canLoad",_canAdd,_loadedMag,_neededAmmo,_isBeltLinking);
|
||||||
|
@ -24,7 +24,7 @@ params ["_vehicle", "_turretPath", "_carryMag", "_vehMag", "_unloadTo"];
|
|||||||
TRACE_5("removeTurretMag EH",_vehicle,_turretPath,_carryMag,_vehMag,_unloadTo);
|
TRACE_5("removeTurretMag EH",_vehicle,_turretPath,_carryMag,_vehMag,_unloadTo);
|
||||||
|
|
||||||
TRACE_3("",local _vehicle,_vehicle turretLocal _turretPath,local _unloadTo);
|
TRACE_3("",local _vehicle,_vehicle turretLocal _turretPath,local _unloadTo);
|
||||||
if (!(_vehicle turretLocal _turretPath)) exitWith {};
|
if !(_vehicle turretLocal _turretPath) exitWith {};
|
||||||
|
|
||||||
private _magsInWeapon = []; // Check how much ammo it has now:
|
private _magsInWeapon = []; // Check how much ammo it has now:
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ private _fncSumArray = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Sanity Checks
|
//Sanity Checks
|
||||||
if (!([_target] call FUNC(canBeDisarmed))) exitWith {
|
if !([_target] call FUNC(canBeDisarmed)) exitWith {
|
||||||
[_caller, _target, "Debug: Cannot disarm target"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Cannot disarm target"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
if (_doNotDropAmmo && {({_x in _listOfItemsToRemove} count (magazines _target)) > 0}) exitWith {
|
if (_doNotDropAmmo && {({_x in _listOfItemsToRemove} count (magazines _target)) > 0}) exitWith {
|
||||||
@ -74,7 +74,6 @@ if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
|
|||||||
};
|
};
|
||||||
_holder setVariable [QGVAR(holderInUse), true];
|
_holder setVariable [QGVAR(holderInUse), true];
|
||||||
|
|
||||||
|
|
||||||
//Remove Magazines
|
//Remove Magazines
|
||||||
private _targetMagazinesStart = magazinesAmmo _target;
|
private _targetMagazinesStart = magazinesAmmo _target;
|
||||||
private _holderMagazinesStart = magazinesAmmoCargo _holder;
|
private _holderMagazinesStart = magazinesAmmoCargo _holder;
|
||||||
@ -96,7 +95,7 @@ if (({((_x select 0) in _listOfItemsToRemove) && {(getNumber (configFile >> "Cfg
|
|||||||
[_caller, _target, "Debug: Didn't Remove Magazines"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Didn't Remove Magazines"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
//Verify holder has mags unit had
|
//Verify holder has mags unit had
|
||||||
if (!([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holderMagazinesEnd] call FUNC(verifyMagazinesMoved))) then {
|
if !([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holderMagazinesEnd] call FUNC(verifyMagazinesMoved)) then {
|
||||||
_holder setVariable [QGVAR(holderInUse), false];
|
_holder setVariable [QGVAR(holderInUse), false];
|
||||||
[_caller, _target, "Debug: Crate Magazines not in holder"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Crate Magazines not in holder"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
@ -238,7 +237,7 @@ if (_holderIsEmpty) then {
|
|||||||
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
//If target lost disarm status:
|
//If target lost disarm status:
|
||||||
if (!([_target] call FUNC(canBeDisarmed))) exitWith {
|
if !([_target] call FUNC(canBeDisarmed)) exitWith {
|
||||||
_holder setVariable [QGVAR(holderInUse), false];
|
_holder setVariable [QGVAR(holderInUse), false];
|
||||||
[_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish);
|
[_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish);
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ private _itemsToAdd = [];
|
|||||||
} forEach _listOfObjectsToRemove;
|
} forEach _listOfObjectsToRemove;
|
||||||
|
|
||||||
{
|
{
|
||||||
if (!(_x in _listOfObjectsToRemove)) then {
|
if !(_x in _listOfObjectsToRemove) then {
|
||||||
_listOfObjectsToRemove pushBack _x;
|
_listOfObjectsToRemove pushBack _x;
|
||||||
};
|
};
|
||||||
} forEach _itemsToAdd;
|
} forEach _itemsToAdd;
|
||||||
|
@ -16,11 +16,14 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_caller", "_target"];
|
params ["_caller", "_target"];
|
||||||
#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"
|
|
||||||
|
#define DEFAULTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"
|
||||||
|
|
||||||
//Sanity Checks
|
//Sanity Checks
|
||||||
if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");};
|
if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");};
|
||||||
if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");};
|
if !([_player, _target] call FUNC(canPlayerDisarmUnit)) exitWith {ERROR("Can't Disarm Unit");};
|
||||||
if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;};
|
if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;};
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
@ -74,8 +77,8 @@ GVAR(disarmTarget) = _target;
|
|||||||
private _rankPicture = _display displayCtrl 1203;
|
private _rankPicture = _display displayCtrl 1203;
|
||||||
|
|
||||||
//Show rank and name (just like BIS's inventory)
|
//Show rank and name (just like BIS's inventory)
|
||||||
private _icon = format [DEFUALTPATH, toLowerANSI (rank _target)];
|
private _icon = format [DEFAULTPATH, toLowerANSI (rank _target)];
|
||||||
if (_icon isEqualTo DEFUALTPATH) then {_icon = ""};
|
if (_icon isEqualTo DEFAULTPATH) then {_icon = ""};
|
||||||
_rankPicture ctrlSetText _icon;
|
_rankPicture ctrlSetText _icon;
|
||||||
_playerName ctrlSetText ([GVAR(disarmTarget), false, true] call EFUNC(common,getName));
|
_playerName ctrlSetText ([GVAR(disarmTarget), false, true] call EFUNC(common,getName));
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
["vehicle", {
|
["vehicle", {
|
||||||
params ["","_vehicle"];
|
params ["","_vehicle"];
|
||||||
TRACE_2("vehicle change",_vehicle,typeOf _vehicle);
|
TRACE_2("vehicle change",_vehicle,typeOf _vehicle);
|
||||||
if (!(_vehicle isKindOf QGVAR(staticBase))) exitWith {};
|
if !(_vehicle isKindOf QGVAR(staticBase)) exitWith {};
|
||||||
|
|
||||||
_vehicle animate ["rest_rotate", 0];
|
_vehicle animate ["rest_rotate", 0];
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
|
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
|
||||||
|
|
||||||
private _lastView = cameraView;
|
private _lastView = cameraView;
|
||||||
if (!(_lastView in ["INTERNAL", "EXTERNAL"])) then { _lastView == "INTERNAL"; };
|
if !(_lastView in ["INTERNAL", "EXTERNAL"]) then { _lastView == "INTERNAL"; };
|
||||||
|
|
||||||
GVAR(pfID) = [{
|
GVAR(pfID) = [{
|
||||||
params ["_args"];
|
params ["_args"];
|
||||||
|
@ -21,7 +21,7 @@ params ["_target", "_unit", ["_event", false]];
|
|||||||
TRACE_3("sightAttach",_target,_unit,_event);
|
TRACE_3("sightAttach",_target,_unit,_event);
|
||||||
|
|
||||||
if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
|
if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
|
||||||
if (!(_target turretLocal [0])) exitWith {};
|
if !(_target turretLocal [0]) exitWith {};
|
||||||
_target setVariable [QGVAR(sightAttached), true, true];
|
_target setVariable [QGVAR(sightAttached), true, true];
|
||||||
_target animate ["optic_hide", 0];
|
_target animate ["optic_hide", 0];
|
||||||
_target addWeapon QGVAR(superStatic);
|
_target addWeapon QGVAR(superStatic);
|
||||||
|
@ -23,7 +23,7 @@ params ["_target", "_unit", ["_event", false]];
|
|||||||
TRACE_3("sightDetach",_target,_unit,_event);
|
TRACE_3("sightDetach",_target,_unit,_event);
|
||||||
|
|
||||||
if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
|
if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
|
||||||
if (!(_target turretLocal [0])) exitWith {};
|
if !(_target turretLocal [0]) exitWith {};
|
||||||
_target setVariable [QGVAR(sightAttached), false, true];
|
_target setVariable [QGVAR(sightAttached), false, true];
|
||||||
_target animate ["optic_hide", 1];
|
_target animate ["optic_hide", 1];
|
||||||
_target removeWeapon QGVAR(superStatic);
|
_target removeWeapon QGVAR(superStatic);
|
||||||
|
@ -53,7 +53,7 @@ private _explosivesList = [];
|
|||||||
// If the detonator is not active, is a clacker and has assigned explosives, generate an interaction to make it the active detonator for use with the "trigger all" keybind
|
// If the detonator is not active, is a clacker and has assigned explosives, generate an interaction to make it the active detonator for use with the "trigger all" keybind
|
||||||
if (
|
if (
|
||||||
_detonator != GVAR(activeTrigger) &&
|
_detonator != GVAR(activeTrigger) &&
|
||||||
{_detonator != "Cellphone"} &&
|
{_detonator != "Cellphone"} &&
|
||||||
{
|
{
|
||||||
_explosivesList isNotEqualTo [] ||
|
_explosivesList isNotEqualTo [] ||
|
||||||
{_detonator == "ACE_DeadManSwitch" && {_unit getVariable [QGVAR(deadmanInvExplosive), ""] != ""}}
|
{_detonator == "ACE_DeadManSwitch" && {_unit getVariable [QGVAR(deadmanInvExplosive), ""] != ""}}
|
||||||
@ -144,7 +144,7 @@ if (_detonator != "ACE_DeadManSwitch") then {
|
|||||||
private _procressedMags = [];
|
private _procressedMags = [];
|
||||||
{
|
{
|
||||||
private _mag = _x;
|
private _mag = _x;
|
||||||
if (!(_mag in _procressedMags)) then {
|
if !(_mag in _procressedMags) then {
|
||||||
_procressedMags pushBack _x;
|
_procressedMags pushBack _x;
|
||||||
private _magConfig = configFile >> "CfgMagazines" >> _mag;
|
private _magConfig = configFile >> "CfgMagazines" >> _mag;
|
||||||
private _supportedTriggers = getArray (_magConfig >> "ACE_Triggers" >> "SupportedTriggers");
|
private _supportedTriggers = getArray (_magConfig >> "ACE_Triggers" >> "SupportedTriggers");
|
||||||
|
@ -37,7 +37,7 @@ TRACE_2("placed",_deadman,_range);
|
|||||||
//Handle deadman connected to explosive in inventory
|
//Handle deadman connected to explosive in inventory
|
||||||
private _connectedInventoryExplosive = _unit getVariable [QGVAR(deadmanInvExplosive), ""];
|
private _connectedInventoryExplosive = _unit getVariable [QGVAR(deadmanInvExplosive), ""];
|
||||||
if (_connectedInventoryExplosive != "") then {
|
if (_connectedInventoryExplosive != "") then {
|
||||||
if (!(_connectedInventoryExplosive in (magazines _unit))) exitWith {};
|
if !(_connectedInventoryExplosive in (magazines _unit)) exitWith {};
|
||||||
|
|
||||||
//Remove mag and reset variable
|
//Remove mag and reset variable
|
||||||
_unit removeMagazine _connectedInventoryExplosive;
|
_unit removeMagazine _connectedInventoryExplosive;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// Keybinds
|
// Keybinds
|
||||||
["ACE3 Vehicles", QGVAR(fastRope), localize LSTRING(Interaction_fastRope), {
|
["ACE3 Vehicles", QGVAR(fastRope), localize LSTRING(Interaction_fastRope), {
|
||||||
if ((vehicle ACE_player) == ACE_player) exitWith {false};
|
if ((vehicle ACE_player) == ACE_player) exitWith {false};
|
||||||
if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false};
|
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
if ([ACE_player, vehicle ACE_player] call FUNC(canFastRope)) then {
|
if ([ACE_player, vehicle ACE_player] call FUNC(canFastRope)) then {
|
||||||
[ACE_player, vehicle ACE_player] call FUNC(fastRope);
|
[ACE_player, vehicle ACE_player] call FUNC(fastRope);
|
||||||
true
|
true
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), {
|
["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), {
|
||||||
if ((vehicle ACE_player) == ACE_player) exitWith {false};
|
if ((vehicle ACE_player) == ACE_player) exitWith {false};
|
||||||
if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false};
|
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
if ([vehicle ACE_player] call FUNC(canCutRopes)) then {
|
if ([vehicle ACE_player] call FUNC(canCutRopes)) then {
|
||||||
[vehicle ACE_player] call FUNC(cutRopes);
|
[vehicle ACE_player] call FUNC(cutRopes);
|
||||||
true
|
true
|
||||||
@ -43,7 +43,7 @@ if (isServer) then {
|
|||||||
|
|
||||||
#ifdef DRAW_FASTROPE_INFO
|
#ifdef DRAW_FASTROPE_INFO
|
||||||
addMissionEventHandler ["Draw3D", {
|
addMissionEventHandler ["Draw3D", {
|
||||||
if (!(cursorObject isKindOf "Helicopter")) exitWith {};
|
if !(cursorObject isKindOf "Helicopter") exitWith {};
|
||||||
private _config = configOf cursorObject;
|
private _config = configOf cursorObject;
|
||||||
private _enabled = getNumber (_config >> QGVAR(enabled));
|
private _enabled = getNumber (_config >> QGVAR(enabled));
|
||||||
drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"];
|
drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"];
|
||||||
|
@ -30,7 +30,7 @@ if !(IS_UNCONSCIOUS(_unit)) then {
|
|||||||
_unit setVariable [QGVAR(indicatorIteration), _iteration];
|
_unit setVariable [QGVAR(indicatorIteration), _iteration];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!([_unit] call FUNC(isBurning)) || { !alive _unit }) then {
|
if (!([_unit] call FUNC(isBurning)) || {!alive _unit}) then {
|
||||||
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
||||||
_unit setVariable [QGVAR(burnUIPFH), -1];
|
_unit setVariable [QGVAR(burnUIPFH), -1];
|
||||||
};
|
};
|
||||||
|
@ -48,10 +48,10 @@ if IS_NUMBER(_preset) then { // Legacy support
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _budget = _logic getVariable ["Budget", -1];
|
private _budget = _logic getVariable ["Budget", -1];
|
||||||
if (!(_budget isEqualType 0)) then {_budget = -1};
|
if !(_budget isEqualType 0) then {_budget = -1};
|
||||||
|
|
||||||
private _addToolItem = _logic getVariable ["AddToolItem", false];
|
private _addToolItem = _logic getVariable ["AddToolItem", false];
|
||||||
if (!(_addToolItem isEqualType false)) then {_addToolItem = false};
|
if !(_addToolItem isEqualType false) then {_addToolItem = false};
|
||||||
|
|
||||||
|
|
||||||
private _objects = [_preset] call FUNC(getPlaceableSet);
|
private _objects = [_preset] call FUNC(getPlaceableSet);
|
||||||
|
@ -65,7 +65,7 @@ if (_zIndex < 5) then {
|
|||||||
while {count _nlos != count _excludes && {_c < (count _nlos)}} do {
|
while {count _nlos != count _excludes && {_c < (count _nlos)}} do {
|
||||||
scopeName "mainSearch";
|
scopeName "mainSearch";
|
||||||
{
|
{
|
||||||
if (!(_forEachIndex in _excludes)) then {
|
if !(_forEachIndex in _excludes) then {
|
||||||
private _index = _buckets pushBack [_x, [_x]];
|
private _index = _buckets pushBack [_x, [_x]];
|
||||||
_excludes pushBack _forEachIndex;
|
_excludes pushBack _forEachIndex;
|
||||||
_bucketPos = _x;
|
_bucketPos = _x;
|
||||||
@ -74,7 +74,7 @@ if (_zIndex < 5) then {
|
|||||||
};
|
};
|
||||||
} forEach _nlos;
|
} forEach _nlos;
|
||||||
{
|
{
|
||||||
if (!(_forEachIndex in _excludes)) then {
|
if !(_forEachIndex in _excludes) then {
|
||||||
_testPos = _x;
|
_testPos = _x;
|
||||||
if (_testPos vectorDistanceSqr _bucketPos <= 30) then {
|
if (_testPos vectorDistanceSqr _bucketPos <= 30) then {
|
||||||
_bucketList pushBack _x;
|
_bucketList pushBack _x;
|
||||||
|
@ -127,7 +127,7 @@ if (_objects isNotEqualTo []) then {
|
|||||||
if (_currentCount < 10) then {
|
if (_currentCount < 10) then {
|
||||||
private _count = ceil (random (sqrt (_m / 1000)));
|
private _count = ceil (random (sqrt (_m / 1000)));
|
||||||
private _vecVar = FRAG_VEC_VAR;
|
private _vecVar = FRAG_VEC_VAR;
|
||||||
if (!(_target isKindOf "Man")) then {
|
if !(_target isKindOf "Man") then {
|
||||||
ADD(_vecVar,(sqrt _cubic) / 2000);
|
ADD(_vecVar,(sqrt _cubic) / 2000);
|
||||||
if ((crew _target) isEqualTo [] && {_count > 0}) then {
|
if ((crew _target) isEqualTo [] && {_count > 0}) then {
|
||||||
_count = 0 max (_count / 2);
|
_count = 0 max (_count / 2);
|
||||||
|
@ -34,7 +34,7 @@ while {_objectCount > 0 && {_iter < (GVAR(maxTrackPerFrame) min _objectCount)}}
|
|||||||
if (!isNil "_object") then {
|
if (!isNil "_object") then {
|
||||||
private _args = GVAR(arguments) select GVAR(lastIterationIndex);
|
private _args = GVAR(arguments) select GVAR(lastIterationIndex);
|
||||||
|
|
||||||
if (!(_args call FUNC(pfhRound))) then {
|
if !(_args call FUNC(pfhRound)) then {
|
||||||
_gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
|
_gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,7 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
|||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {false};
|
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Don't change mode or show hint if advanced throwing is active
|
// Don't change mode or show hint if advanced throwing is active
|
||||||
if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false};
|
if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false};
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ if ((getNumber (configOf _vehicle >> QGVAR(addLaserDesignator))) == 1) then {
|
|||||||
params ["_vehicle", "_turretPath"];
|
params ["_vehicle", "_turretPath"];
|
||||||
TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath);
|
TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath);
|
||||||
if (!alive _vehicle) exitWith {};
|
if (!alive _vehicle) exitWith {};
|
||||||
if (!(_vehicle turretLocal _turretPath)) then {WARNING("Turret not local");};
|
if !(_vehicle turretLocal _turretPath) then {WARNING("Turret not local");};
|
||||||
private _hasLaser = false;
|
private _hasLaser = false;
|
||||||
{
|
{
|
||||||
// Most addons just use "Laserdesignator_mounted", but this should cover custom ones
|
// Most addons just use "Laserdesignator_mounted", but this should cover custom ones
|
||||||
|
@ -116,7 +116,7 @@ GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (
|
|||||||
//Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice)
|
//Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice)
|
||||||
if (GVAR(openedMenuType) == 0) then {
|
if (GVAR(openedMenuType) == 0) then {
|
||||||
if (isNull curatorCamera) then {
|
if (isNull curatorCamera) then {
|
||||||
if (!(isNull (ACE_controlledUAV select 0))) then {
|
if !(isNull (ACE_controlledUAV select 0)) then {
|
||||||
GVAR(menuDepthPath) = [["ACE_SelfActions", (ACE_controlledUAV select 0)]];
|
GVAR(menuDepthPath) = [["ACE_SelfActions", (ACE_controlledUAV select 0)]];
|
||||||
GVAR(expanded) = true;
|
GVAR(expanded) = true;
|
||||||
GVAR(expandedTime) = diag_tickTime;
|
GVAR(expandedTime) = diag_tickTime;
|
||||||
|
@ -123,7 +123,7 @@ GVAR(collectedActionPoints) resize 0;
|
|||||||
// Render nearby actions, unit self actions or vehicle self actions as appropiate
|
// Render nearby actions, unit self actions or vehicle self actions as appropiate
|
||||||
if (GVAR(openedMenuType) == 0) then {
|
if (GVAR(openedMenuType) == 0) then {
|
||||||
if (isNull curatorCamera) then {
|
if (isNull curatorCamera) then {
|
||||||
if (!(isNull (ACE_controlledUAV select 0))) then {
|
if !(isNull (ACE_controlledUAV select 0)) then {
|
||||||
// Render UAV self actions when in control of UAV AI
|
// Render UAV self actions when in control of UAV AI
|
||||||
(ACE_controlledUAV select 0) call _fnc_renderSelfActions;
|
(ACE_controlledUAV select 0) call _fnc_renderSelfActions;
|
||||||
} else {
|
} else {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
if ((getText (missionconfigfile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith {
|
if ((getText (missionconfigfile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith {
|
||||||
TRACE_1("no mission debriefing config",_this);
|
TRACE_1("no mission debriefing config",_this);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(GETEGVAR(medical,enabled,false)) exitWith {
|
if !(GETEGVAR(medical,enabled,false)) exitWith {
|
||||||
WARNING("No ACE-Medical");
|
WARNING("No ACE-Medical");
|
||||||
XGVAR(outputText) = "No ACE-Medical";
|
XGVAR(outputText) = "No ACE-Medical";
|
||||||
@ -64,7 +65,7 @@ GVAR(killCount) = 0;
|
|||||||
private _killInfo = [];
|
private _killInfo = [];
|
||||||
|
|
||||||
if (!isNull _killer) then {
|
if (!isNull _killer) then {
|
||||||
if (!(_killer isKindof "CAManBase")) then { // If killer is a vehicle log the vehicle type
|
if !(_killer isKindof "CAManBase") then { // If killer is a vehicle log the vehicle type
|
||||||
_killInfo pushBack format [LLSTRING(Vehicle), getText ((configOf _killer) >> "displayName")];
|
_killInfo pushBack format [LLSTRING(Vehicle), getText ((configOf _killer) >> "displayName")];
|
||||||
};
|
};
|
||||||
if (isNull _instigator) then {
|
if (isNull _instigator) then {
|
||||||
@ -77,7 +78,7 @@ GVAR(killCount) = 0;
|
|||||||
TRACE_2("",_unitIsPlayer,_instigatorIsPlayer);
|
TRACE_2("",_unitIsPlayer,_instigatorIsPlayer);
|
||||||
|
|
||||||
// Don't do anything if neither are players
|
// Don't do anything if neither are players
|
||||||
if (!(_unitIsPlayer || _instigatorIsPlayer)) exitWith {};
|
if !(_unitIsPlayer || _instigatorIsPlayer) exitWith {};
|
||||||
|
|
||||||
// Log firendly fire
|
// Log firendly fire
|
||||||
private _fnc_getSideFromConfig = {
|
private _fnc_getSideFromConfig = {
|
||||||
@ -89,7 +90,7 @@ GVAR(killCount) = 0;
|
|||||||
default {civilian};
|
default {civilian};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if ((!isNull _instigator) && {_unit != _instigator} && {_instigator isKindOf "CAManBase"}) then {
|
if (!isNull _instigator && {_unit != _instigator} && {_instigator isKindOf "CAManBase"}) then {
|
||||||
// Because of unconscious group switching/captives it's probably best to just use unit's config side
|
// Because of unconscious group switching/captives it's probably best to just use unit's config side
|
||||||
private _unitSide = [_unit] call _fnc_getSideFromConfig;
|
private _unitSide = [_unit] call _fnc_getSideFromConfig;
|
||||||
private _killerSide = [_instigator] call _fnc_getSideFromConfig;
|
private _killerSide = [_instigator] call _fnc_getSideFromConfig;
|
||||||
|
@ -115,7 +115,7 @@ if (_spots isNotEqualTo []) then {
|
|||||||
while { count(_spots) != count(_excludes) && _c < (count _spots) } do {
|
while { count(_spots) != count(_excludes) && _c < (count _spots) } do {
|
||||||
scopeName "mainSearch";
|
scopeName "mainSearch";
|
||||||
{
|
{
|
||||||
if (!(_forEachIndex in _excludes)) then {
|
if !(_forEachIndex in _excludes) then {
|
||||||
private _index = _buckets pushBack [_x, [_x]];
|
private _index = _buckets pushBack [_x, [_x]];
|
||||||
_excludes pushBack _forEachIndex;
|
_excludes pushBack _forEachIndex;
|
||||||
_bucketPos = _x select 0;
|
_bucketPos = _x select 0;
|
||||||
@ -124,7 +124,7 @@ if (_spots isNotEqualTo []) then {
|
|||||||
};
|
};
|
||||||
} forEach _spots;
|
} forEach _spots;
|
||||||
{
|
{
|
||||||
if (!(_forEachIndex in _excludes)) then {
|
if !(_forEachIndex in _excludes) then {
|
||||||
private _testPos = (_x select 0);
|
private _testPos = (_x select 0);
|
||||||
if ((_testPos vectorDistanceSqr _bucketPos) <= 100) then {
|
if ((_testPos vectorDistanceSqr _bucketPos) <= 100) then {
|
||||||
_bucketList pushBack _x;
|
_bucketList pushBack _x;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
params ["_caller", "_target"];
|
params ["_caller", "_target"];
|
||||||
|
|
||||||
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
|
if !(_this call FUNC(canRefuelUAV)) exitWith {};
|
||||||
|
|
||||||
private _onFinish = {
|
private _onFinish = {
|
||||||
(_this select 0) params ["_caller", "_target"];
|
(_this select 0) params ["_caller", "_target"];
|
||||||
|
@ -25,7 +25,7 @@ _args params ["_magazineClassname", "_lastAmmoCount"];
|
|||||||
private _fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count");
|
private _fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count");
|
||||||
|
|
||||||
// Don't show anything if player can't interact
|
// Don't show anything if player can't interact
|
||||||
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting", "isNotSwimming"]] call EFUNC(common,canInteractWith))) exitWith {};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSitting", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
|
|
||||||
// Count mags
|
// Count mags
|
||||||
private _fullMags = 0;
|
private _fullMags = 0;
|
||||||
|
@ -25,7 +25,7 @@ TRACE_3("params",_group,_leadColor,_unitColor);
|
|||||||
if (_group isEqualType grpNull) then {_group = groupID _group};
|
if (_group isEqualType grpNull) then {_group = groupID _group};
|
||||||
|
|
||||||
if (_group == "") exitWith {ERROR("Group ID is blank, which is not valid.")};
|
if (_group == "") exitWith {ERROR("Group ID is blank, which is not valid.")};
|
||||||
if (!([_leadColor] call FUNC(isValidColorArray))) exitWith {ERROR("leadColor is not a valid color array.")};
|
if !([_leadColor] call FUNC(isValidColorArray)) exitWith {ERROR("leadColor is not a valid color array.")};
|
||||||
if (!([_unitColor] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")};
|
if !([_unitColor] call FUNC(isValidColorArray)) exitWith {ERROR("color is not a valid color array.")};
|
||||||
|
|
||||||
GVAR(GroupColorCfgMappingNew) set [toLower _group, [_leadColor, _unitColor]];
|
GVAR(GroupColorCfgMappingNew) set [toLower _group, [_leadColor, _unitColor]];
|
||||||
|
@ -20,7 +20,7 @@ scopeName "main";
|
|||||||
params ["_colorArray"];
|
params ["_colorArray"];
|
||||||
|
|
||||||
if (isNil "_colorArray") exitWith {false};
|
if (isNil "_colorArray") exitWith {false};
|
||||||
if (!(_colorArray isEqualType [])) exitWith {false};
|
if !(_colorArray isEqualType []) exitWith {false};
|
||||||
if (count _colorArray != 4) exitWith {false};
|
if (count _colorArray != 4) exitWith {false};
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -24,9 +24,10 @@ if (!_activated) exitWith {};
|
|||||||
|
|
||||||
// Transcode string setting into usable array. Example: "1,1,1,1" -> [1, 1, 1, 1]
|
// Transcode string setting into usable array. Example: "1,1,1,1" -> [1, 1, 1, 1]
|
||||||
private _leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]");
|
private _leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]");
|
||||||
if (!([_leadColor] call FUNC(isValidColorArray))) exitWith {ERROR("leadColor is not a valid color array.")};
|
if !([_leadColor] call FUNC(isValidColorArray)) exitWith {ERROR("leadColor is not a valid color array.")};
|
||||||
|
|
||||||
private _color = call compile ("[" + (_logic getVariable ["color", ""]) + "]");
|
private _color = call compile ("[" + (_logic getVariable ["color", ""]) + "]");
|
||||||
if (!([_color] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")};
|
if !([_color] call FUNC(isValidColorArray)) exitWith {ERROR("color is not a valid color array.")};
|
||||||
|
|
||||||
// Add all synchronized groups and reference custom configuration for them
|
// Add all synchronized groups and reference custom configuration for them
|
||||||
{
|
{
|
||||||
|
@ -29,14 +29,14 @@ if (!_activated) exitWith {};
|
|||||||
private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""];
|
private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""];
|
||||||
if (_defaultLeadColor != "") then {
|
if (_defaultLeadColor != "") then {
|
||||||
_defaultLeadColor = call compile ("[" + _defaultLeadColor + "]");
|
_defaultLeadColor = call compile ("[" + _defaultLeadColor + "]");
|
||||||
if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")};
|
if !([_defaultLeadColor] call FUNC(isValidColorArray)) exitWith {ERROR("defaultLeadColor is not a valid color array.")};
|
||||||
["CBA_settings_setSettingMission", [QGVAR(defaultLeadColor), _defaultLeadColor, true]] call CBA_fnc_localEvent;
|
["CBA_settings_setSettingMission", [QGVAR(defaultLeadColor), _defaultLeadColor, true]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _defaultColor = _logic getVariable ["defaultColor", ""];
|
private _defaultColor = _logic getVariable ["defaultColor", ""];
|
||||||
if (_defaultColor != "") then {
|
if (_defaultColor != "") then {
|
||||||
_defaultColor = call compile ("[" + _defaultColor + "]");
|
_defaultColor = call compile ("[" + _defaultColor + "]");
|
||||||
if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")};
|
if !([_defaultColor] call FUNC(isValidColorArray)) exitWith {ERROR("defaultColor is not a valid color array.")};
|
||||||
["CBA_settings_setSettingMission", [QGVAR(defaultColor), _defaultColor, true]] call CBA_fnc_localEvent;
|
["CBA_settings_setSettingMission", [QGVAR(defaultColor), _defaultColor, true]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ private _index = 1;
|
|||||||
private _keepCheckingDigits = true;
|
private _keepCheckingDigits = true;
|
||||||
private _validTimestamp = true;
|
private _validTimestamp = true;
|
||||||
while {_keepCheckingDigits} do {
|
while {_keepCheckingDigits} do {
|
||||||
if (!(_string select [_index, 1] in DIGITS)) exitWith { _validTimestamp = false; };
|
if !(_string select [_index, 1] in DIGITS) exitWith { _validTimestamp = false; };
|
||||||
if (!(_string select [_index+1, 1] in DIGITS)) exitWith { _validTimestamp = false; };
|
if !(_string select [_index+1, 1] in DIGITS) exitWith { _validTimestamp = false; };
|
||||||
switch (_string select [_index+2, 1]) do {
|
switch (_string select [_index+2, 1]) do {
|
||||||
case (":"): {
|
case (":"): {
|
||||||
_index = _index + 3;
|
_index = _index + 3;
|
||||||
@ -54,7 +54,7 @@ while {_keepCheckingDigits} do {
|
|||||||
};
|
};
|
||||||
case (" "): {
|
case (" "): {
|
||||||
_keepCheckingDigits = false;
|
_keepCheckingDigits = false;
|
||||||
if (!(_string select [_index+3, 3] in ["am]", "pm]"])) then {_validTimestamp = false; };
|
if !(_string select [_index+3, 3] in ["am]", "pm]"]) then {_validTimestamp = false; };
|
||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
_keepCheckingDigits = false;
|
_keepCheckingDigits = false;
|
||||||
|
@ -10,10 +10,10 @@ GVAR(dev_watchVariableRunning) = true;
|
|||||||
if (!isNull _display) exitWith {"Paused"};
|
if (!isNull _display) exitWith {"Paused"};
|
||||||
|
|
||||||
private _unit = cursorTarget;
|
private _unit = cursorTarget;
|
||||||
if (!(_unit isKindOf "CAManBase")) then {_unit = cursorObject};
|
if !(_unit isKindOf "CAManBase") then {_unit = cursorObject};
|
||||||
if (!(_unit isKindOf "CAManBase")) then {_unit = ACE_player};
|
if !(_unit isKindOf "CAManBase") then {_unit = ACE_player};
|
||||||
if ((_unit != ACE_player) && {IS_UNCONSCIOUS(ACE_player)}) then {_unit = ACE_player};
|
if ((_unit != ACE_player) && {IS_UNCONSCIOUS(ACE_player)}) then {_unit = ACE_player};
|
||||||
if (!(_unit isKindOf "CAManBase")) exitWith {"No Unit?"};
|
if !(_unit isKindOf "CAManBase") exitWith {"No Unit?"};
|
||||||
|
|
||||||
private _return = [];
|
private _return = [];
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ GVAR(selfInteractionActions) = [];
|
|||||||
|
|
||||||
[QEGVAR(interact_menu,newControllableObject), {
|
[QEGVAR(interact_menu,newControllableObject), {
|
||||||
params ["_type"]; // string of the object's classname
|
params ["_type"]; // string of the object's classname
|
||||||
if (!(_type isKindOf "CAManBase")) exitWith {};
|
if !(_type isKindOf "CAManBase") exitWith {};
|
||||||
{
|
{
|
||||||
_x set [0, _type];
|
_x set [0, _type];
|
||||||
_x call EFUNC(interact_menu,addActionToClass);
|
_x call EFUNC(interact_menu,addActionToClass);
|
||||||
|
@ -21,7 +21,7 @@ params ["_medic", "_patient", "_bodyPart"];
|
|||||||
|
|
||||||
private _heartRate = 0;
|
private _heartRate = 0;
|
||||||
|
|
||||||
if (!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))) then {
|
if !([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo)) then {
|
||||||
_heartRate = switch (true) do {
|
_heartRate = switch (true) do {
|
||||||
case (alive _patient): {
|
case (alive _patient): {
|
||||||
GET_HEART_RATE(_patient)
|
GET_HEART_RATE(_patient)
|
||||||
|
@ -77,12 +77,12 @@ _patient setVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0], true];
|
|||||||
|
|
||||||
// wakeup needs to be done after achieving stable vitals, but before manually reseting unconc var
|
// wakeup needs to be done after achieving stable vitals, but before manually reseting unconc var
|
||||||
if IS_UNCONSCIOUS(_patient) then {
|
if IS_UNCONSCIOUS(_patient) then {
|
||||||
if (!([_patient] call EFUNC(medical_status,hasStableVitals))) then { ERROR_2("fullheal [unit %1][state %2] did not restore stable vitals",_patient,_state); };
|
if !([_patient] call EFUNC(medical_status,hasStableVitals)) then {ERROR_2("fullheal [unit %1][state %2] did not restore stable vitals",_patient,_state);};
|
||||||
TRACE_1("Waking up",_patient);
|
TRACE_1("Waking up",_patient);
|
||||||
[QEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent;
|
[QEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent;
|
||||||
_state = GET_SM_STATE(_patient);
|
_state = GET_SM_STATE(_patient);
|
||||||
TRACE_1("after WakeUp",_state);
|
TRACE_1("after WakeUp",_state);
|
||||||
if IS_UNCONSCIOUS(_patient) then { ERROR_2("fullheal [unit %1][state %2] failed to wake up patient",_patient,_state); };
|
if IS_UNCONSCIOUS(_patient) then {ERROR_2("fullheal [unit %1][state %2] failed to wake up patient",_patient,_state);};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Generic medical admin
|
// Generic medical admin
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
TRACE_1("cycle fire mode",_this);
|
TRACE_1("cycle fire mode",_this);
|
||||||
|
|
||||||
if (!alive ACE_player) exitWith {};
|
if (!alive ACE_player) exitWith {};
|
||||||
if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
|
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
|
|
||||||
|
|
||||||
private _currentShooter = objNull;
|
private _currentShooter = objNull;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
params ["_shooter","_weapon","","_mode","_ammo","","_projectile"];
|
params ["_shooter","_weapon","","_mode","_ammo","","_projectile"];
|
||||||
|
|
||||||
// Bail on not missile
|
// Bail on not missile
|
||||||
if (!(_ammo isKindOf "MissileBase")) exitWith {};
|
if !(_ammo isKindOf "MissileBase") exitWith {};
|
||||||
|
|
||||||
// Bail if guidance is disabled for this ammo
|
// Bail if guidance is disabled for this ammo
|
||||||
if ((getNumber (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "enabled")) != 1) exitWith {};
|
if ((getNumber (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "enabled")) != 1) exitWith {};
|
||||||
|
@ -28,7 +28,7 @@ if (_vehicle distance ACE_player > 8000) exitWith {};
|
|||||||
|
|
||||||
//AI will have no clue how to use:
|
//AI will have no clue how to use:
|
||||||
private _shooterMan = gunner _vehicle;
|
private _shooterMan = gunner _vehicle;
|
||||||
if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {};
|
if !([_shooterMan] call EFUNC(common,isPlayer)) exitWith {};
|
||||||
|
|
||||||
//Calculate air density:
|
//Calculate air density:
|
||||||
private _altitude = (getPosASL _vehicle) select 2;
|
private _altitude = (getPosASL _vehicle) select 2;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params ["_player", "_newVehicle"];
|
params ["_player", "_newVehicle"];
|
||||||
|
|
||||||
if (isNull _newVehicle) exitWith {};
|
if (isNull _newVehicle) exitWith {};
|
||||||
if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
|
if !(_newVehicle isKindOf "Mortar_01_base_F") exitWith {};
|
||||||
|
|
||||||
private _tubeWeaponName = (weapons _newVehicle) select 0;
|
private _tubeWeaponName = (weapons _newVehicle) select 0;
|
||||||
private _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
|
private _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
|
||||||
|
@ -61,7 +61,7 @@ if (!isNil QGVAR(serverPriorFog)) then {[] call FUNC(nonDedicatedFix);}; // If v
|
|||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
if (!(missionNamespace getVariable [QGVAR(allowBrightnessControl), true])) exitWith {false}; // just a mission setVar (not ace_setting)
|
if !(missionNamespace getVariable [QGVAR(allowBrightnessControl), true]) exitWith {false}; // just a mission setVar (not ace_setting)
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
||||||
@ -73,7 +73,7 @@ if (!isNil QGVAR(serverPriorFog)) then {[] call FUNC(nonDedicatedFix);}; // If v
|
|||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
if (!(missionNamespace getVariable [QGVAR(allowBrightnessControl), true])) exitWith {false}; // just a mission setVar (not ace_setting)
|
if !(missionNamespace getVariable [QGVAR(allowBrightnessControl), true]) exitWith {false}; // just a mission setVar (not ace_setting)
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
TRACE_1("lock key down",GVAR(isLockKeyDown));
|
TRACE_1("lock key down",GVAR(isLockKeyDown));
|
||||||
|
|
||||||
if (!alive ACE_player) exitWith {};
|
if (!alive ACE_player) exitWith {};
|
||||||
if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
|
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
if (!(ACE_player call CBA_fnc_canUseWeapon)) exitWith {};
|
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {};
|
||||||
if ((getNumber (configFile >> "CfgWeapons" >> (currentWeapon ACE_player) >> QGVAR(enabled))) == 0) exitWith {};
|
if ((getNumber (configFile >> "CfgWeapons" >> (currentWeapon ACE_player) >> QGVAR(enabled))) == 0) exitWith {};
|
||||||
if (GVAR(isLockKeyDown)) exitWith {ERROR("already running?");};
|
if (GVAR(isLockKeyDown)) exitWith {ERROR("already running?");};
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
// Test binarization one time at startup - ref https://github.com/acemod/ACE3/pull/8093
|
// Test binarization one time at startup - ref https://github.com/acemod/ACE3/pull/8093
|
||||||
private _test = getText (configFile >> "Cfg3DEN" >> "Object" >> "AttributeCategories" >> "ace_attributes" >> "Attributes" >> "ace_rearm_rearmCargo" >> "defaultValue");
|
private _test = getText (configFile >> "Cfg3DEN" >> "Object" >> "AttributeCategories" >> "ace_attributes" >> "Attributes" >> "ace_rearm_rearmCargo" >> "defaultValue");
|
||||||
if (!("else {" in _test)) then {
|
if !("else {" in _test) then {
|
||||||
ERROR("3den attribute has ERROR [check binarization]");
|
ERROR("3den attribute has ERROR [check binarization]");
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ addMissionEventHandler ["Draw3D", {
|
|||||||
_info = _info + "[Wheel]";
|
_info = _info + "[Wheel]";
|
||||||
_color = [0,1,0,1];
|
_color = [0,1,0,1];
|
||||||
};
|
};
|
||||||
if (!((getText (_config>> "HitPoints" >> _hitpoint >> "depends")) in ["", "0"])) then {
|
if !((getText (_config>> "HitPoints" >> _hitpoint >> "depends")) in ["", "0"]) then {
|
||||||
_info = _info + format ["[depends: %1]", getText (_config>> "HitPoints" >> _hitpoint >> "depends")];
|
_info = _info + format ["[depends: %1]", getText (_config>> "HitPoints" >> _hitpoint >> "depends")];
|
||||||
_color = [0,0,1,1]
|
_color = [0,0,1,1]
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,7 @@ if (!_return) exitWith {false};
|
|||||||
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
||||||
|
|
||||||
private _repairLocations = getArray (_config >> "repairLocations");
|
private _repairLocations = getArray (_config >> "repairLocations");
|
||||||
if (!("All" in _repairLocations)) then {
|
if !("All" in _repairLocations) then {
|
||||||
private _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))};
|
private _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))};
|
||||||
private _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))};
|
private _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))};
|
||||||
{
|
{
|
||||||
|
@ -117,7 +117,7 @@ private _processedSelections = [];
|
|||||||
continue
|
continue
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(getText (_vehCfg >> "HitPoints" >> _hitpoint >> "depends") in ["", "0"])) then { // skip depends hitpoints, should be normalized by engine
|
if !(getText (_vehCfg >> "HitPoints" >> _hitpoint >> "depends") in ["", "0"]) then { // skip depends hitpoints, should be normalized by engine
|
||||||
TRACE_3("Skipping depends hitpoint",_hitpoint,_forEachIndex,_selection);
|
TRACE_3("Skipping depends hitpoint",_hitpoint,_forEachIndex,_selection);
|
||||||
/*#ifdef DEBUG_MODE_FULL
|
/*#ifdef DEBUG_MODE_FULL
|
||||||
systemChat format ["Skipping depends hitpoint, hitpoint %1, index %2, selection %3", _hitpoint, _forEachIndex, _selection];
|
systemChat format ["Skipping depends hitpoint, hitpoint %1, index %2, selection %3", _hitpoint, _forEachIndex, _selection];
|
||||||
|
@ -33,7 +33,7 @@ private _dependentHitPointScripts = [];
|
|||||||
{
|
{
|
||||||
if ((_x != "") && {isClass (_config >> _x)} && {!(_x in _realHitPoints)}) then {
|
if ((_x != "") && {isClass (_config >> _x)} && {!(_x in _realHitPoints)}) then {
|
||||||
_realHitPoints pushBack _x;
|
_realHitPoints pushBack _x;
|
||||||
if (!((getText (_config >> _x >> "depends")) in ["", "0"])) then {
|
if !((getText (_config >> _x >> "depends")) in ["", "0"]) then {
|
||||||
_dependentHitPoints pushBack _x;
|
_dependentHitPoints pushBack _x;
|
||||||
_dependentHitPointScripts pushBack compile getText (_config >> _x >> "depends");
|
_dependentHitPointScripts pushBack compile getText (_config >> _x >> "depends");
|
||||||
};
|
};
|
||||||
|
@ -70,7 +70,7 @@ if (!_return) exitWith {false};
|
|||||||
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
||||||
|
|
||||||
private _repairLocations = getArray (_config >> "repairLocations");
|
private _repairLocations = getArray (_config >> "repairLocations");
|
||||||
if (!("All" in _repairLocations)) then {
|
if !("All" in _repairLocations) then {
|
||||||
private _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))};
|
private _repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))};
|
||||||
private _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))};
|
private _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))};
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ if (isNil _callback) then {
|
|||||||
} else {
|
} else {
|
||||||
_callback = missionNamespace getVariable _callback;
|
_callback = missionNamespace getVariable _callback;
|
||||||
};
|
};
|
||||||
if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
|
if !(_callback isEqualType {}) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
|
||||||
|
|
||||||
_args call _callback;
|
_args call _callback;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ if (isNil _callback) then {
|
|||||||
} else {
|
} else {
|
||||||
_callback = missionNamespace getVariable _callback;
|
_callback = missionNamespace getVariable _callback;
|
||||||
};
|
};
|
||||||
if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
|
if !(_callback isEqualType {}) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
|
||||||
|
|
||||||
_args call _callback;
|
_args call _callback;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ if (!GVAR(enabled)) exitWith {false};
|
|||||||
params ["_unit", "_turretAndDirection", "_majorStep"];
|
params ["_unit", "_turretAndDirection", "_majorStep"];
|
||||||
TRACE_3("adjustScope",_unit,_turretAndDirection,_majorStep);
|
TRACE_3("adjustScope",_unit,_turretAndDirection,_majorStep);
|
||||||
|
|
||||||
if (!(_unit isKindOf "Man")) exitWith {false};
|
if !(_unit isKindOf "Man") exitWith {false};
|
||||||
if (currentMuzzle _unit != currentWeapon _unit) exitWith {false};
|
if (currentMuzzle _unit != currentWeapon _unit) exitWith {false};
|
||||||
|
|
||||||
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
|
@ -20,7 +20,7 @@ params ["_unit"];
|
|||||||
if (cameraView == "GUNNER") exitWith {false};
|
if (cameraView == "GUNNER") exitWith {false};
|
||||||
if (!isNull objectParent _unit) exitWith {false};
|
if (!isNull objectParent _unit) exitWith {false};
|
||||||
if (GVAR(simplifiedZeroing)) exitWith {false};
|
if (GVAR(simplifiedZeroing)) exitWith {false};
|
||||||
if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false};
|
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false};
|
||||||
|
|
||||||
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {false};
|
if (_weaponIndex < 0) exitWith {false};
|
||||||
|
@ -19,7 +19,7 @@ params ["_unit"];
|
|||||||
|
|
||||||
if (cameraView == "GUNNER") exitWith {false};
|
if (cameraView == "GUNNER") exitWith {false};
|
||||||
if (!isNull objectParent _unit) exitWith {false};
|
if (!isNull objectParent _unit) exitWith {false};
|
||||||
if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false};
|
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false};
|
||||||
|
|
||||||
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {false};
|
if (_weaponIndex < 0) exitWith {false};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
||||||
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
|
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
|
||||||
|
|
||||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
if !(_ammo isKindOf "BulletBase") exitWith {};
|
||||||
|
|
||||||
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {};
|
if (_weaponIndex < 0) exitWith {};
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
if (!GVAR(enabled)) exitWith { currentZeroing _unit };
|
if (!GVAR(enabled)) exitWith {currentZeroing _unit};
|
||||||
|
|
||||||
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith { currentZeroing _unit };
|
if (_weaponIndex < 0) exitWith { currentZeroing _unit };
|
||||||
if (GVAR(simplifiedZeroing)) exitWith {
|
if (GVAR(simplifiedZeroing)) exitWith {
|
||||||
if (!(GVAR(canAdjustElevation) select _weaponIndex)) exitWith { currentZeroing _unit };
|
if !(GVAR(canAdjustElevation) select _weaponIndex) exitWith {currentZeroing _unit};
|
||||||
private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]];
|
private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]];
|
||||||
((_adjustment select _weaponIndex) select 0)
|
((_adjustment select _weaponIndex) select 0)
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@ params ["_unit"];
|
|||||||
|
|
||||||
private _optics = ["", "", ""];
|
private _optics = ["", "", ""];
|
||||||
|
|
||||||
if (!(_unit isKindOf "CAManBase")) exitWith {_optics};
|
if !(_unit isKindOf "CAManBase") exitWith {_optics};
|
||||||
|
|
||||||
{
|
{
|
||||||
if (count _x >= 2) then {
|
if (count _x >= 2) then {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -26,7 +26,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -38,7 +38,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -50,7 +50,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -62,7 +62,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
@ -86,7 +86,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
[ACE_player] call FUNC(inventoryCheck);
|
[ACE_player] call FUNC(inventoryCheck);
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ if (_seatsClaimed isEqualTo []) then {
|
|||||||
_seat setVariable [QGVAR(seatsClaimed), _seatsClaimed, true];
|
_seat setVariable [QGVAR(seatsClaimed), _seatsClaimed, true];
|
||||||
|
|
||||||
// Also prevent dragging/carrying
|
// Also prevent dragging/carrying
|
||||||
if (!([_seat] call EFUNC(common,owned))) then {
|
if !([_seat] call EFUNC(common,owned)) then {
|
||||||
[_player, _seat] call EFUNC(common,claim);
|
[_player, _seat] call EFUNC(common,claim);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
// don't switch to original player units
|
// don't switch to original player units
|
||||||
if (!([_unit] call FUNC(isValidAi))) exitWith {};
|
if !([_unit] call FUNC(isValidAi)) exitWith {};
|
||||||
|
|
||||||
// exit var
|
// exit var
|
||||||
private _leave = false;
|
private _leave = false;
|
||||||
|
@ -29,10 +29,10 @@ params [
|
|||||||
["_dimension", 512, [0]]
|
["_dimension", 512, [0]]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (_textColor select [0, 1] == "#") then { _textColor = _textColor select [1]; };
|
if (_textColor select [0, 1] == "#") then {_textColor = _textColor select [1];};
|
||||||
if (_backgroundColor select [0, 1] == "#") then { _backgroundColor = _backgroundColor select [1]; };
|
if (_backgroundColor select [0, 1] == "#") then {_backgroundColor = _backgroundColor select [1];};
|
||||||
if (!((count _textColor) in [6,8])) exitWith { ERROR_1("bad Tcolor %1",_textColor); "" };
|
if !((count _textColor) in [6,8]) exitWith {ERROR_1("bad Tcolor %1",_textColor); ""};
|
||||||
if (!((count _backgroundColor) in [6,8])) exitWith { ERROR_1("bad Bcolor %1",_textColor); "" };
|
if !((count _backgroundColor) in [6,8]) exitWith {ERROR_1("bad Bcolor %1",_textColor); ""};
|
||||||
|
|
||||||
if (_autoMultiline) then {
|
if (_autoMultiline) then {
|
||||||
private _magicWidth = 0.75;
|
private _magicWidth = 0.75;
|
||||||
|
@ -29,7 +29,7 @@ TRACE_2("",_vehicle,_text);
|
|||||||
if (!isServer) exitWith {};
|
if (!isServer) exitWith {};
|
||||||
if (_text == "") exitWith {};
|
if (_text == "") exitWith {};
|
||||||
private _clanSel = getText (configOf _vehicle >> "selectionClan");
|
private _clanSel = getText (configOf _vehicle >> "selectionClan");
|
||||||
if (!(_clanSel in selectionNames _vehicle)) exitWith { TRACE_1("no tag",_clanSel); };
|
if !(_clanSel in selectionNames _vehicle) exitWith {TRACE_1("no tag",_clanSel);};
|
||||||
|
|
||||||
private _texture = [_text, _textSize, _textColor, "00000000", true] call FUNC(generateStencilTexture);
|
private _texture = [_text, _textSize, _textColor, "00000000", true] call FUNC(generateStencilTexture);
|
||||||
TRACE_1("",_texture);
|
TRACE_1("",_texture);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith {
|
if !((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) exitWith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
|
|
||||||
GVAR(currentMode) = "";
|
GVAR(currentMode) = "";
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
TRACE_3("bailOut",_center,_crewman,_vehicle);
|
TRACE_3("bailOut",_center,_crewman,_vehicle);
|
||||||
|
|
||||||
if (isPlayer _crewman) exitWith {};
|
if (isPlayer _crewman) exitWith {};
|
||||||
if (!alive _crewman || { !( [_crewman] call EFUNC(common,isAwake))} ) exitWith {};
|
if (!alive _crewman || {!([_crewman] call EFUNC(common,isAwake))}) exitWith {};
|
||||||
|
|
||||||
unassignVehicle _crewman;
|
unassignVehicle _crewman;
|
||||||
_crewman leaveVehicle _vehicle;
|
_crewman leaveVehicle _vehicle;
|
||||||
|
@ -23,8 +23,12 @@ if (!params [["_unit", objNull, [objNull]], ["_veh", objNull, [objNull]], ["_use
|
|||||||
};
|
};
|
||||||
TRACE_3("params",_unit,_veh,_useCustom);
|
TRACE_3("params",_unit,_veh,_useCustom);
|
||||||
|
|
||||||
if (isNull _unit) exitWith {ERROR("null unit");};
|
if (isNull _unit) exitWith {
|
||||||
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
ERROR("null unit");
|
||||||
|
};
|
||||||
|
if (isNull _veh) exitWith {
|
||||||
|
ERROR("null vehicle");
|
||||||
|
};
|
||||||
|
|
||||||
if (_useCustom) then {
|
if (_useCustom) then {
|
||||||
private _previousMags = magazinesDetail _unit;
|
private _previousMags = magazinesDetail _unit;
|
||||||
|
@ -33,7 +33,10 @@ if ((locked _veh) == 0) exitWith {false};
|
|||||||
if !("ACE_key_lockpick" in (_unit call EFUNC(common,uniqueItems))) exitWith {false};
|
if !("ACE_key_lockpick" in (_unit call EFUNC(common,uniqueItems))) exitWith {false};
|
||||||
|
|
||||||
private _vehLockpickStrength = _veh getVariable[QGVAR(lockpickStrength), GVAR(DefaultLockpickStrength)];
|
private _vehLockpickStrength = _veh getVariable[QGVAR(lockpickStrength), GVAR(DefaultLockpickStrength)];
|
||||||
if (!(_vehLockpickStrength isEqualType 0)) exitWith {ERROR("ACE_vehicleLock_LockpickStrength invalid"); false};
|
if !(_vehLockpickStrength isEqualType 0) exitWith {
|
||||||
|
ERROR("ACE_vehicleLock_LockpickStrength invalid");
|
||||||
|
false
|
||||||
|
};
|
||||||
|
|
||||||
//-1 indicates unpickable lock
|
//-1 indicates unpickable lock
|
||||||
if (_vehLockpickStrength < 0) exitWith {false};
|
if (_vehLockpickStrength < 0) exitWith {false};
|
||||||
@ -45,7 +48,7 @@ private _condition = {
|
|||||||
((_unit distance _veh) < 5) && {(speed _veh) < 0.1}
|
((_unit distance _veh) < 5) && {(speed _veh) < 0.1}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!([[_unit, _veh]] call _condition)) exitWith {false};
|
if !([[_unit, _veh]] call _condition) exitWith {false};
|
||||||
|
|
||||||
private _returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"];
|
private _returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"];
|
||||||
switch (_funcType) do {
|
switch (_funcType) do {
|
||||||
|
@ -22,7 +22,7 @@ if (!isServer) exitWith {};
|
|||||||
params ["_logic", "_syncedObjects", "_activated"];
|
params ["_logic", "_syncedObjects", "_activated"];
|
||||||
TRACE_3("params",_logic,_syncedObjects,_activated);
|
TRACE_3("params",_logic,_syncedObjects,_activated);
|
||||||
|
|
||||||
if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not active");};
|
if (!_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not active");};
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_syncedObjects"];
|
params ["_syncedObjects"];
|
||||||
|
@ -27,7 +27,7 @@ private _newIndex = -1;
|
|||||||
if (cba_events_control) then {
|
if (cba_events_control) then {
|
||||||
if (cameraView != "INTERNAL") exitWith {};
|
if (cameraView != "INTERNAL") exitWith {};
|
||||||
if (isTurnedOut _player) exitWith {};
|
if (isTurnedOut _player) exitWith {};
|
||||||
if (!([_player, _vehicle, []] call EFUNC(common,canInteractWith))) exitWith {};
|
if !([_player, _vehicle, []] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
|
|
||||||
BEGIN_COUNTER(newIndex);
|
BEGIN_COUNTER(newIndex);
|
||||||
if ((_shownIndex > -1) && {currentVisionMode _player != _lastVisionMode}) then {
|
if ((_shownIndex > -1) && {currentVisionMode _player != _lastVisionMode}) then {
|
||||||
|
@ -41,6 +41,6 @@ private _compartment = switch (_role) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(_compartment isEqualType "")) then { _compartment = format ["Compartment%1",_compartment] };
|
if !(_compartment isEqualType "") then {_compartment = format ["Compartment%1",_compartment]};
|
||||||
|
|
||||||
[_role, _cargoIndex, _turretPath, _compartment]
|
[_role, _cargoIndex, _turretPath, _compartment]
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
params ["_newCameraView", "_cameraOn"];
|
params ["_newCameraView", "_cameraOn"];
|
||||||
|
|
||||||
if (! ([_newCameraView, _cameraOn] call FUNC(canChangeCamera))) exitWith {};
|
if !([_newCameraView, _cameraOn] call FUNC(canChangeCamera)) exitWith {};
|
||||||
|
|
||||||
TRACE_1("View Restricted",XGVAR(mode));
|
TRACE_1("View Restricted",XGVAR(mode));
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ if (!hasInterface) exitWith {};
|
|||||||
|
|
||||||
["ACE3 Vehicles", QGVAR(CollisionLights), localize LSTRING(CollisionLights), {
|
["ACE3 Vehicles", QGVAR(CollisionLights), localize LSTRING(CollisionLights), {
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false};
|
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((ACE_player isEqualTo (vehicle ACE_player)) || {ACE_player != (driver (vehicle ACE_player))}) exitWith {false};
|
if ((ACE_player isEqualTo (vehicle ACE_player)) || {ACE_player != (driver (vehicle ACE_player))}) exitWith {false};
|
||||||
|
|
||||||
|
@ -47,15 +47,15 @@ if (_terrainEffectEnabled) then {
|
|||||||
private _newWindSpeed = 0;
|
private _newWindSpeed = 0;
|
||||||
{
|
{
|
||||||
private _windSource = [100, _windDirAdjusted, _x] call _fnc_polar2vect;
|
private _windSource = [100, _windDirAdjusted, _x] call _fnc_polar2vect;
|
||||||
if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith {
|
if !(terrainIntersectASL [_position, _position vectorAdd _windSource]) exitWith {
|
||||||
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
||||||
};
|
};
|
||||||
_windSource = [100, _windDirAdjusted + _x, 0] call _fnc_polar2vect;
|
_windSource = [100, _windDirAdjusted + _x, 0] call _fnc_polar2vect;
|
||||||
if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith {
|
if !(terrainIntersectASL [_position, _position vectorAdd _windSource]) exitWith {
|
||||||
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
||||||
};
|
};
|
||||||
_windSource = [100, _windDirAdjusted - _x, 0] call _fnc_polar2vect;
|
_windSource = [100, _windDirAdjusted - _x, 0] call _fnc_polar2vect;
|
||||||
if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith {
|
if !(terrainIntersectASL [_position, _position vectorAdd _windSource]) exitWith {
|
||||||
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
||||||
};
|
};
|
||||||
} forEach [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
} forEach [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||||
@ -69,15 +69,15 @@ if (_obstacleEffectEnabled) then {
|
|||||||
private _newWindSpeed = 0;
|
private _newWindSpeed = 0;
|
||||||
{
|
{
|
||||||
private _windSource = [20, _windDirAdjusted, _x] call _fnc_polar2vect;
|
private _windSource = [20, _windDirAdjusted, _x] call _fnc_polar2vect;
|
||||||
if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith {
|
if !(lineIntersects [_position, _position vectorAdd _windSource]) exitWith {
|
||||||
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
||||||
};
|
};
|
||||||
_windSource = [20, _windDirAdjusted + _x, 0] call _fnc_polar2vect;
|
_windSource = [20, _windDirAdjusted + _x, 0] call _fnc_polar2vect;
|
||||||
if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith {
|
if !(lineIntersects [_position, _position vectorAdd _windSource]) exitWith {
|
||||||
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
||||||
};
|
};
|
||||||
_windSource = [20, _windDirAdjusted - _x, 0] call _fnc_polar2vect;
|
_windSource = [20, _windDirAdjusted - _x, 0] call _fnc_polar2vect;
|
||||||
if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith {
|
if !(lineIntersects [_position, _position vectorAdd _windSource]) exitWith {
|
||||||
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
||||||
};
|
};
|
||||||
} forEach [0, 5, 10, 15, 20, 25, 30, 35, 40, 45];
|
} forEach [0, 5, 10, 15, 20, 25, 30, 35, 40, 45];
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
params ["_func", "_keyDown"];
|
params ["_func", "_keyDown"];
|
||||||
|
|
||||||
if (!GVAR(shown)) exitWith { false }; // fast exit if not shown
|
if (!GVAR(shown)) exitWith { false }; // fast exit if not shown
|
||||||
if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith { false };
|
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith { false };
|
||||||
if (!(ACE_player call CBA_fnc_canUseWeapon)) exitWith { false };
|
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith { false };
|
||||||
|
|
||||||
if (currentMuzzle ACE_player != currentWeapon ACE_player) exitWith { false };
|
if (currentMuzzle ACE_player != currentWeapon ACE_player) exitWith { false };
|
||||||
private _display = uinamespace getVariable [QGVAR(display), displayNull];
|
private _display = uinamespace getVariable [QGVAR(display), displayNull];
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
params ["_object"];
|
params ["_object"];
|
||||||
|
|
||||||
if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {};
|
if !(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)]) exitWith {};
|
||||||
|
|
||||||
[{
|
[{
|
||||||
TRACE_1("Delayed addCuratorEditableObjects",_this);
|
TRACE_1("Delayed addCuratorEditableObjects",_this);
|
||||||
|
@ -23,13 +23,13 @@ params ["_logic", "_units", "_activated"];
|
|||||||
|
|
||||||
if (_activated) then {
|
if (_activated) then {
|
||||||
|
|
||||||
//--- Terminate when not created on the server
|
// Terminate when not created on the server
|
||||||
if (!isserver && local _logic && isnull (getassignedcuratorunit _logic)) exitwith {
|
if (!isServer && local _logic && isnull (getassignedcuratorunit _logic)) exitwith {
|
||||||
[format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp;
|
[format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp;
|
||||||
deletevehicle _logic;
|
deletevehicle _logic;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Get curator owner
|
// Get curator owner
|
||||||
_ownerVar = _logic getvariable ["owner",""];
|
_ownerVar = _logic getvariable ["owner",""];
|
||||||
_ownerUID = parsenumber _ownerVar;
|
_ownerUID = parsenumber _ownerVar;
|
||||||
if (cheatsenabled) then {
|
if (cheatsenabled) then {
|
||||||
@ -46,13 +46,13 @@ if (_activated) then {
|
|||||||
};
|
};
|
||||||
_isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted";
|
_isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted";
|
||||||
|
|
||||||
//--- Wipe out the variable so clients can't access it
|
// Wipe out the variable so clients can't access it
|
||||||
_logic setvariable ["owner",nil];
|
_logic setvariable ["owner",nil];
|
||||||
|
|
||||||
//--- Server
|
// Server
|
||||||
if (isserver) then {
|
if (isserver) then {
|
||||||
|
|
||||||
//--- Prepare admin variable
|
// Prepare admin variable
|
||||||
_adminVar = "";
|
_adminVar = "";
|
||||||
if (_isAdmin) then {
|
if (_isAdmin) then {
|
||||||
_letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
|
_letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
|
||||||
@ -61,12 +61,12 @@ if (_activated) then {
|
|||||||
_logic setvariable ["adminVar",_adminVar,true];
|
_logic setvariable ["adminVar",_adminVar,true];
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Get allowed addons
|
// Get allowed addons
|
||||||
_addonsType = _logic getvariable ["Addons",2];
|
_addonsType = _logic getvariable ["Addons",2];
|
||||||
_addons = [];
|
_addons = [];
|
||||||
switch _addonsType do {
|
switch _addonsType do {
|
||||||
|
|
||||||
//--- All (including unofficial ones)
|
// All (including unofficial ones)
|
||||||
case 3: {
|
case 3: {
|
||||||
_cfgPatches = configfile >> "cfgpatches";
|
_cfgPatches = configfile >> "cfgpatches";
|
||||||
for "_i" from 0 to (count _cfgPatches - 1) do {
|
for "_i" from 0 to (count _cfgPatches - 1) do {
|
||||||
@ -79,10 +79,10 @@ if (_activated) then {
|
|||||||
_logic addcuratoraddons _addons;
|
_logic addcuratoraddons _addons;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- All active
|
// All active
|
||||||
case 2: {};
|
case 2: {};
|
||||||
|
|
||||||
//--- All mission
|
// All mission
|
||||||
case 1: {
|
case 1: {
|
||||||
_addonsList = [];
|
_addonsList = [];
|
||||||
{
|
{
|
||||||
@ -92,13 +92,13 @@ if (_activated) then {
|
|||||||
_logic addcuratoraddons _addonsList;
|
_logic addcuratoraddons _addonsList;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- None
|
// None
|
||||||
case 0: {
|
case 0: {
|
||||||
removeallcuratoraddons _logic;
|
removeallcuratoraddons _logic;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Handle ownership
|
// Handle ownership
|
||||||
[_logic,_ownerVar,_ownerUID,_adminVar] spawn {
|
[_logic,_ownerVar,_ownerUID,_adminVar] spawn {
|
||||||
scriptname "BIS_fnc_moduleCurator: Owner";
|
scriptname "BIS_fnc_moduleCurator: Owner";
|
||||||
|
|
||||||
@ -110,16 +110,16 @@ if (_activated) then {
|
|||||||
_name = _logic getvariable ["name",""];
|
_name = _logic getvariable ["name",""];
|
||||||
if (_name == "") then {_name = localize "STR_A3_curator";};
|
if (_name == "") then {_name = localize "STR_A3_curator";};
|
||||||
|
|
||||||
//--- Wait until mission starts
|
// Wait until mission starts
|
||||||
waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO CBA_missionTime, IT BREAKS THE MODULE
|
waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO CBA_missionTime, IT BREAKS THE MODULE
|
||||||
|
|
||||||
//--- Refresh addon list, so it's broadcasted to clients
|
// Refresh addon list, so it's broadcasted to clients
|
||||||
_addons = curatoraddons _logic;
|
_addons = curatoraddons _logic;
|
||||||
removeAllCuratorAddons _logic;
|
removeAllCuratorAddons _logic;
|
||||||
_logic addcuratoraddons _addons;
|
_logic addcuratoraddons _addons;
|
||||||
|
|
||||||
while {true} do {
|
while {true} do {
|
||||||
//--- Wait for player to become Zeus
|
// Wait for player to become Zeus
|
||||||
switch true do {
|
switch true do {
|
||||||
case (_ownerUID > 0): {
|
case (_ownerUID > 0): {
|
||||||
waituntil {
|
waituntil {
|
||||||
@ -133,7 +133,7 @@ if (_activated) then {
|
|||||||
};
|
};
|
||||||
if (isnull _logic) exitwith {};
|
if (isnull _logic) exitwith {};
|
||||||
|
|
||||||
//--- Assign
|
// Assign
|
||||||
_player = objnull;
|
_player = objnull;
|
||||||
switch true do {
|
switch true do {
|
||||||
case (_ownerUID > 0): {
|
case (_ownerUID > 0): {
|
||||||
@ -150,7 +150,7 @@ if (_activated) then {
|
|||||||
waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic};
|
waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic};
|
||||||
if (isnull _logic) exitwith {};
|
if (isnull _logic) exitwith {};
|
||||||
|
|
||||||
//--- Add radio channels
|
// Add radio channels
|
||||||
{
|
{
|
||||||
_x radiochanneladd [_player];
|
_x radiochanneladd [_player];
|
||||||
} foreach (_logic getvariable ["channels",[]]);
|
} foreach (_logic getvariable ["channels",[]]);
|
||||||
@ -159,7 +159,7 @@ if (_activated) then {
|
|||||||
private _msgCode = {
|
private _msgCode = {
|
||||||
params ["_logic","_player"];
|
params ["_logic","_player"];
|
||||||
|
|
||||||
//--- Sent notification to all assigned players
|
// Sent notification to all assigned players
|
||||||
if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then {
|
if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then {
|
||||||
{
|
{
|
||||||
if (isplayer _x) then {
|
if (isplayer _x) then {
|
||||||
@ -181,7 +181,7 @@ if (_activated) then {
|
|||||||
// Added by ace_zeus
|
// Added by ace_zeus
|
||||||
[QGVAR(zeusUnitAssigned), [_logic,_player]] call CBA_fnc_globalEvent;
|
[QGVAR(zeusUnitAssigned), [_logic,_player]] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
//--- Wait for player to stop being Zeus
|
// Wait for player to stop being Zeus
|
||||||
switch true do {
|
switch true do {
|
||||||
case (_ownerUID > 0): {
|
case (_ownerUID > 0): {
|
||||||
waituntil {
|
waituntil {
|
||||||
@ -195,12 +195,12 @@ if (_activated) then {
|
|||||||
};
|
};
|
||||||
if (isnull _logic) exitwith {};
|
if (isnull _logic) exitwith {};
|
||||||
|
|
||||||
//--- Add radio channels
|
// Add radio channels
|
||||||
{
|
{
|
||||||
_x radiochannelremove [_player];
|
_x radiochannelremove [_player];
|
||||||
} foreach (_logic getvariable ["channels",[]]);
|
} foreach (_logic getvariable ["channels",[]]);
|
||||||
|
|
||||||
//--- Unassign
|
// Unassign
|
||||||
waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic};
|
waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic};
|
||||||
if (isnull _logic) exitwith {};
|
if (isnull _logic) exitwith {};
|
||||||
};
|
};
|
||||||
@ -211,14 +211,14 @@ if (_activated) then {
|
|||||||
params ["_logic"];
|
params ["_logic"];
|
||||||
|
|
||||||
if (GVAR(zeusBird)) then {
|
if (GVAR(zeusBird)) then {
|
||||||
//--- Create bird
|
// Create bird
|
||||||
_birdType = _logic getVariable ["birdType","eagle_f"];
|
_birdType = _logic getVariable ["birdType","eagle_f"];
|
||||||
if (_birdType != "") then {
|
if (_birdType != "") then {
|
||||||
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
|
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
|
||||||
_logic setVariable ["bird",_bird,true];
|
_logic setVariable ["bird",_bird,true];
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Locality changed
|
// Locality changed
|
||||||
_logic addeventhandler [
|
_logic addeventhandler [
|
||||||
"local",
|
"local",
|
||||||
{
|
{
|
||||||
@ -237,7 +237,7 @@ if (_activated) then {
|
|||||||
[_logic] call _birdCode;
|
[_logic] call _birdCode;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Activated all future addons
|
// Activated all future addons
|
||||||
_addons = [];
|
_addons = [];
|
||||||
{
|
{
|
||||||
if (typeof _x == "ModuleCuratorAddAddons_F") then {
|
if (typeof _x == "ModuleCuratorAddAddons_F") then {
|
||||||
@ -254,12 +254,12 @@ if (_activated) then {
|
|||||||
if (time <= 0) then { _addons call bis_fnc_activateaddons; };
|
if (time <= 0) then { _addons call bis_fnc_activateaddons; };
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Player
|
// Player
|
||||||
if (hasinterface) then {
|
if (hasinterface) then {
|
||||||
waituntil {local player};
|
waituntil {local player};
|
||||||
_serverCommand = ["#kick", "#shutdown"] select (_ownerVar == "#adminLogged");
|
_serverCommand = ["#kick", "#shutdown"] select (_ownerVar == "#adminLogged");
|
||||||
|
|
||||||
//--- Black effect until the interface is open
|
// Black effect until the interface is open
|
||||||
_forced = _logic getvariable ["forced",0] > 0;
|
_forced = _logic getvariable ["forced",0] > 0;
|
||||||
if (_forced) then {
|
if (_forced) then {
|
||||||
_isCurator = switch true do {
|
_isCurator = switch true do {
|
||||||
@ -279,15 +279,15 @@ if (_activated) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Check if player is server admin
|
// Check if player is server admin
|
||||||
if (_isAdmin) then {
|
if (_isAdmin) then {
|
||||||
_adminVar = _logic getvariable ["adminVar",""];
|
_adminVar = _logic getvariable ["adminVar",""];
|
||||||
_logic setvariable ["adminVar",nil];
|
_logic setvariable ["adminVar",nil];
|
||||||
if (isserver) then {
|
if (isserver) then {
|
||||||
//--- Host
|
// Host
|
||||||
missionnamespace setvariable [_adminVar,player];
|
missionnamespace setvariable [_adminVar,player];
|
||||||
} else {
|
} else {
|
||||||
//--- Client
|
// Client
|
||||||
[_logic,_adminVar,_serverCommand] spawn {
|
[_logic,_adminVar,_serverCommand] spawn {
|
||||||
scriptname "BIS_fnc_moduleCurator: Admin check";
|
scriptname "BIS_fnc_moduleCurator: Admin check";
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ if (_activated) then {
|
|||||||
sleep 1;
|
sleep 1;
|
||||||
waituntil {alive player};
|
waituntil {alive player};
|
||||||
|
|
||||||
//--- Show warning when Zeus key is not assigned
|
// Show warning when Zeus key is not assigned
|
||||||
if (count (actionkeys "curatorInterface") == 0) then {
|
if (count (actionkeys "curatorInterface") == 0) then {
|
||||||
[
|
[
|
||||||
format [
|
format [
|
||||||
@ -324,7 +324,7 @@ if (_activated) then {
|
|||||||
] call bis_fnc_guiMessage;
|
] call bis_fnc_guiMessage;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Show hint about pinging for players
|
// Show hint about pinging for players
|
||||||
if (
|
if (
|
||||||
isnil {profilenamespace getvariable "bis_fnc_curatorPinged_done"}
|
isnil {profilenamespace getvariable "bis_fnc_curatorPinged_done"}
|
||||||
&&
|
&&
|
||||||
@ -339,7 +339,7 @@ if (_activated) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Add local event handlers
|
// Add local event handlers
|
||||||
_logic addeventhandler ["curatorFeedbackMessage",{_this call bis_fnc_showCuratorFeedbackMessage;}];
|
_logic addeventhandler ["curatorFeedbackMessage",{_this call bis_fnc_showCuratorFeedbackMessage;}];
|
||||||
_logic addeventhandler ["curatorPinged",{_this call bis_fnc_curatorPinged;}];
|
_logic addeventhandler ["curatorPinged",{_this call bis_fnc_curatorPinged;}];
|
||||||
_logic addeventhandler ["curatorObjectPlaced",{_this call bis_fnc_curatorObjectPlaced;}];
|
_logic addeventhandler ["curatorObjectPlaced",{_this call bis_fnc_curatorObjectPlaced;}];
|
||||||
|
@ -30,13 +30,13 @@ TRACE_4("moduleCargoParadrop placed",_logic,typeOf _vehicle,_pilot,typeOf _pilot
|
|||||||
|
|
||||||
deleteVehicle _logic; // cleanup logic now, we just needed it to get the attached vehicle
|
deleteVehicle _logic; // cleanup logic now, we just needed it to get the attached vehicle
|
||||||
|
|
||||||
if (!(missionNamespace getVariable [QEGVAR(cargo,enable), false])) exitWith {
|
if !(missionNamespace getVariable [QEGVAR(cargo,enable), false]) exitWith {
|
||||||
[LSTRING(RequiresAddon)] call FUNC(showMessage);
|
[LSTRING(RequiresAddon)] call FUNC(showMessage);
|
||||||
};
|
};
|
||||||
if (isNull _vehicle) exitWith {
|
if (isNull _vehicle) exitWith {
|
||||||
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
||||||
};
|
};
|
||||||
if (!(_vehicle isKindOf "Air")) exitWith {
|
if !(_vehicle isKindOf "Air") exitWith {
|
||||||
[format ["%1 %2", localize "str_dn_aircraft", localize "str_msg_no_veh_select"]] call FUNC(showMessage);
|
[format ["%1 %2", localize "str_dn_aircraft", localize "str_msg_no_veh_select"]] call FUNC(showMessage);
|
||||||
};
|
};
|
||||||
if ((!alive _vehicle) || {!alive _pilot}) exitWith {
|
if ((!alive _vehicle) || {!alive _pilot}) exitWith {
|
||||||
|
@ -22,7 +22,7 @@ TRACE_2("moduleCargoParadropWaypoint",_vehicleGroup,_wpPos);
|
|||||||
private _vehicle = vehicle leader _vehicleGroup;
|
private _vehicle = vehicle leader _vehicleGroup;
|
||||||
private _commander = driver _vehicle;
|
private _commander = driver _vehicle;
|
||||||
private _cargo = _vehicle getVariable [QEGVAR(cargo,loaded), []];
|
private _cargo = _vehicle getVariable [QEGVAR(cargo,loaded), []];
|
||||||
if (!(_vehicle isKindOf "Air")) exitWith {WARNING_1("not in a air vehicle",typeOf _vehicle); true};
|
if !(_vehicle isKindOf "Air") exitWith {WARNING_1("not in a air vehicle",typeOf _vehicle); true};
|
||||||
if (_cargo isEqualTo []) exitWith {WARNING_1("no cargo",_cargo); true};
|
if (_cargo isEqualTo []) exitWith {WARNING_1("no cargo",_cargo); true};
|
||||||
|
|
||||||
private _previousSpeedMode = speedMode _vehicleGroup;
|
private _previousSpeedMode = speedMode _vehicleGroup;
|
||||||
|
@ -40,7 +40,7 @@ if !(GETEGVAR(medical,enabled,false)) then {
|
|||||||
if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then {
|
if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then {
|
||||||
[LSTRING(OnlyNonCaptive)] call FUNC(showMessage);
|
[LSTRING(OnlyNonCaptive)] call FUNC(showMessage);
|
||||||
} else {
|
} else {
|
||||||
if (!(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false))) then {
|
if !(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false)) then {
|
||||||
_unit setVariable [QEGVAR(medical,isMedicalFacility), true, true];
|
_unit setVariable [QEGVAR(medical,isMedicalFacility), true, true];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -57,7 +57,7 @@ if (_autoSeek) then {
|
|||||||
LOG("Unit deleted or killed, PFH removed");
|
LOG("Unit deleted or killed, PFH removed");
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!([_unit] call EFUNC(common,isAwake))) exitWith {};
|
if !([_unit] call EFUNC(common,isAwake)) exitWith {};
|
||||||
|
|
||||||
// Detonation
|
// Detonation
|
||||||
private _nearObjects = (_unit nearObjects _activationRadius) select {side _x == _activationSide && {_x != _unit} && {alive _x}};
|
private _nearObjects = (_unit nearObjects _activationRadius) select {side _x == _activationSide && {_x != _unit} && {alive _x}};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(_this isEqualTypeParams [""])) exitWith {ERROR_1("First arg must be string [%1]",_this);};
|
if !(_this isEqualTypeParams [""]) exitWith {ERROR_1("First arg must be string [%1]",_this);};
|
||||||
|
|
||||||
private _message = _this apply {if ((_x isEqualType "") && {isLocalized _x}) then {localize _x} else {_x}};
|
private _message = _this apply {if ((_x isEqualType "") && {isLocalized _x}) then {localize _x} else {_x}};
|
||||||
[objNull, format _message] call BIS_fnc_showCuratorFeedbackMessage;
|
[objNull, format _message] call BIS_fnc_showCuratorFeedbackMessage;
|
||||||
|
Loading…
Reference in New Issue
Block a user