mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
manual merge
This commit is contained in:
commit
5a1aae6028
@ -1,4 +1,4 @@
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# If you contributed, but are not listed here, contact me:
|
||||
# koffeinflummi@gmail.com
|
||||
#
|
||||
@ -37,6 +37,7 @@ alef <alefor@gmail.com>
|
||||
Aleksey EpMAK Yermakov <epmak777@gmail.com>
|
||||
Alganthe <alganthe@live.fr>
|
||||
Anthariel <Contact@storm-simulation.com>
|
||||
Arkhir <wonsz666@gmail.com >
|
||||
Asgar Serran <piechottaf@web.de>
|
||||
Bamse <bamsis@gmail.com>
|
||||
Bla1337
|
||||
@ -108,6 +109,7 @@ Toaster <jonathan.pereira@gmail.com>
|
||||
Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
Valentin Torikian <valentin.torikian@gmail.com>
|
||||
voiper
|
||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Winter <simon@agius-muscat.net>
|
||||
zGuba
|
||||
|
@ -26,19 +26,19 @@ _aceTimeSecond = floor ACE_time;
|
||||
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
if (!alive _bullet || _bulletSpeed < 100) exitWith {
|
||||
GVAR(allBullets) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
if (!alive _bullet || _bulletSpeed < 100) then {
|
||||
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
|
||||
} else {
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 500) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
|
||||
};
|
||||
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 500) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
|
||||
} forEach GVAR(allBullets);
|
||||
nil
|
||||
} count +GVAR(allBullets);
|
||||
|
||||
if (GVAR(allBullets) isEqualTo []) then {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_backpack"];
|
||||
|
||||
if (typeName _backpack == "OBJECT") then {
|
||||
if (_backpack isEqualType objNull) then {
|
||||
_backpack = typeOf _backpack;
|
||||
};
|
||||
|
||||
|
@ -21,10 +21,10 @@ params ["_newUnit","_oldUnit"];
|
||||
//set showHUD based on new unit status:
|
||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_newUnit);
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_newUnit);
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
|
||||
//If old player was escorting, stop
|
||||
|
@ -23,9 +23,9 @@ params ["_unit","_zeusIsOpen"];
|
||||
if (!_zeusIsOpen) then {
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_unit);
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_unit);
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
};
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
@ -107,7 +107,7 @@ if (_state) then {
|
||||
};
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ if (_state) then {
|
||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
};
|
||||
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
@ -75,7 +75,7 @@ if (_state) then {
|
||||
if (_unit == ACE_player) then {
|
||||
//only re-enable HUD if not handcuffed
|
||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -181,11 +181,13 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_DisplayName">
|
||||
<English>Make Unit Handcuffed</English>
|
||||
<Polish>Skuj jednostkę</Polish>
|
||||
<Portuguese>Fazer unidade algemada</Portuguese>
|
||||
<Russian>Связать юнита</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_Description">
|
||||
<English>Sync a unit to make them handcuffed.<br />Source: ace_captives</English>
|
||||
<Polish>Zsynchronizuj z jednostką, aby została skuta.<br />Źródło: ace_captives</Polish>
|
||||
<Portuguese>Sincronizar uma unidade para deixá-la algemada.<br/>Source: ace_captives</Portuguese>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.<br />Источник: ace_captives</Russian>
|
||||
</Key>
|
||||
@ -288,4 +290,4 @@
|
||||
<Spanish>Rendición o desarme</Spanish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -48,6 +48,11 @@ class Extended_InitPost_EventHandlers {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
class RoadCone_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
class Car {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
|
@ -237,7 +237,15 @@ class CfgVehicles {
|
||||
GVAR(size) = 6;
|
||||
};
|
||||
|
||||
|
||||
// objects
|
||||
class RoadCone_F: ThingX {
|
||||
GVAR(size) = 1;
|
||||
GVAR(canLoad) = 1;
|
||||
};
|
||||
class RoadBarrier_F: RoadCone_F {
|
||||
GVAR(size) = 2;
|
||||
};
|
||||
|
||||
|
||||
class Scrapyard_base_F;
|
||||
class Land_PaperBox_closed_F: Scrapyard_base_F {
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
_unloaded = [_item, _vehicle] call FUNC(unloadItem);
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
// Show hint as feedback
|
||||
_hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
|
||||
|
@ -23,7 +23,7 @@ if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
|
||||
private ["_itemSize", "_validItem"];
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
|
||||
if (typeName _item == "STRING") then {
|
||||
if (_item isEqualType "") then {
|
||||
_validItem =
|
||||
isClass (configFile >> "CfgVehicles" >> _item) &&
|
||||
{getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1};
|
||||
|
@ -22,7 +22,7 @@ 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};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
|
@ -19,7 +19,7 @@ params ["_item"];
|
||||
private ["_isVirtual","_itemClass","_config"];
|
||||
scopeName "return";
|
||||
|
||||
_isVirtual = (typeName _item == "STRING");
|
||||
_isVirtual = (_item isEqualType "");
|
||||
_itemClass = if (_isVirtual) then {_item} else {typeOf _item};
|
||||
_config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
|
||||
|
||||
|
@ -24,7 +24,7 @@ if (_loaded isEqualTo []) exitWith {};
|
||||
|
||||
{
|
||||
// TODO Do we want to be able to recover destroyed equipment?
|
||||
if (typeName _x == "OBJECT") then {
|
||||
if (_x isEqualType objNull) then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} count _loaded;
|
||||
|
@ -33,7 +33,7 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
|
||||
|
||||
if (typeName _item == "OBJECT") then {
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,-100]];
|
||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
||||
|
@ -25,7 +25,7 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
private ["_display","_loaded", "_ctrl", "_class", "_label"];
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
if (isNil "_display") exitWith {
|
||||
if (isnil "_display") exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
@ -40,8 +40,8 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
|
||||
lbClear _ctrl;
|
||||
{
|
||||
_class = if (typeName _x == "STRING") then {_x} else {typeOf _x};
|
||||
_ctrl lbAdd (getText(configFile >> "CfgVehicles" >> _class >> "displayName"));
|
||||
_class = if (_x isEqualType "") then {_x} else {typeOf _x};
|
||||
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName"));
|
||||
true
|
||||
} count _loaded;
|
||||
|
||||
|
@ -41,7 +41,7 @@ if ([_item, GVAR(interactionVehicle)] call FUNC(canUnloadItem)) then {
|
||||
|
||||
[5 * _size, [_item, GVAR(interactionVehicle)], "UnloadCargo", {}, localize LSTRING(UnloadingItem)] call EFUNC(common,progressBar);
|
||||
} else {
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
_displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
||||
|
@ -23,7 +23,7 @@ if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
@ -57,7 +57,7 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
||||
|
||||
if (typeName _item == "OBJECT") then {
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
|
||||
|
@ -24,8 +24,8 @@ _loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_newLoaded = [];
|
||||
_totalSpaceOccupied = 0;
|
||||
{
|
||||
if ((typeName _x == "STRING") || {!isNull _x}) then {
|
||||
_newLoaded pushBack _x;
|
||||
if ((_x isEqualType "") || {!isNull _x}) then {
|
||||
_newLoaded pushback _x;
|
||||
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
|
||||
};
|
||||
true
|
||||
|
@ -98,18 +98,22 @@
|
||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||
<English>Loading Cargo</English>
|
||||
<Portuguese>Carregando carga</Portuguese>
|
||||
<Polish>Ładowanie cargo</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
||||
<English>Unloading Cargo</English>
|
||||
<Portuguese>Descarregando carga</Portuguese>
|
||||
<Polish>Rozładowywanie cargo</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
||||
<English>%1<br/>could not be loaded</English>
|
||||
<Portuguese>%1<br/>não pode ser carregado</Portuguese>
|
||||
<Polish>%1<br/>nie mógł zostać załadowany</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingFailed">
|
||||
<English>%1<br/>could not be unloaded</English>
|
||||
<Portuguese>%1<br/>não pode ser descarregado</Portuguese>
|
||||
<Polish>%1<br/>nie mógł zostać rozładowany</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -29,17 +29,16 @@
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
|
||||
//Handle the waitUntilAndExec array:
|
||||
private _deleted = 0;
|
||||
{
|
||||
// if condition is satisifed call statement
|
||||
if ((_x select 2) call (_x select 0)) then {
|
||||
// make sure to delete the correct handle when multiple conditions are met in one frame
|
||||
GVAR(waitUntilAndExecArray) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
GVAR(waitUntilAndExecArray) deleteAt (GVAR(waitUntilAndExecArray) find _x);
|
||||
(_x select 2) call (_x select 1);
|
||||
};
|
||||
} forEach GVAR(waitUntilAndExecArray);
|
||||
|
||||
nil
|
||||
} count +GVAR(waitUntilAndExecArray);
|
||||
|
||||
END_COUNTER(waitAndExec);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
@ -98,7 +97,6 @@
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
||||
["assignTeam", {(_this select 0) assignTeam (_this select 1)}] call FUNC(addEventHandler);
|
||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
||||
|
||||
if (isServer) then {
|
||||
|
@ -168,6 +168,7 @@ PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setVolume);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(showHud);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
@ -292,6 +293,7 @@ PREP(hashListSet);
|
||||
PREP(hashListPush);
|
||||
|
||||
GVAR(syncedEvents) = HASH_CREATE;
|
||||
GVAR(showHudHash) = [] call FUNC(hashCreate);
|
||||
|
||||
//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute
|
||||
GVAR(waitAndExecArray) = [];
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
params ["_unit", "_action", "_condition", "_statement"];
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
if (_condition isEqualType "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -21,19 +21,19 @@
|
||||
|
||||
params ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", ["_priority", 0]];
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
if (_condition isEqualType "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
if (typeName _condition2 == "STRING") then {
|
||||
if (_condition2 isEqualType "") then {
|
||||
_condition2 = compile _condition2;
|
||||
};
|
||||
|
||||
if (typeName _statement2 == "STRING") then {
|
||||
if (_statement2 isEqualType "") then {
|
||||
_statement2 = compile _statement2;
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -22,14 +22,14 @@
|
||||
|
||||
params ["_list", "_variable", "_setting", "_global", ["_vehicle", false]];
|
||||
|
||||
if (typeName _list == "STRING") then {
|
||||
if (_list isEqualType "") then {
|
||||
_list = [_list, true, true] call FUNC(parseList);
|
||||
TRACE_1("Parsed",_list)
|
||||
};
|
||||
|
||||
{
|
||||
if (!isNil "_x") then {
|
||||
if (typeName _x == typeName objNull) then {
|
||||
if (_x isEqualType objNull) then {
|
||||
if (local _x) then {
|
||||
if (_vehicle) then {
|
||||
(vehicle _x) setVariable [_variable, _setting, _global];
|
||||
|
@ -16,7 +16,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
params ["_id", ["_show", false]];
|
||||
|
||||
if (typeName _show == "SCALAR") then {
|
||||
if (_show isEqualType 0) then {
|
||||
_show = _show == 1;
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_function"];
|
||||
|
||||
if (typeName _function == "STRING") exitWith {_function};
|
||||
if (_function isEqualType "") exitWith {_function};
|
||||
|
||||
_function = toArray str _function;
|
||||
_function deleteAt 0;
|
||||
|
@ -21,7 +21,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi
|
||||
|
||||
if (isNil "_defaultGlobal") exitWith {};
|
||||
|
||||
if (typeName _name != "STRING") exitWith {
|
||||
if (!(_name isEqualType "")) exitwith {
|
||||
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ private ["_validIndex", "_realIndex"];
|
||||
|
||||
_validIndex = -1;
|
||||
|
||||
if (typeName _searchOffsetOrName == "STRING") then {
|
||||
if (_searchOffsetOrName isEqualType "") then {
|
||||
{
|
||||
if (_x select 0 == _searchOffsetOrName) exitWith {
|
||||
_validIndex = _forEachIndex;
|
||||
|
@ -20,10 +20,10 @@ params ["_text", "_image", ["_imageColor", [1,1,1]], ["_target", ACE_player]];
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
if (typeName _text != "TEXT") then {
|
||||
if (typeName _text == "ARRAY") then {
|
||||
if (_text isEqualType []) then {
|
||||
if (count _text > 0) then {
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
if (_x isEqualType "" && {isLocalized _x}) then {
|
||||
_text set [_forEachIndex, localize _x];
|
||||
};
|
||||
} forEach _text;
|
||||
@ -32,7 +32,7 @@ if (typeName _text != "TEXT") then {
|
||||
};
|
||||
};
|
||||
|
||||
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||
if (_text isEqualType "" && {isLocalized _text}) then {
|
||||
_text = localize _text;
|
||||
};
|
||||
|
||||
|
@ -19,17 +19,17 @@ params ["_text", ["_size", 1.5], ["_target", ACE_player]];
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
if (typeName _text != "TEXT") then {
|
||||
if (typeName _text == "ARRAY") then {
|
||||
if (_text isEqualType []) then {
|
||||
if (count _text > 0) then {
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
_text set [_forEachIndex, localize _x];
|
||||
if (_x isEqualType "" && {isLocalized _x}) then {
|
||||
_text set [_foreachIndex, localize _x];
|
||||
};
|
||||
}forEach _text;
|
||||
}foreach _text;
|
||||
_text = format _text;
|
||||
};
|
||||
};
|
||||
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||
if (_text isEqualType "" && {isLocalized _text}) then {
|
||||
_text = localize _text;
|
||||
};
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
@ -48,10 +48,10 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||
/*
|
||||
// This does not function at the moment. Has been disabled until it fixed.
|
||||
_xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
*/
|
||||
|
||||
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
|
@ -31,7 +31,7 @@ if (isNull (call BIS_fnc_displayMission)) exitWith {
|
||||
|
||||
params ["_textHeader", "_textMessage", ["_onOK", {}], ["_onCancel", {}]];
|
||||
|
||||
if (typeName _textMessage == "STRING") then {
|
||||
if (_textMessage isEqualType "") then {
|
||||
_textMessage = parseText _textMessage;
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@ TRACE_3("params", _arguments, _function, _unit);
|
||||
|
||||
_function = call compile _function;
|
||||
|
||||
if (typeName _unit == "SCALAR") exitWith {
|
||||
if (_unit isEqualType 0) exitWith {
|
||||
switch (_unit) do {
|
||||
case 0 : {
|
||||
_arguments call _function;
|
||||
|
@ -18,7 +18,7 @@ params ["_target"];
|
||||
if (isNil "_x") then {
|
||||
ACE_LOGERROR_1("No arguments and function for remote function. ID: %1",_forEachIndex);
|
||||
} else {
|
||||
if (typeName _x == "ARRAY") then {
|
||||
if (_x isEqualType []) then {
|
||||
[_x select 0, _target] call (_x select 1);
|
||||
};
|
||||
};
|
||||
|
@ -41,8 +41,8 @@ _fnc_logEntries = {
|
||||
case (isClass _e1): {[_e1, _d + 1] call _fnc_logEntries; false};
|
||||
};
|
||||
|
||||
if (typeName _e2 != "BOOL") then {
|
||||
if (typeName _e2 == "ARRAY") then {
|
||||
if (!(_e2 isEqualType false)) then {
|
||||
if (_e2 isEqualType []) then {
|
||||
_e2 = toArray str _e2;
|
||||
{
|
||||
if (_x == toArray "[" select 0) then {
|
||||
|
@ -24,7 +24,7 @@ _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
|
||||
|
||||
// get correct format on vehicles without any hitpoints
|
||||
if (_hitPointsWithSelections isEqualTo []) then {
|
||||
_hitPointsWithSelections = [[],[],[]];
|
||||
_hitPointsWithSelections = [[],[],[]];
|
||||
};
|
||||
|
||||
_hitPointsWithSelections resize 2;
|
||||
|
@ -8,10 +8,17 @@
|
||||
* Return Value:
|
||||
* is the unit an engineer <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_common_fnc_isEngineer
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1] // return
|
||||
private _isEngineer = _unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1];
|
||||
//Handle ace_repair modules setting this to a number
|
||||
if (_isEngineer isEqualType 0) then {_isEngineer = _isEngineer > 0};
|
||||
|
||||
_isEngineer
|
||||
|
@ -27,7 +27,7 @@
|
||||
// If the setting is stored on the profile
|
||||
if !(isNil "_profileValue") then {
|
||||
// If the profile variable has the correct type
|
||||
if (typeName _profileValue == typeName (missionNamespace getVariable _name)) then {
|
||||
if (_profileValue isEqualType (missionNamespace getVariable _name)) then {
|
||||
// Load the setting from the profile
|
||||
missionNamespace setVariable [_name, _profileValue];
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ _fnc_parseConfigForDisplayNames = {
|
||||
private "_text";
|
||||
_text = _x;
|
||||
|
||||
if (typeName _text == "STRING" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
|
||||
if (_text isEqualType "" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
|
||||
_text = localize (_text select [1]); //chop off the leading $
|
||||
_values set [_forEachIndex, _text];
|
||||
};
|
||||
|
@ -85,13 +85,13 @@ _fnc_perFrameFunction = {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
if (_errorCode == 0) then {
|
||||
if (typeName _onFinish == "STRING") then {
|
||||
if (_onFinish isEqualType "") then {
|
||||
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
||||
} else {
|
||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
|
||||
};
|
||||
} else {
|
||||
if (typeName _onFail == "STRING") then {
|
||||
if (_onFail isEqualType "") then {
|
||||
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
||||
} else {
|
||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
|
||||
|
@ -19,7 +19,7 @@ params ["_name", "_value"];
|
||||
|
||||
// Hack to keep backward compatibility for the moment
|
||||
if (typeName (missionNamespace getVariable _name) == "BOOL") then {
|
||||
if (typeName _value == "SCALAR") then {
|
||||
if (_value isEqualType 0) then {
|
||||
_value = _value > 0;
|
||||
};
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) &&
|
||||
private _failed = false;
|
||||
if (typeName _value != _settingData select 1) then {
|
||||
_failed = true;
|
||||
if ((_typeName == "BOOL") && {typeName _value == "SCALAR"}) then {
|
||||
if ((_typeName == "BOOL") && {_value isEqualType 0}) then {
|
||||
// If value is not 0 or 1 consider it invalid and don't set anything
|
||||
if (_value isEqualTo 0) then {
|
||||
_value = false;
|
||||
@ -56,7 +56,7 @@ if (typeName _value != _settingData select 1) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
if ((_typeName == "COLOR") && {typeName _value == "ARRAY"}) then {
|
||||
if ((_typeName == "COLOR") && {_value isEqualType []}) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
|
@ -38,19 +38,16 @@ GVAR(setVariablePublicArray) pushBack [_object, _varName, _syncTime, _idName];
|
||||
if (isNil QGVAR(setVariablePublicPFH)) exitWith {};
|
||||
|
||||
GVAR(setVariablePublicPFH) = [{
|
||||
private "_delete";
|
||||
_delete = 0;
|
||||
|
||||
{
|
||||
_x params ["_object", "_varName", "_syncTime", "_idName"];
|
||||
if (ACE_diagTime > _syncTime) then {
|
||||
// set value public
|
||||
_object setVariable [_varName, _object getVariable _varName, true];
|
||||
GVAR(setVariablePublicArray) deleteAt _forEachIndex - _delete;
|
||||
GVAR(setVariableNames) deleteAt _forEachIndex - _delete;
|
||||
_delete = _delete + 1;
|
||||
GVAR(setVariablePublicArray) deleteAt (GVAR(setVariablePublicArray) find _x);
|
||||
GVAR(setVariableNames) deleteAt (GVAR(setVariableNames) find _x);
|
||||
};
|
||||
} forEach GVAR(setVariablePublicArray);
|
||||
nil
|
||||
} count +GVAR(setVariablePublicArray);
|
||||
|
||||
if (GVAR(setVariablePublicArray) isEqualTo []) then {
|
||||
[GVAR(setVariablePublicPFH)] call CBA_fnc_removePerFrameHandler;
|
||||
|
66
addons/common/functions/fnc_showHud.sqf
Normal file
66
addons/common/functions/fnc_showHud.sqf
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Allows multiple sources to not overwrite showHud command
|
||||
* Bitwise AND Logic (a single false in a mask will make it false)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Source ID <STRING><OPTIONAL>
|
||||
* 1: Show Hud Bool Array (8 to set, empty to remove) <ARRAY><OPTIONAL>
|
||||
* - [hud, info, radar, compass, direction, menu, group, cursors]
|
||||
* - hud: Boolean - show scripted HUD (same as normal showHUD true/false)
|
||||
* - info: Boolean - show vehicle + soldier info (hides weapon info from the HUD as well)
|
||||
* - radar: Boolean - show vehicle radar
|
||||
* - compass: Boolean - show vehicle compass
|
||||
* - direction: Boolean - show tank direction indicator (not present in vanilla Arma 3)
|
||||
* - menu: Boolean - show commanding menu (hides HC related menus)
|
||||
* - group: Boolean - show group info bar (hides squad leader info bar)
|
||||
* - cursors: Boolean - show HUD weapon cursors (connected with scripted HUD)
|
||||
*
|
||||
* Return Value:
|
||||
* Resulting ShowHud Array <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* ["hideHud", [false, true, true, true, true, true, true, false]] call ace_common_fnc_showHud; //This is equivalent to the old showHud false
|
||||
* [] call ace_common_fnc_showHud; //sets `showHud` and returns the result array used
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {[-1]};
|
||||
|
||||
params [["_reason", "", [""]], ["_mask", [], [[]], [0,8]]];
|
||||
|
||||
if (isArray (missionConfigFile >> "showHUD")) then {
|
||||
//(showHud = 0;) is fine - the array is the problem
|
||||
ACE_LOGWARNING("showHUD[] in Description.ext breaks the showHud command");
|
||||
};
|
||||
|
||||
if (_reason != "") then {
|
||||
_reason = toLower _reason;
|
||||
if (_mask isEqualTo []) then {
|
||||
TRACE_2("Setting", _reason, _mask);
|
||||
[GVAR(showHudHash), _reason] call FUNC(hashRem);
|
||||
} else {
|
||||
TRACE_2("Removing", _reason, _mask);
|
||||
[GVAR(showHudHash), _reason, _mask] call FUNC(hashSet);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(showHudHash) params ["_reasons", "_masks"];
|
||||
private _resultMask = [];
|
||||
|
||||
for "_index" from 0 to 7 do {
|
||||
private _set = true; //Default to true
|
||||
{
|
||||
if (!(_x select _index)) exitWith {
|
||||
_set = false; //Any false will make it false
|
||||
};
|
||||
} forEach _masks;
|
||||
_resultMask pushBack _set;
|
||||
};
|
||||
|
||||
TRACE_2("showHud", _resultMask, _reasons);
|
||||
showHud _resultMask;
|
||||
|
||||
_resultMask
|
@ -35,7 +35,7 @@ if (!isServer) exitWith {false};
|
||||
_eventEntry = _x;
|
||||
_ttlReturn = true;
|
||||
|
||||
if (typeName _globalEventTTL == "CODE") then {
|
||||
if (_globalEventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL}};
|
||||
@ -45,7 +45,7 @@ if (!isServer) exitWith {false};
|
||||
// Do event based TTL check
|
||||
_eventEntry params ["_time", "", "_eventTTL"];
|
||||
|
||||
if (typeName _eventTTL == "CODE") then {
|
||||
if (_eventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_eventTTL < 1 || {ACE_diagTime < _time + _eventTTL}};
|
||||
|
@ -17,6 +17,6 @@
|
||||
|
||||
params ["_value"];
|
||||
|
||||
if (typeName _value == "SCALAR") exitWith {_value};
|
||||
if (_value isEqualType 0) exitWith {_value};
|
||||
|
||||
parseNumber _value // return
|
||||
|
@ -84,6 +84,22 @@ class CfgVehicles {
|
||||
GVAR(canDrag) = 0;
|
||||
};
|
||||
|
||||
// Barrier
|
||||
class RoadCone_F: thingX {
|
||||
XEH_ENABLED;
|
||||
GVAR(canCarry) = 1;
|
||||
GVAR(carryPosition[]) = {0,1,1};
|
||||
GVAR(carryDirection) = 0;
|
||||
|
||||
GVAR(canDrag) = 1;
|
||||
GVAR(dragPosition[]) = {0,1.2,0};
|
||||
GVAR(dragDirection) = 0;
|
||||
};
|
||||
|
||||
class RoadBarrier_F: RoadCone_F {
|
||||
GVAR(carryPosition[]) = {0,1,0.300671};
|
||||
};
|
||||
|
||||
class ACE_RepairItem_Base: ThingX {};
|
||||
|
||||
class ACE_Track: ACE_RepairItem_Base {
|
||||
|
File diff suppressed because it is too large
Load Diff
1
addons/gestures/$PBOPREFIX$
Normal file
1
addons/gestures/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\gestures
|
11
addons/gestures/CfgEventHandlers.hpp
Normal file
11
addons/gestures/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
145
addons/gestures/CfgVehicles.hpp
Normal file
145
addons/gestures/CfgVehicles.hpp
Normal file
@ -0,0 +1,145 @@
|
||||
class CfgVehicles {
|
||||
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ADDON {
|
||||
displayName = CSTRING(Gestures);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = "";
|
||||
showDisabled = 1;
|
||||
priority = 3.5;
|
||||
icon = PATHTOF(UI\gestures_ca.paa);
|
||||
|
||||
class GVAR(Advance) {
|
||||
displayName = CSTRING(BIgestureAdvance);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureAdvance';);
|
||||
showDisabled = 1;
|
||||
priority = 1.9;
|
||||
};
|
||||
class GVAR(Go) {
|
||||
displayName = CSTRING(BIgestureGo);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
|
||||
showDisabled = 1;
|
||||
priority = 1.8;
|
||||
};
|
||||
class GVAR(Follow) {
|
||||
displayName = CSTRING(BIgestureFollow);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureFollow';);
|
||||
showDisabled = 1;
|
||||
priority = 1.7;
|
||||
};
|
||||
class GVAR(Up) {
|
||||
displayName = CSTRING(BIgestureUp);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureUp';);
|
||||
showDisabled = 1;
|
||||
priority = 1.5;
|
||||
};
|
||||
class GVAR(CeaseFire) {
|
||||
displayName = CSTRING(BIgestureCeaseFire);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
|
||||
showDisabled = 1;
|
||||
priority = 1.3;
|
||||
};
|
||||
class GVAR(Freeze) {
|
||||
displayName = CSTRING(BIgestureFreeze);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureFreeze';);
|
||||
showDisabled = 1;
|
||||
priority = 1.2;
|
||||
};
|
||||
class GVAR(Forward) {
|
||||
displayName = CSTRING(forward);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.9;
|
||||
};
|
||||
class GVAR(Regroup) {
|
||||
displayName = CSTRING(regroup);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.8;
|
||||
};
|
||||
class GVAR(Stop) {
|
||||
displayName = CSTRING(stop);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(stop)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.7;
|
||||
};
|
||||
class GVAR(Cover) {
|
||||
displayName = CSTRING(cover);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.6;
|
||||
};
|
||||
class GVAR(Point) {
|
||||
displayName = CSTRING(point);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.5;
|
||||
};
|
||||
class GVAR(Engage) {
|
||||
displayName = CSTRING(engage);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.4;
|
||||
};
|
||||
class GVAR(Hold) {
|
||||
displayName = CSTRING(hold);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.3;
|
||||
};
|
||||
class GVAR(Warning) {
|
||||
displayName = CSTRING(warning);
|
||||
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
|
||||
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
|
||||
showDisabled = 1;
|
||||
priority = 1.2;
|
||||
};
|
||||
/*
|
||||
class class GVAR(Yes) {
|
||||
displayName = ECSTRING(common,Yes);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
|
||||
showDisabled = 1;
|
||||
priority = 1.1;
|
||||
hotkey = "8";
|
||||
};
|
||||
|
||||
class class GVAR(No) {
|
||||
displayName = ECSTRING(common,No);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureNo';);
|
||||
showDisabled = 1;
|
||||
priority = 1.0;
|
||||
hotkey = "9";
|
||||
};
|
||||
|
||||
class class GVAR(Hi) {
|
||||
displayName = CSTRING(Gestures_Hi);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3););
|
||||
showDisabled = 1;
|
||||
priority = 0.9;
|
||||
hotkey = "0";
|
||||
};
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
38
addons/gestures/XEH_postInit.sqf
Normal file
38
addons/gestures/XEH_postInit.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
#include "key.sqf"
|
||||
|
||||
// reload mutex, you can't play signal while reloading
|
||||
GVAR(ReloadMutex) = true;
|
||||
|
||||
// Event for main display to be loaded:
|
||||
["mainDisplayLoaded", {
|
||||
// handle reloading
|
||||
(findDisplay 46) displayAddEventHandler ["KeyDown", {
|
||||
if ((_this select 1) in actionKeys "ReloadMagazine") then {
|
||||
if ((isNull ACE_player) || {!alive ACE_player}) exitWith {false};
|
||||
private _weapon = currentWeapon ACE_player;
|
||||
|
||||
if (_weapon != "") then {
|
||||
GVAR(ReloadMutex) = false;
|
||||
|
||||
private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
|
||||
private _isLauncher = _weapon isKindOf ["Launcher", (configFile >> "CfgWeapons")];
|
||||
private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
|
||||
private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
|
||||
|
||||
if (_duration != 0) then {
|
||||
_duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
|
||||
} else {
|
||||
_duration = 3;
|
||||
};
|
||||
|
||||
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
|
||||
[{GVAR(ReloadMutex) = true;}, [], _duration] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
};
|
||||
false
|
||||
}];
|
||||
}] call EFUNC(common,addEventHandler);
|
7
addons/gestures/XEH_preInit.sqf
Normal file
7
addons/gestures/XEH_preInit.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(playSignal);
|
||||
|
||||
ADDON = true;
|
BIN
addons/gestures/anim/ace_cover.rtm
Normal file
BIN
addons/gestures/anim/ace_cover.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_cover_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_cover_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_engage.rtm
Normal file
BIN
addons/gestures/anim/ace_engage.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_engage_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_engage_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_forward.rtm
Normal file
BIN
addons/gestures/anim/ace_forward.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_forward_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_forward_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_hold.rtm
Normal file
BIN
addons/gestures/anim/ace_hold.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_hold_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_hold_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_point.rtm
Normal file
BIN
addons/gestures/anim/ace_point.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_point_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_point_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_regroup.rtm
Normal file
BIN
addons/gestures/anim/ace_regroup.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_regroup_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_regroup_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_stop.rtm
Normal file
BIN
addons/gestures/anim/ace_stop.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_stop_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_stop_stand_lowered.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_warning.rtm
Normal file
BIN
addons/gestures/anim/ace_warning.rtm
Normal file
Binary file not shown.
BIN
addons/gestures/anim/ace_warning_stand_lowered.rtm
Normal file
BIN
addons/gestures/anim/ace_warning_stand_lowered.rtm
Normal file
Binary file not shown.
200
addons/gestures/cfgMovesBasic.hpp
Normal file
200
addons/gestures/cfgMovesBasic.hpp
Normal file
@ -0,0 +1,200 @@
|
||||
class CfgMovesBasic {
|
||||
class ManActions {
|
||||
GVAR(forward) = QGVAR(forward);
|
||||
GVAR(stop) = QGVAR(stop);
|
||||
GVAR(cover) = QGVAR(cover);
|
||||
GVAR(regroup) = QGVAR(regroup);
|
||||
GVAR(engage) = QGVAR(engage);
|
||||
GVAR(point) = QGVAR(point);
|
||||
GVAR(hold) = QGVAR(hold);
|
||||
GVAR(warning) = QGVAR(warningS);
|
||||
|
||||
GVAR(forwardStandLowered) = QGVAR(forwardStandLowered);
|
||||
GVAR(stopStandLowered) = QGVAR(stopStandLowered);
|
||||
GVAR(coverStandLowered) = QGVAR(coverStandLowered);
|
||||
GVAR(regroupStandLowered) = QGVAR(regroupStandLowered);
|
||||
GVAR(engageStandLowered) = QGVAR(engageStandLowered);
|
||||
GVAR(pointStandLowered) = QGVAR(pointStandLowered);
|
||||
GVAR(holdStandLowered) = QGVAR(holdStandLowered);
|
||||
GVAR(warningStandLowered) = QGVAR(warningStandLowered);
|
||||
};
|
||||
|
||||
class Actions {
|
||||
class NoActions: ManActions {
|
||||
GVAR(forward)[] = {QGVAR(forward), "Gesture"};
|
||||
GVAR(stop)[] = {QGVAR(stop), "Gesture"};
|
||||
GVAR(cover)[] = {QGVAR(cover), "Gesture"};
|
||||
GVAR(regroup)[] = {QGVAR(regroup), "Gesture"};
|
||||
GVAR(engage)[] = {QGVAR(engage), "Gesture"};
|
||||
GVAR(point)[] = {QGVAR(point), "Gesture"};
|
||||
GVAR(hold)[] = {QGVAR(hold), "Gesture"};
|
||||
GVAR(warning)[] = {QGVAR(warning), "Gesture"};
|
||||
|
||||
GVAR(forwardStandLowered)[] = {QGVAR(forwardStandLowered), "Gesture"};
|
||||
GVAR(stopStandLowered)[] = {QGVAR(stopStandLowered), "Gesture"};
|
||||
GVAR(coverStandLowered)[] = {QGVAR(coverStandLowered), "Gesture"};
|
||||
GVAR(regroupStandLowered)[] = {QGVAR(regroupStandLowered), "Gesture"};
|
||||
GVAR(engageStandLowered)[] = {QGVAR(engageStandLowered), "Gesture"};
|
||||
GVAR(pointStandLowered)[] = {QGVAR(pointStandLowered), "Gesture"};
|
||||
GVAR(holdStandLowered)[] = {QGVAR(holdStandLowered), "Gesture"};
|
||||
GVAR(warningStandLowered)[] = {QGVAR(warningStandLowered), "Gesture"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgGesturesMale {
|
||||
class Default;
|
||||
|
||||
class BlendAnims {
|
||||
GVAR(LeftArm)[] = {
|
||||
"LeftShoulder", 1,
|
||||
"LeftArm", 1,
|
||||
"LeftArmRoll", 1,
|
||||
"LeftForeArm", 1,
|
||||
"LeftForeArmRoll", 1,
|
||||
"LeftHand", 1,
|
||||
"LeftHandIndex1", 1,
|
||||
"LeftHandIndex2", 1,
|
||||
"LeftHandIndex3", 1,
|
||||
"LeftHandMiddle1", 1,
|
||||
"LeftHandMiddle2", 1,
|
||||
"LeftHandMiddle3", 1,
|
||||
"LeftHandPinky1", 1,
|
||||
"LeftHandMiddle2", 1,
|
||||
"LeftHandMiddle3", 1,
|
||||
"LeftHandPinky1", 1,
|
||||
"LeftHandPinky2", 1,
|
||||
"LeftHandPinky3", 1,
|
||||
"LeftHandRing", 1,
|
||||
"LeftHandRing1", 1,
|
||||
"LeftHandRing2", 1,
|
||||
"LeftHandRing3", 1,
|
||||
"LeftHandThumb1", 1,
|
||||
"LeftHandThumb2", 1,
|
||||
"LeftHandThumb3", 1
|
||||
};
|
||||
};
|
||||
|
||||
class States {
|
||||
class GVAR(Base): Default {
|
||||
actions = "NoActions";
|
||||
canPullTrigger = 0;
|
||||
connectAs = "";
|
||||
connectFrom[] = {};
|
||||
connectTo[] = {};
|
||||
disableWeapons = 0;
|
||||
enableBinocular = 1;
|
||||
enableMissile = 1;
|
||||
enableOptics = 0;
|
||||
equivalentTo = "";
|
||||
file = "\A3\anims_f\Data\anim\Sdr\gst\GestureHi.rtm";
|
||||
forceAim = 0;
|
||||
headBobMode = 0;
|
||||
headBobStrength = 0;
|
||||
interpolateFrom[] = {};
|
||||
interpolateTo[] = {};
|
||||
interpolateWith[] = {};
|
||||
interpolationRestart = 0;
|
||||
interpolationSpeed = 6;
|
||||
looped = 0;
|
||||
mask = QGVAR(LeftArm);
|
||||
minPlayTime = 0.5;
|
||||
preload = 0;
|
||||
ragdoll = 0;
|
||||
relSpeedMax = 1;
|
||||
relSpeedMin = 1;
|
||||
showHandGun = 0;
|
||||
showItemInHand = 0;
|
||||
showItemInRightHand = 0;
|
||||
showWeaponAim = 1;
|
||||
soundEdge[] = {0.5,1};
|
||||
soundEnabled = 1;
|
||||
soundOverride = "";
|
||||
speed = -2;
|
||||
static = 0;
|
||||
terminal = 0;
|
||||
Walkcycles = 1;
|
||||
weaponIK = 1;
|
||||
|
||||
leftHandIKBeg = 1;
|
||||
leftHandIKCurve[] = {0, 1, 0.1, 0, 0.8, 0, 1, 1};
|
||||
leftHandIKEnd = 1;
|
||||
|
||||
rightHandIKBeg = 1;
|
||||
rightHandIKCurve[] = {1};
|
||||
rightHandIKEnd = 1;
|
||||
};
|
||||
|
||||
class GVAR(forward): GVAR(Base) {
|
||||
file = QUOTE(PATHTOF(anim\ace_forward.rtm));
|
||||
speed = 1;
|
||||
};
|
||||
|
||||
class GVAR(forwardStandLowered): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(stop): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_stop.rtm));
|
||||
speed = 0.6;
|
||||
};
|
||||
|
||||
class GVAR(stopStandLowered): GVAR(stop) {
|
||||
file = QUOTE(PATHTOF(anim\ace_stop_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(cover): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_cover.rtm));
|
||||
speed = 0.8;
|
||||
};
|
||||
|
||||
class GVAR(coverStandLowered): GVAR(cover) {
|
||||
file = QUOTE(PATHTOF(anim\ace_cover_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(regroup): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_regroup.rtm));
|
||||
speed = 0.8;
|
||||
};
|
||||
|
||||
class GVAR(regroupStandLowered): GVAR(regroup) {
|
||||
file = QUOTE(PATHTOF(anim\ace_regroup_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(engage): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_engage.rtm));
|
||||
speed = 0.9;
|
||||
};
|
||||
|
||||
class GVAR(engageStandLowered): GVAR(engage) {
|
||||
file = QUOTE(PATHTOF(anim\ace_engage_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(point): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_point.rtm));
|
||||
speed = 0.8;
|
||||
};
|
||||
|
||||
class GVAR(pointStandLowered): GVAR(point) {
|
||||
file = QUOTE(PATHTOF(anim\ace_point_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(hold): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_hold.rtm));
|
||||
speed = 0.8;
|
||||
};
|
||||
|
||||
class GVAR(holdStandLowered): GVAR(hold) {
|
||||
file = QUOTE(PATHTOF(anim\ace_hold_stand_lowered.rtm));
|
||||
};
|
||||
|
||||
class GVAR(warning): GVAR(forward) {
|
||||
file = QUOTE(PATHTOF(anim\ace_warning.rtm));
|
||||
speed = 0.8;
|
||||
};
|
||||
|
||||
class GVAR(warningStandLowered): GVAR(warning) {
|
||||
file = QUOTE(PATHTOF(anim\ace_warning_stand_lowered.rtm));
|
||||
};
|
||||
};
|
||||
};
|
17
addons/gestures/config.cpp
Normal file
17
addons/gestures/config.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interact_menu"};
|
||||
author[] = {"joko // Jonas", "Emperias", "Zigomarvin"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgMovesBasic.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
33
addons/gestures/functions/fnc_playSignal.sqf
Normal file
33
addons/gestures/functions/fnc_playSignal.sqf
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Author: joko // Jonas, Emperias, Zigomarvin
|
||||
* Detect if the player and play the Gesture Animation
|
||||
*
|
||||
* Arguments:
|
||||
* Animation <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* "GeniusAnimation" call ace_gestures_fnc_playSignal
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
TRACE_1("params",_this);
|
||||
|
||||
if (!GVAR(ReloadMutex)) exitWith {false};
|
||||
|
||||
private _gesture = if (_this select [0,2] == "BI") then {
|
||||
_this select [2]
|
||||
} else {
|
||||
if (((animationState ACE_player) select [0, 12]) in ["amovpercmstp", "amovpercmwlk", "amovpercmtac"] && weaponLowered ACE_player) then {
|
||||
format ["%1StandLowered", _this]
|
||||
} else {
|
||||
_this
|
||||
};
|
||||
};
|
||||
|
||||
ACE_player playAction _gesture;
|
||||
true
|
1
addons/gestures/functions/script_component.hpp
Normal file
1
addons/gestures/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\gestures\script_component.hpp"
|
38
addons/gestures/key.sqf
Normal file
38
addons/gestures/key.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
#include "\a3\editor_f\Data\Scripts\dikCodes.h"
|
||||
|
||||
{
|
||||
_x params ["_currentName","_key"];
|
||||
|
||||
if (_currentName select [0,1] == "BI") then {
|
||||
_currentName = _currentName select [2];
|
||||
};
|
||||
|
||||
private _code = (compile format [QUOTE(QUOTE(QGVAR(%1)) call FUNC(playSignal);), _currentName]);
|
||||
|
||||
[
|
||||
"ACE3 Gestures",
|
||||
_currentName,
|
||||
localize format[LSTRING(%1), _currentName],
|
||||
_code,
|
||||
{false},
|
||||
[_key, [false, (_key != -1), false]],
|
||||
false
|
||||
] call CBA_fnc_addKeybind;
|
||||
|
||||
false
|
||||
} count [
|
||||
["stop", DIK_NUMPAD2],
|
||||
["cover", DIK_NUMPAD3],
|
||||
["forward", DIK_NUMPAD4],
|
||||
["regroup", DIK_NUMPAD5],
|
||||
["engage", DIK_NUMPAD6],
|
||||
["point", DIK_NUMPAD7],
|
||||
["hold", DIK_NUMPAD8],
|
||||
["warning", DIK_NUMPAD9],
|
||||
["BIgestureGo", -1],
|
||||
["BIgestureAdvance", -1],
|
||||
["BIgestureFollow", -1],
|
||||
["BIgestureUp", -1],
|
||||
["BIgestureFreeze", -1],
|
||||
["BIgestureCeaseFire", -1]
|
||||
];
|
12
addons/gestures/script_component.hpp
Normal file
12
addons/gestures/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT Gestures
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_GESTURES
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_GESTURES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_GESTURES
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
198
addons/gestures/stringtable.xml
Normal file
198
addons/gestures/stringtable.xml
Normal file
@ -0,0 +1,198 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Gestures">
|
||||
<Key ID="STR_ACE_Gestures_Name">
|
||||
<English>ACE Gestures</English>
|
||||
<German>ACE Gesten</German>
|
||||
<Polish>ACE Gesty</Polish>
|
||||
<Czech>ACE Posunky</Czech>
|
||||
<French>ACE Signaux</French>
|
||||
<Hungarian>ACE Kézjelek</Hungarian>
|
||||
<Italian>ACE Gesti</Italian>
|
||||
<Portuguese>ACE Gestos</Portuguese>
|
||||
<Russian>ACE Жесты</Russian>
|
||||
<Spanish>ACE Gestos</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_Gestures">
|
||||
<English>Gestures</English>
|
||||
<German>Gesten</German>
|
||||
<Spanish>Gestos</Spanish>
|
||||
<Polish>Gesty</Polish>
|
||||
<Czech>Posunky</Czech>
|
||||
<French>Signaux</French>
|
||||
<Russian>Жесты</Russian>
|
||||
<Hungarian>Kézjelek</Hungarian>
|
||||
<Portuguese>Gestos</Portuguese>
|
||||
<Italian>Gesti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIgestureAdvance">
|
||||
<English>Advance</English>
|
||||
<German>Vordringen</German>
|
||||
<Spanish>Avanzar</Spanish>
|
||||
<Polish>Naprzód</Polish>
|
||||
<Czech>Postoupit</Czech>
|
||||
<French>Avancer</French>
|
||||
<Russian>Продвигаться</Russian>
|
||||
<Hungarian>Előre</Hungarian>
|
||||
<Portuguese>Avançar</Portuguese>
|
||||
<Italian>Avanzare</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIgestureGo">
|
||||
<English>Go</English>
|
||||
<German>Los</German>
|
||||
<Spanish>Adelante</Spanish>
|
||||
<Polish>Szybko</Polish>
|
||||
<Czech>Jít</Czech>
|
||||
<French>Aller</French>
|
||||
<Russian>Идти</Russian>
|
||||
<Hungarian>Mozgás</Hungarian>
|
||||
<Portuguese>Mover-se</Portuguese>
|
||||
<Italian>Muoversi</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIgestureFollow">
|
||||
<English>Follow</English>
|
||||
<German>Folgen</German>
|
||||
<Spanish>Seguirme</Spanish>
|
||||
<Polish>Za mną</Polish>
|
||||
<Czech>Následovat</Czech>
|
||||
<French>Suivre</French>
|
||||
<Russian>Следовать</Russian>
|
||||
<Hungarian>Utánam</Hungarian>
|
||||
<Portuguese>Seguir</Portuguese>
|
||||
<Italian>Seguire</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIgestureUp">
|
||||
<English>Up</English>
|
||||
<German>Aufstehen</German>
|
||||
<Spanish>Arriba</Spanish>
|
||||
<Polish>Do góry</Polish>
|
||||
<Czech>Vztyk</Czech>
|
||||
<French>Debout</French>
|
||||
<Russian>Вверх</Russian>
|
||||
<Hungarian>Fel</Hungarian>
|
||||
<Portuguese>Acima</Portuguese>
|
||||
<Italian>Alzarsi</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIgestureCeaseFire">
|
||||
<English>Cease Fire</English>
|
||||
<German>Feuer einstellen</German>
|
||||
<Spanish>Alto el fuego</Spanish>
|
||||
<Polish>Wstrzymać ogień</Polish>
|
||||
<Czech>Zastavit palbu</Czech>
|
||||
<French>Halte au feu</French>
|
||||
<Russian>Прекратить огонь</Russian>
|
||||
<Hungarian>Tüzet szüntess</Hungarian>
|
||||
<Portuguese>Cessar Fogo</Portuguese>
|
||||
<Italian>Cessare il Fuoco</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIGesturesPoint">
|
||||
<English>Point</English>
|
||||
<German>Zeigen</German>
|
||||
<Spanish>Señalar</Spanish>
|
||||
<Polish>Wskazać</Polish>
|
||||
<Czech>Ukázat</Czech>
|
||||
<French>Pointer</French>
|
||||
<Russian>Точка</Russian>
|
||||
<Hungarian>Mutat</Hungarian>
|
||||
<Portuguese>Apontar</Portuguese>
|
||||
<Italian>Puntare a</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_BIgestureFreeze">
|
||||
<English>Freeze</English>
|
||||
<German>Keine Bewegung</German>
|
||||
<Spanish>Alto</Spanish>
|
||||
<Polish>Stać</Polish>
|
||||
<Czech>Stát</Czech>
|
||||
<French>Halte</French>
|
||||
<Russian>Замереть</Russian>
|
||||
<Hungarian>Állj</Hungarian>
|
||||
<Portuguese>Alto</Portuguese>
|
||||
<Italian>Fermi</Italian>
|
||||
</Key>
|
||||
<!-- STOP -->
|
||||
<Key ID="STR_ACE_Gestures_stop">
|
||||
<English>Stop</English>
|
||||
<French>Stop</French>
|
||||
<German>Stop</German>
|
||||
<Polish>Stop</Polish>
|
||||
</Key>
|
||||
<!-- COVER -->
|
||||
<Key ID="STR_ACE_Gestures_cover">
|
||||
<English>Cover</English>
|
||||
<German>Deckung</German>
|
||||
<Spanish>Cubrirse</Spanish>
|
||||
<Polish>Do osłony</Polish>
|
||||
<Czech>Krýt se</Czech>
|
||||
<French>A couvert</French>
|
||||
<Russian>Укрыться</Russian>
|
||||
<Hungarian>Fedezékbe</Hungarian>
|
||||
<Portuguese>Proteger-se</Portuguese>
|
||||
<Italian>Copertura</Italian>
|
||||
</Key>
|
||||
<!-- REGROUP -->
|
||||
<Key ID="STR_ACE_Gestures_regroup">
|
||||
<English>Rally up</English>
|
||||
<French>Regroupement</French>
|
||||
<German>Sammeln</German>
|
||||
<Polish>Zbiórka</Polish>
|
||||
</Key>
|
||||
<!-- FORWARD -->
|
||||
<Key ID="STR_ACE_Gestures_forward">
|
||||
<English>Move forward</English>
|
||||
<French>En avant</French>
|
||||
<German>Vorwärts Bewegen</German>
|
||||
<Polish>Naprzód</Polish>
|
||||
</Key>
|
||||
<!-- ENGAGE -->
|
||||
<Key ID="STR_ACE_Gestures_engage">
|
||||
<English>Engage</English>
|
||||
<French>Engager</French>
|
||||
<Polish>Atak</Polish>
|
||||
</Key>
|
||||
<!-- POINT -->
|
||||
<Key ID="STR_ACE_Gestures_point">
|
||||
<English>Point</English>
|
||||
<French>Pointer</French>
|
||||
<German>Zeigen</German>
|
||||
<Polish>Wskaż</Polish>
|
||||
</Key>
|
||||
<!-- HOLD -->
|
||||
<Key ID="STR_ACE_Gestures_hold">
|
||||
<English>Hold</English>
|
||||
<French>Tenir</French>
|
||||
<German>Anhalten</German>
|
||||
<Polish>Wstrzymać</Polish>
|
||||
</Key>
|
||||
<!-- WARNING -->
|
||||
<Key ID="STR_ACE_Gestures_warning">
|
||||
<English>Warning</English>
|
||||
<French>Attention</French>
|
||||
<German>Achtung</German>
|
||||
<Polish>Uwaga</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_Hi">
|
||||
<English>Hi</English>
|
||||
<German>Hallo</German>
|
||||
<Spanish>Hola</Spanish>
|
||||
<Polish>Witaj</Polish>
|
||||
<Czech>Ahoj</Czech>
|
||||
<French>Salut</French>
|
||||
<Russian>Привет</Russian>
|
||||
<Hungarian>Helló</Hungarian>
|
||||
<Portuguese>Olá</Portuguese>
|
||||
<Italian>Ciao</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gestures_Attack">
|
||||
<English>Attack</English>
|
||||
<German>Angreifen</German>
|
||||
<Spanish>Atacar</Spanish>
|
||||
<Polish>Do ataku</Polish>
|
||||
<Czech>Zaútočit</Czech>
|
||||
<French>Attaquer</French>
|
||||
<Russian>Атаковать</Russian>
|
||||
<Hungarian>Támadás</Hungarian>
|
||||
<Portuguese>Atacar</Portuguese>
|
||||
<Italian>Attaccare</Italian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -183,13 +183,13 @@ class CfgGlasses {
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_sport:G_Bandanna_blk {
|
||||
class G_Bandanna_sport: G_Bandanna_shades {
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_aviator:G_Bandanna_blk {
|
||||
class G_Bandanna_aviator: G_Bandanna_shades {
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
|
@ -25,4 +25,10 @@ class ACE_Settings {
|
||||
displayName = CSTRING(enabledForZeusUnits_DisplayName);
|
||||
description = CSTRING(enabledForZeusUnits_Description);
|
||||
};
|
||||
class GVAR(autoAddEarplugsToUnits) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
displayName = CSTRING(autoAddEarplugsToUnits_DisplayName);
|
||||
description = CSTRING(autoAddEarplugsToUnits_Description);
|
||||
};
|
||||
};
|
||||
|
@ -13,7 +13,7 @@ class Extended_PostInit_EventHandlers {
|
||||
class Extended_Init_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(AddEarPlugs) {
|
||||
init = QUOTE( if (local (_this select 0)) then {_this call FUNC(addEarPlugs)}; );
|
||||
serverInit = QUOTE( _this call FUNC(addEarPlugs) );
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -33,3 +33,11 @@ class Extended_Explosion_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
respawn = QUOTE(_this call FUNC(handleRespawn));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -137,6 +137,12 @@ class CfgVehicles {
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class autoAddEarplugsToUnits {
|
||||
displayName = CSTRING(autoAddEarplugsToUnits_DisplayName);
|
||||
description = CSTRING(autoAddEarplugsToUnits_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = CSTRING(Module_Description);
|
||||
|
@ -42,7 +42,8 @@ class CfgWeapons {
|
||||
class H_PilotHelmetFighter_O: H_PilotHelmetFighter_B {};
|
||||
class H_PilotHelmetFighter_I: H_PilotHelmetFighter_B {};
|
||||
|
||||
class H_Cap_headphones: H_HelmetB {
|
||||
class HelmetBase;
|
||||
class H_Cap_headphones: HelmetBase {
|
||||
GVAR(protection) = 0.5;
|
||||
GVAR(lowerVolume) = 0.60;
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ PREP(addEarPlugs);
|
||||
PREP(earRinging);
|
||||
PREP(explosionNear);
|
||||
PREP(firedNear);
|
||||
PREP(handleRespawn);
|
||||
PREP(hasEarPlugsIn);
|
||||
PREP(moduleHearing);
|
||||
PREP(putInEarPlugs);
|
||||
|
@ -14,29 +14,50 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
TRACE_2("params",_unit,typeOf _unit);
|
||||
|
||||
// Exit if hearing is disabled or soldier has earplugs already in (persistence scenarios)
|
||||
if (!GVAR(enableCombatDeafness) || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
||||
// only run this after the settings are initialized
|
||||
if !(EGVAR(common,settingsInitFinished)) exitWith {
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addEarPlugs), _this];
|
||||
};
|
||||
|
||||
private ["_launcher"];
|
||||
// Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios)
|
||||
if (!GVAR(enableCombatDeafness) || {!GVAR(autoAddEarplugsToUnits)} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
||||
|
||||
// add earplugs if the soldier has a rocket launcher
|
||||
_launcher = secondaryWeapon _unit;
|
||||
|
||||
if (_launcher != "") exitWith {
|
||||
if ((secondaryWeapon _unit) != "") exitWith {
|
||||
TRACE_1("has launcher - adding",_unit);
|
||||
_unit addItem "ACE_EarPlugs";
|
||||
};
|
||||
|
||||
// otherwise add earplugs if the soldier has a big rifle
|
||||
private ["_magazine", "_ammo"];
|
||||
if ((primaryWeapon _unit) == "") exitWith {};
|
||||
|
||||
_magazine = primaryWeaponMagazine _unit select 0;
|
||||
(primaryWeaponMagazine _unit) params [["_magazine", ""]];
|
||||
if (_magazine == "") exitWith {};
|
||||
|
||||
if (isNil "_magazine") exitWith {};
|
||||
private _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||
private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
|
||||
private _count = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count");
|
||||
|
||||
_ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
|
||||
private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber");
|
||||
_caliber = call {
|
||||
if (_ammo isKindOf ["ShellBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
||||
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
|
||||
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };
|
||||
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
||||
if (_caliber <= 0) then { 6.5 } else { _caliber };
|
||||
};
|
||||
private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5;
|
||||
|
||||
if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "audiblefire") > 8) then {
|
||||
//If unit has a machine gun boost effective loudness 50%
|
||||
if (_count >= 50) then {_loudness = _loudness * 1.5};
|
||||
|
||||
TRACE_2("primaryWeapon",_unit,_loudness);
|
||||
|
||||
if (_loudness > 0.2) then {
|
||||
TRACE_1("loud gun - adding",_unit);
|
||||
_unit addItem "ACE_EarPlugs";
|
||||
};
|
||||
|
35
addons/hearing/functions/fnc_handleRespawn.sqf
Normal file
35
addons/hearing/functions/fnc_handleRespawn.sqf
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Reset earplugs on respawn, and then re-add if appropriate
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player] call ACE_hearing_fnc_handleRespawn;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
TRACE_2("params",_unit,typeOf _unit);
|
||||
|
||||
if (!local _unit) exitWith {}; //XEH should only be called on local units
|
||||
|
||||
private _respawn = [0] call BIS_fnc_missionRespawnType;
|
||||
|
||||
//if respawn is not Group or side:
|
||||
if (_respawn <= 3) then {
|
||||
//Remove earplugs if they have them:
|
||||
if (_unit getVariable ["ACE_hasEarPlugsin", false]) then {
|
||||
TRACE_1("had EarPlugs in - removing",_unit);
|
||||
_unit setVariable ["ACE_hasEarPlugsin", false, true];
|
||||
};
|
||||
};
|
||||
|
||||
//Re-add if they need them:
|
||||
[_unit] call FUNC(addEarPlugs);
|
@ -20,4 +20,5 @@ if ((_logic getVariable "DisableEarRinging") != -1) then {
|
||||
};
|
||||
|
||||
[_logic, QGVAR(enabledForZeusUnits), "enabledForZeusUnits"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(autoAddEarplugsToUnits), "autoAddEarplugsToUnits"] call EFUNC(common,readSettingFromModule);
|
||||
ACE_LOGINFO("Hearing Module Initialized.");
|
||||
|
@ -165,5 +165,13 @@
|
||||
<Portuguese>Permite que unidades remotamente controladas pelo Zeus sejam atingidas por danos auditivos.</Portuguese>
|
||||
<Spanish>Permitir a las unidades por control remoto de zeus que puedan tener daños auditivos.</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Hearing_autoAddEarplugsToUnits_DisplayName">
|
||||
<English>Add earplugs to units</English>
|
||||
<Polish>Dodaj stopery dla jednostek</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Hearing_autoAddEarplugsToUnits_Description">
|
||||
<English>Add the `ACE_EarPlugs` item to all units that have loud weapons. Can disable if using custom loadouts.</English>
|
||||
<Polish>Dodaje `ACE_EarPlugs` - stopery - do wszystkich jednostek, które posiadają głośną broń. Można wyłaczyć w przypadku korzystania z niestandardowych loadoutów.</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -17,7 +17,7 @@ params ["_target"];
|
||||
private ["_objectType","_actionsVarName","_isMan"];
|
||||
_objectType = _target;
|
||||
_isMan = false;
|
||||
if (typeName _target == "OBJECT") then {
|
||||
if (_target isEqualType objNull) then {
|
||||
_objectType = typeOf _target;
|
||||
_isMan = _target isKindOf "CAManBase";
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ params ["_target"];
|
||||
private ["_objectType","_actionsVarName","_isMan"];
|
||||
_objectType = _target;
|
||||
_isMan = false;
|
||||
if (typeName _target == "OBJECT") then {
|
||||
if (_target isEqualType objNull) then {
|
||||
_objectType = typeOf _target;
|
||||
_isMan = _target isKindOf "CAManBase";
|
||||
};
|
||||
|
@ -40,11 +40,11 @@ params [
|
||||
["_modifierFunction", {}]
|
||||
];
|
||||
|
||||
_position = if (typeName (_position) == "STRING") then {
|
||||
_position = if (_position isEqualType "") then {
|
||||
// If the action is set to a selection, create the suitable code
|
||||
compile format ["_target selectionPosition '%1'", _position];
|
||||
} else {
|
||||
if (typeName (_position) == "ARRAY") then {
|
||||
if (_position isEqualType []) then {
|
||||
// If the action is set to a array position, create the suitable code
|
||||
compile format ["%1", _position];
|
||||
} else {
|
||||
|
@ -78,10 +78,10 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
// Execute the current action if it's run on hover
|
||||
private _tmp = ((GVAR(selectedAction) select 0) select 9) select 3;
|
||||
private _runOnHover = true;
|
||||
if ((typeName _tmp) == "CODE" ) then {
|
||||
if (_tmp isEqualType {}) then {
|
||||
_runOnHover = call _tmp;
|
||||
} else {
|
||||
if ((typeName _tmp) == "BOOL" ) then {
|
||||
if (_tmp isEqualType false) then {
|
||||
_runOnHover = _tmp;
|
||||
} else {
|
||||
_runOnHover = _tmp > 0;
|
||||
|
@ -34,7 +34,7 @@ _fnc_renderNearbyActions = {
|
||||
|
||||
// Quick oclussion test. Skip objects more than 1 m behind the camera plane
|
||||
_lambda = ((getPosASL _x) vectorDiff _cameraPos) vectorDotProduct _cameraDir;
|
||||
if (_lambda > -1) then {
|
||||
if ((_lambda > -1) && {!isObjectHidden _target}) then {
|
||||
_numInteractions = 0;
|
||||
// Prevent interacting with yourself or your own vehicle
|
||||
if (_target != ACE_player && {_target != vehicle ACE_player}) then {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Interact_Menu">
|
||||
<Key ID="STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction">
|
||||
@ -301,9 +301,11 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interact_Menu_menuAnimationSpeed">
|
||||
<English>Interaction Animation Speed</English>
|
||||
<Polish>Szybkość animacji interakcji</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interact_Menu_menuAnimationSpeed_Description">
|
||||
<English>Makes menu animations faster and decreases the time needed to hover to show sub actions</English>
|
||||
<Polish>Przyśpiesza animacje menu interakcji oraz czas wymagany do pokazania podmenu</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -4,4 +4,11 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(enableMagazinePassing) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(PassMagazineSetting);
|
||||
category = ECSTRING(interact_menu,Category_InteractionMenu);
|
||||
};
|
||||
};
|
||||
|
@ -36,6 +36,32 @@ class CfgVehicles {
|
||||
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
|
||||
selection = "pelvis";
|
||||
|
||||
class ACE_PassMagazine {
|
||||
displayName = CSTRING(PassMagazine);
|
||||
condition = "";
|
||||
statement = "";
|
||||
showDisabled = 0;
|
||||
priority = 3.3;
|
||||
icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\cargomag_ca.paa";
|
||||
|
||||
class ACE_PassMagazinePrimary {
|
||||
displayName = CSTRING(PassMagazinePrimary);
|
||||
condition = QUOTE([ARR_3(_player,_target,primaryWeapon _target)] call FUNC(canPassMagazine));
|
||||
statement = QUOTE([ARR_3(_player,_target,primaryWeapon _target)] call FUNC(passMagazine));
|
||||
showDisabled = 0;
|
||||
priority = 3;
|
||||
icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\primaryweapon_ca.paa";
|
||||
};
|
||||
class ACE_PassMagazineHandgun {
|
||||
displayName = CSTRING(PassMagazineHandgun);
|
||||
condition = QUOTE([ARR_3(_player,_target,handgunWeapon _target)] call FUNC(canPassMagazine));
|
||||
statement = QUOTE([ARR_3(_player,_target,handgunWeapon _target)] call FUNC(passMagazine));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\handgun_ca.paa";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_TeamManagement {
|
||||
displayName = CSTRING(TeamManagement);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {GVAR(EnableTeamManagement)});
|
||||
@ -271,112 +297,6 @@ class CfgVehicles {
|
||||
hotkey = "M";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Gestures {
|
||||
displayName = CSTRING(Gestures);
|
||||
condition = "canStand _target";
|
||||
statement = "";
|
||||
showDisabled = 1;
|
||||
priority = 3.5;
|
||||
icon = PATHTOF(UI\gestures_ca.paa);
|
||||
hotkey = "G";
|
||||
|
||||
/*class ACE_Gesture_Advance {
|
||||
displayName = CSTRING(Gestures_Attack);
|
||||
condition = "canStand _target";
|
||||
statement = "_target playActionNow 'gestureAttack';";
|
||||
showDisabled = 1;
|
||||
priority = 2.0;
|
||||
};*/
|
||||
class ACE_Gesture_Advance {
|
||||
displayName = CSTRING(Gestures_Advance);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureAdvance';);
|
||||
showDisabled = 1;
|
||||
priority = 1.9;
|
||||
hotkey = "1";
|
||||
};
|
||||
class ACE_Gesture_Go {
|
||||
displayName = CSTRING(Gestures_Go);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
|
||||
showDisabled = 1;
|
||||
priority = 1.8;
|
||||
hotkey = "2";
|
||||
};
|
||||
class ACE_Gesture_Follow {
|
||||
displayName = CSTRING(Gestures_Follow);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureFollow';);
|
||||
showDisabled = 1;
|
||||
priority = 1.7;
|
||||
hotkey = "3";
|
||||
};
|
||||
/*class ACE_Gesture_Point {
|
||||
displayName = CSTRING(Gestures_Point);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gesturePoint';);
|
||||
showDisabled = 1;
|
||||
priority = 1.6;
|
||||
};*/
|
||||
class ACE_Gesture_Up {
|
||||
displayName = CSTRING(Gestures_Up);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureUp';);
|
||||
showDisabled = 1;
|
||||
priority = 1.5;
|
||||
hotkey = "4";
|
||||
};
|
||||
class ACE_Gesture_Cover {
|
||||
displayName = CSTRING(Gestures_Cover);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureCover';);
|
||||
showDisabled = 1;
|
||||
priority = 1.4;
|
||||
hotkey = "5";
|
||||
};
|
||||
class ACE_Gesture_CeaseFire {
|
||||
displayName = CSTRING(Gestures_Cease_Fire);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
|
||||
showDisabled = 1;
|
||||
priority = 1.3;
|
||||
hotkey = "6";
|
||||
};
|
||||
class ACE_Gesture_Freeze {
|
||||
displayName = CSTRING(Gestures_Freeze);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureFreeze';);
|
||||
showDisabled = 1;
|
||||
priority = 1.2;
|
||||
hotkey = "7";
|
||||
};
|
||||
class ACE_Gesture_Yes {
|
||||
displayName = ECSTRING(common,Yes);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
|
||||
showDisabled = 1;
|
||||
priority = 1.1;
|
||||
hotkey = "8";
|
||||
};
|
||||
class ACE_Gesture_No {
|
||||
displayName = ECSTRING(common,No);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow 'gestureNo';);
|
||||
showDisabled = 1;
|
||||
priority = 1.0;
|
||||
hotkey = "9";
|
||||
};
|
||||
class ACE_Gesture_Hi {
|
||||
displayName = CSTRING(Gestures_Hi);
|
||||
condition = QUOTE(canStand _target);
|
||||
statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3););
|
||||
showDisabled = 1;
|
||||
priority = 0.9;
|
||||
hotkey = "0";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Equipment {
|
||||
displayName = CSTRING(Equipment);
|
||||
condition = QUOTE(true);
|
||||
@ -558,6 +478,14 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class Pod_Heli_Transport_04_base_F: StaticWeapon {
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
distance = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class StaticMGWeapon: StaticWeapon {};
|
||||
class HMG_01_base_F: StaticMGWeapon {};
|
||||
|
||||
@ -619,4 +547,23 @@ class CfgVehicles {
|
||||
|
||||
class ACE_SelfActions {};
|
||||
};
|
||||
|
||||
class RoadCone_F: thingX {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = CSTRING(MainAction);
|
||||
selection = "";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RoadBarrier_F: RoadCone_F {
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
position = "[0,0,0.500671]";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -29,19 +29,11 @@ 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 = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 1));
|
||||
[_message] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// restore global fire teams for JIP
|
||||
private "_team";
|
||||
{
|
||||
_team = _x getVariable [QGVAR(assignedFireTeam), ""];
|
||||
if (_team != "") then {_x assignTeam _team};
|
||||
false
|
||||
} count allUnits;
|
||||
|
||||
// add keybinds
|
||||
["ACE3 Common", QGVAR(openDoor), localize LSTRING(OpenDoor), {
|
||||
// Conditions: canInteract
|
||||
@ -67,8 +59,11 @@ private "_team";
|
||||
// Conditions: specific
|
||||
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
|
||||
|
||||
//Tap whichever shoulder is closest
|
||||
private _shoulderNum = [0, 1] select (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180);
|
||||
|
||||
// Statement
|
||||
[ACE_player, cursorTarget, 0] call FUNC(tapShoulder);
|
||||
[ACE_player, cursorTarget, _shoulderNum] call FUNC(tapShoulder);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
|
@ -20,6 +20,8 @@ PREP(sendAway);
|
||||
PREP(canJoinGroup);
|
||||
PREP(canJoinTeam);
|
||||
PREP(joinTeam);
|
||||
PREP(canPassMagazine);
|
||||
PREP(passMagazine);
|
||||
PREP(canBecomeLeader);
|
||||
PREP(doBecomeLeader);
|
||||
PREP(canTapShoulder);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user