mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Various - Use configOf command for faster lookup (#8100)
* configOf * replace some use of CBA_fnc_getObjectConfig
This commit is contained in:
parent
f72175f823
commit
e8693c8db9
@ -19,7 +19,7 @@ params ["_vehicle"];
|
||||
|
||||
if (unitIsUAV _vehicle) exitWith {};
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
private _addAction = false;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
if (GVAR(advancedCorrections)) then {
|
||||
["LandVehicle", "init", {
|
||||
params ["_vehicle"];
|
||||
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _vehicleCfg = configOf _vehicle;
|
||||
// config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner
|
||||
private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then {
|
||||
getNumber (_vehicleCfg >> QGVAR(applyCorrections))
|
||||
|
@ -26,7 +26,7 @@ private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []]
|
||||
TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown);
|
||||
|
||||
{
|
||||
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _x;
|
||||
private _vehicleCfg = configOf _x;
|
||||
// config "ace_artillerytables_showRangetable" [0 disabled, 1 enabled] falls back to artilleryScanner
|
||||
private _showRangetable = if (isNumber (_vehicleCfg >> QGVAR(showRangetable))) then {
|
||||
getNumber (_vehicleCfg >> QGVAR(showRangetable))
|
||||
|
@ -10,7 +10,7 @@ class Cfg3DEN {
|
||||
control = "Edit";
|
||||
|
||||
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace););
|
||||
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0));
|
||||
defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(space),0));
|
||||
|
||||
validate = "number";
|
||||
condition = "objectHasInventoryCargo";
|
||||
@ -24,7 +24,7 @@ class Cfg3DEN {
|
||||
|
||||
// Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!)
|
||||
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize););
|
||||
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1));
|
||||
defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(size),-1));
|
||||
|
||||
validate = "number";
|
||||
condition = "1-objectBrain";
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
// Show hint as feedback
|
||||
private _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded;
|
||||
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
private _itemName = getText (configOf _item >> "displayName");
|
||||
private _vehicleName = getText (configOf _vehicle >> "displayName");
|
||||
|
||||
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
// Show hint as feedback
|
||||
private _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
|
||||
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
private _vehicleName = getText (configOf _vehicle >> "displayName");
|
||||
|
||||
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
|
||||
|
||||
@ -70,7 +70,7 @@ GVAR(vehicleAction) = [
|
||||
{
|
||||
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
|
||||
GVAR(enable) &&
|
||||
{(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} &&
|
||||
{(_target getVariable [QGVAR(hasCargo), getNumber (configOf _target >> QGVAR(hasCargo)) == 1])} &&
|
||||
{locked _target < 2} &&
|
||||
{([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} &&
|
||||
{alive _target} &&
|
||||
@ -87,12 +87,12 @@ GVAR(objectAction) = [
|
||||
{
|
||||
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
|
||||
GVAR(enable) &&
|
||||
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) in [true, 1]} &&
|
||||
{(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} &&
|
||||
{locked _target < 2} &&
|
||||
{alive _target} &&
|
||||
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
|
||||
{((nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) findIf {
|
||||
private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo));
|
||||
private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo));
|
||||
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
|
||||
(_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} &&
|
||||
{([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE}
|
||||
|
@ -23,7 +23,7 @@ private _statement = {
|
||||
};
|
||||
|
||||
private _vehicles = (nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) select {
|
||||
private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo));
|
||||
private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo));
|
||||
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
|
||||
(_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} &&
|
||||
{([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE}
|
||||
|
@ -21,7 +21,7 @@ params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]];
|
||||
|
||||
if ((!_ignoreInteraction) && {speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}}) exitWith {TRACE_1("vehicle not stable",_vehicle); false};
|
||||
|
||||
if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith {
|
||||
if (_item isEqualType objNull && {{alive _x && {getText (configOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith {
|
||||
TRACE_1("item is occupied",_item);
|
||||
false
|
||||
};
|
||||
|
@ -18,4 +18,4 @@
|
||||
params ["_object"];
|
||||
// TRACE_1("params",_object);
|
||||
|
||||
(_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]) max 0
|
||||
(_object getVariable [QGVAR(space), getNumber (configOf _object >> QGVAR(space))]) max 0
|
||||
|
@ -76,7 +76,7 @@ if (_vehicle isKindOf "Air") then {
|
||||
private _turretPath = _player call CBA_fnc_turretPath;
|
||||
(_player == (driver _target)) || // pilot
|
||||
{(getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1} || // coPilot
|
||||
{_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config
|
||||
{_turretPath in (getArray (configOf _target >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config
|
||||
};
|
||||
private _statement = {
|
||||
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
|
||||
|
@ -99,8 +99,8 @@ if (_showHint) then {
|
||||
[
|
||||
[
|
||||
LSTRING(UnloadedItem),
|
||||
getText (configFile >> "CfgVehicles" >> typeOf _itemObject >> "displayName"),
|
||||
getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName")
|
||||
getText (configOf _itemObject >> "displayName"),
|
||||
getText (configOf _vehicle >> "displayName")
|
||||
],
|
||||
3
|
||||
] call EFUNC(common,displayTextStructured);
|
||||
|
@ -60,7 +60,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
] call EFUNC(common,progressBar);
|
||||
_return = true;
|
||||
} else {
|
||||
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
|
||||
private _displayName = getText (configOf _object >> "displayName");
|
||||
|
||||
[[LSTRING(LoadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -34,4 +34,4 @@ if (count _loaded != count _newLoaded) then {
|
||||
_vehicle setVariable [QGVAR(loaded), _newLoaded, true];
|
||||
};
|
||||
|
||||
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
|
||||
_vehicle setVariable [QGVAR(space), getNumber (configOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_dummy"];
|
||||
|
||||
private _chemlightClass = getText (configFile >> "CfgVehicles" >> typeOf _dummy >> "ACE_Attachable");
|
||||
private _chemlightClass = getText (configOf _dummy >> "ACE_Attachable");
|
||||
private _config = configFile >> "CfgAmmo" >> _chemlightClass;
|
||||
private _delay = getNumber (_config >> "explosionTime");
|
||||
private _lifeTime = getNumber (_config >> "timeToLive");
|
||||
|
@ -31,7 +31,7 @@ if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
|
||||
|
||||
private ["_selectionPosition", "_selectionPosition2"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _turret = [];
|
||||
|
||||
private _radius = 0;
|
||||
|
@ -30,7 +30,7 @@ _target setVariable [QGVAR(owner), _unit, true];
|
||||
|
||||
// lock target object
|
||||
if (_lockTarget) then {
|
||||
private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
||||
private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
||||
if (!isNull _unit) then {
|
||||
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
||||
if (_canBeDisassembled) then {
|
||||
|
@ -36,7 +36,7 @@ _target setVariable [QGVAR(owner), _unit, true];
|
||||
|
||||
// lock target object
|
||||
if (_lockTarget) then {
|
||||
private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
||||
private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
|
||||
if (!isNull _unit) then {
|
||||
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
||||
if (_canBeDisassembled) then {
|
||||
|
@ -19,7 +19,7 @@
|
||||
if (!local _this) exitWith {};
|
||||
|
||||
// Objects with disabled simulation and objects with simulation type "house" don't have gravity/physics, so make sure they are not floating
|
||||
private _hasGravity = simulationEnabled _this && {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"};
|
||||
private _hasGravity = simulationEnabled _this && {getText (configOf _this >> "simulation") != "house"};
|
||||
|
||||
if (!_hasGravity) then {
|
||||
private _positionASL = getPosASL _this;
|
||||
|
@ -23,7 +23,7 @@ private _vehicle = vehicle _unit;
|
||||
if (_vehicle isEqualTo _unit) exitWith {""};
|
||||
|
||||
// --- driver
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
if (_unit == driver _vehicle) exitWith {
|
||||
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_config >> "driverAction")) // return
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _turret = _vehicle call FUNC(getTurretCommander);
|
||||
|
||||
[_config, _turret] call FUNC(getTurretConfigPath) // return
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _turret = _vehicle call FUNC(getTurretGunner);
|
||||
|
||||
[_config, _turret] call FUNC(getTurretConfigPath) // return
|
||||
|
@ -22,7 +22,7 @@ private _turrets = allTurrets [_vehicle, true];
|
||||
private _doorTurrets = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
|
@ -28,7 +28,7 @@ _position = toLower _position;
|
||||
// general
|
||||
if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _turret = [];
|
||||
|
||||
private _isInside = vehicle _unit == _vehicle;
|
||||
@ -206,7 +206,7 @@ switch (_position) do {
|
||||
// this will execute all config based event handlers. Not script based ones unfortunately, but atleast we don't use any.
|
||||
private _fnc_getInEH = {
|
||||
// config based getIn EHs are assigned to the soldier, not the vehicle. Why Bis? Why?
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _unit >> "EventHandlers";
|
||||
private _config = configOf _unit >> "EventHandlers";
|
||||
|
||||
if (isClass _config) then {
|
||||
//getIn is local effects with global arguments. It doesn't trigger if the unit was already inside and only switched seats
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
params ["_vehicle", "_light"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light;
|
||||
private _config = configOf _vehicle >> "Reflectors" >> _light;
|
||||
|
||||
private _intensity = getNumber (_config >> "intensity");
|
||||
private _position = getText (_config >> "position");
|
||||
|
@ -23,9 +23,9 @@ private _side = side _leader;
|
||||
|
||||
if (_vehicle == _leader) exitWith {
|
||||
if (
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "detectSkill") > 20 ||
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "camouflage") < 1 ||
|
||||
getText (configFile >> "CfgVehicles" >> typeOf _leader >> "textsingular") == "diver"
|
||||
getNumber (configOf _leader >> "detectSkill") > 20 ||
|
||||
getNumber (configOf _leader >> "camouflage") < 1 ||
|
||||
getText (configOf _leader >> "textsingular") == "diver"
|
||||
) then {
|
||||
["n_recon", "b_recon", "o_recon"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
} else {
|
||||
@ -33,16 +33,16 @@ if (_vehicle == _leader) exitWith {
|
||||
};
|
||||
};
|
||||
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1) exitWith {
|
||||
if (getNumber (configOf _vehicle >> "attendant") == 1) exitWith {
|
||||
["n_med", "b_med", "o_med"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
};
|
||||
|
||||
if (
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportRepair") > 0 ||
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportFuel") > 0 ||
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportAmmo") > 0 ||
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_canRepair") > 0 ||
|
||||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_fuelCapacityCargo") > 0
|
||||
getNumber (configOf _vehicle >> "transportRepair") > 0 ||
|
||||
getNumber (configOf _vehicle >> "transportFuel") > 0 ||
|
||||
getNumber (configOf _vehicle >> "transportAmmo") > 0 ||
|
||||
getNumber (configOf _vehicle >> "ACE_canRepair") > 0 ||
|
||||
getNumber (configOf _vehicle >> "ACE_fuelCapacityCargo") > 0
|
||||
) exitWith {
|
||||
["n_maint", "b_maint", "o_maint"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
};
|
||||
@ -59,7 +59,7 @@ if (_vehicle isKindOf "StaticMortar") exitWith {
|
||||
["n_mortar", "b_mortar", "o_mortar"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
};
|
||||
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "artilleryScanner") == 1) exitWith {
|
||||
if (getNumber (configOf _vehicle >> "artilleryScanner") == 1) exitWith {
|
||||
["n_art", "b_art", "o_art"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
};
|
||||
|
||||
@ -68,7 +68,7 @@ if (_vehicle isKindOf "Car") exitWith {
|
||||
};
|
||||
|
||||
if (_vehicle isKindOf "Tank") exitWith {
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportSoldier") > 0) then {
|
||||
if (getNumber (configOf _vehicle >> "transportSoldier") > 0) then {
|
||||
["n_mech_inf", "b_mech_inf", "o_mech_inf"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
} else {
|
||||
["n_armor", "b_armor", "o_armor"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
|
||||
|
@ -27,7 +27,7 @@ if (_unit isKindOf "CAManBase") then {
|
||||
if (_showEffective) then {
|
||||
_name = [effectiveCommander _unit, false, _useRaw] call FUNC(getName);
|
||||
} else {
|
||||
_name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
||||
_name = getText (configOf _unit >> "displayName");
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@ if (!(_returnValue isEqualTo [])) then {
|
||||
} else {
|
||||
// Attempt to determine turret owner based on magazines in the vehicle
|
||||
private _pyMags = getPylonMagazines _vehicle;
|
||||
private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"];
|
||||
private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"];
|
||||
if (_pylonIndex >= (count _pyMags)) exitWith {ERROR("out of bounds");};
|
||||
if (_pylonIndex >= (count _pylonConfigs)) exitWith {ERROR("out of bounds");};
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
private _hitpoints = [];
|
||||
private _selections = [];
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
crew _vehicle select {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") == "UAVPilot"} // return
|
||||
crew _vehicle select {getText (configOf _x >> "simulation") == "UAVPilot"} // return
|
||||
|
@ -21,7 +21,7 @@ private _vehicle = vehicle _unit;
|
||||
|
||||
if (_unit == _vehicle) exitWith {false};
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false};
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")];
|
||||
private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configOf _unit >> "attendant")];
|
||||
|
||||
_isMedic > 0
|
||||
|
@ -82,7 +82,7 @@ if (_lightSource isKindOf "CAManBase") then {
|
||||
if (isCollisionLightOn _lightSource) then {
|
||||
private _markerLights = [
|
||||
_lightSource,
|
||||
{configProperties [configFile >> "CfgVehicles" >> typeOf _this >> "MarkerLights", "isClass _x", true]},
|
||||
{configProperties [configOf _this >> "MarkerLights", "isClass _x", true]},
|
||||
uiNamespace,
|
||||
format [QEGVAR(cache,MarkerLights_%1), typeOf _lightSource],
|
||||
1E11
|
||||
|
@ -21,7 +21,7 @@ params ["_unit", "_vehicle", ["_caller", objNull]];
|
||||
TRACE_3("loadPersonLocal",_unit,_vehicle,_caller);
|
||||
|
||||
private _slotsOpen = false;
|
||||
if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false]) || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "ejectDeadCargo")) == 0}}) then {
|
||||
if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false]) || {(getNumber (configOf _vehicle >> "ejectDeadCargo")) == 0}}) then {
|
||||
_unit moveInCargo _vehicle;
|
||||
TRACE_1("moveInCargo",_vehicle);
|
||||
_slotsOpen = true;
|
||||
|
@ -24,7 +24,7 @@ if (isNil QGVAR(LSD_Vehicles)) then {
|
||||
};
|
||||
|
||||
{
|
||||
_hSCount = count (getArray (configFile >> "CfgVehicles" >> typeOf _x >> "hiddenSelections"));
|
||||
_hSCount = count (getArray (configOf _x >> "hiddenSelections"));
|
||||
if (_hSCount > 0) then {
|
||||
GVAR(LSD_Vehicles) pushBack [_x, _hSCount];
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ params ["_unit", ["_distance", 10], ["_cargoOnly", false]];
|
||||
private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F", "Pod_Heli_Transport_04_crewed_base_F"], _distance];
|
||||
_nearVehicles select {
|
||||
// Filter cargo seats that will eject unconscious units (e.g. quad bike)
|
||||
private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 0};
|
||||
private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configOf _x >> "ejectDeadCargo")) == 0};
|
||||
((fullCrew [_x, "", true]) findIf {
|
||||
_x params ["_body", "_role", "_cargoIndex"];
|
||||
(isNull _body) // seat empty
|
||||
|
@ -25,7 +25,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exit
|
||||
};
|
||||
params ["_wire", "_unit"];
|
||||
|
||||
private _config = (configFile >> "CfgVehicles" >> typeOf _unit);
|
||||
private _config = (configOf _unit);
|
||||
private _delay = [45, 30] select ([_unit] call EFUNC(common,isEngineer) || {[_unit] call EFUNC(common,isEOD)});
|
||||
|
||||
// TODO: Animation?
|
||||
|
@ -96,8 +96,8 @@ if (_mode == 1) then {
|
||||
if (canMove _vehicle) then {
|
||||
{
|
||||
private _selectionPart = "hit" + _x;
|
||||
if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
|
||||
private _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
if (isText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
|
||||
private _selection = getText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
// TODO: Only the tires that have touched the wire should burst.
|
||||
_vehicle setHit [_selection, 1];
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ private _totalAmmo = 0;
|
||||
} forEach (magazinesAmmoCargo _vehicle);
|
||||
|
||||
// Get ammo from transportAmmo / ace_rearm
|
||||
private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _vehCfg = configOf _vehicle;
|
||||
|
||||
private _configSupply = (getNumber (_vehCfg >> "transportAmmo")) max (getNumber (_vehCfg >> QEGVAR(rearm,defaultSupply)));
|
||||
if (_vehicle getVariable [QEGVAR(rearm,isSupplyVehicle), (_configSupply > 0)]) then {
|
||||
|
@ -81,8 +81,8 @@ if (_reloadSource isKindOf "CaManBase") then {
|
||||
};
|
||||
|
||||
private _timeToLoad = 1;
|
||||
if (!isNull(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime")) then {
|
||||
_timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime");
|
||||
if (!isNull(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime")) then {
|
||||
_timeToLoad = getNumber(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime");
|
||||
};
|
||||
|
||||
TRACE_1("Reloading in progress",_timeToLoad);
|
||||
|
@ -20,7 +20,7 @@
|
||||
params ["_tripod", "_player"];
|
||||
TRACE_2("assemble_pickupTripod",_tripod,_player);
|
||||
|
||||
private _tripodClassname = getText(configFile >> "CfgVehicles" >> (typeof _tripod) >> QUOTE(ADDON) >> "disassembleTo");
|
||||
private _tripodClassname = getText(configOf _tripod >> QUOTE(ADDON) >> "disassembleTo");
|
||||
private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _tripodClassname >> QUOTE(ADDON) >> "pickupTime");
|
||||
|
||||
private _onFinish = {
|
||||
|
@ -19,9 +19,9 @@
|
||||
params ["_staticWeapon", "_player"];
|
||||
TRACE_2("assemble_pickupWeapon",_staticWeapon,_player);
|
||||
|
||||
private _onDisassembleFunc = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleFunc");
|
||||
private _carryWeaponClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleWeapon");
|
||||
private _turretClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleTurret");
|
||||
private _onDisassembleFunc = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleFunc");
|
||||
private _carryWeaponClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleWeapon");
|
||||
private _turretClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleTurret");
|
||||
private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "pickupTime");
|
||||
TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime);
|
||||
if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith {ERROR_1("bad weapon classname [%1]",_carryWeaponClassname);};
|
||||
|
@ -24,8 +24,8 @@ private _statement = {
|
||||
TRACE_5("starting unload",_target,_turretPath,_player,_carryMag,_vehMag);
|
||||
|
||||
private _timeToUnload = 1;
|
||||
if (!isNull(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime")) then {
|
||||
_timeToUnload = getNumber(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime");
|
||||
if (!isNull(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime")) then {
|
||||
_timeToUnload = getNumber(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime");
|
||||
};
|
||||
|
||||
[
|
||||
|
@ -26,7 +26,7 @@ if (!alive _vehicle) exitWith { [false, "", -1, false] };
|
||||
// Verify unit has carry magazine
|
||||
if ((!isNull _unit) && {((_vehicle distance _unit) > 5) || {((magazines _unit) findIf {_x == _carryMag}) == -1}}) exitWith { [false, "", -2, false] };
|
||||
|
||||
private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo");
|
||||
private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo");
|
||||
if (_desiredAmmo == 0) then { _desiredAmmo = 100; };
|
||||
private _ammoNeeded = _desiredAmmo min getNumber (configFile >> "CfgMagazines" >> _carryMag >> "count"); // assume it needs full carry mag
|
||||
private _loadedMag = "";
|
||||
|
@ -20,7 +20,7 @@ params ["_vehicle", "_turret", "_carryMag"];
|
||||
TRACE_3("reload_getVehicleMagazine",_vehicle,_turret,_carryMag);
|
||||
|
||||
private _carryGroupCfg = configFile >> QGVAR(groups) >> _carryMag;
|
||||
private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo");
|
||||
private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo");
|
||||
if (_desiredAmmo == 0) then { _desiredAmmo = 100; };
|
||||
|
||||
private _bestMag = "#";
|
||||
|
@ -22,8 +22,8 @@ params ["_vehicle", "_turret", "_carryMag", "_unit"];
|
||||
TRACE_4("loadMagazine",_vehicle,_turret,_carryMag,_unit);
|
||||
|
||||
private _timeToLoad = 1;
|
||||
if (!isNull(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime")) then {
|
||||
_timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime");
|
||||
if (!isNull(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime")) then {
|
||||
_timeToLoad = getNumber(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime");
|
||||
};
|
||||
|
||||
private _displayName = format [localize LSTRING(loadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")];
|
||||
|
@ -20,7 +20,7 @@ params ["_staticWeapon", "_assemblyMode", "_emptyWeapon"];
|
||||
TRACE_3("staticWeaponInit_unloadExtraMags",_staticWeapon,_assemblyMode,_emptyWeapon);
|
||||
if (!_assemblyMode) exitWith {};
|
||||
|
||||
private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "desiredAmmo");
|
||||
private _desiredAmmo = getNumber (configOf _staticWeapon >> QUOTE(ADDON) >> "desiredAmmo");
|
||||
private _storeExtraMagazines = GVAR(handleExtraMagazines);
|
||||
if (_emptyWeapon) then {
|
||||
_desiredAmmo = 0;
|
||||
|
@ -25,6 +25,6 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false};
|
||||
|
||||
// a static weapon has to be empty for dragging (ignore UAV AI)
|
||||
if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
|
||||
alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}
|
||||
|
@ -21,6 +21,6 @@ params ["_unit", "_target"];
|
||||
if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// a static weapon has to be empty for dragging (ignore UAV AI)
|
||||
if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};
|
||||
|
||||
alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_object"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _object;
|
||||
private _config = configOf _object;
|
||||
|
||||
if (getNumber (_config >> QGVAR(canDrag)) == 1) then {
|
||||
private _position = getArray (_config >> QGVAR(dragPosition));
|
||||
|
@ -23,7 +23,7 @@ _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"];
|
||||
_shooter setVariable [QGVAR(fired), true, true];
|
||||
_shooter animate ["missile_hide", 1];
|
||||
|
||||
private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance";
|
||||
private _config = configOf _projectile >> "ace_missileguidance";
|
||||
|
||||
private _serviceInterval = [_config >> "serviceInterval", "NUMBER", 0.33] call CBA_fnc_getConfigEntry;
|
||||
private _serviceChargeCount = [_config >> "serviceCharges", "NUMBER", 60] call CBA_fnc_getConfigEntry;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#ifdef DRAW_FASTROPE_INFO
|
||||
addMissionEventHandler ["Draw3D", {
|
||||
if (!(cursorObject isKindOf "Helicopter")) exitWith {};
|
||||
private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject);
|
||||
private _config = configOf cursorObject;
|
||||
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"];
|
||||
if (_enabled > 0) then {
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
params ["_vehicle", "_player", "_ropeClass", ["_defaultOption", false]];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
(driver _vehicle != _player) &&
|
||||
{getPos _vehicle select 2 > 2} && {
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
params ["_vehicle"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) &&
|
||||
{(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} &&
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
params ["_vehicle"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 2 &&
|
||||
{getText (_config >> QGVAR(onCut)) != ""}
|
||||
|
@ -40,5 +40,5 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
_vehicle setVariable [QGVAR(deployedRopes), [], true];
|
||||
|
||||
// Set new state (0 if no FRIES, 2 if FRIES for manual stowing)
|
||||
private _newState = [0, 2] select (isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(onCut)));
|
||||
private _newState = [0, 2] select (isText (configOf _vehicle >> QGVAR(onCut)));
|
||||
_vehicle setVariable [QGVAR(deploymentStage), _newState, true];
|
||||
|
@ -26,7 +26,7 @@ if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith {
|
||||
ERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.');
|
||||
};
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _configEnabled = getNumber (_config >> QGVAR(enabled));
|
||||
if (_configEnabled == 0) exitWith {
|
||||
if (hasInterface) then {
|
||||
|
@ -20,7 +20,7 @@
|
||||
params ["_vehicle", ["_player", objNull], ["_ropeClass", ""]];
|
||||
TRACE_3("deployRopes",_vehicle,_player,_ropeClass);
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
private _ropeOrigins = getArray (_config >> QGVAR(ropeOrigins));
|
||||
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
if !(isNumber (_config >> QGVAR(enabled))) then {
|
||||
["%1 has not been configured for ACE_Fastroping.", getText (_config >> "displayName")] call BIS_fnc_error;
|
||||
} else {
|
||||
|
@ -19,7 +19,7 @@ params ["_vehicle"];
|
||||
//Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed
|
||||
_vehicle setVariable [QGVAR(deploymentStage), 1, true];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _waitTime = 0;
|
||||
if (isText (_config >> QGVAR(onPrepare))) then {
|
||||
_waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare))));
|
||||
|
@ -19,7 +19,7 @@ params ["_vehicle"];
|
||||
//Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed
|
||||
_vehicle setVariable [QGVAR(deploymentStage), 1, true];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
private _waitTime = 0;
|
||||
if (isText (_config >> QGVAR(onCut))) then {
|
||||
_waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onCut))));
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_vehicle", "_turret", "_delta"];
|
||||
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
private _min = getNumber (_turretConfig >> QGVAR(MinDistance));
|
||||
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
|
||||
|
@ -23,7 +23,7 @@ TRACE_4("params",_vehicle,_turret,_distance,_angleTarget);
|
||||
private _FCSInitSpeed = [];
|
||||
private _FCSMagazines = [];
|
||||
private _FCSElevation = [];
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
{
|
||||
private _magazine = _x;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
|
||||
getNumber ([configOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
|
||||
&& {cameraView == "GUNNER"}
|
||||
&& {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out
|
||||
&& {cameraOn != (getConnectedUAV ACE_player)} //Not Controlling a UAV
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_vehicle", "_turret"];
|
||||
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
// Update display for infantry rangefinders
|
||||
if (_vehicle == ACE_player) exitWith {[5,5500,25,true] call FUNC(getRange)};
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]];
|
||||
TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound);
|
||||
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
if (isNil "_distance") then {
|
||||
_distance = [
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_vehicle"];
|
||||
|
||||
{
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath);
|
||||
private _turretConfig = [configOf _vehicle, _x] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) then {
|
||||
if (isNil QGVAR(jipID)) then {
|
||||
|
@ -12,8 +12,8 @@ GVAR(playerIsVirtual) = false;
|
||||
|
||||
["unit", { // Add unit changed EH to check if player is either virtual (logic) or a UAV AI
|
||||
params ["_unit"];
|
||||
GVAR(playerIsVirtual) = ((getNumber (configFile >> "CfgVehicles" >> (typeOf _unit) >> "isPlayableLogic")) == 1) ||
|
||||
{(getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "simulation")) == "UAVPilot"};
|
||||
GVAR(playerIsVirtual) = ((getNumber (configOf _unit >> "isPlayableLogic")) == 1) ||
|
||||
{(getText (configOf _unit >> "simulation")) == "UAVPilot"};
|
||||
TRACE_3("unit changed",_unit,typeOf _unit,GVAR(playerIsVirtual));
|
||||
}, true] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
|
@ -24,7 +24,7 @@ TRACE_2("applyGlassesEffect",_player,_glasses);
|
||||
// remove old effect
|
||||
call FUNC(removeGlassesEffect);
|
||||
|
||||
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith {
|
||||
if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith {
|
||||
TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator)
|
||||
};
|
||||
|
||||
|
@ -74,7 +74,7 @@ _affected = _affected - [ACE_player];
|
||||
|
||||
// Affect local player, independently of distance
|
||||
if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then {
|
||||
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf ACE_player) >> "isPlayableLogic")) == 1) exitWith {
|
||||
if ((getNumber (configOf ACE_player >> "isPlayableLogic")) == 1) exitWith {
|
||||
TRACE_1("skipping playable logic",typeOf ACE_player); // VirtualMan_F (placeable logic zeus / spectator)
|
||||
};
|
||||
// Do effects for player
|
||||
|
@ -196,7 +196,7 @@ private _vehicle = _position nearestObject "Car";
|
||||
|
||||
if (!local _vehicle) exitWith {};
|
||||
|
||||
private _config = _vehicle call CBA_fnc_getObjectConfig;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
// --- burn tyres
|
||||
private _fnc_isWheelHitPoint = {
|
||||
|
@ -60,7 +60,7 @@ GVAR(lastPlayerVehicle) = objNull;
|
||||
};
|
||||
// Don't add a new EH if the unit respawned
|
||||
if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then {
|
||||
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith {
|
||||
if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith {
|
||||
TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator)
|
||||
};
|
||||
private _firedEH = _player addEventHandler ["FiredNear", {call FUNC(firedNear)}];
|
||||
|
@ -22,10 +22,10 @@ if (isNull _vehicle) exitWith {};
|
||||
private _newAttenuation = 1;
|
||||
if (ACE_player != _vehicle) then {
|
||||
private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
|
||||
private _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType");
|
||||
private _effectType = getText (configOf _vehicle >> "attenuationEffectType");
|
||||
|
||||
if (!(_turretPath isEqualTo [])) then {
|
||||
private _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath);
|
||||
private _turretConfig = [(configOf _vehicle), _turretPath] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
|
||||
_effectType = "";
|
||||
@ -40,7 +40,7 @@ if (ACE_player != _vehicle) then {
|
||||
case (_effectType == ""): {1};
|
||||
case (_effectType == "CarAttenuation");
|
||||
case (_effectType == "RHS_CarAttenuation"): { // Increase protection for armored cars
|
||||
private _armor = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> "HitBody" >> "armor");
|
||||
private _armor = getNumber (configOf _vehicle >> "HitPoints" >> "HitBody" >> "armor");
|
||||
linearConversion [2, 8, _armor, 0.5, 0.3, true];};
|
||||
case (_effectType == "OpenCarAttenuation"): {1};
|
||||
case (_effectType == "TankAttenuation"): {0.1};
|
||||
|
@ -41,7 +41,7 @@ if (!_enabled) exitWith {TRACE_3("Not enabled",_enabled,_vehicle,_turretPath);};
|
||||
|
||||
|
||||
// Add laser if vehicle is configured for one:
|
||||
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then {
|
||||
if ((getNumber (configOf _vehicle >> QGVAR(addLaserDesignator))) == 1) then {
|
||||
[{
|
||||
params ["_vehicle", "_turretPath"];
|
||||
TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath);
|
||||
|
@ -38,7 +38,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
|
||||
|
||||
//Make the common case fast (cursorTarget is looking at a door):
|
||||
if ((!isNull cursorTarget) && {cursorTarget isKindOf "Static"} && {!(cursorTarget in _housesScaned)}) then {
|
||||
if (((count (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "UserActions")) > 0) || {(count (getArray (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "ladders"))) > 0}) then {
|
||||
if (((count (configOf cursorTarget >> "UserActions")) > 0) || {(count (getArray (configOf cursorTarget >> "ladders"))) > 0}) then {
|
||||
_housesToScanForActions = [cursorTarget];
|
||||
} else {
|
||||
_housesScaned pushBack cursorTarget;
|
||||
|
@ -620,7 +620,7 @@ class CfgVehicles {
|
||||
condition = "true";
|
||||
class ACE_OpenBox {
|
||||
displayName = CSTRING(OpenBox);
|
||||
condition = QUOTE((alive _target) && {(getNumber (configFile >> 'CfgVehicles' >> (typeOf _target) >> 'disableInventory')) == 0});
|
||||
condition = QUOTE((alive _target) && {(getNumber (configOf _target >> 'disableInventory')) == 0});
|
||||
statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)), _target)]);
|
||||
showDisabled = 0;
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ private _actions = [];
|
||||
{
|
||||
private _unit = _x;
|
||||
|
||||
if (_unit != _player && {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "simulation") != "UAVPilot"}) then {
|
||||
if (_unit != _player && {getText (configOf _unit >> "simulation") != "UAVPilot"}) then {
|
||||
private _icon = [
|
||||
"",
|
||||
"A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa",
|
||||
|
@ -18,5 +18,5 @@
|
||||
params ["_target"];
|
||||
|
||||
alive _target &&
|
||||
{getMass _target <= 2600 || getNumber (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(canPush)) == 1} &&
|
||||
{getMass _target <= 2600 || getNumber (configOf _target >> QGVAR(canPush)) == 1} &&
|
||||
{vectorMagnitude velocity _target < 3}
|
||||
|
@ -22,7 +22,7 @@ TRACE_2("params",_target,_cameraPosASL);
|
||||
private _bb = boundingBoxReal _target;
|
||||
(_bb select 0) params ["_bbX", "_bbY", "_bbZ"];
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> (typeOf _target);
|
||||
private _config = configOf _target;
|
||||
if (isNumber (_config >> QGVAR(bodyWidth))) then {_bbX = getNumber (_config >> QGVAR(bodyWidth));};
|
||||
if (isNumber (_config >> QGVAR(bodyLength))) then {_bbY = getNumber (_config >> QGVAR(bodyLength));};
|
||||
|
||||
|
@ -23,7 +23,7 @@ TRACE_2("openDoor",_house,_door);
|
||||
|
||||
if (isNull _house) exitWith {};
|
||||
|
||||
if ((configProperties [configFile >> "CfgVehicles" >> (typeOf _house) >> "UserActions"]) isEqualTo []) exitWith {
|
||||
if ((configProperties [configOf _house >> "UserActions"]) isEqualTo []) exitWith {
|
||||
TRACE_1("Ignore houses with no UserActions",typeOf _house); // Fix problem with Shoothouse Walls
|
||||
};
|
||||
|
||||
@ -38,8 +38,8 @@ private _lockedVariable = format ["bis_disabled_%1", _door];
|
||||
// Check if the door can be locked aka have locked variable, otherwhise cant lock it
|
||||
if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable, 0] == 1}) exitWith {
|
||||
private _lockedAnimation = format ["%1_locked_source", _door];
|
||||
TRACE_3("locked",_house,_lockedAnimation,isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation));
|
||||
if (isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)) then {
|
||||
TRACE_3("locked",_house,_lockedAnimation,isClass (configOf _house >> "AnimationSources" >> _lockedAnimation));
|
||||
if (isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)) then {
|
||||
// from: a3\structures_f\scripts\fn_door.sqf: - wiggles the door handle (A3 buildings)
|
||||
_house animateSource [_lockedAnimation, (1 - (_house animationSourcePhase _lockedAnimation))];
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ GVAR(vehicleLightColor) = [1,1,1,0];
|
||||
["vehicle", {
|
||||
params ["_unit", "_vehicle"];
|
||||
if ((isNull _vehicle) || {_unit == _vehicle}) exitWith {};
|
||||
private _cfg = configfile >> "CfgVehicles" >> (typeOf _vehicle);
|
||||
private _cfg = configOf _vehicle;
|
||||
GVAR(vehicleExteriorTurrets) = getArray (_cfg >> QGVAR(vehicleExteriorTurrets));
|
||||
GVAR(vehicleLightColor) = [_cfg >> QGVAR(vehicleLightColor), "array", [1,1,1,0]] call CBA_fnc_getConfigEntry;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
reverse _allHitPoints;
|
||||
|
||||
if (_allHitPoints param [0, ""] != "ACE_HDBracket") then {
|
||||
private _config = [_unit] call CBA_fnc_getObjectConfig;
|
||||
private _config = configOf _unit;
|
||||
if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);};
|
||||
if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)};
|
||||
ERROR_1("Bad hitpoints for unit type ""%1""",typeOf _unit);
|
||||
@ -53,7 +53,7 @@
|
||||
["Air", "Killed", {
|
||||
params ["_vehicle", "_killer"];
|
||||
TRACE_3("air killed",_vehicle,typeOf _vehicle,velocity _vehicle);
|
||||
if ((getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "destrType")) == "") exitWith {};
|
||||
if ((getText (configOf _vehicle >> "destrType")) == "") exitWith {};
|
||||
if (unitIsUAV _vehicle) exitWith {};
|
||||
|
||||
private _lethality = linearConversion [0, 25, (vectorMagnitude velocity _vehicle), 0.5, 1];
|
||||
|
@ -21,7 +21,7 @@ params ["_unit", "_hitpoint"];
|
||||
private _uniform = uniform _unit;
|
||||
// If unit is naked, use its underwear class instead
|
||||
if (_uniform isEqualTo "") then {
|
||||
_uniform = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "nakedUniform");
|
||||
_uniform = getText (configOf _unit >> "nakedUniform");
|
||||
};
|
||||
|
||||
private _gear = [
|
||||
|
@ -12,7 +12,7 @@ PREP_RECOMPILE_END;
|
||||
["CAManBase", "init", {
|
||||
params ["_unit"];
|
||||
|
||||
private _config = [_unit] call CBA_fnc_getObjectConfig;
|
||||
private _config = configOf _unit;
|
||||
if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);};
|
||||
if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)};
|
||||
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") > 0]
|
||||
_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configOf _vehicle >> "attendant") > 0]
|
||||
|
@ -43,7 +43,7 @@ if (isNull _vehicle) exitWith { TRACE_1("no vehicle found",_vehicle); };
|
||||
params ["_unit", "_vehicle"];
|
||||
TRACE_2("success",_unit,_vehicle);
|
||||
private _patientName = [_unit, false, true] call EFUNC(common,getName);
|
||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
private _vehicleName = getText (configOf _vehicle >> "displayName");
|
||||
[[LSTRING(LoadedInto), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured);
|
||||
}, [_patient, _vehicle], 3, {
|
||||
params ["_unit", "_emptyPos"];
|
||||
|
@ -36,7 +36,7 @@ if (_patient call EFUNC(common,isAwake)) exitWith {
|
||||
params ["_unit", "_vehicle"];
|
||||
TRACE_2("success",_unit,_vehicle);
|
||||
private _patientName = [_unit, false, true] call EFUNC(common,getName);
|
||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
private _vehicleName = getText (configOf _vehicle >> "displayName");
|
||||
[[LSTRING(UnloadedFrom), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured);
|
||||
}, [_patient, vehicle _patient], 3, {
|
||||
params ["_unit", "_vehicle"];
|
||||
|
@ -24,7 +24,7 @@ addMissionEventHandler ["Draw3D", {
|
||||
drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,1,1], _detectorPointAGL, 1, 1, 0, "detector", 1, 0.02, "PuristaMedium"];
|
||||
{
|
||||
private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10];
|
||||
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> QGVAR(detectable))) == 1) then {
|
||||
if ((getNumber (configOf _x >> QGVAR(detectable))) == 1) then {
|
||||
drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"];
|
||||
} else {
|
||||
drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"];
|
||||
|
@ -18,7 +18,7 @@ params ["_firedEH", "", "", "", "_stateParams"];
|
||||
_firedEH params ["_shooter","_weapon","","","","","_projectile"];
|
||||
_stateParams params ["", "_seekerStateParams"];
|
||||
|
||||
private _usePilotCamera = getNumber (([_shooter] call CBA_fnc_getObjectConfig) >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1;
|
||||
private _usePilotCamera = getNumber (configOf _shooter >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1;
|
||||
|
||||
private _turretPath = [_shooter, _weapon] call CBA_fnc_turretPathWeapon;
|
||||
private _turretConfig = [_shooter, _turretPath] call CBA_fnc_getTurret;
|
||||
|
@ -30,7 +30,7 @@ if !(_target isKindOf "AllVehicles") then {
|
||||
_launchParams set [0, _target];
|
||||
_projectile setMissileTarget objNull; // to emulate a no launch warning
|
||||
|
||||
private _projectileConfig = [_projectile] call CBA_fnc_getObjectConfig;
|
||||
private _projectileConfig = configOf _projectile;
|
||||
private _config = _projectileConfig >> "ace_missileguidance";
|
||||
|
||||
private _isActive = false;
|
||||
|
@ -19,7 +19,7 @@ _firedEH params ["_shooter","_weapon","","","","","_projectile", "_gunner"];
|
||||
_stateParams params ["", "", "_attackProfileStateParams"];
|
||||
_seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"];
|
||||
|
||||
private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance";
|
||||
private _config = configOf _projectile >> "ace_missileguidance";
|
||||
private _maxCorrectableDistance = [_config >> "correctionDistance", "NUMBER", DEFAULT_CORRECTION_DISTANCE] call CBA_fnc_getConfigEntry;
|
||||
private _distanceAheadOfMissile = [_config >> "missileLeadDistance", "NUMBER", DEFAULT_LEAD_DISTANCE] call CBA_fnc_getConfigEntry;
|
||||
private _maxDistanceSqr = _seekerMaxRange * _seekerMaxRange;
|
||||
|
@ -31,7 +31,7 @@ if (alive ACE_player) then {
|
||||
// Test if we are using player's nvg or if sourced from vehicle:
|
||||
|
||||
private _currentVehicle = vehicle ACE_player;
|
||||
private _vehConfig = configFile >> "CfgVehicles" >> (typeOf _currentVehicle);
|
||||
private _vehConfig = configOf _currentVehicle;
|
||||
|
||||
if (cameraView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view
|
||||
if ([ACE_player] call CBA_fnc_canUseWeapon) exitWith {true}; // FFV
|
||||
|
@ -37,7 +37,7 @@ private _fnc_setSelections = {
|
||||
} forEach GVAR(comboBoxes);
|
||||
};
|
||||
|
||||
private _pylonComponent = configFile >> "CfgVehicles" >> typeOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent";
|
||||
private _pylonComponent = configOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent";
|
||||
private _loadoutFound = {
|
||||
if (getText (_x >> "displayName") isEqualTo _loadoutName) exitWith {
|
||||
// Get default turrets from config
|
||||
|
@ -48,7 +48,7 @@ if (GVAR(rearmNewPylons) || {_isCurator}) then {
|
||||
ctrlShow [ID_TEXT_BANNER, false];
|
||||
};
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _aircraft;
|
||||
private _config = configOf _aircraft;
|
||||
private _pylonComponent = _config >> "Components" >> "TransportPylonsComponent";
|
||||
|
||||
ctrlSetText [ID_PICTURE_AIRCRAFT, getText (_pylonComponent >> "uiPicture")];
|
||||
|
@ -94,7 +94,7 @@ scopeName "main";
|
||||
|
||||
params ["_vehicle", "_player"];
|
||||
|
||||
private _vehicleConfig = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _vehicleConfig = configOf _vehicle;
|
||||
private _isInVehicle = _player in _vehicle;
|
||||
private _fullCrew = fullCrew [_vehicle, "", true];
|
||||
|
||||
|
@ -72,7 +72,7 @@ if (!isNull _target &&
|
||||
private _effectiveRole = toLower _role;
|
||||
|
||||
if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner
|
||||
if ((_effectiveRole == "driver") && {(getNumber (([_target] call CBA_fnc_getObjectConfig) >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons)
|
||||
if ((_effectiveRole == "driver") && {(getNumber (configOf _target >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons)
|
||||
|
||||
// Seats can be locked independently of the main vehicle
|
||||
if ((_role == "driver") && {lockedDriver _target}) exitWith {TRACE_1("lockedDriver",_x);};
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
|
||||
#define DEFAULT_REARMCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(defaultSupply),-1)
|
||||
#define DEFAULT_REARMCARGO GET_NUMBER(configOf _this >> QQGVAR(defaultSupply),-1)
|
||||
|
||||
|
||||
class Cfg3DEN {
|
||||
|
@ -44,7 +44,7 @@ private _vehicleActions = [];
|
||||
TRACE_2("can add",_x,_magazineHelper);
|
||||
|
||||
if (!(_magazineHelper isEqualTo [])) then {
|
||||
private _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon");
|
||||
private _icon = getText(configOf _vehicle >> "Icon");
|
||||
if !((_icon select [0, 1]) == "\") then {
|
||||
_icon = "";
|
||||
};
|
||||
@ -52,7 +52,7 @@ private _vehicleActions = [];
|
||||
// [Level 0] adds a single action to rearm the entire vic
|
||||
private _action = [
|
||||
_vehicle,
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"),
|
||||
getText(configOf _vehicle >> "displayName"),
|
||||
_icon,
|
||||
{_this call FUNC(rearmEntireVehicle)},
|
||||
{true},
|
||||
@ -79,7 +79,7 @@ private _vehicleActions = [];
|
||||
|
||||
private _action = [
|
||||
_vehicle,
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"),
|
||||
getText(configOf _vehicle >> "displayName"),
|
||||
_icon,
|
||||
{},
|
||||
{true},
|
||||
|
@ -30,7 +30,7 @@ params ["_vehicle"];
|
||||
private _magazineInfo = [];
|
||||
|
||||
// 1.70 pylons
|
||||
private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"];
|
||||
private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"];
|
||||
{
|
||||
private _pylonConfig = _x;
|
||||
|
||||
|
@ -25,8 +25,8 @@ if (GVAR(supply) != 1) exitWith {
|
||||
private _supply = _truck getVariable QGVAR(currentSupply);
|
||||
|
||||
if (isNil "_supply") then {
|
||||
if (isNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply))) then {
|
||||
_supply = getNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply));
|
||||
if (isNumber (configOf _truck >> QGVAR(defaultSupply))) then {
|
||||
_supply = getNumber (configOf _truck >> QGVAR(defaultSupply));
|
||||
} else {
|
||||
_supply = 1200;
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ params [
|
||||
|
||||
if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false};
|
||||
|
||||
private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target;
|
||||
private _vehCfg = configOf _target;
|
||||
private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo");
|
||||
private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply));
|
||||
private _supplyVehicle = _target getVariable [QGVAR(isSupplyVehicle), false];
|
||||
|
@ -41,7 +41,7 @@ private _currentSupply = if (_addToCurrent) then {
|
||||
|
||||
_source setVariable [QGVAR(currentSupply), _currentSupply + _rearmCargo, true];
|
||||
|
||||
private _rearmCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(defaultSupply));
|
||||
private _rearmCargoConfig = getNumber (configOf _source >> QGVAR(defaultSupply));
|
||||
|
||||
// already initialized because this is a config rearm vehicle
|
||||
if (_rearmCargoConfig > 0 || _source getVariable [QGVAR(isSupplyVehicle), false]) exitWith {};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user