mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
General - SQF Improvements (#9698)
Co-authored-by: Dystopian <sddex@ya.ru> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
8d6555ad0f
commit
1e404cf85b
@ -53,7 +53,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
|
|||||||
private _gridCenter = [_x + 25, _y + 25];
|
private _gridCenter = [_x + 25, _y + 25];
|
||||||
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||||
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
||||||
private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
|
private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter);
|
||||||
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
|
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
|
||||||
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
||||||
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||||
|
|
||||||
private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
|
private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
|
||||||
private _twistDirection = [0, 1] select (_barrelTwist != 0);
|
private _twistDirection = parseNumber (_barrelTwist != 0);
|
||||||
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
||||||
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
||||||
if !(_twistDirection in [-1, 0, 1]) then {
|
if !(_twistDirection in [-1, 0, 1]) then {
|
||||||
|
@ -29,7 +29,10 @@ private _currentLoiterRadius = waypointLoiterRadius _waypoint;
|
|||||||
private _currentLoiterType = waypointLoiterType _waypoint;
|
private _currentLoiterType = waypointLoiterType _waypoint;
|
||||||
|
|
||||||
// Set pos to ATL
|
// Set pos to ATL
|
||||||
_pos set [2, if (_currentHeight >= 50) then { _currentHeight } else { 0 }];
|
_pos set [
|
||||||
|
2,
|
||||||
|
[0, _currentHeight] select (_currentHeight >= 50)
|
||||||
|
];
|
||||||
|
|
||||||
// [_group] call CBA_fnc_clearWaypoints;
|
// [_group] call CBA_fnc_clearWaypoints;
|
||||||
_waypoint = _group addWaypoint [_pos, 0];
|
_waypoint = _group addWaypoint [_pos, 0];
|
||||||
|
@ -109,11 +109,10 @@ private _tabToChange = [];
|
|||||||
{
|
{
|
||||||
_x params ["_tab", "_tabSide"];
|
_x params ["_tab", "_tabSide"];
|
||||||
|
|
||||||
_tabToChange = if (_tabSide == "R") then {
|
_tabToChange = [
|
||||||
|
GVAR(statsListLeftPanel),
|
||||||
GVAR(statsListRightPanel)
|
GVAR(statsListRightPanel)
|
||||||
} else {
|
] select (_tabSide == "R");
|
||||||
GVAR(statsListLeftPanel)
|
|
||||||
};
|
|
||||||
|
|
||||||
_stats = _tabToChange select _tab;
|
_stats = _tabToChange select _tab;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ private _fnc_fillRightContainer = {
|
|||||||
_ctrlPanel lnbSetText [[_lbAdd, 1], _displayName];
|
_ctrlPanel lnbSetText [[_lbAdd, 1], _displayName];
|
||||||
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
||||||
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
||||||
_ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select _isUnique];
|
_ctrlPanel lnbSetValue [[_lbAdd, 2], parseNumber _isUnique];
|
||||||
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
||||||
if ((toLower _className) in GVAR(favorites)) then {
|
if ((toLower _className) in GVAR(favorites)) then {
|
||||||
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
||||||
|
@ -147,7 +147,7 @@ if (!isNull _loadoutsDisplay) then {
|
|||||||
// Right panel lnb + and - buttons
|
// Right panel lnb + and - buttons
|
||||||
case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): {
|
case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): {
|
||||||
if (GVAR(rightTabLnBFocus)) then {
|
if (GVAR(rightTabLnBFocus)) then {
|
||||||
[_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo);
|
[_display, parseNumber (_keyPressed != DIK_LEFT)] call FUNC(buttonCargo);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -31,9 +31,9 @@ if (_allItems isEqualTo []) then { _allItems = [configName _config] };
|
|||||||
|| {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}};
|
|| {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}};
|
||||||
|
|
||||||
private _text = switch (true) do { // shorthand roughly based on PEQ-15
|
private _text = switch (true) do { // shorthand roughly based on PEQ-15
|
||||||
case (_laser && _illum): { if (_isIR) then { "IR-DUAL" } else { "VIS-DUAL" } };
|
case (_laser && _illum): { ["VIS-DUAL", "IR-DUAL"] select _isIR }; // DUAL
|
||||||
case (_laser): { if (_isIR) then { "IR-AIM" } else { "VIS-AIM" } }; // AIM
|
case (_laser): { ["VIS-AIM", "IR-AIM"] select _isIR }; // AIM
|
||||||
case (_illum): { if (_isIR) then { "IR-ILM" } else { "VIS-ILM" } }; // ILLUMIATION
|
case (_illum): { ["VIS-ILM", "IR-ILM"] select _isIR }; // ILLUMIATION
|
||||||
default { "_" }; // there are some purely cosmetic attachements
|
default { "_" }; // there are some purely cosmetic attachements
|
||||||
};
|
};
|
||||||
_allModes pushBackUnique _text;
|
_allModes pushBackUnique _text;
|
||||||
|
@ -46,11 +46,7 @@ private _fnc_toConfigCase = {
|
|||||||
|
|
||||||
// If item doesn't exist in config, "" is returned
|
// If item doesn't exist in config, "" is returned
|
||||||
// Just return unaltered item name in that case, so it can be documented as being unavailable
|
// Just return unaltered item name in that case, so it can be documented as being unavailable
|
||||||
if (_name != "") then {
|
[_x, _name] select (_name != "");
|
||||||
_name
|
|
||||||
} else {
|
|
||||||
_x
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
_x
|
_x
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,7 @@ GVAR(magModeData) = [];
|
|||||||
{
|
{
|
||||||
_x params ["_xDisplayNameShort", "_xDisplayName", "_xInitSpeed", "_xAirFriction"];
|
_x params ["_xDisplayNameShort", "_xDisplayName", "_xInitSpeed", "_xAirFriction"];
|
||||||
if (_allSameCharge) then {
|
if (_allSameCharge) then {
|
||||||
_ctrlChargeList lbAdd format ["%1", _xDisplayNameShort];
|
_ctrlChargeList lbAdd _xDisplayNameShort;
|
||||||
_ctrlChargeList lbSetTooltip [count GVAR(magModeData), format ["%1\n%2 m/s\n%3", _xDisplayName, _xInitSpeed toFixed 1, _xAirFriction]];
|
_ctrlChargeList lbSetTooltip [count GVAR(magModeData), format ["%1\n%2 m/s\n%3", _xDisplayName, _xInitSpeed toFixed 1, _xAirFriction]];
|
||||||
GVAR(magModeData) pushBack [_xInitSpeed, _xAirFriction];
|
GVAR(magModeData) pushBack [_xInitSpeed, _xAirFriction];
|
||||||
} else {
|
} else {
|
||||||
|
@ -90,7 +90,7 @@ if (GVAR(showWind2)) then {
|
|||||||
|
|
||||||
_elevationAbs = Round(_elevationAbs * 100) / 100;
|
_elevationAbs = Round(_elevationAbs * 100) / 100;
|
||||||
if (_elevationAbs > 0) then {
|
if (_elevationAbs > 0) then {
|
||||||
ctrlSetText [400, format["%1", abs(_elevationAbs)]];
|
ctrlSetText [400, str abs _elevationAbs];
|
||||||
} else {
|
} else {
|
||||||
if (_elevationAbs < 0) then {
|
if (_elevationAbs < 0) then {
|
||||||
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
||||||
@ -100,7 +100,7 @@ if (_elevationAbs > 0) then {
|
|||||||
};
|
};
|
||||||
_elevationRel = Round(_elevationRel * 100) / 100;
|
_elevationRel = Round(_elevationRel * 100) / 100;
|
||||||
if (_elevationRel > 0) then {
|
if (_elevationRel > 0) then {
|
||||||
ctrlSetText [401, format["%1", abs(_elevationRel)]];
|
ctrlSetText [401, str abs _elevationRel];
|
||||||
} else {
|
} else {
|
||||||
if (_elevationRel < 0) then {
|
if (_elevationRel < 0) then {
|
||||||
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
||||||
@ -110,7 +110,7 @@ if (_elevationRel > 0) then {
|
|||||||
};
|
};
|
||||||
_elevationCur = Round(_elevationCur * 100) / 100;
|
_elevationCur = Round(_elevationCur * 100) / 100;
|
||||||
if (_elevationCur > 0) then {
|
if (_elevationCur > 0) then {
|
||||||
ctrlSetText [402, format["%1", abs(_elevationCur)]];
|
ctrlSetText [402, str abs _elevationCur];
|
||||||
} else {
|
} else {
|
||||||
if (_elevationCur < 0) then {
|
if (_elevationCur < 0) then {
|
||||||
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
_object setVariable ["acre_sys_core_isDisabled", _set > 0, true];
|
_object setVariable ["acre_sys_core_isDisabled", _set > 0, true];
|
||||||
};
|
};
|
||||||
if (["task_force_radio"] call FUNC(isModLoaded)) then {
|
if (["task_force_radio"] call FUNC(isModLoaded)) then {
|
||||||
_object setVariable ["tf_voiceVolume", [1, 0] select (_set > 0), true];
|
_object setVariable ["tf_voiceVolume", parseNumber (_set == 0), true];
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ if (_state) then {
|
|||||||
_keyPressedInfo set [1, ((_keyPressedInfo select 1) - 1) max 0];
|
_keyPressedInfo set [1, ((_keyPressedInfo select 1) - 1) max 0];
|
||||||
|
|
||||||
if (_keyPressedInfo isEqualTo [false, 0]) then {
|
if (_keyPressedInfo isEqualTo [false, 0]) then {
|
||||||
GVAR(keyboardInputMain) deleteAt _key,
|
GVAR(keyboardInputMain) deleteAt _key
|
||||||
};
|
};
|
||||||
}, _key, 0.5] call CBA_fnc_waitAndExecute;
|
}, _key, 0.5] call CBA_fnc_waitAndExecute;
|
||||||
}];
|
}];
|
||||||
|
@ -31,7 +31,7 @@ if (isLocalized _requestMessage) then {
|
|||||||
_requestMessage = format [_requestMessage, [_caller, false, true] call FUNC(getName)];
|
_requestMessage = format [_requestMessage, [_caller, false, true] call FUNC(getName)];
|
||||||
};
|
};
|
||||||
|
|
||||||
hint format ["%1", _requestMessage]; // @todo ?
|
hint str _requestMessage; // @todo ?
|
||||||
|
|
||||||
if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
|
if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
|
||||||
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
|
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
|
||||||
|
@ -541,7 +541,7 @@ GVAR(menuRun) = true;
|
|||||||
};
|
};
|
||||||
case "options": {
|
case "options": {
|
||||||
(__dsp displayCtrl __Option0) ctrlSetText "Signal Delay";
|
(__dsp displayCtrl __Option0) ctrlSetText "Signal Delay";
|
||||||
(__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" });
|
(__dsp displayCtrl __Option1) ctrlSetText (["Direction: MIL", "Direction: Deg"] select GVAR(useDegrees));
|
||||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
|
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
|
||||||
if (GVAR(SEL)) then {
|
if (GVAR(SEL)) then {
|
||||||
GVAR(vectorConnected) = false;
|
GVAR(vectorConnected) = false;
|
||||||
|
@ -65,10 +65,10 @@ GVAR(outputPFH) = [{
|
|||||||
private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
__gridControl ctrlSetText _dagrGrid;
|
||||||
__speedControl ctrlSetText format ["%1", _dagrSpeed];
|
__speedControl ctrlSetText _dagrSpeed;
|
||||||
__elevationControl ctrlSetText format ["%1", _dagrElevation];
|
__elevationControl ctrlSetText _dagrElevation;
|
||||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 <20>", _dagrHeading] });
|
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { str _dagrHeading } else { format ["%1 <20>", _dagrHeading] });
|
||||||
__timeControl ctrlSetText format ["%1", _dagrTime];
|
__timeControl ctrlSetText _dagrTime;
|
||||||
|
|
||||||
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -89,8 +89,8 @@ private _dagrDist = str GVAR(LAZDIST) + "m";
|
|||||||
GVAR(vectorGrid) = _dagrGrid;
|
GVAR(vectorGrid) = _dagrGrid;
|
||||||
|
|
||||||
// OUTPUT
|
// OUTPUT
|
||||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
__gridControl ctrlSetText _dagrGrid;
|
||||||
__speedControl ctrlSetText format ["%1", _dagrDist];
|
__speedControl ctrlSetText _dagrDist;
|
||||||
__elevationControl ctrlSetText format ["%1", _dagrElevation];
|
__elevationControl ctrlSetText _dagrElevation;
|
||||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1°", _bearing] });
|
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { str _bearing } else { format ["%1°", _bearing] });
|
||||||
__timeControl ctrlSetText format ["%1", _dagrTime];
|
__timeControl ctrlSetText _dagrTime;
|
||||||
|
@ -85,10 +85,10 @@ GVAR(outputPFH) = [{
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
__gridControl ctrlSetText _dagrGrid;
|
||||||
__speedControl ctrlSetText format ["%1", _bearing];
|
__speedControl ctrlSetText str _bearing;
|
||||||
__elevationControl ctrlSetText format ["%1", _dagrGrid2];
|
__elevationControl ctrlSetText _dagrGrid2;
|
||||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1°", _dagrHeading] });
|
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { str _dagrHeading } else { format ["%1°", _dagrHeading] });
|
||||||
__timeControl ctrlSetText format ["%1", _dagrDistance];
|
__timeControl ctrlSetText _dagrDistance;
|
||||||
|
|
||||||
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -55,7 +55,7 @@ params ["_listBoxCtrl", "_itemsCountArray"];
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_listBoxCtrl lbAdd format ["%1", _displayName];
|
_listBoxCtrl lbAdd _displayName;
|
||||||
_listBoxCtrl lbSetData [((lbSize _listBoxCtrl) - 1), _classname];
|
_listBoxCtrl lbSetData [((lbSize _listBoxCtrl) - 1), _classname];
|
||||||
_listBoxCtrl lbSetPicture [((lbSize _listBoxCtrl) - 1), _picture];
|
_listBoxCtrl lbSetPicture [((lbSize _listBoxCtrl) - 1), _picture];
|
||||||
_listBoxCtrl lbSetTextRight [((lbSize _listBoxCtrl) - 1), str _count];
|
_listBoxCtrl lbSetTextRight [((lbSize _listBoxCtrl) - 1), str _count];
|
||||||
|
@ -29,7 +29,7 @@ private _direction = getDir _object;
|
|||||||
|
|
||||||
// Marker name unique to this object
|
// Marker name unique to this object
|
||||||
private _markerNameStr = format [QGVAR(marker_%1), hashValue _object];
|
private _markerNameStr = format [QGVAR(marker_%1), hashValue _object];
|
||||||
private _channel = if (GVAR(markObjectsOnMap) == 2) then { 0 } else { 1 };
|
private _channel = parseNumber (GVAR(markObjectsOnMap) != 2);
|
||||||
|
|
||||||
private _marker = createMarkerLocal [_markerNameStr, _object, _channel, _unit];
|
private _marker = createMarkerLocal [_markerNameStr, _object, _channel, _unit];
|
||||||
TRACE_2("created",_marker,_channel);
|
TRACE_2("created",_marker,_channel);
|
||||||
|
@ -48,7 +48,7 @@ _caliber = call {
|
|||||||
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
|
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
|
||||||
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };
|
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };
|
||||||
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
||||||
if (_caliber <= 0) then { 6.5 } else { _caliber };
|
[_caliber, 6.5] select (_caliber <= 0);
|
||||||
};
|
};
|
||||||
private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5;
|
private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5;
|
||||||
|
|
||||||
|
@ -27,7 +27,9 @@ params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"];
|
|||||||
if (_weapon in ["Throw", "Put"]) exitWith {};
|
if (_weapon in ["Throw", "Put"]) exitWith {};
|
||||||
if (_distance > 50) exitWith {};
|
if (_distance > 50) exitWith {};
|
||||||
|
|
||||||
private _vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
|
private _vehAttenuation = [GVAR(playerVehAttenuation), 1] select (
|
||||||
|
(ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}
|
||||||
|
);
|
||||||
private _distance = 1 max _distance;
|
private _distance = 1 max _distance;
|
||||||
|
|
||||||
private _silencer = switch (_weapon) do {
|
private _silencer = switch (_weapon) do {
|
||||||
@ -78,7 +80,7 @@ if (isNil "_loudness") then {
|
|||||||
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
|
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
|
||||||
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };
|
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };
|
||||||
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
||||||
if (_caliber <= 0) then { 6.5 } else { _caliber };
|
[_caliber, 6.5] select (_caliber <= 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5;
|
_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5;
|
||||||
|
@ -31,11 +31,10 @@ private _configLaunchHeightClear = getNumber (_attackConfig >> QGVAR(launchHeigh
|
|||||||
private _startingStage = if (_configLaunchHeightClear > 0) then {
|
private _startingStage = if (_configLaunchHeightClear > 0) then {
|
||||||
STAGE_LAUNCH; // LOAL-HI / LO
|
STAGE_LAUNCH; // LOAL-HI / LO
|
||||||
} else {
|
} else {
|
||||||
if (_seekerTargetPos isEqualTo [0,0,0]) then {
|
[
|
||||||
STAGE_SEEK_CRUISE; // LOAL-DIR
|
STAGE_ATTACK_CRUISE,
|
||||||
} else {
|
STAGE_SEEK_CRUISE,
|
||||||
STAGE_ATTACK_CRUISE // LOBL
|
] select (_seekerTargetPos isEqualTo [0,0,0]);
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set data in param array
|
// Set data in param array
|
||||||
|
@ -145,7 +145,7 @@ GVAR(no_cams) sort true;
|
|||||||
GVAR(cam) camCommit 0;
|
GVAR(cam) camCommit 0;
|
||||||
|
|
||||||
ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]];
|
ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]];
|
||||||
ctrlSetText [2, format["%1", GVAR(cur_cam) + 1]];
|
ctrlSetText [2, str (GVAR(cur_cam) + 1)];
|
||||||
private _cam_time = CBA_missionTime - (GVAR(huntIR) getVariable [QGVAR(startTime), CBA_missionTime]);
|
private _cam_time = CBA_missionTime - (GVAR(huntIR) getVariable [QGVAR(startTime), CBA_missionTime]);
|
||||||
ctrlSetText [3, format["%1 s", round(_cam_time)]];
|
ctrlSetText [3, format["%1 s", round(_cam_time)]];
|
||||||
private _cam_pos = getPosVisual GVAR(huntIR);
|
private _cam_pos = getPosVisual GVAR(huntIR);
|
||||||
|
@ -49,7 +49,7 @@ _position = if (_position isEqualType "") then {
|
|||||||
} else {
|
} else {
|
||||||
if (_position isEqualType []) then {
|
if (_position isEqualType []) then {
|
||||||
// If the action is set to a array position, create the suitable code
|
// If the action is set to a array position, create the suitable code
|
||||||
compile format ["%1", _position];
|
compile str _position;
|
||||||
} else {
|
} else {
|
||||||
_position;
|
_position;
|
||||||
};
|
};
|
||||||
|
@ -30,6 +30,6 @@ _vehicles apply {
|
|||||||
_name = format ["%1 (%2m)", _name, _distanceStr];
|
_name = format ["%1 (%2m)", _name, _distanceStr];
|
||||||
};
|
};
|
||||||
private _icon = [_x] call EFUNC(common,getVehicleIcon);
|
private _icon = [_x] call EFUNC(common,getVehicleIcon);
|
||||||
private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
private _action = [str _x, _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||||
[_action, [], _target]
|
[_action, [], _target]
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ if (_useListMenu) then {
|
|||||||
_scaleX = _textSize * 0.17 * 1.1;
|
_scaleX = _textSize * 0.17 * 1.1;
|
||||||
_scaleY = 0.17 * 0.30 * 4/3;
|
_scaleY = 0.17 * 0.30 * 4/3;
|
||||||
} else {
|
} else {
|
||||||
private _textSize = if (GVAR(textSize) > 2) then {1.3} else {1};
|
private _textSIze = [1, 1.3] select (GVAR(textSize) > 2);
|
||||||
_scaleX = _textSize * 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
|
_scaleX = _textSize * 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
|
||||||
_scaleY = _textSize * 0.17 * 4/3 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
|
_scaleY = _textSize * 0.17 * 4/3 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
|
||||||
};
|
};
|
||||||
|
@ -136,7 +136,7 @@ GVAR(isOpeningDoor) = false;
|
|||||||
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
|
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
|
||||||
|
|
||||||
//Tap whichever shoulder is closest
|
//Tap whichever shoulder is closest
|
||||||
private _shoulderNum = [0, 1] select (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180);
|
private _shoulderNum = parseNumber (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180);
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, cursorTarget, _shoulderNum] call FUNC(tapShoulder);
|
[ACE_player, cursorTarget, _shoulderNum] call FUNC(tapShoulder);
|
||||||
|
@ -43,7 +43,7 @@ private _icon = "";
|
|||||||
|
|
||||||
_actions pushBack [
|
_actions pushBack [
|
||||||
[
|
[
|
||||||
format ["%1", _unit],
|
str _unit,
|
||||||
[_unit, true] call EFUNC(common,getName),
|
[_unit, true] call EFUNC(common,getName),
|
||||||
[_icon, "#FFFFFF"],
|
[_icon, "#FFFFFF"],
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ GVAR(usedScrollWheel) = false;
|
|||||||
|
|
||||||
// didn't use incremental opening. Just do animation normally.
|
// didn't use incremental opening. Just do animation normally.
|
||||||
if !(GVAR(usedScrollWheel)) then {
|
if !(GVAR(usedScrollWheel)) then {
|
||||||
private _phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
|
private _phase = parseNumber (_house animationPhase (_animations select 0) < 0.5);
|
||||||
|
|
||||||
{_house animate [_x, _phase]; false} count _animations;
|
{_house animate [_x, _phase]; false} count _animations;
|
||||||
};
|
};
|
||||||
|
@ -93,7 +93,7 @@ if (GVAR(referenceHeadingMenu) == 0) then {
|
|||||||
};
|
};
|
||||||
case 1: { // Direction
|
case 1: { // Direction
|
||||||
if (!GVAR(MinAvgMax)) then {
|
if (!GVAR(MinAvgMax)) then {
|
||||||
_textCenterBig = format["%1", format["%1 %2", GVAR(Directions) select GVAR(Direction), round(_playerDir)]];
|
_textCenterBig = format["%1 %2", GVAR(Directions) select GVAR(Direction), round(_playerDir)];
|
||||||
} else {
|
} else {
|
||||||
_textCenterLine1Left = "Min";
|
_textCenterLine1Left = "Min";
|
||||||
_textCenterLine2Left = "Avg";
|
_textCenterLine2Left = "Avg";
|
||||||
|
@ -22,7 +22,10 @@ TRACE_2("Fence cutting started",_unit,_fence);
|
|||||||
if (_unit != ACE_player) exitWith {};
|
if (_unit != ACE_player) exitWith {};
|
||||||
|
|
||||||
// Get cut time based on if unit is a engineer
|
// Get cut time based on if unit is a engineer
|
||||||
private _cutTime = if (_unit call EFUNC(common,isEngineer)) then {CUT_TIME_ENGINEER} else {CUT_TIME_DEFAULT};
|
private _cutTime = [
|
||||||
|
CUT_TIME_DEFAULT,
|
||||||
|
CUT_TIME_ENGINEER
|
||||||
|
] select (_unit call EFUNC(common,isEngineer));
|
||||||
|
|
||||||
if !(_unit call EFUNC(common,isSwimming)) then {
|
if !(_unit call EFUNC(common,isSwimming)) then {
|
||||||
[_unit, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
[_unit, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||||
|
@ -28,7 +28,7 @@ GVAR(dev_watchVariableRunning) = true;
|
|||||||
_return pushBack format ["<t color='#%1'>State: %2</t>", _color, _targetState];
|
_return pushBack format ["<t color='#%1'>State: %2</t>", _color, _targetState];
|
||||||
private _hasStableVitals = ["N", "Y"] select ([_unit] call EFUNC(medical_status,hasStableVitals));
|
private _hasStableVitals = ["N", "Y"] select ([_unit] call EFUNC(medical_status,hasStableVitals));
|
||||||
private _hasStableCondition = ["N", "Y"] select ([_unit] call EFUNC(medical_status,isInStableCondition));
|
private _hasStableCondition = ["N", "Y"] select ([_unit] call EFUNC(medical_status,isInStableCondition));
|
||||||
private _unconcFlag = if IS_UNCONSCIOUS(_unit) then {"[<t color='#BBFFBB'>U</t>]"} else {""};
|
private _unconcFlag = ["", "[<t color='#BBFFBB'>U</t>]"] select IS_UNCONSCIOUS(_unit);
|
||||||
private _timeLeft = _unit getVariable [QEGVAR(medical_statemachine,cardiacArrestTimeLeft), -1];
|
private _timeLeft = _unit getVariable [QEGVAR(medical_statemachine,cardiacArrestTimeLeft), -1];
|
||||||
private _cardiactArrestFlag = if IN_CRDC_ARRST(_unit) then {format ["[<t color='#BBBBFF'>CA</t> %1]", _timeLeft toFixed 1]} else {""};
|
private _cardiactArrestFlag = if IN_CRDC_ARRST(_unit) then {format ["[<t color='#BBBBFF'>CA</t> %1]", _timeLeft toFixed 1]} else {""};
|
||||||
_return pushBack format ["[StableVitals: %1] [StableCon: %2] %3 %4", _hasStableVitals, _hasStableCondition, _unconcFlag, _cardiactArrestFlag];
|
_return pushBack format ["[StableVitals: %1] [StableCon: %2] %3 %4", _hasStableVitals, _hasStableCondition, _unconcFlag, _cardiactArrestFlag];
|
||||||
@ -38,7 +38,7 @@ GVAR(dev_watchVariableRunning) = true;
|
|||||||
private _woundBleeding = GET_WOUND_BLEEDING(_unit);
|
private _woundBleeding = GET_WOUND_BLEEDING(_unit);
|
||||||
private _bloodLoss = GET_BLOOD_LOSS(_unit);
|
private _bloodLoss = GET_BLOOD_LOSS(_unit);
|
||||||
private _hemorrhage = GET_HEMORRHAGE(_unit);
|
private _hemorrhage = GET_HEMORRHAGE(_unit);
|
||||||
private _isBleeding = if (IS_BLEEDING(_unit)) then {"<t color ='#FF9999'>Bleeding</t>"} else {""};
|
private _isBleeding = ["", "[<t color ='#FF9999'>Bleeding</t>]"] select IS_BLEEDING(_unit);
|
||||||
private _secondsToHeartstop = if (_bloodLoss != 0) then {format ["[<t color ='#FF9999'>Time Left:</t> %1 sec]", (((_bloodVolume - BLOOD_VOLUME_CLASS_4_HEMORRHAGE) max 0) / _bloodLoss) toFixed 0]} else {""};
|
private _secondsToHeartstop = if (_bloodLoss != 0) then {format ["[<t color ='#FF9999'>Time Left:</t> %1 sec]", (((_bloodVolume - BLOOD_VOLUME_CLASS_4_HEMORRHAGE) max 0) / _bloodLoss) toFixed 0]} else {""};
|
||||||
_return pushBack format ["Blood: %1 [Hemorrhage: %2] %3", _bloodVolume toFixed 3, _hemorrhage, _isBleeding];
|
_return pushBack format ["Blood: %1 [Hemorrhage: %2] %3", _bloodVolume toFixed 3, _hemorrhage, _isBleeding];
|
||||||
_return pushBack format [" - [W: %1 T: %2] %3", _woundBleeding toFixed 4, _bloodLoss toFixed 4, _secondsToHeartstop];
|
_return pushBack format [" - [W: %1 T: %2] %3", _woundBleeding toFixed 4, _bloodLoss toFixed 4, _secondsToHeartstop];
|
||||||
@ -60,7 +60,7 @@ GVAR(dev_watchVariableRunning) = true;
|
|||||||
|
|
||||||
// Damage:
|
// Damage:
|
||||||
private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]];
|
private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]];
|
||||||
private _limping = if (_unit getVariable [QEGVAR(medical,isLimping), false]) then {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
|
private _limping = ["", "[<t color ='#FFCC22'> Limping </t>]"] select (_unit getVariable [QEGVAR(medical,isLimping), false]);
|
||||||
_return pushBack format ["BodyPartDamage: [H: %1] [B: %2]", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2];
|
_return pushBack format ["BodyPartDamage: [H: %1] [B: %2]", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2];
|
||||||
_return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2];
|
_return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2];
|
||||||
|
|
||||||
@ -68,8 +68,8 @@ GVAR(dev_watchVariableRunning) = true;
|
|||||||
_return pushBack format ["[HHnd:%1] [HLeg: %2] %3", (_unit getHitPointDamage "HitHands") toFixed 2, (_unit getHitPointDamage "HitLegs") toFixed 2, _limping];
|
_return pushBack format ["[HHnd:%1] [HLeg: %2] %3", (_unit getHitPointDamage "HitHands") toFixed 2, (_unit getHitPointDamage "HitLegs") toFixed 2, _limping];
|
||||||
|
|
||||||
private _fractures = GET_FRACTURES(_unit);
|
private _fractures = GET_FRACTURES(_unit);
|
||||||
private _canSprint = if (isSprintAllowed _unit) then {""} else {"[<t color ='#FFCC22'>Sprint Blocked</t>]"};
|
private _canSprint = ["[<t color ='#FFCC22'>Sprint Blocked</t>]", ""] select (isSprintAllowed _unit);
|
||||||
private _forceWalk = if (isForcedWalk _unit) then {"[<t color ='#FF9922'>Forced Walking</t>]"} else {""};
|
private _forceWalk = ["", "[<t color ='#FF9922'>Forced Walking</t>]"] select (isForcedWalk _unit);
|
||||||
_return pushBack format ["Fractures: %1 %2%3", _fractures, _canSprint, _forceWalk];
|
_return pushBack format ["Fractures: %1 %2%3", _fractures, _canSprint, _forceWalk];
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ private _itemHash = createHashMap;
|
|||||||
private _items = getArray (configFile >> "ace_medical_treatment_actions" >> _x >> "items");
|
private _items = getArray (configFile >> "ace_medical_treatment_actions" >> _x >> "items");
|
||||||
if (_items isEqualTo []) then { ERROR_1("bad action %1",_x); };
|
if (_items isEqualTo []) then { ERROR_1("bad action %1",_x); };
|
||||||
private _itemClassname = configName (configFile >> "CfgWeapons" >> _items # 0);
|
private _itemClassname = configName (configFile >> "CfgWeapons" >> _items # 0);
|
||||||
private _treatment = if ((count _treatments) > 1) then { _x } else { "" };
|
private _treatment = ["", _x] select ((count _treatments) > 1);
|
||||||
_typeHash set [_itemClassname, _treatment];
|
_typeHash set [_itemClassname, _treatment];
|
||||||
} forEach _treatments;
|
} forEach _treatments;
|
||||||
_itemHash set [_itemType, _typeHash];
|
_itemHash set [_itemType, _typeHash];
|
||||||
|
@ -38,7 +38,7 @@ if (ACE_player != GVAR(target)) then {
|
|||||||
// Vehicle
|
// Vehicle
|
||||||
private _medicVehicle = objectParent ACE_player;
|
private _medicVehicle = objectParent ACE_player;
|
||||||
private _patientVehicle = objectParent GVAR(target);
|
private _patientVehicle = objectParent GVAR(target);
|
||||||
private _vehicle = if (!isNull _medicVehicle) then {_medicVehicle} else {_patientVehicle};
|
private _vehicle = [_patientVehicle, _medicVehicle] select (!isNull _medicVehicle);
|
||||||
|
|
||||||
if (!isNull _vehicle) then {
|
if (!isNull _vehicle) then {
|
||||||
_vehicleCount = 0;
|
_vehicleCount = 0;
|
||||||
|
@ -19,15 +19,14 @@
|
|||||||
if (!isNull findDisplay 312) exitWith {};
|
if (!isNull findDisplay 312) exitWith {};
|
||||||
|
|
||||||
// Find new target to switch to
|
// Find new target to switch to
|
||||||
private _target = if (
|
private _target = [
|
||||||
|
ACE_player,
|
||||||
|
GVAR(previousTarget)
|
||||||
|
] select (
|
||||||
GVAR(target) == ACE_player
|
GVAR(target) == ACE_player
|
||||||
&& {[ACE_player, GVAR(previousTarget)] call EFUNC(common,canInteractWith)}
|
&& {[ACE_player, GVAR(previousTarget)] call EFUNC(common,canInteractWith)}
|
||||||
&& {[ACE_player, GVAR(previousTarget)] call FUNC(canOpenMenu)}
|
&& {[ACE_player, GVAR(previousTarget)] call FUNC(canOpenMenu)}
|
||||||
) then {
|
);
|
||||||
GVAR(previousTarget);
|
|
||||||
} else {
|
|
||||||
ACE_player;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Exit if new target is same as old
|
// Exit if new target is same as old
|
||||||
if (GVAR(target) == _target) exitWith {};
|
if (GVAR(target) == _target) exitWith {};
|
||||||
|
@ -39,7 +39,7 @@ private _logOutput = LSTRING(Check_Pulse_None);
|
|||||||
if (_heartRate > 1) then {
|
if (_heartRate > 1) then {
|
||||||
if (_medic call FUNC(isMedic)) then {
|
if (_medic call FUNC(isMedic)) then {
|
||||||
_heartRateOutput = LSTRING(Check_Pulse_Output_1);
|
_heartRateOutput = LSTRING(Check_Pulse_Output_1);
|
||||||
_logOutput = format ["%1", round _heartRate];
|
_logOutput = str round _heartRate;
|
||||||
} else {
|
} else {
|
||||||
_heartRateOutput = LSTRING(Check_Pulse_Output_2);
|
_heartRateOutput = LSTRING(Check_Pulse_Output_2);
|
||||||
_logOutput = LSTRING(Check_Pulse_Weak);
|
_logOutput = LSTRING(Check_Pulse_Weak);
|
||||||
|
@ -60,7 +60,7 @@ if (GVAR(currentApplicationPage) == 1) then {
|
|||||||
_size = 32 * _mapSize;
|
_size = 32 * _mapSize;
|
||||||
{
|
{
|
||||||
_x params ["_wpName", "_wpPos"];
|
_x params ["_wpName", "_wpPos"];
|
||||||
private _alpha = if (_forEachIndex == GVAR(currentWaypoint)) then {1} else {0.5};
|
private _alpha = [0.5, 1] select (_forEachIndex == GVAR(currentWaypoint));
|
||||||
_theMap drawIcon [QUOTE(PATHTO_R(images\icon_mapWaypoints.paa)), [1,1,1,_alpha], _wpPos, _size, _size, 0, '', 0 ];
|
_theMap drawIcon [QUOTE(PATHTO_R(images\icon_mapWaypoints.paa)), [1,1,1,_alpha], _wpPos, _size, _size, 0, '', 0 ];
|
||||||
} forEach _waypoints;
|
} forEach _waypoints;
|
||||||
};
|
};
|
||||||
|
@ -80,11 +80,11 @@ if (_isPIP) then {
|
|||||||
|
|
||||||
// Calculate lighting
|
// Calculate lighting
|
||||||
private _dayOpacity = call EFUNC(common,ambientBrightness);
|
private _dayOpacity = call EFUNC(common,ambientBrightness);
|
||||||
private _nightOpacity = [1, 0] select (_dayOpacity == 1);
|
private _nightOpacity = parseNumber (_dayOpacity == 1);
|
||||||
|
|
||||||
// Apply lighting and make layers visible
|
// Apply lighting and make layers visible
|
||||||
(_display displayCtrl 1713001) ctrlSetTextColor [1, 1, 1, 1];
|
(_display displayCtrl 1713001) ctrlSetTextColor [1, 1, 1, 1];
|
||||||
(_display displayCtrl 1713002) ctrlSetTextColor [1, 1, 1, [0, 1] select (_dayOpacity < 0.5)];
|
(_display displayCtrl 1713002) ctrlSetTextColor [1, 1, 1, parseNumber (_dayOpacity < 0.5)];
|
||||||
(_display displayCtrl 1713005) ctrlSetTextColor [1, 1, 1, _dayOpacity];
|
(_display displayCtrl 1713005) ctrlSetTextColor [1, 1, 1, _dayOpacity];
|
||||||
(_display displayCtrl 1713006) ctrlSetTextColor [1, 1, 1, _nightOpacity];
|
(_display displayCtrl 1713006) ctrlSetTextColor [1, 1, 1, _nightOpacity];
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@ private _TimeText = _display displayCtrl 1001;
|
|||||||
};
|
};
|
||||||
|
|
||||||
_TimeText ctrlSetText (format ["%1:%2", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber]);
|
_TimeText ctrlSetText (format ["%1:%2", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber]);
|
||||||
_HeightText ctrlSetText (format ["%1", floor _height]);
|
_HeightText ctrlSetText str floor _height;
|
||||||
_DecendRate ctrlSetText (format ["%1", _descentRate max 0]);
|
_DecendRate ctrlSetText str (_descentRate max 0);
|
||||||
|
|
||||||
(_this select 0) set [1, _height];
|
(_this select 0) set [1, _height];
|
||||||
(_this select 0) set [2, _curTime];
|
(_this select 0) set [2, _curTime];
|
||||||
|
@ -33,7 +33,7 @@ if (_ammoClass == "" || _magazineClass == "" || _weaponClass == "") exitWith {};
|
|||||||
GVAR(controls) = [];
|
GVAR(controls) = [];
|
||||||
|
|
||||||
for "_row" from 0 to 49 do {
|
for "_row" from 0 to 49 do {
|
||||||
private _offset = if (_row < 5) then {0} else {0.003};
|
private _offset = [0.003, 0] select (_row < 5);
|
||||||
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 790000 + _row]);
|
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 790000 + _row]);
|
||||||
_control ctrlSetPosition [safeZoneX + 0.183, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.062, 0.025];
|
_control ctrlSetPosition [safeZoneX + 0.183, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.062, 0.025];
|
||||||
if (_row in [0, 8, 18, 28, 38, 48]) then {
|
if (_row in [0, 8, 18, 28, 38, 48]) then {
|
||||||
@ -47,7 +47,7 @@ for "_row" from 0 to 49 do {
|
|||||||
};
|
};
|
||||||
for "_column" from 0 to 8 do {
|
for "_column" from 0 to 8 do {
|
||||||
for "_row" from 0 to 49 do {
|
for "_row" from 0 to 49 do {
|
||||||
private _offset = if (_row < 5) then {0} else {0.003};
|
private _offset = [0.003, 0] select (_row < 5);
|
||||||
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + _column * 100 + _row]);
|
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + _column * 100 + _row]);
|
||||||
_control ctrlSetPosition [safeZoneX + 0.249 + _column * 0.055, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.052, 0.025];
|
_control ctrlSetPosition [safeZoneX + 0.249 + _column * 0.055, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.052, 0.025];
|
||||||
_control ctrlCommit 0;
|
_control ctrlCommit 0;
|
||||||
@ -57,7 +57,7 @@ for "_column" from 0 to 8 do {
|
|||||||
};
|
};
|
||||||
for "_column" from 0 to 2 do {
|
for "_column" from 0 to 2 do {
|
||||||
for "_row" from 0 to 49 do {
|
for "_row" from 0 to 49 do {
|
||||||
private _offset = if (_row < 5) then {0} else {0.003};
|
private _offset = [0.003, 0] select (_row < 5);
|
||||||
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + (9 +_column) * 100 + _row]);
|
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + (9 +_column) * 100 + _row]);
|
||||||
_control ctrlSetPosition [safeZoneX + 0.743 + _column * 0.049, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.047, 0.025];
|
_control ctrlSetPosition [safeZoneX + 0.743 + _column * 0.049, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.047, 0.025];
|
||||||
_control ctrlCommit 0;
|
_control ctrlCommit 0;
|
||||||
@ -67,7 +67,7 @@ for "_column" from 0 to 2 do {
|
|||||||
};
|
};
|
||||||
for "_column" from 0 to 2 do {
|
for "_column" from 0 to 2 do {
|
||||||
for "_row" from 0 to 49 do {
|
for "_row" from 0 to 49 do {
|
||||||
private _offset = if (_row < 5) then {0} else {0.003};
|
private _offset = [0.003, 0] select (_row < 5);
|
||||||
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + (12 +_column) * 100 + _row]);
|
private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + (12 +_column) * 100 + _row]);
|
||||||
_control ctrlSetPosition [safeZoneX + 0.892 + _column * 0.049, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.047, 0.025];
|
_control ctrlSetPosition [safeZoneX + 0.892 + _column * 0.049, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.047, 0.025];
|
||||||
_control ctrlCommit 0;
|
_control ctrlCommit 0;
|
||||||
|
@ -54,7 +54,7 @@ private _maxMagazines = [_vehicle, _turretPath, _magazineClass] call FUNC(getMax
|
|||||||
private _ammoCounts = [_vehicle, _turretPath, _magazineClass] call FUNC(getTurretMagazineAmmo);
|
private _ammoCounts = [_vehicle, _turretPath, _magazineClass] call FUNC(getTurretMagazineAmmo);
|
||||||
TRACE_3("start",_magazineClass,_maxMagazines,_ammoCounts);
|
TRACE_3("start",_magazineClass,_maxMagazines,_ammoCounts);
|
||||||
|
|
||||||
private _ammoToAdd = if (GVAR(level) == 2) then {_numRounds} else {_rounds};
|
private _ammoToAdd = [_rounds, _numRounds] select (GVAR(level) == 2);
|
||||||
private _ammoAdded = 0;
|
private _ammoAdded = 0;
|
||||||
private _arrayModified = false; // skip needing to remove and re-add mags, if we are only adding new ones
|
private _arrayModified = false; // skip needing to remove and re-add mags, if we are only adding new ones
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ private _class = _unit getVariable ["ACE_IsEngineer", _unit getUnitTrait "engine
|
|||||||
|
|
||||||
// This if statement is here for copmatability with the common variant of isEngineer, which requires a bool.
|
// This if statement is here for copmatability with the common variant of isEngineer, which requires a bool.
|
||||||
// We cannot move this function to common because we require the GVAR(engineerSetting_Repair), which only makes sense to include in the repair module.
|
// We cannot move this function to common because we require the GVAR(engineerSetting_Repair), which only makes sense to include in the repair module.
|
||||||
if (_class isEqualType false) then {_class = [0, 1] select _class};
|
if (_class isEqualType false) then {_class = parseNumber _class};
|
||||||
|
|
||||||
TRACE_3("isEngineer",_unit,_engineerN,_class);
|
TRACE_3("isEngineer",_unit,_engineerN,_class);
|
||||||
if (_class >= _engineerN) exitWith {true};
|
if (_class >= _engineerN) exitWith {true};
|
||||||
|
@ -19,9 +19,9 @@ params ["_newUnit"];
|
|||||||
|
|
||||||
private _side = side group _newUnit;
|
private _side = side group _newUnit;
|
||||||
|
|
||||||
((GETMVAR(ACE_Rallypoint_West, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == west));
|
((GETMVAR(ACE_Rallypoint_West, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == west));
|
||||||
((GETMVAR(ACE_Rallypoint_West_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == west));
|
((GETMVAR(ACE_Rallypoint_West_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == west));
|
||||||
((GETMVAR(ACE_Rallypoint_East, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == east));
|
((GETMVAR(ACE_Rallypoint_East, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == east));
|
||||||
((GETMVAR(ACE_Rallypoint_East_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == east));
|
((GETMVAR(ACE_Rallypoint_East_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == east));
|
||||||
((GETMVAR(ACE_Rallypoint_Independent, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == independent));
|
((GETMVAR(ACE_Rallypoint_Independent, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == independent));
|
||||||
((GETMVAR(ACE_Rallypoint_Independent_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == independent));
|
((GETMVAR(ACE_Rallypoint_Independent_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == independent));
|
||||||
|
@ -53,7 +53,7 @@ if (hasInterface) then {
|
|||||||
private _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == "");
|
private _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == "");
|
||||||
|
|
||||||
_marker setMarkerTypeLocal _type;
|
_marker setMarkerTypeLocal _type;
|
||||||
_marker setMarkerAlphaLocal ([0,1] select (_side == playerSide)); // playerSide to guarantee init
|
_marker setMarkerAlphaLocal (parseNumber (_side == playerSide)); // playerSide to guarantee init
|
||||||
|
|
||||||
private _date = _rallypoint getVariable [QGVAR(markerDate), ""];
|
private _date = _rallypoint getVariable [QGVAR(markerDate), ""];
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ removeBackpack _unit;
|
|||||||
|
|
||||||
|
|
||||||
private _pos = _unit modelToWorld [0,0,0];
|
private _pos = _unit modelToWorld [0,0,0];
|
||||||
private _offset = if ((_unit call CBA_fnc_getUnitAnim select 0) == "prone") then { 1 } else {0.8};
|
private _offset = [0.8, 1] select (_unit call CBA_fnc_getUnitAnim select 0 == "prone");
|
||||||
|
|
||||||
_pos set [0, (_pos select 0) + (sin getDir _unit) * _offset];
|
_pos set [0, (_pos select 0) + (sin getDir _unit) * _offset];
|
||||||
_pos set [1, (_pos select 1) + (cos getDir _unit) * _offset];
|
_pos set [1, (_pos select 1) + (cos getDir _unit) * _offset];
|
||||||
|
@ -20,8 +20,8 @@ params ["_vehicle"];
|
|||||||
|
|
||||||
if (0 == getNumber (configOf _vehicle >> QEGVAR(cargo,hasCargo))) exitWith {};
|
if (0 == getNumber (configOf _vehicle >> QEGVAR(cargo,hasCargo))) exitWith {};
|
||||||
|
|
||||||
private _ropeType = if (
|
private _ropeType = ["ACE_rope6", "ACE_rope12"] select (
|
||||||
-1 < ["Tank", "Wheeled_APC_F", "Truck_F"] findIf {_vehicle isKindOf _x}
|
-1 < ["Tank", "Wheeled_APC_F", "Truck_F"] findIf {_vehicle isKindOf _x}
|
||||||
) then {"ACE_rope12"} else {"ACE_rope6"};
|
);
|
||||||
|
|
||||||
_vehicle addItemCargoGlobal [_ropeType, 1];
|
_vehicle addItemCargoGlobal [_ropeType, 1];
|
||||||
|
@ -63,10 +63,10 @@ private _east = (abs (_ax - _bx)) >= (abs (_ay - _by));
|
|||||||
private _origin2D = [];
|
private _origin2D = [];
|
||||||
private _length = 0;
|
private _length = 0;
|
||||||
if (_east) then {
|
if (_east) then {
|
||||||
_origin2D = if (_ax < _bx) then { _start2d } else { _end2d };
|
_origin2D = [_end2d, _start2d] select (_ax < _bx);
|
||||||
_length = (abs (_ax - _bx)) / _cellsize;
|
_length = (abs (_ax - _bx)) / _cellsize;
|
||||||
} else {
|
} else {
|
||||||
_origin2D = if (_ay < _by) then { _start2d } else { _end2d };
|
_origin2D = [_end2d, _start2d] select (_ay < _by);
|
||||||
_length = (abs (_ay - _by)) / _cellsize;
|
_length = (abs (_ay - _by)) / _cellsize;
|
||||||
};
|
};
|
||||||
TRACE_3("",_east,_origin2D,_length);
|
TRACE_3("",_east,_origin2D,_length);
|
||||||
|
@ -68,7 +68,7 @@ if (!_force) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _displays = ((uiNamespace getVariable "IGUI_displays") + [findDisplay IDD_MISSION]) select {_idd == ctrlIDD _x};
|
private _displays = ((uiNamespace getVariable "IGUI_displays") + [findDisplay IDD_MISSION]) select {_idd == ctrlIDD _x};
|
||||||
private _fade = [1, 0] select _show;
|
private _fade = parseNumber !_show;
|
||||||
|
|
||||||
// Disable/Enable elements
|
// Disable/Enable elements
|
||||||
private _success = false;
|
private _success = false;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
TRACE_1("params",_unit);
|
TRACE_1("params",_unit);
|
||||||
|
|
||||||
if (isNil (format ["%1", _unit getVariable "ACE_airTemperatureBias"])) then {
|
if (isNil {_unit getVariable "ACE_airTemperatureBias"}) then {
|
||||||
_unit setVariable ["ACE_airTemperatureBias", [-(random(3) + 1), random(3) + 1]];
|
_unit setVariable ["ACE_airTemperatureBias", [-(random(3) + 1), random(3) + 1]];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ if (_retTex != ctrlText _ctrlScopeReticle) then { _ctrlScopeReticle ctrlSetText
|
|||||||
private _rangeInfo = _range call {
|
private _rangeInfo = _range call {
|
||||||
if (_range == 0) exitWith { "" };
|
if (_range == 0) exitWith { "" };
|
||||||
if (_range < 0) exitWith { // range error - blink if recent
|
if (_range < 0) exitWith { // range error - blink if recent
|
||||||
if ((_timeSinceLastInput < 3) && {(floor (4*_timeSinceLastInput)) % 2 == 1}) then { "----" } else { "" };
|
["", "----"] select ((_timeSinceLastInput < 3) && {(floor (4*_timeSinceLastInput)) % 2 == 1});
|
||||||
};
|
};
|
||||||
format ["%1 m", _range toFixed 0]
|
format ["%1 m", _range toFixed 0]
|
||||||
};
|
};
|
||||||
@ -98,7 +98,7 @@ _ctrl ctrlSetText _rangeInfo;
|
|||||||
private _bearingInfo = call {
|
private _bearingInfo = call {
|
||||||
private _bearingSetting = GVAR(data) getOrDefault ["bearing_show", 0];
|
private _bearingSetting = GVAR(data) getOrDefault ["bearing_show", 0];
|
||||||
if ((_bearingSetting == 2) && {_timeSinceLastInput > 2}) exitWith { "" };
|
if ((_bearingSetting == 2) && {_timeSinceLastInput > 2}) exitWith { "" };
|
||||||
if ((_bearingSetting == 1)) exitWith { format ["%1", floor (17.777777 * _weaponDir)]; }; // (6400 Mils, not MRAD)
|
if ((_bearingSetting == 1)) exitWith { str floor (17.777777 * _weaponDir); }; // (6400 Mils, not MRAD)
|
||||||
format ["%1°", floor _weaponDir];
|
format ["%1°", floor _weaponDir];
|
||||||
};
|
};
|
||||||
private _ctrl = _display displayCtrl IDC_SCREEN_TEXT_UPPER_LEFT;
|
private _ctrl = _display displayCtrl IDC_SCREEN_TEXT_UPPER_LEFT;
|
||||||
|
@ -257,7 +257,7 @@ if (_activated) then {
|
|||||||
//--- Player
|
//--- Player
|
||||||
if (hasinterface) then {
|
if (hasinterface) then {
|
||||||
waituntil {local player};
|
waituntil {local player};
|
||||||
_serverCommand = if (_ownerVar == "#adminLogged") then {"#shutdown"} else {"#kick"};
|
_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;
|
||||||
|
@ -30,7 +30,7 @@ if (_activated && local _logic && !isnull curatorcamera) then {
|
|||||||
//--- Get unit under cursor
|
//--- Get unit under cursor
|
||||||
_unit = objnull;
|
_unit = objnull;
|
||||||
_mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]];
|
_mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]];
|
||||||
if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;};
|
if ((_mouseOver select 0) == "OBJECT") then {_unit = _mouseOver select 1;};
|
||||||
_unit = effectivecommander _unit;
|
_unit = effectivecommander _unit;
|
||||||
|
|
||||||
//--- Temp owner
|
//--- Temp owner
|
||||||
|
@ -53,7 +53,7 @@ if !(isNull _unit) then {
|
|||||||
if (isNull _unit) then {
|
if (isNull _unit) then {
|
||||||
(_display displayCtrl 56220) lbDelete 0;
|
(_display displayCtrl 56220) lbDelete 0;
|
||||||
} else {
|
} else {
|
||||||
(_display displayCtrl 56218) lbSetCurSel ([0, 1] select (_unit isFlashlightOn currentWeapon _unit));
|
(_display displayCtrl 56218) lbSetCurSel (parseNumber (_unit isFlashlightOn currentWeapon _unit));
|
||||||
};
|
};
|
||||||
|
|
||||||
private _fnc_onUnload = {
|
private _fnc_onUnload = {
|
||||||
|
@ -53,7 +53,7 @@ if !(isNull _unit) then {
|
|||||||
if (isNull _unit) then {
|
if (isNull _unit) then {
|
||||||
(_display displayCtrl 92856) lbDelete 0;
|
(_display displayCtrl 92856) lbDelete 0;
|
||||||
} else {
|
} else {
|
||||||
(_display displayCtrl 92855) lbSetCurSel ([0, 1] select (hmd _unit isNotEqualTo ""));
|
(_display displayCtrl 92855) lbSetCurSel (parseNumber (hmd _unit isNotEqualTo ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
private _fnc_onUnload = {
|
private _fnc_onUnload = {
|
||||||
|
@ -54,7 +54,7 @@ switch _mode do {
|
|||||||
_control = _display displayctrl _idc;
|
_control = _display displayctrl _idc;
|
||||||
|
|
||||||
//--- Admin specific attribute
|
//--- Admin specific attribute
|
||||||
_show = if (getnumber (_cfgControl >> "adminOnly") > 0) then {_enableAdmin} else {true};
|
_show = [true, _enableAdmin] select (getnumber (_cfgControl >> "adminOnly") > 0);
|
||||||
|
|
||||||
if ((_allAttributes || {_x == configname _cfgControl} count _attributes > 0) && _show) then {
|
if ((_allAttributes || {_x == configname _cfgControl} count _attributes > 0) && _show) then {
|
||||||
_controlPos = ctrlposition _control;
|
_controlPos = ctrlposition _control;
|
||||||
@ -75,10 +75,10 @@ switch _mode do {
|
|||||||
|
|
||||||
_target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull];
|
_target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull];
|
||||||
_name = switch (typename _target) do {
|
_name = switch (typename _target) do {
|
||||||
case (typename objnull): {gettext (configfile >> "cfgvehicles" >> typeof _target >> "displayname")};
|
case ("OBJECT"): {gettext (configfile >> "cfgvehicles" >> typeof _target >> "displayname")};
|
||||||
case (typename grpnull): {groupid _target};
|
case ("GROUP"): {groupid _target};
|
||||||
case (typename []): {format ["%1: %3 #%2",groupid (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]};
|
case ("ARRAY"): {format ["%1: %3 #%2",groupid (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]};
|
||||||
case (typename ""): {markertext _target};
|
case ("STRING"): {markertext _target};
|
||||||
};
|
};
|
||||||
_ctrlTitle ctrlsettext format [ctrltext _ctrlTitle,toupper _name];
|
_ctrlTitle ctrlsettext format [ctrltext _ctrlTitle,toupper _name];
|
||||||
|
|
||||||
@ -115,19 +115,19 @@ switch _mode do {
|
|||||||
_display = _this select 0;
|
_display = _this select 0;
|
||||||
_target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull];
|
_target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull];
|
||||||
switch (typename _target) do {
|
switch (typename _target) do {
|
||||||
case (typename objnull): {
|
case ("OBJECT"): {
|
||||||
_isAlive = alive _target;
|
_isAlive = alive _target;
|
||||||
waituntil {isnull _display || (_isAlive && !alive _target)};
|
waituntil {isnull _display || (_isAlive && !alive _target)};
|
||||||
};
|
};
|
||||||
case (typename grpnull): {
|
case ("GROUP"): {
|
||||||
waituntil {isnull _display || isnull _target};
|
waituntil {isnull _display || isnull _target};
|
||||||
};
|
};
|
||||||
case (typename []): {
|
case ("ARRAY"): {
|
||||||
_grp = _target select 0;
|
_grp = _target select 0;
|
||||||
_wpCount = count waypoints _grp;
|
_wpCount = count waypoints _grp;
|
||||||
waituntil {isnull _display || (count waypoints _grp != _wpCount)};
|
waituntil {isnull _display || (count waypoints _grp != _wpCount)};
|
||||||
};
|
};
|
||||||
case (typename ""): {
|
case ("STRING"): {
|
||||||
waituntil {isnull _display || markertype _target == ""};
|
waituntil {isnull _display || markertype _target == ""};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user