mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/acemod/ACE3.git into develop
Conflicts: addons/captives/stringtable.xml
This commit is contained in:
commit
f8481ae5f2
@ -18,7 +18,8 @@ private ["_muzzleVelocityShiftTableUpperLimit", "_temperatureIndexFunction",
|
||||
"_temperatureIndexA", "_temperatureIndexB", "_interpolationRatio"];
|
||||
params["_muzzleVelocityShiftTable", "_temperature"];
|
||||
|
||||
// Check if muzzleVelocityShiftTable is Larger Than 11 Entrys
|
||||
// Check if muzzleVelocityShiftTable is Less Than 11 Entrys
|
||||
if ((count _muzzleVelocityShiftTable) < 11) exitWith {0};
|
||||
_muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10;
|
||||
if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 };
|
||||
|
||||
|
@ -24,12 +24,12 @@ if (!hasInterface) exitWith {};
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
// Parameterization
|
||||
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"];
|
||||
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"];
|
||||
|
||||
params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"];
|
||||
|
||||
_abort = false;
|
||||
|
||||
|
||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||
if (!alive _bullet) exitWith {};
|
||||
if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
|
||||
@ -75,22 +75,22 @@ _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
|
||||
_barrelVelocityShift = 0;
|
||||
if (GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_barrelVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil];
|
||||
if (isNil "_barrelVelocityShift") then {
|
||||
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
|
||||
uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift];
|
||||
};
|
||||
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
|
||||
};
|
||||
|
||||
_ammoTemperatureVelocityShift = 0;
|
||||
if (GVAR(ammoTemperatureEnabled)) then {
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
_temperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
|
||||
_ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
|
||||
};
|
||||
|
||||
if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift;
|
||||
TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift);
|
||||
if (_muzzleVelocityShift != 0) then {
|
||||
_muzzleVelocity = _muzzleVelocity + (_barrelVelocityShift + _ammoTemperatureVelocityShift);
|
||||
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
|
||||
_bullet setVelocity _bulletVelocity;
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ if (_state) then {
|
||||
|
||||
//Adds an animation changed eh
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
if (_animChangedEHID != -1) then {
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
@ -92,7 +92,7 @@ if (_state) then {
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
//remove AnimChanged EH
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
|
@ -48,7 +48,7 @@ if (_state) then {
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
|
||||
//Adds an animation changed eh
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
if (_animChangedEHID != -1) then {
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
@ -68,7 +68,7 @@ if (_state) then {
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
//remove AnimChanged EH
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
|
||||
|
@ -166,7 +166,7 @@
|
||||
<Portuguese>Fazer unidade se render</Portuguese>
|
||||
<French>Faire capituler l'unité</French>
|
||||
<Hungarian>Egység kapitulálása</Hungarian>
|
||||
<Russian>Заставить юнита сдаться</Russian>
|
||||
<Russian>Сделать юнита пленным</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
||||
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
||||
@ -177,15 +177,15 @@
|
||||
<Portuguese>Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives</Portuguese>
|
||||
<French>Synchronise une unité pour la rendre captive. <br/>Source: ace_captives</French>
|
||||
<Hungarian>Egység szinkronizálása, hogy kapituláljon.<br />Forrás: ace_captives</Hungarian>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы заставить их сдаться в плен.<br />Источник: ace_captives</Russian>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их пленными.<br />Источник: ace_captives</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_DisplayName">
|
||||
<English>Make Unit Handcuffed</English>
|
||||
<Russian>Связать юнита</Russian>
|
||||
<Portuguese>Fazer unidade algemada</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_Description">
|
||||
<English>Sync a unit to make them handcuffed.<br />Source: ace_captives</English>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.<br />Источник: ace_captives</Russian>
|
||||
<Portuguese>Sincronizar uma unidade para deixá-la algemada.<br/>Source: ace_captives</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
|
||||
<English>Captives Settings</English>
|
||||
|
@ -1,5 +1,45 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["LoadCargo", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler);
|
||||
["UnloadCargo", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler);
|
||||
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
["LoadCargo", {
|
||||
(_this select 0) params ["_item","_vehicle"];
|
||||
private ["_loaded", "_hint", "_itemName", "_vehicleName"];
|
||||
|
||||
_loaded = [_item, _vehicle] call FUNC(loadItem);
|
||||
|
||||
// Show hint as feedback
|
||||
_hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded;
|
||||
_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
||||
_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
|
||||
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
|
||||
|
||||
if (_loaded) then {
|
||||
// Invoke listenable event
|
||||
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
["UnloadCargo", {
|
||||
(_this select 0) params ["_item","_vehicle"];
|
||||
private ["_unloaded", "_itemClass", "_hint", "_itemName", "_vehicleName"];
|
||||
|
||||
_unloaded = [_item, _vehicle] call FUNC(unloadItem);
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
|
||||
// Show hint as feedback
|
||||
_hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
|
||||
_itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
|
||||
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
|
||||
|
||||
if (_unloaded) then {
|
||||
// Invoke listenable event
|
||||
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
||||
};
|
||||
|
||||
// TOOO maybe drag/carry the unloaded item?
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
@ -22,20 +22,9 @@ private ["_position", "_item", "_i"];
|
||||
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ];
|
||||
TRACE_3("params",_itemClass,_vehicle,_amount);
|
||||
|
||||
_position = getPos _vehicle;
|
||||
_position set [1, (_position select 1) + 1];
|
||||
_position set [2, (_position select 2) + 7.5];
|
||||
|
||||
for "_i" from 1 to _amount do {
|
||||
_item = createVehicle [_itemClass, _position, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Load item or delete it if no space left
|
||||
if !([_item, _vehicle, _showHint] call FUNC(loadItem)) exitWith {
|
||||
TRACE_1("no room to load item - deleting",_item);
|
||||
deleteVehicle _item;
|
||||
};
|
||||
TRACE_1("Item Loaded",_item);
|
||||
|
||||
// Invoke listenable event
|
||||
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
|
||||
[_item, _vehicle] call FUNC(loadItem);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Check if item can be loaded into other Object.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Item Object <OBJECT>
|
||||
* 0: Item <OBJECT or STRING>
|
||||
* 1: Holder Object (Vehicle) <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
@ -16,14 +16,24 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
params [["_item", "", [objNull,""]], "_vehicle"];
|
||||
|
||||
if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
|
||||
|
||||
private "_itemSize";
|
||||
_itemSize = ([_item] call FUNC(getSizeItem));
|
||||
private ["_itemSize", "_validItem"];
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
|
||||
(_itemSize > 0) &&
|
||||
{alive _item && alive _vehicle} &&
|
||||
{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} &&
|
||||
if (typeName _item == "STRING") then {
|
||||
_validItem =
|
||||
isClass (configFile >> "CfgVehicles" >> _item) &&
|
||||
{getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1};
|
||||
} else {
|
||||
_validItem =
|
||||
(alive _item) &&
|
||||
{(_item distance _vehicle) <= MAX_LOAD_DISTANCE};
|
||||
};
|
||||
|
||||
_validItem &&
|
||||
{_itemSize > 0} &&
|
||||
{alive _vehicle} &&
|
||||
{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))}
|
||||
|
@ -16,18 +16,19 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loaded", "_validVehiclestate", "_emptyPos"];
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
private ["_loaded", "_itemClass", "_validVehiclestate", "_emptyPos"];
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
if !(_item in _loaded) exitWith {false};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
if (_vehicle isKindOf "Ship" ) then {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, _itemClass]); // TODO: if spot is underwater pick another spot.
|
||||
} else {
|
||||
if (_vehicle isKindOf "Air" ) then {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
@ -35,7 +36,7 @@ if (_vehicle isKindOf "Ship" ) then {
|
||||
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
|
||||
} else {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]);
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, _itemClass]);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Get the cargo size of an object.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Item <OBJECT or STRING>
|
||||
*
|
||||
* Return value:
|
||||
* Cargo size <NUMBER> (default: -1)
|
||||
@ -15,14 +15,24 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_config";
|
||||
|
||||
params ["_item"];
|
||||
private ["_isVirtual","_itemClass","_config"];
|
||||
scopeName "return";
|
||||
|
||||
_config = (configFile >> "CfgVehicles" >> typeOf _item >> QGVAR(size));
|
||||
_isVirtual = (typeName _item == "STRING");
|
||||
_itemClass = if (_isVirtual) then {_item} else {typeOf _item};
|
||||
_config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
|
||||
|
||||
if (isNumber (_config)) exitWith {
|
||||
_item getVariable [QGVAR(size), getNumber (_config)]
|
||||
if (_isVirtual) then {
|
||||
if (isNumber _config) then {
|
||||
(getNumber _config) breakOut "return";
|
||||
};
|
||||
} else {
|
||||
_config = (configFile >> "CfgVehicles" >> typeOf _item >> QGVAR(size));
|
||||
|
||||
if (isNumber _config) then {
|
||||
(_item getVariable [QGVAR(size), getNumber _config]) breakOut "return";
|
||||
};
|
||||
};
|
||||
|
||||
-1
|
||||
|
@ -20,12 +20,13 @@ params ["_vehicle"];
|
||||
private["_loaded"];
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
if (count _loaded == 0) exitWith {};
|
||||
if (_loaded isEqualTo []) exitWith {};
|
||||
|
||||
{
|
||||
// TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment?
|
||||
deleteVehicle _x;
|
||||
//_x setDamage 1;
|
||||
// TODO Do we want to be able to recover destroyed equipment?
|
||||
if (typeName _x == "OBJECT") then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} count _loaded;
|
||||
|
||||
[_vehicle] call FUNC(validateCargoSpace);
|
||||
|
@ -1,9 +1,10 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Load object into vehicle.
|
||||
* Objects loaded via classname remain virtual until unloaded.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Item <OBJECT or STRING>
|
||||
* 1: Vehicle <OBJECT>
|
||||
* 2: Show Hint <BOOL> (default: true)
|
||||
*
|
||||
@ -17,15 +18,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_item","",[objNull,""]], ["_vehicle",objNull,[objNull]]];
|
||||
private ["_loaded", "_space", "_itemSize"];
|
||||
|
||||
params ["_item", "_vehicle", ["_showHint", true, [true]] ];
|
||||
TRACE_2("params",_item,_vehicle);
|
||||
|
||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {
|
||||
TRACE_2("canLoadItemIn failed",_item,_vehicle);
|
||||
false
|
||||
};
|
||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded pushback _item;
|
||||
@ -37,21 +33,10 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
|
||||
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,100]];
|
||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
||||
|
||||
// show hint
|
||||
private ["_itemName", "_vehicleName"];
|
||||
|
||||
_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
||||
_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
|
||||
if (_showHint) then {
|
||||
["displayTextStructured", [[localize LSTRING(LoadedItem), _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
|
||||
if (typeName _item == "OBJECT") then {
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,-100]];
|
||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
||||
|
||||
true
|
||||
|
@ -22,7 +22,7 @@ params ["_display"];
|
||||
uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
|
||||
[{
|
||||
private ["_display","_loaded", "_ctrl", "_label"];
|
||||
private ["_display","_loaded", "_ctrl", "_class", "_label"];
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
if (isnil "_display") exitWith {
|
||||
@ -40,7 +40,8 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
|
||||
lbClear _ctrl;
|
||||
{
|
||||
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> typeOf _x >> "displayName"));
|
||||
_class = if (typeName _x == "STRING") then {_x} else {typeOf _x};
|
||||
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName"));
|
||||
true
|
||||
} count _loaded;
|
||||
|
||||
|
@ -16,16 +16,25 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_player", "_object"];
|
||||
private ["_vehicle", "_size", "_displayName"];
|
||||
|
||||
private ["_nearestVehicle"];
|
||||
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
|
||||
_vehicle = [_player] call FUNC(findNearestVehicle);
|
||||
|
||||
if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then {
|
||||
if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then {
|
||||
{
|
||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x};
|
||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
|
||||
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
};
|
||||
|
||||
if (isNull _nearestVehicle) exitWith {false};
|
||||
if (isNull _vehicle) exitWith {false};
|
||||
|
||||
[_object, _nearestVehicle] call FUNC(loadItem)
|
||||
// Start progress bar
|
||||
if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
_size = [_object] call FUNC(getSizeItem);
|
||||
|
||||
[5 * _size, [_object,_vehicle], "LoadCargo", {}, localize LSTRING(LoadingItem)] call EFUNC(common,progressBar);
|
||||
} else {
|
||||
_displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ private ["_display", "_loaded", "_ctrl", "_selected", "_item"];
|
||||
disableSerialization;
|
||||
|
||||
_display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
if (isnil "_display") exitWith {};
|
||||
if (isNil "_display") exitWith {};
|
||||
|
||||
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
|
||||
if (count _loaded == 0) exitWith {};
|
||||
@ -32,4 +32,17 @@ _selected = (lbCurSel _ctrl) max 0;
|
||||
if (count _loaded <= _selected) exitWith {};
|
||||
_item = _loaded select _selected;
|
||||
|
||||
[_item, GVAR(interactionVehicle)] call FUNC(unloadItem);
|
||||
|
||||
// Start progress bar
|
||||
private ["_size", "_itemClass", "_displayName"];
|
||||
|
||||
if ([_item, GVAR(interactionVehicle)] call FUNC(canUnloadItem)) then {
|
||||
_size = [_item] call FUNC(getSizeItem);
|
||||
|
||||
[5 * _size, [_item, GVAR(interactionVehicle)], "UnloadCargo", {}, localize LSTRING(UnloadingItem)] call EFUNC(common,progressBar);
|
||||
} else {
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Unload object from vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Item <OBJECT or STRING>
|
||||
* 1: Vehicle <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
@ -16,20 +16,21 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"];
|
||||
|
||||
params ["_item", "_vehicle"];
|
||||
private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"];
|
||||
|
||||
if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
if (_vehicle isKindOf "Ship" ) then {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
TRACE_1("SHIP Ground Check", getPosATL _vehicle );
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, _itemClass]); // TODO: if spot is underwater pick another spot.
|
||||
} else {
|
||||
if (_vehicle isKindOf "Air" ) then {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
@ -39,38 +40,29 @@ if (_vehicle isKindOf "Ship" ) then {
|
||||
} else {
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeOf _item]);
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, _itemClass]);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
if (!_validVehiclestate) exitWith {false};
|
||||
|
||||
if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
if (count _emptyPos == 0) exitWith {false};
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded = _loaded - [_item];
|
||||
_loaded deleteAt (_loaded find _item);
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
|
||||
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
||||
|
||||
detach _item;
|
||||
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
|
||||
|
||||
// show hint
|
||||
private ["_itemName", "_vehicleName"];
|
||||
|
||||
_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
||||
_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
|
||||
["displayTextStructured", [[localize LSTRING(UnloadedItem), _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
|
||||
|
||||
// TOOO maybe drag/carry the unloaded item?
|
||||
|
||||
// Invoke listenable event
|
||||
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
||||
if (typeName _item == "OBJECT") then {
|
||||
detach _item;
|
||||
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
|
||||
} else {
|
||||
createVehicle [_item, _emptyPos, [], 0, ""];
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -24,7 +24,7 @@ _loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_newLoaded = [];
|
||||
_totalSpaceOccupied = 0;
|
||||
{
|
||||
if !(isNull _x) then {
|
||||
if ((typeName _x == "STRING") || {!isNull _x}) then {
|
||||
_newLoaded pushback _x;
|
||||
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
|
||||
};
|
||||
@ -35,4 +35,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 (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
|
||||
|
@ -95,5 +95,21 @@
|
||||
<Hungarian>1%<br/>kirakodva ebből:<br/>%2</Hungarian>
|
||||
<Russian>%1<br/>разгружен из<br/>%2</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||
<English>Loading Cargo</English>
|
||||
<Portuguese>Carregando carga</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
||||
<English>Unloading Cargo</English>
|
||||
<Portuguese>Descarregando carga</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
||||
<English>%1<br/>could not be loaded</English>
|
||||
<Portuguese>%1<br/>não pode ser carregado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingFailed">
|
||||
<English>%1<br/>could not be unloaded</English>
|
||||
<Portuguese>%1<br/>não pode ser descarregado</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -13,7 +13,7 @@
|
||||
|
||||
//Handle the waitAndExec array:
|
||||
while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do {
|
||||
local _entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
private _entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
(_entry select 2) call (_entry select 1);
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
|
||||
//Handle the waitUntilAndExec array:
|
||||
local _deleted = 0;
|
||||
private _deleted = 0;
|
||||
{
|
||||
// if condition is satisifed call statement
|
||||
if ((_x select 2) call (_x select 0)) then {
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_var", ["_depth", 0, [0]]];
|
||||
|
||||
local _pad = "";
|
||||
private _pad = "";
|
||||
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
local _vehicle = vehicle _unit;
|
||||
private _vehicle = vehicle _unit;
|
||||
if (_unit == _vehicle) exitWith {[]};
|
||||
|
||||
scopeName "main";
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
local _vehicle = vehicle _unit;
|
||||
private _vehicle = vehicle _unit;
|
||||
|
||||
if (_unit == _vehicle) exitWith {false};
|
||||
|
||||
local _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false};
|
||||
|
||||
@ -26,10 +26,10 @@ if (_unit == driver _vehicle) exitWith {
|
||||
getNumber (_config >> "forceHideDriver") == 0; // return
|
||||
};
|
||||
|
||||
local _turret = [_unit] call FUNC(getTurretIndex);
|
||||
private _turret = [_unit] call FUNC(getTurretIndex);
|
||||
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
local _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
getNumber (_turretConfig >> "forceHideGunner") == 0; // return
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_unit", "_muzzle", "_mode"];
|
||||
|
||||
local _index = 0;
|
||||
private _index = 0;
|
||||
|
||||
while {
|
||||
_index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}}
|
||||
|
@ -148,7 +148,7 @@ if (_backpack != "") then {
|
||||
_unit addBackpack _backpack;
|
||||
|
||||
if (_clearBackpack) then {
|
||||
local _backpackObject = unitBackpack _unit;
|
||||
private _backpackObject = unitBackpack _unit;
|
||||
|
||||
clearMagazineCargoGlobal _backpackObject;
|
||||
clearWeaponCargoGlobal _backpackObject;
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
BEGIN_COUNTER(timePFH);
|
||||
|
||||
local _lastTickTime = ACE_diagTime;
|
||||
local _lastGameTime = ACE_gameTime;
|
||||
private _lastTickTime = ACE_diagTime;
|
||||
private _lastGameTime = ACE_gameTime;
|
||||
|
||||
ACE_gameTime = time;
|
||||
ACE_diagTime = diag_tickTime;
|
||||
|
||||
local _delta = ACE_diagTime - _lastTickTime;
|
||||
private _delta = ACE_diagTime - _lastTickTime;
|
||||
|
||||
if (ACE_gameTime <= _lastGameTime) then {
|
||||
TRACE_1("paused",_delta);
|
||||
|
@ -30,4 +30,4 @@ GVAR(vectorConnected) = false;
|
||||
GVAR(noVectorData) = true;
|
||||
GVAR(vectorGrid) = "00000000";
|
||||
|
||||
["RangerfinderData", {_this call FUNC(handleRangeFinderData)}] call EFUNC(common,addEventHandler);
|
||||
["RangerfinderData", FUNC(handleRangeFinderData)] call EFUNC(common,addEventHandler);
|
||||
|
@ -74,13 +74,13 @@ GVAR(menuRun) = true;
|
||||
GVAR(menuRun) = false;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
if (GVAR(MENU_B)) then {
|
||||
GVAR(menu) = "main";
|
||||
GVAR(selection) = 0;
|
||||
GVAR(numSelections) = 5;
|
||||
};
|
||||
|
||||
|
||||
if (!GVAR(add) && !GVAR(edit)) then {
|
||||
if (GVAR(DOWN)) then {
|
||||
GVAR(selection) = (GVAR(numSelections) + GVAR(selection) + 1);
|
||||
@ -90,7 +90,7 @@ GVAR(menuRun) = true;
|
||||
};
|
||||
GVAR(selection) = if (GVAR(numSelections) > 0) then { GVAR(selection) % GVAR(numSelections) } else { 0 };
|
||||
};
|
||||
|
||||
|
||||
if (GVAR(LEFT)) then {
|
||||
GVAR(pointer) = (8 + GVAR(pointer) - 1);
|
||||
};
|
||||
@ -98,7 +98,7 @@ GVAR(menuRun) = true;
|
||||
GVAR(pointer) = (8 + GVAR(pointer) + 1);
|
||||
};
|
||||
GVAR(pointer) = GVAR(pointer) % 8;
|
||||
|
||||
|
||||
(__dsp displayCtrl __PSelection1) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection2) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection3) ctrlSetText "";
|
||||
@ -113,7 +113,7 @@ GVAR(menuRun) = true;
|
||||
(__dsp displayCtrl __Selection2) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection3) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection4) ctrlSetText "";
|
||||
|
||||
|
||||
(__dsp displayCtrl __F1) ctrlSetText "";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "";
|
||||
@ -124,7 +124,7 @@ GVAR(menuRun) = true;
|
||||
(__dsp displayCtrl __Option2) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option3) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option4) ctrlSetText "";
|
||||
|
||||
|
||||
switch (GVAR(menu)) do {
|
||||
case "main": {
|
||||
if (GVAR(SEL)) then {
|
||||
@ -500,7 +500,7 @@ GVAR(menuRun) = true;
|
||||
case 6: { GVAR(digit6) = (10 + GVAR(digit6) - 1) % 10 };
|
||||
case 7: { GVAR(digit7) = (10 + GVAR(digit7) - 1) % 10 };
|
||||
case 8: { GVAR(digit8) = (10 + GVAR(digit8) - 1) % 10 };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -590,7 +590,7 @@ GVAR(menuRun) = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(F3) = false;
|
||||
GVAR(F2) = false;
|
||||
|
@ -31,18 +31,19 @@ if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private["_dagrElevation", "_dagrGrid", "_dagrHeading", "_dagrSpeed", "_dagrTime", "_elevation", "_gridArray", "_speed"];
|
||||
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
// GRID
|
||||
_gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
_dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])];
|
||||
|
||||
_gridArray params ["_gridArrayX","_gridArrayY"];
|
||||
_dagrGrid = format ["%1 %2", ((_gridArrayX) select [0,4]), ((_gridArrayY) select [0,4])];
|
||||
|
||||
// SPEED
|
||||
_speed = speed (vehicle ACE_player);
|
||||
_speed = floor (_speed * 10) / 10;
|
||||
@ -68,7 +69,7 @@ GVAR(outputPFH) = [{
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
__speedControl ctrlSetText format ["%1", _dagrSpeed];
|
||||
__elevationControl ctrlSetText format ["%1", _dagrElevation];
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 °", _dagrHeading] });
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 <EFBFBD>", _dagrHeading] });
|
||||
__timeControl ctrlSetText format ["%1", _dagrTime];
|
||||
|
||||
|
||||
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Author: Rosuto
|
||||
* DAGR vector output loop
|
||||
*
|
||||
@ -14,7 +14,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_pos", "_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"];
|
||||
private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"];
|
||||
|
||||
135471 cutRsc ["DAGR_DISPLAY", "plain down"];
|
||||
|
||||
@ -30,15 +30,14 @@ private ["_pos", "_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dag
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
|
||||
|
||||
if (GVAR(noVectorData)) exitwith {};
|
||||
|
||||
_pos = [GVAR(LAZPOS) select 0, GVAR(LAZPOS) select 1];
|
||||
GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"];
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];};
|
||||
if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];};
|
||||
|
||||
if (_lazPosX < 0) then { _lazPosX = _lazPosX + 99999;};
|
||||
if (_lazPosY < 0) then {_lazPosY = _lazPosY + 99999;};
|
||||
|
||||
// Find laser position
|
||||
_xGrid = toArray Str(round(_pos select 0));
|
||||
_xGrid = toArray Str(round _lazPosX);
|
||||
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
@ -47,7 +46,7 @@ _xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round(_pos select 1));
|
||||
_yGrid = toArray Str(round _lazPosY);
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
@ -72,7 +71,7 @@ _yCoord = switch true do {
|
||||
_dagrGrid = _xCoord + " " + _yCoord;
|
||||
|
||||
// Find target elevation
|
||||
_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(common,mapAltitude));
|
||||
_elevation = floor ((_lazPosZ) + EGVAR(common,mapAltitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
|
||||
// Time
|
||||
@ -94,5 +93,5 @@ GVAR(vectorGrid) = _dagrGrid;
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
__speedControl ctrlSetText format ["%1", _dagrDist];
|
||||
__elevationControl ctrlSetText format ["%1", _dagrElevation];
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1°", _bearing] });
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1°", _bearing] });
|
||||
__timeControl ctrlSetText format ["%1", _dagrTime];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Author: Rosuto
|
||||
* DAGR waypoint output loop
|
||||
*
|
||||
@ -31,22 +31,23 @@ if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private["_MYpos", "_WPpos", "_bearing", "_dagrDistance", "_dagrGrid", "_dagrHeading", "_distance", "_gridArray"];
|
||||
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
// GRID
|
||||
_gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos);
|
||||
_dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])];
|
||||
_gridArray params ["_gridArrayX","_gridArrayY"];
|
||||
_dagrGrid = format ["%1 %2", (_gridArrayX select [0,4]), (_gridArrayY select [0,4])];
|
||||
|
||||
// WP Grid
|
||||
_xGrid2 = floor (DAGR_WP_INFO / 10000);
|
||||
_yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000;
|
||||
|
||||
|
||||
_xCoord2 = switch true do {
|
||||
case (_xGrid2 >= 1000): { "" + Str(_xGrid2) };
|
||||
case (_xGrid2 >= 100): { "0" + Str(_xGrid2) };
|
||||
@ -60,7 +61,7 @@ GVAR(outputPFH) = [{
|
||||
case (_yGrid2 >= 10): { "00" + Str(_yGrid2) };
|
||||
default { "000" + Str(_yGrid2) };
|
||||
};
|
||||
|
||||
|
||||
_dagrGrid2 = _xCoord2 + " " + _yCoord2;
|
||||
|
||||
// Distance
|
||||
@ -69,7 +70,7 @@ GVAR(outputPFH) = [{
|
||||
_distance = _MYpos distance _WPpos;
|
||||
_distance = floor (_distance * 10) / 10;
|
||||
_dagrDistance = str _distance + "m";
|
||||
|
||||
|
||||
// Heading
|
||||
_dagrHeading = floor (if (GVAR(useDegrees)) then {
|
||||
direction (vehicle ACE_player)
|
||||
@ -79,12 +80,12 @@ GVAR(outputPFH) = [{
|
||||
|
||||
// WP Heading
|
||||
_bearing = floor ((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir);
|
||||
|
||||
|
||||
// Output
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
__speedControl ctrlSetText format ["%1", _bearing];
|
||||
__elevationControl ctrlSetText format ["%1", _dagrGrid2];
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1°", _dagrHeading] });
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1°", _dagrHeading] });
|
||||
__timeControl ctrlSetText format ["%1", _dagrDistance];
|
||||
|
||||
|
||||
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -23,11 +23,12 @@ if (GVAR(run)) then {
|
||||
};
|
||||
GVAR(hidden) = true;
|
||||
[{
|
||||
EXPLODE_1_PVT(_this select 0,_vehicle);
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_vehicle"];
|
||||
if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith {
|
||||
GVAR(run) = false;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (cameraView == "GUNNER") then {
|
||||
if (!GVAR(hidden)) then {
|
||||
|
@ -95,7 +95,7 @@ GVAR(OldGlasses) = "#NULLSTRING";
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// check goggles
|
||||
local _fnc_checkGoggles = {
|
||||
private _fnc_checkGoggles = {
|
||||
params ["_unit"];
|
||||
|
||||
if (GVAR(EffectsActive)) then {
|
||||
|
@ -28,7 +28,7 @@ _effects set [DIRT, true];
|
||||
SETGLASSES(_unit,_effects);
|
||||
|
||||
if ([_unit] call FUNC(isGogglesVisible)) then {
|
||||
local _dirtImage = getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_OverlayDirt");
|
||||
private _dirtImage = getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_OverlayDirt");
|
||||
|
||||
if (_dirtImage != "") then {
|
||||
GVAR(GogglesEffectsLayer) cutRsc ["RscACE_GogglesEffects", "PLAIN", 0.1, false];
|
||||
|
@ -54,7 +54,7 @@ GVAR(DustHandler) = [{
|
||||
if (ACE_diagTime >= GETDUSTT(DTIME) + 3) then {
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
||||
|
||||
local _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125);
|
||||
private _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125);
|
||||
|
||||
if !(_unit getVariable ["ACE_EyesDamaged", false]) then {
|
||||
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [_amount, _amount, _amount, _amount], [1, 1, 1, 0]];
|
||||
|
@ -27,7 +27,7 @@ _fnc_underCover = {
|
||||
if (vehicle _unit != _unit && {!isTurnedOut _unit}) exitWith {true};
|
||||
|
||||
// looking up and no roof over head
|
||||
local _position = eyePos _unit;
|
||||
private _position = eyePos _unit;
|
||||
positionCameraToWorld [0, 0, 1] select 2 < (positionCameraToWorld [0, 0, 0] select 2) - 0.4 || {(lineIntersects [_position, _position vectorAdd [0, 0, 15], _unit])} // return
|
||||
};
|
||||
|
||||
|
@ -86,7 +86,7 @@ if (_safe) exitWith {};
|
||||
|
||||
// apply rotor wash effect
|
||||
if (_rotorWash select 1 > 0) then {
|
||||
local _scale = 0.7;
|
||||
private _scale = 0.7;
|
||||
|
||||
if (_rotorWash select 1 > 0) then {
|
||||
_scale = CLAMP(0.3 * (_rotorWash select 1),0.1,0.3);
|
||||
|
@ -73,7 +73,7 @@ SETDUST(DTIME,ACE_diagTime);
|
||||
|
||||
// apply dust effect if the amount of fired bullets is over the threshold
|
||||
if (GETDUSTT(DAMOUNT) < 2) then {
|
||||
local _bulletsRequired = 100;
|
||||
private _bulletsRequired = 100;
|
||||
|
||||
if (isNumber (configFile >> _cloudType >> QGVAR(BulletCount))) then {
|
||||
_bulletsRequired = getNumber (configFile >> _cloudType >> QGVAR(BulletCount));
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_glasses"];
|
||||
|
||||
local _config = configFile >> "CfgGlasses" >> _glasses;
|
||||
private _config = configFile >> "CfgGlasses" >> _glasses;
|
||||
|
||||
if (!isClass _config) exitWith {false};
|
||||
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
params ["_unit", ["_radius", 15]];
|
||||
|
||||
local _rotorWash = [false, 0];
|
||||
private _rotorWash = [false, 0];
|
||||
|
||||
{
|
||||
if (isEngineOn _x) then {
|
||||
local _distance = _unit distance _x;
|
||||
private _distance = _unit distance _x;
|
||||
|
||||
// convert distance to 0...1 range, where 0 is the maximum radius
|
||||
_distance = 1 - _distance / _radius;
|
||||
|
@ -29,12 +29,9 @@ GVAR(isOpeningDoor) = false;
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
addCamShake [4, 0.5, 5];
|
||||
private _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0));
|
||||
[_message] call FUNC(displayTextStructured);
|
||||
};
|
||||
|
||||
private "_message";
|
||||
_message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0));
|
||||
|
||||
["displayTextStructured", _message] call EFUNC(common,targetEvent);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// restore global fire teams for JIP
|
||||
|
@ -19,9 +19,9 @@
|
||||
params ["_object"];
|
||||
TRACE_1("params",_object);
|
||||
|
||||
local _typeOf = typeOf _object;
|
||||
private _typeOf = typeOf _object;
|
||||
|
||||
local _returnValue = if (_typeOf != "") then {
|
||||
private _returnValue = if (_typeOf != "") then {
|
||||
//If the fence has configEntry we can check it directly
|
||||
(1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence))));
|
||||
} else {
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#define MAJOR 3
|
||||
#define MINOR 3
|
||||
#define PATCHLVL 2
|
||||
#define PATCHLVL 3
|
||||
#define BUILD 0
|
||||
|
||||
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
|
||||
|
@ -6,7 +6,7 @@ class CfgAmmo {
|
||||
class F_20mm_White: FlareBase {};
|
||||
|
||||
class ACE_FlashlightProxy_White: F_20mm_White {
|
||||
model = "";
|
||||
model = "\A3\Weapons_f\empty";
|
||||
effectFlare = "FlareShell";
|
||||
|
||||
triggerTime = 0;
|
||||
|
@ -1,5 +1,22 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
//Delete map glow lights from disconnecting players #2810
|
||||
if (isServer) then {
|
||||
addMissionEventHandler ["HandleDisconnect",{
|
||||
params ["_disconnectedPlayer"];
|
||||
|
||||
if ((!GVAR(mapGlow)) || {isNull _disconnectedPlayer}) exitWith {};
|
||||
{
|
||||
if (_x isKindOf "ACE_FlashlightProxy_White") then {
|
||||
// ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer);
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} forEach attachedObjects _disconnectedPlayer;
|
||||
|
||||
nil
|
||||
}];
|
||||
};
|
||||
|
||||
// Exit on Headless as well
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
|
@ -54,7 +54,7 @@ if (_show) then {
|
||||
_allInjuryTexts = [];
|
||||
_genericMessages = [];
|
||||
|
||||
if (GVAR(level) >= 2) then {
|
||||
if (GVAR(level) >= 2 && {([_unit] call FUNC(hasMedicalEnabled))}) then {
|
||||
_partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN;
|
||||
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
|
||||
};
|
||||
@ -87,7 +87,7 @@ if (_show) then {
|
||||
|
||||
_damaged = [false, false, false, false, false, false];
|
||||
_selectionBloodLoss = [0,0,0,0,0,0];
|
||||
if (GVAR(level) >= 2) then {
|
||||
if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then {
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
private "_amountOf";
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_selection", "_damage", "_shooter", "_projectile"];
|
||||
params ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_hitPointIndex"];
|
||||
TRACE_5("ACE_DEBUG: HandleDamage Called",_unit, _selection, _damage, _shooter, _projectile);
|
||||
|
||||
// bug, apparently can fire for remote units in special cases
|
||||
@ -43,7 +43,7 @@ if (_selection == "legs") exitWith {_unit getHit "legs"};
|
||||
// This will convert new selection names into selection names that the medical system understands
|
||||
// TODO This should be cleaned up when we revisit the medical system at a later stage
|
||||
// and instead we should deal with the new hitpoints directly
|
||||
_selection = [_selection] call FUNC(translateSelections);
|
||||
_selection = [_unit, _selection, _hitPointIndex] call FUNC(translateSelections);
|
||||
_this set [1, _selection]; // ensure that the parameters are set correctly
|
||||
|
||||
// If the damage is being weird, we just tell it to fuck off. Ignore: "hands", "legs", "?"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_target", "_player", "_selectionN", "_actionData"];
|
||||
|
||||
if (GVAR(level) < 2) exitwith {
|
||||
if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitwith {
|
||||
private ["_pointDamage"];
|
||||
_pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN;
|
||||
|
||||
|
@ -4,29 +4,39 @@
|
||||
* Aims to deal with the new hitpoint system introduced in Arma3 v1.50 and later.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: selection name <STRING>
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: selection name <STRING>
|
||||
* 2: HitPoint Index <SCALAR>
|
||||
*
|
||||
* Return Value:
|
||||
* translated selection name <STRING>
|
||||
*
|
||||
* Example:
|
||||
* ["pelvis"] call ace_medical_fnc_translateSelections
|
||||
* [bob, "pelvis", 4] call ace_medical_fnc_translateSelections
|
||||
* Returns "body"
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define HEAD_SELECTIONS ["face_hub", "neck", "head"]
|
||||
#define HEAD_HITPOINTS ["hitface", "hitneck", "hithead"]
|
||||
#define TORSO_SELECTIONS ["pelvis", "spine1", "spine2", "spine3", "body"]
|
||||
#define TORSO_HITPOINTS ["hitpelvis", "hitabdomen", "hitdiaphragm", "hitchest", "hitbody"]
|
||||
#define L_ARM_SELECTIONS ["hand_l"]
|
||||
#define L_ARM_HITPOINTS ["hitleftarm", "hand_l"]
|
||||
#define R_ARM_SELECTIONS ["hand_r"]
|
||||
#define R_ARM_HITPOINTS ["hitrightarm", "hand_r"]
|
||||
#define L_LEG_SELECTIONS ["leg_l"]
|
||||
#define L_LEG_HITPOINTS ["hitleftleg", "leg_l"]
|
||||
#define R_LEG_SELECTIONS ["leg_r"]
|
||||
#define R_LEG_HITPOINTS ["hitrightleg", "leg_r"]
|
||||
|
||||
params ["_selection"];
|
||||
params ["_unit", "_selection", "_hitPointIndex"];
|
||||
|
||||
if (_selection in HEAD_SELECTIONS) exitwith {"head"};
|
||||
if (_selection in TORSO_SELECTIONS) exitwith {"body"};
|
||||
if (_selection == "") exitWith {""};
|
||||
if (_selection in HEAD_SELECTIONS) exitWith {"head"};
|
||||
if (_selection in TORSO_SELECTIONS) exitWith {"body"};
|
||||
|
||||
// Not necessary unless we get more hitpoints variants in an next arma update
|
||||
/*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"};
|
||||
@ -34,4 +44,20 @@ if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"};
|
||||
if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"};
|
||||
if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/
|
||||
|
||||
//Backup method to detect weird selections/hitpoints
|
||||
if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith {
|
||||
if (_hitPointIndex < 0) exitWith {_selection};
|
||||
private _hitPoint = toLower configName ((configProperties [(configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints")]) select _hitPointIndex);
|
||||
TRACE_4("Weird sel/hit", _unit, _selection, _hitPointIndex, _hitPoint);
|
||||
|
||||
if (_hitPoint in HEAD_HITPOINTS) exitWith {"head"};
|
||||
if (_hitPoint in TORSO_HITPOINTS) exitWith {"body"};
|
||||
if (_hitPoint in L_ARM_HITPOINTS) exitWith {"hand_l"};
|
||||
if (_hitPoint in R_ARM_HITPOINTS) exitWith {"hand_r"};
|
||||
if (_hitPoint in L_LEG_HITPOINTS) exitWith {"leg_l"};
|
||||
if (_hitPoint in R_LEG_HITPOINTS) exitWith {"leg_r"};
|
||||
|
||||
_selection
|
||||
};
|
||||
|
||||
_selection;
|
||||
|
@ -19,7 +19,7 @@ GVAR(pendingReopen) = false;
|
||||
|
||||
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey),
|
||||
{
|
||||
local _target = cursorTarget;
|
||||
private _target = cursorTarget;
|
||||
if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player};
|
||||
|
||||
// Conditions: canInteract
|
||||
|
@ -20,7 +20,7 @@
|
||||
params ["_selectionBloodLoss", "_damaged", "_display"];
|
||||
|
||||
// Handle the body image coloring
|
||||
local _availableSelections = [50, 51, 52, 53, 54, 55];
|
||||
private _availableSelections = [50, 51, 52, 53, 54, 55];
|
||||
{
|
||||
private ["_red", "_green", "_blue"];
|
||||
|
||||
|
@ -62,7 +62,7 @@ _damaged = [false, false, false, false, false, false];
|
||||
_selectionBloodLoss = [0, 0, 0, 0, 0, 0];
|
||||
|
||||
_allInjuryTexts = [];
|
||||
if (EGVAR(medical,level) >= 2) then {
|
||||
if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnabled))}) then {
|
||||
_openWounds = _target getVariable [QEGVAR(medical,openWounds), []];
|
||||
private "_amountOf";
|
||||
{
|
||||
|
@ -114,26 +114,11 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
|
||||
// enable optics in prone left and right stance
|
||||
class AidlPpneMstpSrasWrflDnon_G0S;
|
||||
class AadjPpneMstpSrasWrflDleft: AidlPpneMstpSrasWrflDnon_G0S {
|
||||
enableOptics = 1;
|
||||
};
|
||||
class AadjPpneMstpSrasWrflDright: AidlPpneMstpSrasWrflDnon_G0S {
|
||||
enableOptics = 1;
|
||||
};
|
||||
// enable optics in prone down stance
|
||||
class AadjPpneMstpSrasWrflDup;
|
||||
class AadjPpneMstpSrasWrflDdown: AadjPpneMstpSrasWrflDup {
|
||||
enableOptics = 1;
|
||||
};
|
||||
|
||||
class AidlPpneMstpSrasWpstDnon_G0S;
|
||||
class AadjPpneMstpSrasWpstDleft: AidlPpneMstpSrasWpstDnon_G0S {
|
||||
enableOptics = 2;
|
||||
};
|
||||
class AadjPpneMstpSrasWpstDright: AidlPpneMstpSrasWpstDnon_G0S {
|
||||
enableOptics = 2;
|
||||
};
|
||||
class AadjPpneMstpSrasWpstDup;
|
||||
class AadjPpneMstpSrasWpstDdown: AadjPpneMstpSrasWpstDup {
|
||||
enableOptics = 2;
|
||||
|
@ -41,7 +41,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then {
|
||||
ACE_LOGINFO("ACRE Detected.");
|
||||
DFUNC(isSpeaking) = {
|
||||
params ["_unit"];
|
||||
(([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||
([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||
};
|
||||
} else {
|
||||
if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then {
|
||||
|
@ -24,9 +24,9 @@ private ["_array", "_type", "_return", "_config" /*, "_priority"*/];
|
||||
|
||||
// get Priority Array from Config
|
||||
_array = [
|
||||
getNumber (configFile >> "CfgWeapons" >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgMagazines" >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgAmmo" >> QGVAR(priority))
|
||||
getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(priority))
|
||||
];
|
||||
|
||||
TRACE_1("Proiroity Array",_array);
|
||||
|
@ -308,6 +308,9 @@ class CfgVehicles {
|
||||
class O_Heli_Light_02_F: Heli_Light_02_base_F {
|
||||
displayName = CSTRING(Heli_Light_02_Name);
|
||||
};
|
||||
class O_Heli_Light_02_v2_F: Heli_Light_02_base_F {
|
||||
displayName = CSTRING(Heli_Light_02_v2_Name);
|
||||
};
|
||||
class Heli_Light_02_unarmed_base_F;
|
||||
class O_Heli_Light_02_unarmed_F: Heli_Light_02_unarmed_base_F {
|
||||
displayName = CSTRING(Heli_Light_02_unarmed_Name);
|
||||
|
@ -817,6 +817,17 @@
|
||||
<Hungarian>Ka-60 Kasatka</Hungarian>
|
||||
<Italian>Ka-60 Kasatka</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_RealisticNames_Heli_Light_02_v2_Name">
|
||||
<English>Ka-60 Kasatka (Black & White)</English>
|
||||
<Czech>Ka-60 Kasatka (černobílá)</Czech>
|
||||
<French>Ka-60 Kasatka (noir et blanc)</French>
|
||||
<German>Ka-60 Kasatka (Schwarz-weiß)</German>
|
||||
<Italian>Ka-60 Kasatka (bianco e nero)</Italian>
|
||||
<Polish>Ka-60 Kasatka (czarno-biały)</Polish>
|
||||
<Portuguese>Ka-60 Kasatka (preto e branco)</Portuguese>
|
||||
<Russian>Ka-60 Касатка (белый и черный)</Russian>
|
||||
<Spanish>Ka-60 Kasatka (blanco y negro)</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_RealisticNames_Heli_Light_02_unarmed_Name">
|
||||
<English>Ka-60 Kasatka (unarmed)</English>
|
||||
<German>Ka-60 Kasatka (unbewaffnet)</German>
|
||||
|
@ -25,7 +25,7 @@ if (_target isKindOf "StaticWeapon") exitWith {
|
||||
// no check ammo action on destroyed static weapons
|
||||
if (!alive _target) exitWith {false};
|
||||
|
||||
local _found = false;
|
||||
private _found = false;
|
||||
|
||||
{
|
||||
if (_x select 2) exitWith {
|
||||
|
@ -37,7 +37,7 @@ if (
|
||||
};
|
||||
|
||||
if (currentWeapon _unit != "") then {
|
||||
local _index = 0;
|
||||
private _index = 0;
|
||||
|
||||
while {
|
||||
_index < 100 && {currentWeaponMode _unit != _activeWeaponMode}
|
||||
|
4
mod.cpp
4
mod.cpp
@ -1,8 +1,8 @@
|
||||
name = "Advanced Combat Environment 3.3.2";
|
||||
name = "Advanced Combat Environment 3.3.3";
|
||||
picture = "logo_ace3_ca.paa";
|
||||
actionName = "GitHub";
|
||||
action = "https://github.com/acemod/ACE3";
|
||||
description = "ACE3 - Version 3.3.2";
|
||||
description = "ACE3 - Version 3.3.3";
|
||||
logo = "logo_ace3_ca.paa";
|
||||
logoOver = "logo_ace3_ca.paa";
|
||||
tooltip = "ACE3";
|
||||
|
@ -16,7 +16,7 @@ def get_private_declare(content):
|
||||
|
||||
priv_dec_str = ''.join(priv_srch_declared)
|
||||
|
||||
srch = re.compile('(?<![_a-zA-Z0-9])(_[a-zA-Z]*?)[ ,\}\]\)";]')
|
||||
srch = re.compile('(?<![_a-zA-Z0-9])(_[a-zA-Z0-9]*?)[ ,\}\]\)";]')
|
||||
priv_split = srch.findall(priv_dec_str)
|
||||
priv_split = sorted(set(priv_split))
|
||||
priv_declared += priv_split;
|
||||
@ -27,12 +27,18 @@ def get_private_declare(content):
|
||||
|
||||
priv_dec_str = ''.join(priv_srch_declared)
|
||||
|
||||
srch = re.compile('(?<![_a-zA-Z0-9])(_[a-zA-Z]*?)[ ,\}\]\)";]')
|
||||
srch = re.compile('(?<![_a-zA-Z0-9])(_[a-zA-Z0-9]*?)[ ,\}\]\)";]')
|
||||
priv_split = srch.findall(priv_dec_str)
|
||||
priv_split = sorted(set(priv_split))
|
||||
|
||||
priv_declared += priv_split;
|
||||
|
||||
srch = re.compile('(?i)[\s]*local[\s]+(_[\w\d]*)[\s]*=.*')
|
||||
priv_local = srch.findall(content)
|
||||
priv_local_declared = sorted(set(priv_local))
|
||||
|
||||
priv_declared += priv_local_declared;
|
||||
|
||||
|
||||
return priv_declared
|
||||
|
||||
@ -53,7 +59,7 @@ def check_privates(filepath):
|
||||
|
||||
|
||||
# Regex search privates
|
||||
srch = re.compile('(?<![_a-zA-Z0-9])(_[a-zA-Z]*?)[ ,\^\-\+\/\*\%\}\]\)";]')
|
||||
srch = re.compile('(?<![_a-zA-Z0-9])(_[a-zA-Z0-9]*?)[ =,\^\-\+\/\*\%\}\]\)";]')
|
||||
priv_use = srch.findall(content)
|
||||
priv_use = sorted(set(priv_use))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user