mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into isEqualTypeRepalcement
This commit is contained in:
commit
5850f78c1f
@ -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;
|
||||
|
@ -192,6 +192,7 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa));
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
class Arguments {
|
||||
class allowHandcuffOwnSide {
|
||||
displayName = CSTRING(ModuleSettings_handcuffSide_name);
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -8,6 +8,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleSettings);
|
||||
functionPriority = 1;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
||||
|
@ -18,12 +18,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_position", "_item", "_i"];
|
||||
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ];
|
||||
TRACE_3("params",_itemClass,_vehicle,_amount);
|
||||
|
||||
for "_i" from 1 to _amount do {
|
||||
[_item, _vehicle] call FUNC(loadItem);
|
||||
[_itemClass, _vehicle] call FUNC(loadItem);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
|
@ -35,6 +35,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
|
@ -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 {
|
||||
@ -194,9 +192,17 @@ call FUNC(checkFiles);
|
||||
|
||||
ACE_LOGINFO("Settings received from server.");
|
||||
|
||||
if (isServer) then { //read settings from paramsArray
|
||||
[] call FUNC(readSettingsFromParamsArray);
|
||||
};
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
|
||||
if (isServer) then {
|
||||
// Publish all settings data after all configs and modules are read
|
||||
publicVariable QGVAR(settings);
|
||||
};
|
||||
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
|
@ -115,6 +115,7 @@ PREP(isInBuilding);
|
||||
PREP(isModLoaded);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(isUnderwater);
|
||||
PREP(letterToCode);
|
||||
PREP(lightIntensityFromObject);
|
||||
PREP(loadPerson);
|
||||
@ -139,6 +140,7 @@ PREP(playerSide);
|
||||
PREP(positionToASL);
|
||||
PREP(progressBar);
|
||||
PREP(readSettingFromModule);
|
||||
PREP(readSettingsFromParamsArray);
|
||||
PREP(receiveRequest);
|
||||
PREP(removeCanInteractWithCondition);
|
||||
PREP(removeSpecificMagazine);
|
||||
@ -166,6 +168,7 @@ PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setVolume);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(showHud);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
@ -290,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) = [];
|
||||
|
@ -24,7 +24,7 @@ _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
|
||||
|
||||
// get correct format on vehicles without any hitpoints
|
||||
if (_hitPointsWithSelections isEqualTo []) then {
|
||||
_hitPointsWithSelections = [[],[],[]];
|
||||
_hitPointsWithSelections = [[],[],[]];
|
||||
};
|
||||
|
||||
_hitPointsWithSelections resize 2;
|
||||
|
@ -1,29 +1,19 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit is underwater
|
||||
* Check if unit's head is underwater
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* if unit is in the water (BOOLEAN)
|
||||
* If unit's head is underwater <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
* Deprecated
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
ACE_DEPRECATED("ace_common_fnc_inWater","3.5.0","ace_common_fnc_isUnderwater");
|
||||
|
||||
private "_return";
|
||||
_return = false;
|
||||
|
||||
if (surfaceIsWater getPosASL _unit) then {
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
|
||||
if (_pos select 2 < 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
||||
_this call FUNC(isUnderwater)
|
||||
|
@ -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 ((typeName _isEngineer) == "SCALAR") then {_isEngineer = _isEngineer > 0};
|
||||
|
||||
_isEngineer
|
||||
|
29
addons/common/functions/fnc_isUnderwater.sqf
Normal file
29
addons/common/functions/fnc_isUnderwater.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit's head is underwater
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* If unit's head is underwater <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private "_return";
|
||||
_return = false;
|
||||
|
||||
if (surfaceIsWater getPosASL _unit) then {
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
|
||||
if (_pos select 2 < 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
@ -35,12 +35,23 @@ _fnc_parseConfigForDisplayNames = {
|
||||
_values set [_forEachIndex, _text];
|
||||
};
|
||||
} forEach _values;
|
||||
|
||||
if (!(_values isEqualTo [])) then {
|
||||
if (_typeOf != "SCALAR") then {
|
||||
ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf);
|
||||
} else {
|
||||
private _value = missionNamespace getVariable [_name, -1];
|
||||
if ((_value < 0) || {_value >= (count _values)}) then {
|
||||
ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values);
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
||||
};
|
||||
|
||||
// Iterate through settings
|
||||
{
|
||||
_x params ["_name"];
|
||||
_x params ["_name", "_typeOf"];
|
||||
|
||||
if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then {
|
||||
if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then {
|
||||
|
@ -51,8 +51,6 @@ _fnc_parseConfigForSettings = {
|
||||
// mission side settings
|
||||
[missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings;
|
||||
|
||||
// Publish all settings data
|
||||
publicVariable QGVAR(settings);
|
||||
// Publish all setting values
|
||||
{
|
||||
publicVariable (_x select 0);
|
||||
|
63
addons/common/functions/fnc_readSettingsFromParamsArray.sqf
Normal file
63
addons/common/functions/fnc_readSettingsFromParamsArray.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Read settins from paramsArray that have a ACE_setting = 1.
|
||||
* Happens before modules but after all other configs (for force priority)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_common_fnc_readSettingsFromParamsArray
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//paramsArray is a normal variable not a command
|
||||
private _paramsArray = missionnamespace getvariable ["paramsArray", []];
|
||||
|
||||
TRACE_1("Reading missionConfigFile params",_paramsArray);
|
||||
|
||||
{
|
||||
private _config = (missionConfigFile >> "params") select _forEachIndex;
|
||||
if ((getNumber (_config >> "ACE_setting")) > 0) then {
|
||||
private _settingName = configName _config;
|
||||
private _settingValue = _x;
|
||||
private _title = getText (_config >> "title");
|
||||
|
||||
TRACE_3("ace_setting",_title,_settingName,_settingValue);
|
||||
|
||||
// Check if the variable is already defined
|
||||
if (isNil _settingName) exitWith {
|
||||
ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
|
||||
};
|
||||
|
||||
private _settingData = [_settingName] call FUNC(getSettingData);
|
||||
_settingData params ["", "_typeName", "", "", "", "", "_isForced"];
|
||||
|
||||
// Check if it's already forced and quit
|
||||
if (_isForced) exitWith {ACE_LOGWARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);};
|
||||
|
||||
// The setting is not forced, so update the value
|
||||
// Read entry and cast it to the correct type from the existing variable
|
||||
private _validValue = false;
|
||||
switch (true) do {
|
||||
case (_typeName == "SCALAR"): {_validValue = true;};
|
||||
case (_typeName == "BOOL"): {
|
||||
_settingValue = _settingValue > 0;
|
||||
_validValue = true;
|
||||
};
|
||||
//TODO: Handle ARRAY,COLOR,STRING??? (bool/scalar covers most important settings)
|
||||
};
|
||||
|
||||
if (!_validValue) exitWith {
|
||||
ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName);
|
||||
};
|
||||
|
||||
// Update the variable globaly and Force
|
||||
[_settingName, _settingValue, true, true] call FUNC(setSetting);
|
||||
};
|
||||
} foreach _paramsArray;
|
@ -13,27 +13,39 @@
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* ["ace_map_gestures_enabled", true, false, true] call ace_common_fnc_setSetting
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]];
|
||||
|
||||
private ["_settingData", "_failed"];
|
||||
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
private _settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
// Exit if the setting does not exist
|
||||
if (count _settingData == 0) exitWith {};
|
||||
if (_settingData isEqualTo []) exitWith {
|
||||
ACE_LOGERROR_1("SetSetting [%1] setting does not exist", _name);
|
||||
};
|
||||
|
||||
_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"];
|
||||
|
||||
// Exit if the setting is already forced
|
||||
if (_settingData select 6) exitWith {};
|
||||
if (_isForced) exitWith {
|
||||
ACE_LOGINFO_1("SetSetting [%1] Trying to set forced setting", _name);
|
||||
};
|
||||
|
||||
//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status
|
||||
if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then {
|
||||
ACE_LOGWARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force);
|
||||
};
|
||||
|
||||
// If the type is not equal, try to cast it
|
||||
_failed = false;
|
||||
private _failed = false;
|
||||
if (typeName _value != _settingData select 1) then {
|
||||
_failed = true;
|
||||
if (_settingData select 1 == "BOOL" && _value isEqualType 0) 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;
|
||||
@ -44,12 +56,12 @@ if (typeName _value != _settingData select 1) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
if (_settingData select 1 == "COLOR" && _value isEqualType []) then {
|
||||
if ((_typeName == "COLOR") && {_value isEqualType []}) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
|
||||
if (_failed) exitWith {};
|
||||
if (_failed) exitWith {ACE_LOGERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);};
|
||||
|
||||
// Force it if it was required
|
||||
_settingData set [6, _force];
|
||||
|
@ -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
|
@ -6,6 +6,7 @@ class ACE_ModuleExplosive: ACE_Module {
|
||||
function = QUOTE(FUNC(module));
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa);
|
||||
class Arguments {
|
||||
class RequireSpecialist {
|
||||
|
@ -210,3 +210,11 @@ if(_playSound) then {
|
||||
if(_showHint) then {
|
||||
[format ["%1: %2", localize LSTRING(ZeroedTo), _distance]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
//Update the hud's distance display to the new value or "----" if out of range
|
||||
//(10m fudge because of EFUNC(common,getTargetDistance))
|
||||
if ((_distance + 10) >= (getNumber (_turretConfig >> QGVAR(MaxDistance)))) then {
|
||||
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText "----";
|
||||
} else {
|
||||
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
|
||||
};
|
||||
|
@ -1,12 +1 @@
|
||||
#define COMPONENT fcs
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_FCS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_FCS
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FCS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
#include "\z\ace\addons\fcs\script_component.hpp"
|
@ -7,6 +7,7 @@ class CfgVehicles {
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_finger_ca.paa));
|
||||
function = QFUNC(moduleSettings);
|
||||
isGlobal = 0;
|
||||
isSingular = 1;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
class Arguments {
|
||||
class enabled {
|
||||
|
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));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -101,6 +101,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleHearing);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = PATHTOF(UI\Icon_Module_Hearing_ca.paa);
|
||||
class Arguments {
|
||||
class EnableCombatDeafness {
|
||||
@ -136,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,11 @@
|
||||
<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>
|
||||
</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>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -96,4 +96,13 @@ class ACE_Settings {
|
||||
displayName = CSTRING(addBuildingActions);
|
||||
description = CSTRING(addBuildingActionsDescription);
|
||||
};
|
||||
class GVAR(menuAnimationSpeed) {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 1;
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(menuAnimationSpeed);
|
||||
description = CSTRING(menuAnimationSpeed_Description);
|
||||
values[] = {"$str_speed_normal", "2x", "3x"};
|
||||
};
|
||||
};
|
||||
|
@ -78,6 +78,21 @@ if (GVAR(useCursorMenu)) then {
|
||||
GVAR(selfMenuOffset) = ((positionCameraToWorld [0, 0, 2]) call EFUNC(common,positionToASL)) vectorDiff
|
||||
((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL));
|
||||
|
||||
if (GVAR(menuAnimationSpeed) > 0) then {
|
||||
//Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice)
|
||||
if (GVAR(openedMenuType) == 0) then {
|
||||
if (isNull curatorCamera) then {
|
||||
if (vehicle ACE_player != ACE_player) then {
|
||||
GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]];
|
||||
};
|
||||
} else {
|
||||
GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]];
|
||||
};
|
||||
} else {
|
||||
GVAR(menuDepthPath) = [["ACE_SelfActions", ACE_player]];
|
||||
};
|
||||
};
|
||||
|
||||
["interactMenuOpened", [_menuType]] call EFUNC(common,localEvent);
|
||||
|
||||
true
|
||||
|
@ -14,13 +14,12 @@
|
||||
|
||||
BEGIN_COUNTER(fnc_render);
|
||||
|
||||
private ["_cursorPos2", "_p1", "_p2", "_forEachIndex", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i", "_actionData", "_player", "_target"];
|
||||
|
||||
_foundTarget = false;
|
||||
private _foundTarget = false;
|
||||
|
||||
if (GVAR(openedMenuType) >= 0) then {
|
||||
// _cursorPos1 = positionCameraToWorld [0, 0, 2];
|
||||
_cursorPos2 = positionCameraToWorld [0, 0, 2];
|
||||
BEGIN_COUNTER(fnc_renderMenuOpen);
|
||||
|
||||
private _cursorPos2 = positionCameraToWorld [0, 0, 2];
|
||||
|
||||
// Render all available nearby interactions
|
||||
call FUNC(renderActionPoints);
|
||||
@ -30,27 +29,26 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
[[0.5,0.5], "\a3\ui_f\data\IGUI\Cfg\Cursors\selected_ca.paa"] call FUNC(renderSelector);
|
||||
};
|
||||
|
||||
_cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]);
|
||||
private _cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]);
|
||||
|
||||
_closestDistance = 1000000;
|
||||
_closestSelection = -1;
|
||||
private _closestDistance = 1000000;
|
||||
private _closestSelection = -1;
|
||||
{
|
||||
_sPos = _x select 1;
|
||||
_disSq = (((_cursorScreenPos select 0) - (_sPos select 0))^2 + ((_cursorScreenPos select 1) - (_sPos select 1))^2);
|
||||
if(_disSq < 0.0125 && _disSq < _closestDistance) then {
|
||||
_closestDistance = _disSq;
|
||||
_x params ["", "_sPos"];
|
||||
private _distanceFromCursor = _cursorScreenPos distance2d _sPos;
|
||||
if ((_distanceFromCursor < 0.1118) && {_distanceFromCursor < _closestDistance}) then {
|
||||
_closestDistance = _distanceFromCursor;
|
||||
_closestSelection = _forEachIndex;
|
||||
};
|
||||
} forEach GVAR(currentOptions);
|
||||
|
||||
|
||||
if(_closestSelection == -1) exitWith {};
|
||||
|
||||
_closest = GVAR(currentOptions) select _closestSelection;
|
||||
private _closest = GVAR(currentOptions) select _closestSelection;
|
||||
_closest params ["_action", "_sPos", "_hoverPath"];
|
||||
|
||||
_sPos = _closest select 1;
|
||||
_cTime = ACE_diagTime;
|
||||
_delta = _cTime - GVAR(lastTime);
|
||||
private _cTime = ACE_diagTime;
|
||||
private _delta = _cTime - GVAR(lastTime);
|
||||
GVAR(lastTime) = _cTime;
|
||||
|
||||
GVAR(rotationAngle) = (GVAR(rotationAngle) + (270*_delta)) mod 360;
|
||||
@ -58,28 +56,17 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
|
||||
_foundTarget = true;
|
||||
GVAR(actionSelected) = true;
|
||||
GVAR(selectedAction) = (_closest select 0) select 1;
|
||||
GVAR(selectedAction) = _action select 1;
|
||||
GVAR(selectedTarget) = (GVAR(selectedAction)) select 2;
|
||||
|
||||
_misMatch = false;
|
||||
_hoverPath = (_closest select 2);
|
||||
private _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath);
|
||||
|
||||
if((count GVAR(lastPath)) != (count _hoverPath)) then {
|
||||
_misMatch = true;
|
||||
} else {
|
||||
{
|
||||
if !(_x isEqualTo (_hoverPath select _forEachIndex)) exitWith {
|
||||
_misMatch = true;
|
||||
};
|
||||
} forEach GVAR(lastPath);
|
||||
};
|
||||
|
||||
if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > 0.25}) then {
|
||||
if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then {
|
||||
GVAR(startHoverTime) = ACE_diagTime;
|
||||
GVAR(lastPath) = _hoverPath;
|
||||
GVAR(expanded) = false;
|
||||
} else {
|
||||
if(!GVAR(expanded) && ACE_diagTime-GVAR(startHoverTime) > 0.25) then {
|
||||
if(!GVAR(expanded) && {ACE_diagTime-GVAR(startHoverTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then {
|
||||
GVAR(expanded) = true;
|
||||
|
||||
// Start the expanding menu animation only if the user is not going up the menu
|
||||
@ -89,13 +76,12 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
GVAR(menuDepthPath) = +GVAR(lastPath);
|
||||
|
||||
// Execute the current action if it's run on hover
|
||||
private "_runOnHover";
|
||||
_tmp = ((GVAR(selectedAction) select 0) select 9) select 3;
|
||||
_runOnHover = true;
|
||||
if (_tmp isEqualType {}) then {
|
||||
private _tmp = ((GVAR(selectedAction) select 0) select 9) select 3;
|
||||
private _runOnHover = true;
|
||||
if ((typeName _tmp) == "CODE" ) then {
|
||||
_runOnHover = call _tmp;
|
||||
} else {
|
||||
if (_tmp isEqualType false) then {
|
||||
if ((typeName _tmp) == "BOOL" ) then {
|
||||
_runOnHover = _tmp;
|
||||
} else {
|
||||
_runOnHover = _tmp > 0;
|
||||
@ -103,14 +89,14 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
};
|
||||
if (_runOnHover) then {
|
||||
this = GVAR(selectedTarget);
|
||||
_player = ACE_Player;
|
||||
_target = GVAR(selectedTarget);
|
||||
private _player = ACE_Player;
|
||||
private _target = GVAR(selectedTarget);
|
||||
|
||||
// Clear the conditions caches
|
||||
["clearConditionCaches", []] call EFUNC(common,localEvent);
|
||||
|
||||
// Check the action conditions
|
||||
_actionData = GVAR(selectedAction) select 0;
|
||||
private _actionData = GVAR(selectedAction) select 0;
|
||||
if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
|
||||
// Call the statement
|
||||
[_target, _player, _actionData select 6] call (_actionData select 3);
|
||||
@ -121,6 +107,7 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
END_COUNTER(fnc_renderMenuOpen);
|
||||
};
|
||||
|
||||
if(!_foundTarget && GVAR(actionSelected)) then {
|
||||
|
@ -101,9 +101,9 @@ if (GVAR(UseListMenu)) then {
|
||||
};
|
||||
|
||||
// Animate menu scale
|
||||
if (_menuInSelectedPath && (_menuDepth == count _path)) then {
|
||||
_scaleX = _scaleX * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * 8) min 1));
|
||||
_scaleY = _scaleY * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * 8) min 1));
|
||||
if (_menuInSelectedPath && {_menuDepth == count _path}) then {
|
||||
_scaleX = _scaleX * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1));
|
||||
_scaleY = _scaleY * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1));
|
||||
};
|
||||
|
||||
_target = _actionObject;
|
||||
|
@ -299,5 +299,11 @@
|
||||
<Czech>Menu interakce</Czech>
|
||||
<Spanish>Menú de interacción</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interact_Menu_menuAnimationSpeed">
|
||||
<English>Interaction Animation Speed</English>
|
||||
</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>
|
||||
</Key>
|
||||
</Package>
|
||||
</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);
|
||||
};
|
||||
};
|
||||
|
@ -8,6 +8,7 @@ class CfgVehicles {
|
||||
function = "ACE_Interaction_fnc_moduleInteraction";
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = PATHTOF(UI\Icon_Module_Interaction_ca.paa);
|
||||
|
||||
class Arguments {
|
||||
@ -35,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)});
|
||||
@ -270,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);
|
||||
@ -557,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 {};
|
||||
|
||||
|
@ -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);
|
||||
|
30
addons/interaction/functions/fnc_canPassMagazine.sqf
Normal file
30
addons/interaction/functions/fnc_canPassMagazine.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Checks if unit has a spare magazine for the specified weapon.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that passes the magazine <OBJECT>
|
||||
* 1: Unit to pass the magazine to <OBJECT>
|
||||
* 2: Weapon classname <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Unit can pass magazine <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [_player, _target, "arifle_MX_F"] call ace_interaction_fnc_canPassMagazine
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_player", "_target", "_weapon"];
|
||||
private ["_compatibleMags"];
|
||||
|
||||
if (!GVAR(enableMagazinePassing)) exitWith {false};
|
||||
|
||||
_compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines");
|
||||
{
|
||||
_x params ["_className", "", "_loaded"];
|
||||
if ((_className in _compatibleMags) && {!_loaded} && {_target canAdd _className}) exitWith {true};
|
||||
false
|
||||
} foreach (magazinesAmmoFull _player);
|
@ -19,4 +19,4 @@ if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith {
|
||||
|
||||
(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||
|
||||
showHUD true;
|
||||
["mouseHint", []] call EFUNC(common,showHud); //This is equivalent to the old showHud true
|
||||
|
@ -18,11 +18,7 @@
|
||||
|
||||
params ["_unit", "_team"];
|
||||
|
||||
// make sure correct team is set on JIP
|
||||
_unit setVariable [QGVAR(assignedFireTeam), _team, true];
|
||||
|
||||
// join fire team on every machine in that group
|
||||
["assignTeam", units group _unit, [_unit, _team]] call EFUNC(common,targetEvent);
|
||||
["CBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
||||
|
||||
// display message
|
||||
if (_unit == ACE_player) then {
|
||||
|
57
addons/interaction/functions/fnc_passMagazine.sqf
Normal file
57
addons/interaction/functions/fnc_passMagazine.sqf
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Pass spare magazine for the specified weapon.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that passes the magazine <OBJECT>
|
||||
* 1: Unit to pass the magazine to <OBJECT>
|
||||
* 2: Weapon classname <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [_player, _target, "arifle_MX_F"] call ace_interaction_fnc_magToPassazine
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_player", "_target", "_weapon"];
|
||||
private ["_compatibleMags", "_filteredMags", "_magToPass", "_magToPassIndex", "_playerName", "_magToPassDisplayName"];
|
||||
|
||||
_compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines");
|
||||
_filteredMags = [magazinesAmmoFull _player, {
|
||||
params ["_className", "", "_loaded"];
|
||||
_className in _compatibleMags && !_loaded
|
||||
}] call EFUNC(common,filter);
|
||||
|
||||
//select magazine with most ammo
|
||||
_magToPass = _filteredMags select 0;
|
||||
_magToPassIndex = 0;
|
||||
{
|
||||
_x params ["_className", "_ammoCount"];
|
||||
if ((_ammoCount > (_magToPass select 1)) && (_target canAdd _className)) then {
|
||||
_magToPass = _x;
|
||||
_magToPassIndex = _forEachIndex;
|
||||
};
|
||||
} foreach _filteredMags;
|
||||
|
||||
//remove all magazines and add them again, except the one to be passed
|
||||
//needed because of missing commands, see http://feedback.arma3.com/view.php?id=12782
|
||||
_magToPass params ["_magToPassClassName", "_magToPassAmmoCount"];
|
||||
_player removeMagazines _magToPassClassName;
|
||||
{
|
||||
_x params ["_className", "_ammoCount"];
|
||||
if ((_className == _magToPassClassName) && (_forEachIndex != _magToPassIndex)) then {
|
||||
_player addMagazine [_className, _ammoCount];
|
||||
};
|
||||
} foreach _filteredMags;
|
||||
|
||||
_player playActionNow "PutDown";
|
||||
|
||||
_target addMagazine [_magToPassClassName, _magToPassAmmoCount];
|
||||
|
||||
_playerName = [_player] call EFUNC(common,getName);
|
||||
_magToPassDisplayName = getText (configFile >> "CfgMagazines" >> _magToPassClassName >> "displayName");
|
||||
["displayTextStructured", [_target], [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target]] call EFUNC(common,targetEvent);
|
@ -50,4 +50,4 @@ if (_scroll == "") exitWith {
|
||||
|
||||
(_display displayCtrl 1002) ctrlSetText _scroll;
|
||||
|
||||
showHUD false;
|
||||
["mouseHint", [false, true, true, true, true, true, true, false]] call EFUNC(common,showHud); //This is equivalent to the old showHud false
|
||||
|
@ -253,138 +253,6 @@
|
||||
<Portuguese><< Voltar</Portuguese>
|
||||
<Italian><< Indietro</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_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_Interaction_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>
|
||||
<Key ID="STR_ACE_Interaction_Gestures_Advance">
|
||||
<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_Interaction_Gestures_Go">
|
||||
<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_Interaction_Gestures_Follow">
|
||||
<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_Interaction_Gestures_Point">
|
||||
<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_Interaction_Gestures_Up">
|
||||
<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_Interaction_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>
|
||||
<Key ID="STR_ACE_Interaction_Gestures_Cease_Fire">
|
||||
<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_Interaction_Gestures_Freeze">
|
||||
<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>
|
||||
<Key ID="STR_ACE_Interaction_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_Interaction_WeaponOnBack">
|
||||
<English>Put weapon on back</English>
|
||||
<German>Waffe wegstecken</German>
|
||||
@ -823,5 +691,25 @@
|
||||
<Portuguese>O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes.</Portuguese>
|
||||
<Russian>Управление группами позволяет назначать цвета членам групп, брать командование, вступать в группы или покидать их.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_PassMagazine">
|
||||
<English>Pass magazine</English>
|
||||
<German>Magazin geben</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_PassMagazinePrimary">
|
||||
<English>Primary magazine</English>
|
||||
<German>Gewehrmagazin</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_PassMagazineHandgun">
|
||||
<English>Pistol magazine</English>
|
||||
<German>Pistolenmagazin</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_PassMagazineHint">
|
||||
<English>%1 passed you a %2 magazine.</English>
|
||||
<German>%1 hat dir ein %2 Magazin gegeben.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_PassMagazineSetting">
|
||||
<English>Show "pass magazine" interaction</English>
|
||||
<German>Zeige "Magazine geben" Interaktion</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -87,31 +87,37 @@ class RscDisplayInventory {
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryUnderBarrel: BackgroundSlotPrimary {
|
||||
x = X_PART(29);
|
||||
x = X_PART(28.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(31.4);
|
||||
x = X_PART(30.6);
|
||||
y = Y_PART(9.2); //not sure why different (double check release)
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(33.8);
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazineGL: BackgroundSlotPrimary {
|
||||
x = X_PART(34.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(36.2);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
@ -292,31 +298,37 @@ class RscDisplayInventory {
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryUnderBarrel: SlotPrimary {
|
||||
x = X_PART(29);
|
||||
x = X_PART(28.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = X_PART(31.4);
|
||||
x = X_PART(30.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = X_PART(33.8);
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryMagazineGL: SlotPrimary {
|
||||
x = X_PART(34.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = X_PART(36.2);
|
||||
x = X_PART(36.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.3);
|
||||
w = W_PART(1.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
|
@ -5,7 +5,7 @@ class CfgVehicles {
|
||||
// @TODO: Changing the model and simulation hides it, but THEN IT DOESNT SPAWN WTF!?
|
||||
model = "\A3\Weapons_F\empty.p3d";
|
||||
destrType = "DestructNo";
|
||||
simulation = "house";
|
||||
simulation = "LaserTarget";
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE(_this call FUNC(laser_init));
|
||||
|
@ -5,7 +5,7 @@ class CfgVehicles {
|
||||
class ACE_MapFlashlight {
|
||||
displayName = CSTRING(Action_Flashlights);
|
||||
icon = QUOTE(\a3\ui_f\data\IGUI\Cfg\VehicleToggles\lightsiconon_ca.paa);
|
||||
condition = QUOTE(GVAR(mapIllumination) && visibleMap && (count ([ACE_player] call FUNC(getUnitFlashlights)) > 0));
|
||||
condition = QUOTE(GVAR(mapIllumination) && visibleMap && {count ([ACE_player] call FUNC(getUnitFlashlights)) > 0});
|
||||
statement = "true";
|
||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||
insertChildren = QUOTE(_this call DFUNC(compileFlashlightMenu));
|
||||
@ -23,6 +23,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleMap);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = PATHTOF(UI\Icon_Module_Map_ca.paa);
|
||||
class Arguments {
|
||||
class MapIllumination {
|
||||
@ -82,6 +83,7 @@ class CfgVehicles {
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 0;
|
||||
isSingular = 1;
|
||||
icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Enabled {
|
||||
|
@ -100,7 +100,7 @@ call FUNC(determineZoom);
|
||||
GVAR(glow) = objNull;
|
||||
|
||||
["playerInventoryChanged", {
|
||||
_flashlights = [ACE_player] call FUNC(getUnitFlashlights);
|
||||
private _flashlights = [ACE_player] call FUNC(getUnitFlashlights);
|
||||
if ((GVAR(flashlightInUse) != "") && !(GVAR(flashlightInUse) in _flashlights)) then {
|
||||
GVAR(flashlightInUse) = "";
|
||||
};
|
||||
@ -139,5 +139,9 @@ GVAR(hasWatch) = true;
|
||||
if (isNull (_this select 0)) exitWith {
|
||||
GVAR(hasWatch) = true;
|
||||
};
|
||||
GVAR(hasWatch) = "ItemWatch" in (_this select 1 select 17);
|
||||
GVAR(hasWatch) = false;
|
||||
{
|
||||
if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;};
|
||||
false
|
||||
} count (assignedItems ACE_player);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
// BEGIN_COUNTER(blueForceTrackingUpdate);
|
||||
|
||||
private ["_groupsToDrawMarkers", "_playerSide", "_anyPlayers", "_markerType", "_colour", "_marker"];
|
||||
private ["_groupsToDrawMarkers", "_playerSide", "_anyPlayers", "_colour", "_marker"];
|
||||
|
||||
// Delete last set of markers (always)
|
||||
{
|
||||
@ -28,12 +28,10 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
|
||||
};
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
private _markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
private _colour = format ["Color%1", side _x];
|
||||
|
||||
|
||||
_colour = format ["Color%1", side _x];
|
||||
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
@ -18,48 +18,29 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle", "_player", "_parameters"];
|
||||
params ["", "_player"];
|
||||
|
||||
private["_action", "_actions", "_cfg", "_displayName", "_flashlights", "_icon", "_statement"];
|
||||
|
||||
_actions = [];
|
||||
_flashlights = [_player] call FUNC(getUnitFlashlights);
|
||||
|
||||
//add all carried flashlight menus and on/off submenu actions
|
||||
{
|
||||
_displayName = getText (configFile >> "CfgWeapons" >> _x >> "displayName");
|
||||
_icon = getText (configFile >> "CfgWeapons" >> _x >> "picture");
|
||||
|
||||
_children = {
|
||||
params ["_vehicle", "_player", "_flashlight"];
|
||||
_actions = [];
|
||||
|
||||
_onAction = [
|
||||
(_flashlight + "_On"),
|
||||
"On",
|
||||
"",
|
||||
{[_this select 2] call FUNC(switchFlashlight)},
|
||||
{GVAR(flashlightInUse) != (_this select 2)},
|
||||
{},
|
||||
_flashlight
|
||||
] call EFUNC(interact_menu,createAction);
|
||||
|
||||
_offAction = [
|
||||
(_flashlight + "_Off"),
|
||||
"Off",
|
||||
"",
|
||||
{[""] call FUNC(switchFlashlight)},
|
||||
{GVAR(flashlightInUse) == (_this select 2)},
|
||||
{},
|
||||
_flashlight
|
||||
] call EFUNC(interact_menu,createAction);
|
||||
|
||||
_actions pushBack [_onAction, [], _player];
|
||||
_actions pushBack [_offAction, [], _player];
|
||||
|
||||
_actions
|
||||
_cfg = (configFile >> "CfgWeapons" >> _x);
|
||||
_displayName = getText (_cfg >> "displayName");
|
||||
_icon = getText (_cfg >> "picture");
|
||||
|
||||
_statement = if (GVAR(flashlightInUse) == _x) then {
|
||||
_displayName = format [localize LSTRING(turnLightOff), _displayName];
|
||||
{[""] call FUNC(switchFlashlight)}
|
||||
} else {
|
||||
_displayName = format [localize LSTRING(turnLightOn), _displayName];
|
||||
{[_this select 2] call FUNC(switchFlashlight)}
|
||||
};
|
||||
|
||||
_parentAction = [_x, _displayName, _icon, {true}, {true}, _children, _x] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_parentAction, [], _player];
|
||||
_action = [_x, _displayName, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _player];
|
||||
} forEach _flashlights;
|
||||
|
||||
_actions
|
||||
_actions
|
||||
|
@ -12,14 +12,13 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit"];
|
||||
|
||||
EXPLODE_1_PVT(_this,_unit);
|
||||
|
||||
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight", "_flareTint", "_lightTint", "_l"];
|
||||
private ["_fnc_blendColor", "_lightTint", "_fnc_calcColor", "_l", "_lightLevel", "_vehicle", "_isEnclosed", "_nearObjects", "_light", "_ll", "_flashlight", "_flareTint"];
|
||||
|
||||
// Blend two colors
|
||||
_fnc_blendColor = {
|
||||
EXPLODE_3_PVT(_this,_c1,_c2,_alpha);
|
||||
params ["_c1", "_c2", "_alpha"];
|
||||
[(_c1 select 0) * (1 - _alpha) + (_c2 select 0) * _alpha,
|
||||
(_c1 select 1) * (1 - _alpha) + (_c2 select 1) * _alpha,
|
||||
(_c1 select 2) * (1 - _alpha) + (_c2 select 2) * _alpha,
|
||||
@ -27,16 +26,17 @@ _fnc_blendColor = {
|
||||
};
|
||||
|
||||
// Ambient light tint depending on time of day
|
||||
_lightTint = switch (true) do {
|
||||
case (sunOrMoon == 1.0) : { [0.5,0.5,0.5,1] };
|
||||
case (sunOrMoon > 0.80) : {[[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8)/0.2] call _fnc_blendColor};
|
||||
case (sunOrMoon > 0.50) : {[[0,0,0.1,1], [1.0 - overcast,0.2,0,1], (sunOrMoon - 0.5)/0.3] call _fnc_blendColor};
|
||||
case (sunOrMoon <= 0.5) : { [0,0,0.1,1] };
|
||||
_lightTint = call {
|
||||
if (sunOrMoon == 1.0) exitWith { [0.5,0.5,0.5,1] };
|
||||
if (sunOrMoon > 0.80) exitWith { [[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8)/0.2] call _fnc_blendColor };
|
||||
if (sunOrMoon > 0.50) exitWith { [[0,0,0.1,1], [1.0 - overcast,0.2,0,1], (sunOrMoon - 0.5)/0.3] call _fnc_blendColor };
|
||||
if (sunOrMoon <= 0.5) exitWith { [0,0,0.1,1] };
|
||||
[0,0,0,0]
|
||||
};
|
||||
|
||||
// Calculates overlay color from tint and light level
|
||||
_fnc_calcColor = {
|
||||
EXPLODE_2_PVT(_this,_c1,_lightLevel);
|
||||
params ["_c1", "_lightLevel"];
|
||||
|
||||
if (_lightLevel < 0.5) then {
|
||||
_l = _lightLevel / 0.5;
|
||||
@ -68,7 +68,6 @@ if (_lightLevel > 0.95) exitWith {
|
||||
[false, [0.5,0.5,0.5,0]]
|
||||
};
|
||||
|
||||
private "_vehicle";
|
||||
_vehicle = vehicle _unit;
|
||||
|
||||
// Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination)
|
||||
@ -124,4 +123,4 @@ if (_lightLevel > 0.95) exitWith {
|
||||
};
|
||||
|
||||
// Calculate resulting map color
|
||||
[true, [_lightTint, _lightLevel] call _fnc_calcColor]
|
||||
[true, [_lightTint, _lightLevel] call _fnc_calcColor]
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size", "_i"];
|
||||
_grids = configFile >> "CfgWorlds" >> worldName >> "Grid";
|
||||
_grids = (configFile >> "CfgWorlds" >> worldName >> "Grid");
|
||||
_fourSize = -1;
|
||||
_sixSize = -1;
|
||||
for "_i" from 1 to 10 do {
|
||||
|
@ -16,15 +16,16 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_light", "_color", "_class"];
|
||||
params ["_flashlight"];
|
||||
|
||||
_light = GVAR(glow);
|
||||
if (!isNull _light) then {deleteVehicle _light};
|
||||
|
||||
if (_flashlight != "") then {
|
||||
_colour = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour");
|
||||
if !(_colour in ["white", "red", "green", "blue", "yellow"]) then {_colour = "white"};
|
||||
_class = format["ACE_FlashlightProxy_%1", _colour];
|
||||
_color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour");
|
||||
if !(_color in ["white", "red", "green", "blue", "yellow"]) then {_color = "white"};
|
||||
_class = format["ACE_FlashlightProxy_%1", _color];
|
||||
|
||||
_light = _class createVehicle [0,0,0];
|
||||
_light attachTo [ACE_player, [0,0.5,-0.1], "head"];
|
||||
@ -32,4 +33,4 @@ if (_flashlight != "") then {
|
||||
_light = objNull;
|
||||
};
|
||||
|
||||
GVAR(glow) = _light;
|
||||
GVAR(glow) = _light;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_flashlights = [];
|
||||
private _flashlights = [];
|
||||
|
||||
{
|
||||
if ((isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour")) && !(_x in _flashlights)) then {
|
||||
@ -26,4 +26,4 @@ _flashlights = [];
|
||||
};
|
||||
} forEach (items _unit);
|
||||
|
||||
_flashlights
|
||||
_flashlights
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hmd", "_flashlight", "_screenSize", "_realViewPortY", "_realViewPortX", "_fillTex", "_colourAlpha", "_shadeAlpha", "_colourList", "_maxColour"];
|
||||
params ["_mapCtrl", "_mapScale", "_mapCentre", "_lightLevel"];
|
||||
|
||||
_hmd = hmd ACE_player;
|
||||
@ -50,6 +51,7 @@ if (_flashlight == "") then {
|
||||
//ambient shade fill
|
||||
_mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], _mapCentre, _screenSize, _screenSize, 0, "", 0];
|
||||
} else {
|
||||
private ["_mousePos", "_colour", "_size", "_flashTex", "_beamSize", "_viewPortRatioFixY", "_offsetX", "_offsetYDown", "_offsetYUp"];
|
||||
//mouse pos
|
||||
_mousePos = GVAR(mousePos);
|
||||
|
||||
@ -86,4 +88,4 @@ if (_flashlight == "") then {
|
||||
_mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0) + _offsetX, (_mousePos select 1)], _screenSize * 2, _beamSize, 0, "", 0]; //right
|
||||
_mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0), (_mousePos select 1) - _offsetYDown], _screenSize * 4, _screenSize, 0, "", 0]; //down
|
||||
_mapCtrl drawIcon [_fillTex, [1,1,1,_shadeAlpha], [(_mousePos select 0), (_mousePos select 1) + _offsetYUp], _screenSize * 4, _screenSize * 4, 0, "", 0]; //up
|
||||
};
|
||||
};
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mapCtrl", "_mapScale", "_mapCentre", "_light"];
|
||||
_mapCtrl = findDisplay 12 displayCtrl 51;
|
||||
_mapScale = ctrlMapScale _mapCtrl;
|
||||
_mapCentre = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
||||
@ -73,4 +73,4 @@ if (GVAR(mapLimitZoom)) then {
|
||||
_mapCtrl ctrlMapAnimAdd [0, GVAR(minMapSize) + 0.001, _mapCentre];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -256,6 +256,30 @@
|
||||
<Czech>Snížit jas</Czech>
|
||||
<Spanish>Reducir brillo</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_turnLightOn">
|
||||
<English>Turn On %1</English>
|
||||
<German>%1 Aktivieren</German>
|
||||
<Spanish>Encender %1</Spanish>
|
||||
<Polish>Włącz %1</Polish>
|
||||
<French>Allumer %1</French>
|
||||
<Czech>Zapnout %1</Czech>
|
||||
<Italian>Accendi %1</Italian>
|
||||
<Hungarian>%1 Bekapcsolása</Hungarian>
|
||||
<Portuguese>Ativar %1</Portuguese>
|
||||
<Russian>Активировать %1</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_turnLightOff">
|
||||
<English>Turn Off %1</English>
|
||||
<German>%1 Deaktivieren</German>
|
||||
<Spanish>Apagar %1</Spanish>
|
||||
<Polish>Wyłącz %1</Polish>
|
||||
<French>Éteindre %1</French>
|
||||
<Czech>Vypnout %1</Czech>
|
||||
<Italian>Spegni %1</Italian>
|
||||
<Hungarian>%1 Kikapcsolása</Hungarian>
|
||||
<Portuguese>Desativar %1</Portuguese>
|
||||
<Russian>Деактивировать %1</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_DefaultChannel_DisplayName">
|
||||
<English>Set Channel At Start</English>
|
||||
<Polish>Ust. domyślny kanał</Polish>
|
||||
|
@ -6,11 +6,13 @@ class CfgVehicles {
|
||||
displayName = CSTRING(moduleSettings_displayName);
|
||||
function = QFUNC(moduleSettings);
|
||||
isGlobal = 0;
|
||||
isSingular = 1;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
icon = PATHTOF(ui\icon_module_map_gestures_ca.paa);
|
||||
class Arguments {
|
||||
class enabled {
|
||||
displayName = CSTRING(enabled_DisplayName);
|
||||
description = CSTRING(enabled_description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
@ -18,7 +20,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(maxRange_displayName);
|
||||
description = CSTRING(maxRange_description);
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 4;
|
||||
defaultValue = 7;
|
||||
};
|
||||
class interval {
|
||||
displayName = CSTRING(interval_displayName);
|
||||
@ -30,13 +32,13 @@ class CfgVehicles {
|
||||
displayName = CSTRING(defaultLeadColor_displayName);
|
||||
description = CSTRING(defaultLeadColor_description);
|
||||
typeName = "STRING";
|
||||
defaultValue = "0,0,0,0";
|
||||
defaultValue = "1,0.88,0,0.95";
|
||||
};
|
||||
class defaultColor {
|
||||
displayName = CSTRING(defaultColor_displayName);
|
||||
description = CSTRING(defaultColor_description);
|
||||
typeName = "STRING";
|
||||
defaultValue = "0,0,0,0";
|
||||
defaultValue = "1,0.88,0,0.7";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -53,13 +55,13 @@ class CfgVehicles {
|
||||
displayName = CSTRING(leadColor_displayName);
|
||||
description = CSTRING(leadColor_description);
|
||||
typeName = "STRING";
|
||||
defaultValue = "0,0,0,0";
|
||||
defaultValue = "1,0.88,0,0.95";
|
||||
};
|
||||
class color {
|
||||
displayName = CSTRING(color_displayName);
|
||||
description = CSTRING(color_description);
|
||||
typeName = "STRING";
|
||||
defaultValue = "0,0,0,0";
|
||||
defaultValue = "1,0.88,0,0.7";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,8 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (["STMapGestures"] call EFUNC(common,isModLoaded)) exitWith {
|
||||
ACE_LOGWARNING("st_map_gestures is installed - exiting [remove st_map_gestures.pbo to allow ace version]");
|
||||
};
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["SettingsInitialized", {
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
[{
|
||||
if (isNull (findDisplay 12)) exitWith {};
|
||||
|
||||
|
@ -17,8 +17,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_defaultColor", "_defaultLeadColor"];
|
||||
|
||||
params ["_logic", "", "_activated"];
|
||||
|
||||
if (!_activated || !isServer) exitWith {};
|
||||
@ -27,11 +25,19 @@ if (!_activated || !isServer) exitWith {};
|
||||
[_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
_defaultLeadColor = call compile ("[" + (_logic getVariable ["defaultLeadColor", ""]) + "]");
|
||||
if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")};
|
||||
//For default fallback colors, setting to empty ("") will not force on clients
|
||||
private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""];
|
||||
if (_defaultLeadColor != "") then {
|
||||
_defaultLeadColor = call compile ("[" + _defaultLeadColor + "]");
|
||||
if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")};
|
||||
[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting);
|
||||
};
|
||||
|
||||
_defaultColor = call compile ("[" + (_logic getVariable ["defaultColor", ""]) + "]");
|
||||
if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")};
|
||||
private _defaultColor = _logic getVariable ["defaultColor", ""];
|
||||
if (_defaultColor != "") then {
|
||||
_defaultColor = call compile ("[" + _defaultColor + "]");
|
||||
if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")};
|
||||
[QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting);
|
||||
};
|
||||
|
||||
[QGVAR(defaultLeadColor), _defaultLeadColor, false, true] call EFUNC(common,setSetting);
|
||||
[QGVAR(defaultColor), _defaultColor, false, true] call EFUNC(common,setSetting);
|
||||
ACE_LOGINFO("Map Gestures Module Initialized.");
|
||||
|
@ -21,33 +21,13 @@
|
||||
<Portuguese>Distância max. entre os jogadores para mostrar o indicador de gesto no mapa [padrão: 7 metros]</Portuguese>
|
||||
<Russian>Макс. дистанция между игроками для отображения жестов на карте [по-умолчанию: 7 метров]</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultLeadAlpha_displayName">
|
||||
<English>Lead Default Alpha</English>
|
||||
<Portuguese>Transparência padrão do líder</Portuguese>
|
||||
<Russian>Лид. прозрачность по-умолчанию</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultLeadAlpha_description">
|
||||
<English>Fallback Alpha value for group leaders.</English>
|
||||
<Portuguese>Valor de transparência alternativo para líderes de grupo</Portuguese>
|
||||
<Russian>Значение прозрачности для лидеров групп.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultAlpha_displayName">
|
||||
<English>Default Alpha</English>
|
||||
<Portuguese>Transparência padrão</Portuguese>
|
||||
<Russian>Прозрачность по-умолчанию</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultAlpha_descriptions">
|
||||
<English>Fallback Alpha value.</English>
|
||||
<Portuguese>Valor alternativo de transparência</Portuguese>
|
||||
<Russian>Значение прозрачности по-умолчанию.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultLeadColor_displayName">
|
||||
<English>Lead Default Color</English>
|
||||
<Portuguese>Cor padrão para o líder</Portuguese>
|
||||
<Russian>Лид. цвет по-умолчанию</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultLeadColor_description">
|
||||
<English>Fallback Color value for group leaders.</English>
|
||||
<English>Fallback Color value for group leaders when there is no group setting. [Module: leave blank to not force on clients]</English>
|
||||
<Portuguese>Valor de cor alternativa para líderes de grupo</Portuguese>
|
||||
<Russian>Значение цвета для лидеров групп.</Russian>
|
||||
</Key>
|
||||
@ -57,30 +37,10 @@
|
||||
<Russian>Цвет по-умолчанию</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_defaultColor_description">
|
||||
<English>Fallback Color value.</English>
|
||||
<English>Fallback Color value when there is no group setting. [Module: leave blank to not force on clients]</English>
|
||||
<Portuguese>Valor alternativo de cor</Portuguese>
|
||||
<Russian>Значение цвета.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_leadAlpha_displayName">
|
||||
<English>Lead Alpha</English>
|
||||
<Portuguese>Transparência do líder</Portuguese>
|
||||
<Russian>Лид. прозрачность</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_leadAlpha_description">
|
||||
<English>Alpha value for group leaders of groups synced with this module.</English>
|
||||
<Portuguese>Valor de transparência para líderes de grupo sincronizados com este módulo.</Portuguese>
|
||||
<Russian>Значение прозрачности для лидеров групп, которые [группы] синхронизированы с этим модулем.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_alpha_displayName">
|
||||
<English>Alpha</English>
|
||||
<Portuguese>Transparência</Portuguese>
|
||||
<Russian>Прозрачность</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_alpha_description">
|
||||
<English>Alpha value for group members of groups synced with this module.</English>
|
||||
<Portuguese>Valor de transparência para membros de grupo sincronizados com este módulo.</Portuguese>
|
||||
<Russian>Значение прозрачности для членов групп, которые [группы] синхронизированы с этим модулем.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_map_gestures_leadColor_displayName">
|
||||
<English>Lead Color</English>
|
||||
<Portuguese>Cor do líder</Portuguese>
|
||||
|
@ -17,6 +17,7 @@ class CfgVehicles {
|
||||
function = QUOTE(DFUNC(moduleMedicalSettings));
|
||||
functionPriority = 1;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
||||
@ -153,6 +154,7 @@ class CfgVehicles {
|
||||
function = QUOTE(FUNC(moduleAdvancedMedicalSettings));
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
isDisposable = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -274,6 +276,7 @@ class CfgVehicles {
|
||||
function = QUOTE(DFUNC(moduleReviveSettings));
|
||||
functionPriority = 1;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
||||
@ -430,39 +433,38 @@ class CfgVehicles {
|
||||
#define ARM_LEG_ARMOR_BETTER 5
|
||||
#define ARM_LEG_ARMOR_CSAT 4
|
||||
|
||||
class Land;
|
||||
class Man: Land {
|
||||
class HitPoints;
|
||||
};
|
||||
#define ADD_ACE_HITPOINTS(ARM_ARMOR,LEG_ARMOR) \
|
||||
class HitLeftArm { \
|
||||
armor = ARM_ARMOR; \
|
||||
material = -1; \
|
||||
name = "hand_l"; \
|
||||
passThrough = 1; \
|
||||
radius = 0.08; \
|
||||
explosionShielding = 1; \
|
||||
visual = "injury_hands"; \
|
||||
minimalHit = 0.01; \
|
||||
}; \
|
||||
class HitRightArm: HitLeftArm { \
|
||||
name = "hand_r"; \
|
||||
}; \
|
||||
class HitLeftLeg { \
|
||||
armor = LEG_ARMOR; \
|
||||
material = -1; \
|
||||
name = "leg_l"; \
|
||||
passThrough = 1; \
|
||||
radius = 0.1; \
|
||||
explosionShielding = 1; \
|
||||
visual = "injury_legs"; \
|
||||
minimalHit = 0.01; \
|
||||
}; \
|
||||
class HitRightLeg: HitLeftLeg { \
|
||||
name = "leg_r"; \
|
||||
};
|
||||
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class HitPoints: HitPoints { // custom hitpoints. addons might want to adjust these accordingly
|
||||
class HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_DEFAULT;
|
||||
material = -1;
|
||||
name = "hand_l"; // @todo hopefully these still include the whole arm + hands
|
||||
passThrough = 1;
|
||||
radius = 0.08;
|
||||
explosionShielding = 1;
|
||||
visual = "injury_hands";
|
||||
minimalHit = 0.01;
|
||||
};
|
||||
class HitRightArm: HitLeftArm {
|
||||
name = "hand_r"; // @todo hopefully these still include the whole arm + hands
|
||||
};
|
||||
class HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_DEFAULT;
|
||||
material = -1;
|
||||
name = "leg_l";
|
||||
passThrough = 1;
|
||||
radius = 0.1;
|
||||
explosionShielding = 1;
|
||||
visual = "injury_legs";
|
||||
minimalHit = 0.01;
|
||||
};
|
||||
class HitRightLeg: HitLeftLeg {
|
||||
name = "leg_r";
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_DEFAULT,ARM_LEG_ARMOR_DEFAULT)
|
||||
};
|
||||
|
||||
class ACE_SelfActions {
|
||||
@ -522,174 +524,82 @@ class CfgVehicles {
|
||||
class B_Soldier_base_F: SoldierWB {};
|
||||
|
||||
class B_Soldier_04_f: B_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class B_Soldier_05_f: B_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class I_Soldier_base_F: SoldierGB {};
|
||||
|
||||
class I_Soldier_03_F: I_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class I_Soldier_04_F: I_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_BETTER;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class O_Soldier_base_F: SoldierEB {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class O_Soldier_diver_base_F: O_Soldier_base_F {
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class O_Soldier_02_F: O_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class O_officer_F: O_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = ARM_LEG_ARMOR_CSAT; // @todo is that suppossed to be the case?
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = ARM_LEG_ARMOR_CSAT;
|
||||
};
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
|
||||
};
|
||||
};
|
||||
|
||||
class O_Protagonist_VR_F: O_Soldier_base_F {
|
||||
class HitPoints: HitPoints {
|
||||
class HitHead;
|
||||
class HitBody;
|
||||
class HitHands;
|
||||
class HitLegs;
|
||||
class HitLeftArm: HitLeftArm {
|
||||
armor = 2;
|
||||
};
|
||||
class HitRightArm: HitRightArm {
|
||||
armor = 2;
|
||||
};
|
||||
class HitLeftLeg: HitLeftLeg {
|
||||
armor = 2;
|
||||
};
|
||||
class HitRightLeg: HitRightLeg {
|
||||
armor = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
//These VR guys already have limb hitpoints that we should be able to use
|
||||
//Note: the selections are a little weird, eg: class leg_l {name = "leg_l";};
|
||||
// class B_Soldier_VR_F: B_Soldier_base_F { {
|
||||
// class HitPoints {
|
||||
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
|
||||
// };
|
||||
// };
|
||||
// class O_Soldier_VR_F: O_Soldier_base_F { {
|
||||
// class HitPoints {
|
||||
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
|
||||
// };
|
||||
// };
|
||||
// class I_Soldier_VR_F: I_Soldier_base_F { {
|
||||
// class HitPoints {
|
||||
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
|
||||
// };
|
||||
// };
|
||||
// class C_Soldier_VR_F: C_man_1 {
|
||||
// class HitPoints {
|
||||
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
|
||||
// };
|
||||
// };
|
||||
// class O_Protagonist_VR_F: O_Soldier_base_F {
|
||||
// class HitPoints {
|
||||
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
|
||||
// };
|
||||
// };
|
||||
|
||||
class MapBoard_altis_F;
|
||||
class ACE_bodyBagObject: MapBoard_altis_F {
|
||||
|
@ -19,6 +19,9 @@
|
||||
#include "script_component.hpp"
|
||||
params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_specificSpot", -1]];
|
||||
|
||||
[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
|
||||
|
||||
if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
|
||||
_this call FUNC(treatmentBasic_bandage);
|
||||
};
|
||||
@ -30,7 +33,4 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
|
||||
};
|
||||
}foreach _items;*/
|
||||
|
||||
[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
|
||||
|
||||
true;
|
||||
|
@ -10,6 +10,7 @@ class CfgVehicles {
|
||||
function = QUOTE(DFUNC(module));
|
||||
functionPriority = 1;
|
||||
isGlobal = 0;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
class Arguments {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user