mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3
This commit is contained in:
commit
d42be7b5f8
12
addons/ai/README.md
Normal file
12
addons/ai/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_ai
|
||||
======
|
||||
|
||||
Minor changes of AI skill and overhaul of AI firing modes of vanilla weapons, encouraging the AI to use full-auto and bursts more often.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
12
addons/aircraft/README.md
Normal file
12
addons/aircraft/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_aircraft
|
||||
============
|
||||
|
||||
Changes to air weaponry, flightmodels and HUDs.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
13
addons/attach/README.md
Normal file
13
addons/attach/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
ace_attach
|
||||
==========
|
||||
|
||||
Introducing the ability to attach various throwables to yourself to mark your position and assist in IFF.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [bux578](https://github.com/bux578)
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
@ -4,5 +4,4 @@ PREP(attach);
|
||||
PREP(canAttach);
|
||||
PREP(canDetach);
|
||||
PREP(detach);
|
||||
PREP(detachDelayFix);
|
||||
PREP(openAttachUI);
|
@ -12,7 +12,7 @@ Return Value:
|
||||
none
|
||||
*/
|
||||
|
||||
private ["_unit", "_itemName", "_count", "_attachedItem"];
|
||||
private ["_unit", "_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_itemName = _unit getVariable [QGVAR(ItemName), ""];
|
||||
@ -33,7 +33,10 @@ if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "
|
||||
detach _attachedItem;
|
||||
_attachedItem setPos [getPos _unit select 0, getPos _unit select 1, ((getPos _unit select 2) - 1000)];
|
||||
// Delete attached item after 0.5 seconds
|
||||
[FUNC(detachFix), 0.5, [_attachedItem, (time + 0.5)]] call CBA_fnc_addPerFrameHandler;
|
||||
_fnc_detachDelay = {
|
||||
deleteVehicle (_this select 0);
|
||||
};
|
||||
[_fnc_detachDelay, [_attachedItem], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
// Delete attached item
|
||||
deleteVehicle _attachedItem;
|
||||
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
Author: Pabst Mirror
|
||||
|
||||
Description:
|
||||
Waits then deletes the object. Fixes IR_Grenade's effect not disapearing.
|
||||
|
||||
Parameters:
|
||||
0: ARRAY - [OBJECT - item, NUMBER - time to wait until]
|
||||
1: NUMBER - CBA's PerFrameHandler ID
|
||||
*/
|
||||
|
||||
_attachedItem = (_this select 0) select 0;
|
||||
_waitUntilTime = (_this select 0) select 1;
|
||||
|
||||
if (time < _waitUntilTime) exitWith {};
|
||||
|
||||
deleteVehicle _attachedItem;
|
||||
|
||||
//Remove the frame handler
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
12
addons/backblast/README.md
Normal file
12
addons/backblast/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_backblast
|
||||
=============
|
||||
|
||||
Adds backblast to AT launchers and overpressure zones to tank cannons.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
12
addons/ballistics/README.md
Normal file
12
addons/ballistics/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_ballistics
|
||||
==============
|
||||
|
||||
Changes to weapon and ammunition values.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
@ -43,3 +43,19 @@ class Extended_Respawn_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(dropObject) {
|
||||
Killed = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(dropObject) {
|
||||
GetIn = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
14
addons/common/README.md
Normal file
14
addons/common/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
ace_common
|
||||
==========
|
||||
|
||||
Common functions and systems used by other components.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [NouberNou](https://github.com/NouberNou)
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [walterpearce](https://github.com/walterpearce)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
Binary file not shown.
Binary file not shown.
@ -4,7 +4,7 @@
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (time > 0) exitWith {
|
||||
[QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
[QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
};
|
||||
|
||||
call cba_common_fnc_onFrame;
|
||||
@ -37,38 +37,17 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
call COMPILE_FILE(scripts\assignedItemFix);
|
||||
|
||||
GVAR(keyInput) = COMPILE_FILE(scripts\keyInput);
|
||||
GVAR(keyRelease) = COMPILE_FILE(scripts\keyRelease);
|
||||
GVAR(editKey) = COMPILE_FILE(scripts\editKey);
|
||||
GVAR(openMenu) = COMPILE_FILE(scripts\openMenu);
|
||||
GVAR(closeMenu) = COMPILE_FILE(scripts\closeMenu);
|
||||
GVAR(nextKeys) = COMPILE_FILE(scripts\nextKeys);
|
||||
GVAR(toggleState) = COMPILE_FILE(scripts\toggleState);
|
||||
|
||||
[false] call FUNC(setKeyDefault);
|
||||
|
||||
GVAR(keyStates) = [];
|
||||
GVAR(keyTimes) = [];
|
||||
for "_index" from 0 to 300 do {
|
||||
GVAR(keyStates) set [_index, 0];
|
||||
GVAR(keyTimes) set [_index, -1];
|
||||
};
|
||||
|
||||
call COMPILE_FILE(scripts\KeyInput\initCanInteractFunction);
|
||||
call COMPILE_FILE(scripts\KeyInput\initKeys);
|
||||
call COMPILE_FILE(scripts\KeyInput\initScrollWheel);
|
||||
call COMPILE_FILE(scripts\initCanInteractFunction);
|
||||
call COMPILE_FILE(scripts\initScrollWheel);
|
||||
|
||||
0 spawn {
|
||||
while {true} do {
|
||||
waitUntil {!isNull (findDisplay 46)}; sleep 0.1;
|
||||
findDisplay 46 displayAddEventHandler ["KeyDown", QUOTE( _this call GVAR(onKeyDown) )];
|
||||
findDisplay 46 displayAddEventHandler ["KeyUp", QUOTE( _this call GVAR(onKeyUp) )];
|
||||
findDisplay 46 displayAddEventHandler ["MouseZChanged", QUOTE( _this call GVAR(onScrollWheel) )];
|
||||
[false] call FUNC(disableUserInput);
|
||||
waitUntil {isNull (findDisplay 46)};
|
||||
};
|
||||
};
|
||||
|
||||
enableCamShake true;
|
||||
|
||||
// Set the name for the current player
|
||||
@ -152,21 +131,6 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
|
||||
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
[QGVAR(reviveCounter_f), 0, false, QGVAR(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(inReviveState), false, true, QGVAR(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(isDead),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(isDeadPlayer), false, true, QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
["ACE_isUnconscious",false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(ENABLE_REVIVE_SETDEAD_F),0,false,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
|
||||
if (isNil QGVAR(ENABLE_REVIVE_F)) then {
|
||||
GVAR(ENABLE_REVIVE_F) = 0;
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
{((_this select 0) getvariable [QGVAR(inReviveState), false])}
|
||||
] call EFUNC(common,registerUnconsciousCondition);
|
||||
[QGVAR(carriedObj),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
|
@ -80,7 +80,6 @@ PREP(isAutoWind);
|
||||
PREP(isEngineer);
|
||||
PREP(isEOD);
|
||||
PREP(isInBuilding);
|
||||
PREP(isMedic);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(letterToCode);
|
||||
@ -110,7 +109,6 @@ PREP(sanitizeString);
|
||||
PREP(serverLog);
|
||||
PREP(setCaptivityStatus);
|
||||
PREP(setForceWalkStatus);
|
||||
PREP(setKeyDefault);
|
||||
PREP(setName);
|
||||
PREP(setParameter);
|
||||
PREP(setPitchBankYaw);
|
||||
@ -215,11 +213,10 @@ PREP(getCanInteract);
|
||||
PREP(canInteract);
|
||||
PREP(resetAllDefaults_f);
|
||||
PREP(broadcastSound3D_f);
|
||||
PREP(setDead);
|
||||
|
||||
PREP(isAwake);
|
||||
PREP(setProne);
|
||||
|
||||
PREP(raiseScriptedEvent_f);
|
||||
PREP(setDisableUserInputStatus);
|
||||
|
||||
PREP(dropWeapon_f);
|
||||
@ -227,7 +224,6 @@ PREP(inWater_f);
|
||||
PREP(setVolume_f);
|
||||
PREP(closeAllDialogs_f);
|
||||
PREP(disableAI_f);
|
||||
PREP(moduleBasicRevive);
|
||||
PREP(switchToGroupSide_f);
|
||||
PREP(getFirstObjectIntersection);
|
||||
PREP(getFirstTerrainIntersection);
|
||||
@ -243,22 +239,18 @@ PREP(getCarriedObj);
|
||||
PREP(getCarriedBy);
|
||||
PREP(beingCarried);
|
||||
PREP(setCarriedBy);
|
||||
PREP(setUnconsciousState);
|
||||
PREP(isUnconscious);
|
||||
PREP(getUnconsciousCondition);
|
||||
PREP(registerUnconsciousCondition);
|
||||
PREP(setCaptiveSwitch);
|
||||
|
||||
|
||||
PREP(moveToTempGroup);
|
||||
PREP(canGoUnconsciousState);
|
||||
PREP(setWeaponsCorrectUnconscious);
|
||||
|
||||
|
||||
PREP(limitMovementSpeed);
|
||||
PREP(setArrestState);
|
||||
PREP(isArrested);
|
||||
PREP(loadPerson_F);
|
||||
PREP(loadPersonLocal_F);
|
||||
PREP(makeCopyOfBody_F);
|
||||
PREP(unloadPerson_F);
|
||||
PREP(cleanUpCopyOfBody_F);
|
||||
|
||||
|
||||
|
||||
ADDON = true;
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {"ACE_Box_Misc"};
|
||||
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_main", "ace_gui"};
|
||||
requiredAddons[] = {"ace_main"};
|
||||
author[] = {"KoffeinFlummi"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
@ -66,14 +66,6 @@ class ACE_Options {
|
||||
|
||||
#include <ProgressScreen.hpp>
|
||||
#include <HintConfig.hpp>
|
||||
|
||||
/*
|
||||
class RscControlsGroupNoScrollbars;
|
||||
class RscAttributeInventory: RscControlsGroupNoScrollbars {
|
||||
onSetFocus = QUOTE([ARR_3(_this,""RscAttributeInventory"",'CuratorCommon')] call (uinamespace getvariable ""BIS_fnc_initCuratorAttribute""); _this select 0 call DFUNC(addCuratorUnloadEventhandler););
|
||||
};
|
||||
*/
|
||||
|
||||
#include <RscInfoType.hpp>
|
||||
#include <FixPickup.hpp>
|
||||
#include <FixAnimations.hpp>
|
||||
|
@ -36,12 +36,9 @@ if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj))))
|
||||
_to attachTo [_unit,(_this select 2)];
|
||||
[format["fnc_carryObj - UNIT: %1 TO %2 - attachTo offset: %3",_unit,_to,(_this select 2)],2] call FUNC(debug);
|
||||
};
|
||||
} else {
|
||||
[format["fnc_carryObj - UNIT: %1 TO %2 - Script expects external handling of attachTo Command. Exiting",_unit,_to],2] call FUNC(debug);
|
||||
};
|
||||
|
||||
[[_unit, _to, _fallDown],"carryObject"] call FUNC(raiseScriptedEvent_f);
|
||||
|
||||
["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
// ["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
};
|
||||
} else {
|
||||
if (!isNull ([_unit] call FUNC(getCarriedObj))) then {
|
||||
@ -59,13 +56,14 @@ if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj))))
|
||||
_positionUnit set [2, ((getPosASL _unit) select 2) + 0.1];
|
||||
_carriedObj setPosASL _positionUnit;
|
||||
};
|
||||
[[_unit, _carriedObj],"carryObjectDropped"] call FUNC(raiseScriptedEvent_f);
|
||||
|
||||
[[_unit] call FUNC(getCarriedObj), objNull] call FUNC(setCarriedBy);
|
||||
_unit setvariable [QGVAR(carriedObj),_to,true];
|
||||
_return = true;
|
||||
|
||||
[[_unit, _to, _fallDown],"carryObject"] call FUNC(raiseScriptedEvent_f);
|
||||
["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
// ["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
|
||||
};
|
||||
};
|
||||
} else {
|
||||
|
@ -16,21 +16,26 @@ private ["_msg", "_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLeve
|
||||
_msg = _this select 0;
|
||||
_level = if (count _this > 1) then {_this select 1} else { 2 };
|
||||
|
||||
if (typeName _level != "NUMBER") then {
|
||||
_level = 2;
|
||||
};
|
||||
|
||||
_defaultLoglevel = if (isNil QGVAR(LOGLEVEL)) then {
|
||||
DEFAULT_LOGGING_LEVEL;
|
||||
} else {
|
||||
GVAR(LOGLEVEL);
|
||||
};
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {
|
||||
false
|
||||
};
|
||||
|
||||
_defaultLogDisplayLevel = if (isnil QGVAR(LOGDISPLAY_LEVEL)) then {
|
||||
DEFAULT_TEXT_DISPLAY;
|
||||
} else {
|
||||
GVAR(LOGDISPLAY_LEVEL);
|
||||
};
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {
|
||||
false
|
||||
};
|
||||
if (_level <= _defaultLoglevel) then {
|
||||
|
||||
_prefix = switch (_level) do {
|
||||
@ -42,7 +47,7 @@ if (_level <= _defaultLoglevel) then {
|
||||
};
|
||||
_message = format["[%1] %2",_prefix,_msg];
|
||||
|
||||
if (_level >= _defaultLogDisplayLevel) then {
|
||||
if (_level <= _defaultLogDisplayLevel) then {
|
||||
systemChat _message;
|
||||
};
|
||||
diag_log _message;
|
||||
|
@ -37,4 +37,3 @@ GVAR(OBJECT_VARIABLES_STORAGE) pushback [_name,_value,_defaultGlobal,_catagory,_
|
||||
|
||||
missionNamespace setvariable [QGVAR(OBJECT_VARIABLES_STORAGE_) + _name, [_name,_value,_defaultGlobal,_catagory,_code, _persistent]];
|
||||
|
||||
[[_name,_value,_defaultGlobal,_catagory,_code, _persistent],"variableDefined"] call FUNC(raiseScriptedEvent_f);
|
||||
|
@ -43,7 +43,7 @@ if (_unit getVariable ["ACE_isUnconscious", false] && {!_force}) exitWith {
|
||||
};
|
||||
|
||||
// don't go unconscious if the unit isn't unconscious
|
||||
if (_animation == "Unconscious" && {!(_unit getVariable ["ACE_isUnconscious", false])}) exitWith {};
|
||||
if (_animation == "Unconscious" && {!((_unit getVariable ["ACE_isUnconscious", false]) || (_unit getVariable ["ACE_isDead", false]))}) exitWith {};
|
||||
|
||||
// switchMove "" no longer works in dev 1.37
|
||||
if (_animation == "") then {
|
||||
|
@ -12,4 +12,4 @@
|
||||
|
||||
private ["_unit","_return"];
|
||||
_unit = _this select 0;
|
||||
(!([_unit] call FUNC(isUnconscious))) && alive _unit && !(_unit getvariable [QGVAR(isDead),false]);
|
||||
(!(_unit getvariable ["ACE_isUnconscious",false]) && alive _unit && !(_unit getvariable ["ACE_isDead",false]));
|
||||
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
*
|
||||
* Checks if a unit is a medic.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit to be checked (object)
|
||||
*
|
||||
* Return Value:
|
||||
* Bool: is unit medic?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit"];
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
_unit getVariable ["ACE_isMedic", (getNumber(configFile >> "CfgVehicles" >> typeOf _unit >> "attendant") == 1)]
|
@ -1,64 +0,0 @@
|
||||
/**
|
||||
* fn_raiseScriptedEvent_f.sqf
|
||||
* @Descr: Execute a custom defined eventhandler.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [arguments ANY, handle STRING (The name of the eventhandler)]
|
||||
* @Return: ARRAY Array containing the results of the called eventhandlers.
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_arguments","_handle","_ehCfg","_eventHandlerCollection","_eventHandlerName","_cfg","_code","_classType", "_return"];
|
||||
_arguments = _this select 0;
|
||||
_handle = _this select 1;
|
||||
|
||||
// TODO figure out how we want to handle custom eventhandlers
|
||||
|
||||
_eventHandlerName = (QGVAR(f_custom_eventhandlers_) + _handle);
|
||||
_eventHandlerCollection = missionNamespace getvariable _eventHandlerName;
|
||||
if (isnil "_eventHandlerCollection") then {
|
||||
_eventHandlerCollection = [];
|
||||
[format["caching Custom Eventhandler: %1",_handle]] call FUNC(debug);
|
||||
_cfg = (ConfigFile >> "ACE_Eventhandlers" >> "CustomEventHandlers" >> _handle);
|
||||
if (isClass _cfg) then {
|
||||
_numberOfEH = count _cfg;
|
||||
|
||||
for "_EHiterator" from 0 to (_numberOfEH -1) /* step +1 */ do {
|
||||
//for [{_EHiterator=0}, {(_EHiterator< _numberOfEH)}, {_EHiterator=_EHiterator+1}] do {
|
||||
_ehCfg = _cfg select _EHiterator;
|
||||
if (isClass _ehCfg) then {
|
||||
_classType = (ConfigName _ehCfg);
|
||||
_code = (compile getText(_ehCfg >> "onCall"));
|
||||
_eventHandlerCollection pushback [_classType, _code];
|
||||
true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_cfg = (MissionConfigFile >> "ACE_Eventhandlers" >> "CustomEventHandlers" >> _handle);
|
||||
if (isClass _cfg) then {
|
||||
_numberOfEH = count _cfg;
|
||||
for "_EHiterator" from 0 to (_numberOfEH -1) /* step +1 */ do {
|
||||
//for [{_EHiterator=0}, {(_EHiterator< _numberOfEH)}, {_EHiterator=_EHiterator+1}] do {
|
||||
_ehCfg = _cfg select _EHiterator;
|
||||
if (isClass _ehCfg) then {
|
||||
_classType = (ConfigName _ehCfg);
|
||||
_code = (compile getText(_ehCfg >> "onCall"));
|
||||
_eventHandlerCollection pushback [_classType, _code];
|
||||
true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
missionNamespace setvariable [_eventHandlerName, _eventHandlerCollection];
|
||||
[format["Custom Eventhandler: %1 cache: %2",_handle, _eventHandlerCollection]] call FUNC(debug);
|
||||
};
|
||||
|
||||
_return = [];
|
||||
{
|
||||
_return pushback (_arguments call (_x select 1));
|
||||
}foreach _eventHandlerCollection;
|
||||
|
||||
_return
|
@ -13,13 +13,15 @@
|
||||
private ["_unit","_oldUnit","_sets"];
|
||||
_unit = _this select 0;
|
||||
|
||||
_unit setvariable [QGVAR(isDead),nil,true];
|
||||
_unit setvariable ["ACE_isDead",nil,true];
|
||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||
|
||||
if (isPlayer _unit) then {
|
||||
[true] call FUNC(setVolume_f);
|
||||
[false] call FUNC(disableKeyInput_f);
|
||||
[false] call EFUNC(GUI,effectBlackOut);
|
||||
if (["ace_medical"] call FUNC(isModLoader_f)) then {
|
||||
[false] call EFUNC(medical,effectBlackOut);
|
||||
};
|
||||
|
||||
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
|
||||
// clear all disable user input
|
||||
@ -35,4 +37,3 @@ if (isPlayer _unit) then {
|
||||
};
|
||||
}foreach ([_unit] call FUNC(getAllDefinedSetVariables));
|
||||
|
||||
[[_unit],"resetToDefaults"] call FUNC(raiseScriptedEvent_f);
|
@ -42,4 +42,3 @@ if (_setArrest) then {
|
||||
};
|
||||
};
|
||||
|
||||
[[_unit, _setArrest],"setArrestState"] call FUNC(raiseScriptedEvent_f);
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Set all keys from the 'ACE_Default_Keys' base class that are missing in the current user profile.
|
||||
*
|
||||
* Argument:
|
||||
* 1: Overwrite existing key binds? (Bool)
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_overwrite", "_saveProfile", "_config", "_count", "_index", "_configFile", "_name", "_key", "_shft", "_ctrl", "_alt", "_keyCode", "_state"];
|
||||
|
||||
_overwrite = _this select 0;
|
||||
|
||||
_saveProfile = false;
|
||||
|
||||
_config = configFile >> "ACE_Default_Keys";
|
||||
_count = count _config;
|
||||
|
||||
for "_index" from 0 to (_count - 1) do {
|
||||
_configFile = _config select _index;
|
||||
_name = format ["ACE_Key_%1", configName _configFile];
|
||||
_key = profileNamespace getVariable _name;
|
||||
|
||||
if (isNil "_key" || {_overwrite}) then {
|
||||
_key = getNumber (_configFile >> "Key");
|
||||
_shft = getNumber (_configFile >> "Shift") == 1;
|
||||
_ctrl = getNumber (_configFile >> "Control") == 1;
|
||||
_alt = getNumber (_configFile >> "Alt") == 1;
|
||||
|
||||
_keyCode = [_key, _shft, _ctrl, _alt] call FUNC(convertKeyCode);
|
||||
|
||||
profileNamespace setVariable [_name, _keyCode];
|
||||
_saveProfile = true;
|
||||
};
|
||||
};
|
||||
|
||||
_config = configFile >> "ACE_Options";
|
||||
_count = count _config;
|
||||
|
||||
for "_index" from 0 to (_count - 1) do {
|
||||
_configFile = _config select _index;
|
||||
_name = format ["ACE_%1", configName _configFile];
|
||||
_state = profileNamespace getVariable _name;
|
||||
|
||||
if (isNil "_state" || {_overwrite}) then {
|
||||
_state = getNumber (_configFile >> "default") == 1;
|
||||
|
||||
profileNamespace setVariable [_name, _state];
|
||||
_saveProfile = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_overwrite) then {
|
||||
saveProfileNamespace;
|
||||
diag_log text "[ACE]: Profile settings overwritten.";
|
||||
} else {
|
||||
if (_saveProfile) then {
|
||||
saveProfileNamespace;
|
||||
diag_log text "[ACE]: Encountered missing variable in profile namespace. Profile saved.";
|
||||
} else {
|
||||
diag_log text "[ACE]: No missing variables encountered in profile namespace.";
|
||||
};
|
||||
};
|
@ -44,5 +44,3 @@ if (_setVolume) then {
|
||||
player setVariable ["acre_sys_core_isDisabled", true, true];
|
||||
|
||||
};
|
||||
|
||||
[[_setVolume],"setVolume"] call FUNC(raiseScriptedEvent_f);
|
@ -62,5 +62,3 @@ if (_switch) then {
|
||||
reverse _previousGroupsList; // we have to reverse again, to ensure the list is in the right order.
|
||||
_unit setvariable [QGVAR(previousGroupSwitchTo_F), _previousGroupsList, true];
|
||||
};
|
||||
|
||||
[[_unit, _switch, _id, _side],"switchToGroupSide"] call FUNC(raiseScriptedEvent_f);
|
@ -1,72 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
_config = configFile >> "ACE_Default_Keys";
|
||||
_count = count _config;
|
||||
|
||||
_header = format ["_keyCode = [_this select 1, _this select 2, _this select 3, _this select 4] call %1; _keyIndex = floor _keyCode; if (_keyIndex == 0) exitWith {false}; if (!(profileNamespace getVariable ['ACE_common_enableNumberHotkeys', true]) && {_keyIndex < 12} && {_keyIndex > 1} && {_keyCode mod 1 == 0}) exitWith {false}; _time = time; _player = ACE_player; _vehicle = vehicle _player; _isInput = false;", QUOTE(FUNC(convertKeyCode))];
|
||||
_headerUp = format ["_keyCode = _this select 1; _keyIndex = _keyCode; if (_keyIndex == 0) exitWith {false}; _time = time; _player = ACE_player; _vehicle = vehicle _player;"];
|
||||
|
||||
_handleDoubleTap = QUOTE(if (_time < (GVAR(keyTimes) select _keyIndex) + 0.5 && {_keyIndex == _keyCode}) then {_keyCode = _keyIndex + 0.8};);
|
||||
_handleHold = QUOTE(_allowHold = false; _disallowHold = false; if (GVAR(keyStates) select _keyIndex > 1) exitWith {false}; if (GVAR(keyStates) select _keyIndex > 0) then {_keyCode = _keyIndex + 0.9};);
|
||||
_handleHoldUp = QUOTE(if (GVAR(keyStates) select _keyIndex > 1) then {_keyCode = _keyIndex + 0.9};);
|
||||
|
||||
_debug = format ["if (!isNil 'ACE_Debug' && {'Keys' in ACE_Debug}) then {systemChat (str _keyCode + ' ' + str (%1 select _keyIndex))};", QGVAR(keyStates)];
|
||||
|
||||
_onKeyDown = "" + _debug;
|
||||
_onKeyUp = "" + _debug;
|
||||
|
||||
for "_index" from 0 to (_count - 1) do {
|
||||
_configFile = _config select _index;
|
||||
|
||||
_keyName = configName _configFile;
|
||||
_condition = getText (_configFile >> "condition");
|
||||
if (_condition == "") then {_condition = "true"};
|
||||
|
||||
_statement = getText (_configFile >> "statement");
|
||||
|
||||
_exceptions = getArray (_configFile >> "exceptions");
|
||||
_canInteract = format [QUOTE(%1 call GVAR(canInteract)), _exceptions];
|
||||
|
||||
_conditionName = format ["ACE_Key_%1_Condition", _keyName];
|
||||
_statementName = format ["ACE_Key_%1_Statement", _keyName];
|
||||
missionNamespace setVariable [_conditionName, compileFinal _condition];
|
||||
missionNamespace setVariable [_statementName, compileFinal _statement];
|
||||
|
||||
_handleHolding = ["_disallowHold = true;", "_allowHold = true;"] select (getNumber (_configFile >> "allowHolding") == 1);
|
||||
|
||||
if (_statement != "") then {
|
||||
_entry = format ["if (_keyCode == profileNamespace getVariable 'ACE_Key_%1' && {call %2}) then {if (%4) then {call %3};%5 _isInput = true;};", _keyName, _conditionName, _statementName, _canInteract, _handleHolding];
|
||||
_onKeyDown = _onKeyDown + _entry;
|
||||
};
|
||||
|
||||
_condition = getText (_configFile >> "conditionUp");
|
||||
if (_condition == "") then {_condition = "true"};
|
||||
|
||||
_statement = getText (_configFile >> "statementUp");
|
||||
|
||||
_conditionName = format ["ACE_Key_%1_ConditionUp", _keyName];
|
||||
_statementName = format ["ACE_Key_%1_StatementUp", _keyName];
|
||||
missionNamespace setVariable [_conditionName, compileFinal _condition];
|
||||
missionNamespace setVariable [_statementName, compileFinal _statement];
|
||||
|
||||
if (_statement != "") then {
|
||||
_entry = format ["if (_keyCode == floor (profileNamespace getVariable 'ACE_Key_%1') && {call %2}) then {call %3; _isInput = true;};", _keyName, _conditionName, _statementName];
|
||||
_onKeyUp = _onKeyUp + _entry;
|
||||
};
|
||||
};
|
||||
|
||||
_halt = format ["if (!(_allowHold) || {_disallowHold}) then {%1 set [_keyIndex, (%1 select _keyIndex) + 1]; %2 set [_keyIndex, _time];};", QGVAR(keyStates), QGVAR(keyTimes)];
|
||||
_haltUp = format ["%1 set [_keyIndex, 0];", QGVAR(keyStates)];
|
||||
|
||||
//_return = "_isInput";
|
||||
_return = "if (profileNamespace getVariable ['ACE_common_enableNumberHotkeys', true] && {_keyIndex < 12} && {_keyIndex > 1}) then {true} else {_isInput}";
|
||||
|
||||
_repeat = "if (!_isInput && {_keyCode mod 1 > 0.75} && {_keyCode mod 1 < 0.85}) exitWith {_keyCode = _keyIndex; " + _onKeyDown + _return + "};";
|
||||
_repeatUp = "if (!_isInput && {_keyCode mod 1 > 0.75} && {_keyCode mod 1 < 0.85}) exitWith {_keyCode = _keyIndex; " + _onKeyUp + "};";
|
||||
|
||||
_onKeyDown = _header + _handleDoubleTap + _handleHold + _onKeyDown + _halt + _repeat + _return;
|
||||
_onKeyUp = _headerUp + _onKeyUp + _haltUp + _repeatUp; //_headerUp + _handleHoldUp + _onKeyUp + _haltUp + _repeatUp;
|
||||
|
||||
GVAR(onKeyDown) = compileFinal _onKeyDown;
|
||||
GVAR(onKeyUp) = compileFinal _onKeyUp;
|
@ -1 +0,0 @@
|
||||
#include "\z\ace\addons\common\script_component.hpp"
|
@ -1,5 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
closeDialog 0;
|
||||
[localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
|
@ -1,115 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define GRAY [0.25, 0.25, 0.25, 1]
|
||||
#define WHITE [1, 1, 1, 1]
|
||||
#define OFFSET_1 100
|
||||
#define OFFSET_2 200
|
||||
|
||||
waitUntil {isNil QGVAR(keyNewTemp)};
|
||||
GVAR(keyNewTemp) = [];
|
||||
|
||||
GVAR(keySet) = 0;
|
||||
_index = count GVAR(keyNew);
|
||||
|
||||
disableSerialization;
|
||||
_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
|
||||
_ctrlMenuDialog = _dlgMenuDialog displayCtrl (OFFSET_2 + (_this select 0));
|
||||
_action = GVAR(keyNames) select (_this select 0);
|
||||
_displayName = getText (configFile >> QGVAR(Default_Keys) >> _action >> "displayName");
|
||||
|
||||
_keyCode = profileNamespace getVariable [format ["ACE_Key_%1", _action], 0];//
|
||||
for "_index1" from 0 to (count GVAR(keyNew) - 1) do {
|
||||
if (_action == (GVAR(keyNew) select _index1) select 0) then {
|
||||
_keyCode = (GVAR(keyNew) select _index1) select 1;
|
||||
}
|
||||
};
|
||||
(_dlgMenuDialog displayCtrl 24) ctrlSetText ([_keyCode] call FUNC(revertKeyCodeLocalized));//"";
|
||||
/*(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor GRAY;
|
||||
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
|
||||
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;*/
|
||||
|
||||
for "_index1" from 20 to 32 do {(_dlgMenuDialog displayCtrl _index1) ctrlShow true};
|
||||
for "_index1" from 10 to 13 do {(_dlgMenuDialog displayCtrl _index1) ctrlEnable false};
|
||||
|
||||
(_dlgMenuDialog displayCtrl 30) ctrlSetText _displayName;
|
||||
|
||||
GVAR(keysetDefault) = compile format [
|
||||
"_configFile = configFile >> 'ACE_Default_Keys' >> '%1';
|
||||
_key = getNumber (_configFile >> 'Key');
|
||||
_shft = getNumber (_configFile >> 'Shift') == 1;
|
||||
_ctrl = getNumber (_configFile >> 'Control') == 1;
|
||||
_alt = getNumber (_configFile >> 'Alt') == 1;
|
||||
|
||||
_keyCode = [_key, _shft, _ctrl, _alt] call %2;
|
||||
|
||||
%3 = [_key, [_shft, _ctrl, _alt], _keyCode];",
|
||||
_action,
|
||||
QFUNC(convertKeyCode),
|
||||
QGVAR(keyNewTemp)
|
||||
];
|
||||
|
||||
_description = ctrlText _ctrlMenuDialog;
|
||||
//_ctrlMenuDialog ctrlSetText "..";
|
||||
|
||||
_ehid_keydown = _dlgMenuDialog displayAddEventHandler ["KeyDown", QUOTE( _this call GVAR(keyInput) )];
|
||||
_ehid_keyup = _dlgMenuDialog displayAddEventHandler ["KeyUp", QUOTE( _this call GVAR(keyRelease) )];
|
||||
|
||||
waitUntil {
|
||||
if (count GVAR(keyNewTemp) > 0) then {
|
||||
_key = GVAR(keyNewTemp) select 0;
|
||||
_keyModifier = GVAR(keyNewTemp) select 1;
|
||||
//_keyCode = round (10 * ((GVAR(keyNewTemp) select 2) % 1));
|
||||
_keyCode = GVAR(keyNewTemp) select 2;
|
||||
|
||||
(_dlgMenuDialog displayCtrl 24) ctrlSetText ([_keyCode] call FUNC(revertKeyCodeLocalized));
|
||||
|
||||
/*_key = toString (toArray (keyName _key) - [34]);
|
||||
|
||||
switch (_keyCode) do {
|
||||
case 8 : {
|
||||
(_dlgMenuDialog displayCtrl 24) ctrlSetText format [localize QUOTE(DOUBLES(STR,GVAR(DoubleTapKey))), _key];
|
||||
|
||||
(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor GRAY;
|
||||
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
|
||||
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;
|
||||
};
|
||||
case 9 : {
|
||||
(_dlgMenuDialog displayCtrl 24) ctrlSetText format [localize QUOTE(DOUBLES(STR,GVAR(HoldKey))), _key];
|
||||
|
||||
(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor GRAY;
|
||||
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor GRAY;
|
||||
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor GRAY;
|
||||
};
|
||||
default {
|
||||
(_dlgMenuDialog displayCtrl 24) ctrlSetText _key;
|
||||
|
||||
(_dlgMenuDialog displayCtrl 21) ctrlSetTextColor ([GRAY, WHITE] select (_keyModifier select 0));
|
||||
(_dlgMenuDialog displayCtrl 22) ctrlSetTextColor ([GRAY, WHITE] select (_keyModifier select 1));
|
||||
(_dlgMenuDialog displayCtrl 23) ctrlSetTextColor ([GRAY, WHITE] select (_keyModifier select 2));
|
||||
};
|
||||
};*/
|
||||
};
|
||||
GVAR(keySet) != 0 ||
|
||||
{!dialog}
|
||||
};
|
||||
|
||||
for "_index1" from 10 to 13 do {(_dlgMenuDialog displayCtrl _index1) ctrlEnable true};
|
||||
for "_index1" from 20 to 32 do {(_dlgMenuDialog displayCtrl _index1) ctrlShow false};
|
||||
|
||||
_dlgMenuDialog displayRemoveEventHandler ["KeyDown", _ehid_keydown];
|
||||
_dlgMenuDialog displayRemoveEventHandler ["KeyUp", _ehid_keyup];
|
||||
|
||||
if (GVAR(keySet) == 1 && {count GVAR(keyNewTemp) > 0}) then {
|
||||
_keyCode = GVAR(keyNewTemp) select 2;
|
||||
_description = [_keyCode] call FUNC(revertKeyCodeLocalized);
|
||||
_ctrlMenuDialog ctrlSetText _description;
|
||||
|
||||
GVAR(keyNew) set [_index, [_action, _keyCode]];
|
||||
} else {
|
||||
_ctrlMenuDialog ctrlSetText _description;
|
||||
};
|
||||
|
||||
GVAR(keySet) = -1;
|
||||
GVAR(keyNewTemp) = nil;
|
||||
GVAR(keysetDefault) = nil;
|
@ -1,26 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define FORBIDDEN_KEYS [42, 54, 29, 157, 56, 184, 0, 183, 197, 1]
|
||||
|
||||
_key = _this select 1;
|
||||
_shft = _this select 2;
|
||||
_ctrl = _this select 3;
|
||||
_alt =_this select 4;
|
||||
|
||||
if (_key in FORBIDDEN_KEYS) exitWith {true};
|
||||
|
||||
_keyCode = [_key, _shft, _ctrl, _alt] call FUNC(convertKeyCode);
|
||||
|
||||
_keyIndex = floor _keyCode;
|
||||
_time = time;
|
||||
|
||||
if (_time < (GVAR(keyTimes) select _keyIndex) + 0.5 && {_keyIndex == _keyCode}) then {_keyCode = _keyIndex + 0.8};
|
||||
if (GVAR(keyStates) select _keyIndex > 1) exitWith {true};
|
||||
if (GVAR(keyStates) select _keyIndex > 0 && {_keyIndex == _keyCode}) then {_keyCode = _keyIndex + 0.9};
|
||||
|
||||
GVAR(keyStates) set [_keyIndex, (GVAR(keyStates) select _keyIndex) + 1];
|
||||
GVAR(keyTimes) set [_keyIndex, _time];
|
||||
|
||||
GVAR(keyNewTemp) = [_key, [_shft, _ctrl, _alt], _keyCode];
|
||||
true
|
@ -1,6 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
_keyIndex = _this select 1;
|
||||
|
||||
GVAR(keyStates) set [_keyIndex, 0];
|
@ -1,123 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define OFFSET_1 100
|
||||
#define OFFSET_2 200
|
||||
#define OFFSET_3 300
|
||||
#define OFFSET_4 400
|
||||
#define OFFSET_5 500
|
||||
|
||||
_config = configFile >> "ACE_Default_Keys";
|
||||
_count = count _config;
|
||||
|
||||
_countPages = ceil (_count / 20) + 1;
|
||||
|
||||
GVAR(MenuPage) = GVAR(MenuPage) + ([-1, 1] select _this);
|
||||
|
||||
if (GVAR(MenuPage) == - 1) then {GVAR(MenuPage) = _countPages - 1};
|
||||
if (GVAR(MenuPage) > _countPages - 1) then {GVAR(MenuPage) = 0};
|
||||
|
||||
disableSerialization;
|
||||
_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
|
||||
|
||||
(_dlgMenuDialog displayCtrl 14) ctrlSetText format ["%1/%2", GVAR(MenuPage) + 1, _countPages];
|
||||
|
||||
if (GVAR(MenuPage) == _countPages - 1) then {
|
||||
for "_index" from OFFSET_1 to (OFFSET_1 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
|
||||
for "_index" from OFFSET_2 to (OFFSET_2 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
|
||||
|
||||
_config = configFile >> "ACE_Options";
|
||||
_count = count _config;
|
||||
|
||||
_offset = 0;
|
||||
|
||||
for "_index" from 0 to (_count - 1 min 19) do {
|
||||
_configFile = _config select _index + _offset;
|
||||
_configName = configName _configFile;
|
||||
_displayName = getText (_configFile >> "displayName");
|
||||
_state = profileNamespace getVariable format ["ACE_%1", _configName];
|
||||
|
||||
_control1 = _dlgMenuDialog displayCtrl (OFFSET_3 + _index);
|
||||
_control2 = _dlgMenuDialog displayCtrl (OFFSET_4 + _index);
|
||||
_control3 = _dlgMenuDialog displayCtrl (OFFSET_5 + _index);
|
||||
|
||||
_control1 ctrlSetText format [QUOTE(PATHTOF(UI\box_%1checked_ca.paa)), ["un", ""] select _state];
|
||||
_control2 ctrlSetText _displayName;
|
||||
|
||||
_control1 ctrlShow true;
|
||||
_control2 ctrlShow true;
|
||||
_control3 ctrlShow true;
|
||||
|
||||
GVAR(OptionNames) set [_index, _configName];
|
||||
};
|
||||
|
||||
for "_index" from _count to (_count + 19) do {
|
||||
_control1 = _dlgMenuDialog displayCtrl (OFFSET_3 + _index);
|
||||
_control2 = _dlgMenuDialog displayCtrl (OFFSET_4 + _index);
|
||||
_control3 = _dlgMenuDialog displayCtrl (OFFSET_5 + _index);
|
||||
|
||||
_control1 ctrlShow false;
|
||||
_control2 ctrlShow false;
|
||||
_control3 ctrlShow false;
|
||||
};
|
||||
|
||||
} else {
|
||||
for "_index" from OFFSET_3 to (OFFSET_3 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
|
||||
for "_index" from OFFSET_4 to (OFFSET_4 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
|
||||
for "_index" from OFFSET_5 to (OFFSET_5 + 19) do {(_dlgMenuDialog displayCtrl _index) ctrlShow false};
|
||||
|
||||
_offset = 20 * GVAR(MenuPage);
|
||||
if (GVAR(MenuPage) == _countPages - 2) then {
|
||||
_count = (_count - 1) % 20 + 1;
|
||||
};
|
||||
|
||||
_updateNames = [];
|
||||
_updateKeys = [];
|
||||
{
|
||||
_keyName = _x select 0;
|
||||
_keyInput = _x select 1;
|
||||
|
||||
_index = _updateNames find _keyName;
|
||||
if (_index == -1) then {_index = count _updateKeys};
|
||||
|
||||
_updateNames set [_index, _keyName];
|
||||
_updateKeys set [_index, _keyInput];
|
||||
} forEach GVAR(keyNew);
|
||||
|
||||
for "_index" from 0 to (_count - 1 min 19) do {
|
||||
_configFile = _config select _index + _offset;
|
||||
_keyName = configName _configFile;
|
||||
_displayName = getText (_configFile >> "displayName");
|
||||
_isDisabled = getNumber (_configFile >> "disabled") == 1;
|
||||
|
||||
_indexUpdate = _updateNames find _keyName;
|
||||
_keyCode = if (_indexUpdate == -1) then {
|
||||
profileNamespace getVariable format ["ACE_Key_%1", _keyName];
|
||||
} else {
|
||||
_updateKeys select _indexUpdate;
|
||||
};
|
||||
|
||||
_description = [_keyCode] call FUNC(revertKeyCodeLocalized);
|
||||
|
||||
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
|
||||
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
|
||||
|
||||
_control1 ctrlSetText _displayName;
|
||||
_control2 ctrlSetText _description;
|
||||
|
||||
_control1 ctrlShow true;
|
||||
_control2 ctrlShow true;
|
||||
|
||||
GVAR(keyNames) set [_index, _keyName];
|
||||
};
|
||||
|
||||
for "_index" from _count to (_count + 19) do {
|
||||
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
|
||||
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
|
||||
|
||||
_control1 ctrlShow false;
|
||||
_control2 ctrlShow false;
|
||||
};
|
||||
|
||||
GVAR(keySet) = -1;
|
||||
};
|
@ -1,100 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define OFFSET_1 100
|
||||
#define OFFSET_2 200
|
||||
|
||||
closeDialog 0;
|
||||
createDialog QGVAR(OptionsMenu_Dialog);
|
||||
|
||||
GVAR(keyNew) = [];
|
||||
GVAR(keySet) = -1;
|
||||
GVAR(keySave) = 0;
|
||||
GVAR(keyNames) = [];
|
||||
GVAR(MenuPage) = 0;
|
||||
GVAR(OptionNames) = [];
|
||||
GVAR(OptionNamesNew) = [];
|
||||
GVAR(OptionStatesNew) = [];
|
||||
|
||||
disableSerialization;
|
||||
_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
|
||||
|
||||
_ehid_keydown = _dlgMenuDialog displayAddEventHandler ["KeyDown", "_this select 1 > 1"];
|
||||
_ehid_keyup = _dlgMenuDialog displayAddEventHandler ["KeyUp", "_this select 1 > 1"];
|
||||
|
||||
_config = configFile >> "ACE_Default_Keys";
|
||||
_count = count _config;
|
||||
|
||||
_countPages = ceil (_count / 20) + 1;
|
||||
(_dlgMenuDialog displayCtrl 14) ctrlSetText format ["%1/%2", GVAR(MenuPage) + 1, _countPages];
|
||||
|
||||
for "_index" from 0 to (_count - 1 min 19) do {
|
||||
_configFile = _config select _index;
|
||||
_keyName = configName _configFile;
|
||||
_displayName = getText (_configFile >> "displayName");
|
||||
_isDisabled = getNumber (_configFile >> "disabled") == 1;
|
||||
|
||||
_keyCode = profileNamespace getVariable format ["ACE_Key_%1", _keyName];
|
||||
_description = [_keyCode] call FUNC(revertKeyCodeLocalized);
|
||||
|
||||
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
|
||||
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
|
||||
|
||||
_control1 ctrlSetText _displayName;
|
||||
_control2 ctrlSetText _description;
|
||||
|
||||
_control1 ctrlShow true;
|
||||
_control2 ctrlShow true;
|
||||
|
||||
GVAR(keyNames) set [_index, _keyName];
|
||||
};
|
||||
|
||||
for "_index" from _count to 19 do {
|
||||
_control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index);
|
||||
_control2 = _dlgMenuDialog displayCtrl (OFFSET_2 + _index);
|
||||
|
||||
_control1 ctrlShow false;
|
||||
_control2 ctrlShow false;
|
||||
};
|
||||
|
||||
waitUntil {!dialog};
|
||||
|
||||
_dlgMenuDialog displayRemoveEventHandler ["KeyDown", _ehid_keydown];
|
||||
_dlgMenuDialog displayRemoveEventHandler ["KeyUp", _ehid_keyup];
|
||||
|
||||
if (GVAR(keySave) == 1) then {
|
||||
_count0 = count GVAR(keyNew);
|
||||
|
||||
for "_index" from 0 to (_count0 - 1) do {
|
||||
_key = GVAR(keyNew) select _index;
|
||||
_keyName = _key select 0;
|
||||
_keyCode = _key select 1;
|
||||
|
||||
profileNamespace setVariable [format ["ACE_Key_%1", _keyName], _keyCode];
|
||||
};
|
||||
|
||||
_count1 = count GVAR(OptionNamesNew);
|
||||
|
||||
for "_index" from 0 to (_count1 - 1) do {
|
||||
_name = GVAR(OptionNamesNew) select _index;
|
||||
_state = GVAR(OptionStatesNew) select _index;
|
||||
|
||||
profileNamespace setVariable [_name, _state];
|
||||
};
|
||||
|
||||
if (_count0 > 0 || {_count1 > 0}) then {
|
||||
saveProfileNamespace;
|
||||
[localize QUOTE(DOUBLES(STR,GVAR(ProfileSaved)))] call FUNC(displayTextStructured);
|
||||
} else {
|
||||
[localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
|
||||
};
|
||||
} else {
|
||||
[localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured);
|
||||
};
|
||||
|
||||
GVAR(keyNewTemp) = nil;
|
||||
GVAR(keyNames) = nil;
|
||||
GVAR(MenuPage) = nil;
|
||||
GVAR(OptionNames) = nil;
|
||||
GVAR(OptionNamesNew) = nil;
|
||||
GVAR(OptionStatesNew) = nil;
|
@ -1,18 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
_index = _this select 0;
|
||||
|
||||
_name = format ["ACE_%1", GVAR(OptionNames) select _index];
|
||||
|
||||
_index1 = GVAR(OptionNamesNew) find _name;
|
||||
_state = if (_index1 == -1) then {_index1 = count GVAR(OptionNamesNew); !(profileNamespace getVariable _name)} else {!(GVAR(OptionStatesNew) select _index1)};
|
||||
|
||||
disableSerialization;
|
||||
_dlgMenuDialog = uiNamespace getVariable QGVAR(MenuDialog);
|
||||
|
||||
_control = _dlgMenuDialog displayCtrl (300 + _index);
|
||||
_control ctrlSetText format [QUOTE(PATHTOF(UI\box_%1checked_ca.paa)), ["un", ""] select _state];
|
||||
|
||||
GVAR(OptionNamesNew) set [_index1, _name];
|
||||
GVAR(OptionStatesNew) set [_index1, _state];
|
@ -50,150 +50,6 @@
|
||||
<Hungarian>ACE Opciók</Hungarian>
|
||||
<Italian>Opzioni ACE</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Shift">
|
||||
<English>Shift</English>
|
||||
<German>Umschalt</German>
|
||||
<Spanish>Shift</Spanish>
|
||||
<Polish>Shift</Polish>
|
||||
<Czech>Shift</Czech>
|
||||
<French>Shift</French>
|
||||
<Russian>Shift</Russian>
|
||||
<Portuguese>Shift</Portuguese>
|
||||
<Hungarian>Shift</Hungarian>
|
||||
<Italian>Shift</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Ctrl">
|
||||
<English>Ctrl</English>
|
||||
<German>Strg</German>
|
||||
<Spanish>Ctrl</Spanish>
|
||||
<Polish>Ctrl</Polish>
|
||||
<Czech>Ctrl</Czech>
|
||||
<French>Ctrl</French>
|
||||
<Russian>Ctrl</Russian>
|
||||
<Portuguese>Ctrl</Portuguese>
|
||||
<Hungarian>Ctrl</Hungarian>
|
||||
<Italian>Ctrl</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Alt">
|
||||
<English>Alt</English>
|
||||
<German>Alt</German>
|
||||
<Spanish>Alt</Spanish>
|
||||
<Polish>Alt</Polish>
|
||||
<Czech>Alt</Czech>
|
||||
<French>Alt</French>
|
||||
<Russian>Alt</Russian>
|
||||
<Portuguese>Alt</Portuguese>
|
||||
<Hungarian>Alt</Hungarian>
|
||||
<Italian>Alt</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Shift_Right">
|
||||
<English>Shift right</English>
|
||||
<German>Umschalt rechts</German>
|
||||
<Spanish>Shift derecho</Spanish>
|
||||
<Polish>Prawy Shift</Polish>
|
||||
<Czech>Pravý Shift</Czech>
|
||||
<French>Shift Droite</French>
|
||||
<Russian>Правый Shift</Russian>
|
||||
<Portuguese>Shift da Direita</Portuguese>
|
||||
<Hungarian>Jobb Shift</Hungarian>
|
||||
<Italian>Shift destro</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Ctrl_Right">
|
||||
<English>Ctrl right</English>
|
||||
<German>Strg rechts</German>
|
||||
<Spanish>Ctrl derecho</Spanish>
|
||||
<Polish>Prawy Ctrl</Polish>
|
||||
<Czech>Pravý Ctrl</Czech>
|
||||
<French>Ctrl Droite</French>
|
||||
<Russian>Правый Ctrl</Russian>
|
||||
<Portuguese>Ctrl da Direita</Portuguese>
|
||||
<Hungarian>Jobb Ctrl</Hungarian>
|
||||
<Italian>Ctrl destro</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Alt_Right">
|
||||
<English>Alt right</English>
|
||||
<German>Alt Gr</German>
|
||||
<Spanish>Alt derecho</Spanish>
|
||||
<Polish>Prawy Alt</Polish>
|
||||
<Czech>Pravý Alt</Czech>
|
||||
<French>Alt Droite</French>
|
||||
<Russian>Правый Alt</Russian>
|
||||
<Portuguese>Alt da Direita</Portuguese>
|
||||
<Hungarian>Alt Gr</Hungarian>
|
||||
<Italian>Alt Gr</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_KeyDefault">
|
||||
<English>Default</English>
|
||||
<German>Standard</German>
|
||||
<Spanish>Por defecto</Spanish>
|
||||
<Polish>Domyślne</Polish>
|
||||
<Czech>Výchozí</Czech>
|
||||
<French>Défaut</French>
|
||||
<Russian>По умолчанию</Russian>
|
||||
<Portuguese>Padrão</Portuguese>
|
||||
<Hungarian>Alapértelmezett</Hungarian>
|
||||
<Italian>Standard</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_KeyNone">
|
||||
<English>None</English>
|
||||
<German>Keiner</German>
|
||||
<Spanish>Ninguna</Spanish>
|
||||
<Polish>Brak</Polish>
|
||||
<Czech>Žádný</Czech>
|
||||
<French>Aucun</French>
|
||||
<Russian>Не назначено</Russian>
|
||||
<Portuguese>Nenhuma</Portuguese>
|
||||
<Hungarian>Semmi</Hungarian>
|
||||
<Italian>Non assegnato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_DoubleTapKey">
|
||||
<English>2x %1</English>
|
||||
<German>2x %1</German>
|
||||
<Spanish>2x %1</Spanish>
|
||||
<Polish>2x %1</Polish>
|
||||
<Czech>2x %1</Czech>
|
||||
<French>2x %1</French>
|
||||
<Russian>2x %1</Russian>
|
||||
<Portuguese>2x %1</Portuguese>
|
||||
<Hungarian>2x %1</Hungarian>
|
||||
<Italian>2x %1</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_HoldKey">
|
||||
<English>Hold %1</English>
|
||||
<German>%1 halten</German>
|
||||
<Spanish>Mantener %1</Spanish>
|
||||
<Polish>Przytrzymać %1</Polish>
|
||||
<Czech>Držet %1</Czech>
|
||||
<French>Tenir %1</French>
|
||||
<Russian>Удерживая %1</Russian>
|
||||
<Portuguese>Segurar %1</Portuguese>
|
||||
<Hungarian>%1 Nyomvatartása</Hungarian>
|
||||
<Italian>Tieni premuto %1</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ProfileSaved">
|
||||
<English>Profile saved</English>
|
||||
<German>Profil gespeichert</German>
|
||||
<Spanish>Perfil guardado</Spanish>
|
||||
<Polish>Profil zapisany</Polish>
|
||||
<Czech>Profil uložen</Czech>
|
||||
<French>Profil sauvegardé</French>
|
||||
<Russian>Профиль сохранен</Russian>
|
||||
<Portuguese>Perfil salvo</Portuguese>
|
||||
<Hungarian>Profil elmentve</Hungarian>
|
||||
<Italian>Profilo salvato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ProfileNotSaved">
|
||||
<English>Profile not saved</English>
|
||||
<German>Profil nicht gespeichert</German>
|
||||
<Spanish>Perfil no guardado</Spanish>
|
||||
<Polish>Profil niezapisany</Polish>
|
||||
<Czech>Profil neuložen</Czech>
|
||||
<French>Profil non sauvegardé</French>
|
||||
<Russian>Профиль не сохранен</Russian>
|
||||
<Portuguese>Perfil não salvo</Portuguese>
|
||||
<Hungarian>A profil nincs elmentve</Hungarian>
|
||||
<Italian>Profilo non salvato</Italian>
|
||||
</Key>
|
||||
<!-- These are cardinal directions, in case you didn't guess. -->
|
||||
<Key ID="STR_ACE_Common_N">
|
||||
<English>N</English>
|
||||
@ -399,30 +255,6 @@
|
||||
<Hungarian>Művelet megszakítva.</Hungarian>
|
||||
<Italian>Azione cancellata.</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Prev">
|
||||
<English>< Prev</English>
|
||||
<German>< Zurück</German>
|
||||
<Spanish>< Anterior.</Spanish>
|
||||
<Polish>< Poprzedni</Polish>
|
||||
<Czech>< Předchozí</Czech>
|
||||
<French>< Préc</French>
|
||||
<Russian>< Пред.</Russian>
|
||||
<Portuguese>< Anterior</Portuguese>
|
||||
<Hungarian>< Előző</Hungarian>
|
||||
<Italian>< Prec</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_Next">
|
||||
<English>Next ></English>
|
||||
<German>Weiter ></German>
|
||||
<Spanish>Siguiente ></Spanish>
|
||||
<Polish>Następny ></Polish>
|
||||
<Czech>Další ></Czech>
|
||||
<French>Suivant ></French>
|
||||
<Russian>След. ></Russian>
|
||||
<Portuguese>Próximo ></Portuguese>
|
||||
<Hungarian>Következő ></Hungarian>
|
||||
<Italian>Prossimo ></Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_MiscItems">
|
||||
<English>[ACE] Miscellaneous Items</English>
|
||||
<German>[ACE] Verschiedenes</German>
|
||||
|
12
addons/difficulties/README.md
Normal file
12
addons/difficulties/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_difficulties
|
||||
================
|
||||
|
||||
Changes the elite difficulty setting to more closely resemble Arma 2.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
12
addons/disposable/README.md
Normal file
12
addons/disposable/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_disposable
|
||||
==============
|
||||
|
||||
Makes the NLAW a disposable one-way weapon.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
12
addons/explosives/README.md
Normal file
12
addons/explosives/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_explosives
|
||||
==============
|
||||
|
||||
Completely replaces the vanilla explosives system, allowing precise placement and different trigger types.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [CorruptedHeart](https://github.com/CorruptedHeart)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
12
addons/fcs/README.md
Normal file
12
addons/fcs/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_fcs
|
||||
=======
|
||||
|
||||
Adds a fire control system to armoured vehicles and helicoters, allowing the precise engagement of stationary and moving targets.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
12
addons/flashsuppressors/README.md
Normal file
12
addons/flashsuppressors/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_flashsuppressors
|
||||
====================
|
||||
|
||||
Allows the flash suppressors that are already in the game to be used.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
12
addons/frag/README.md
Normal file
12
addons/frag/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_frag
|
||||
========
|
||||
|
||||
Shrapnel system for explosives.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [NouberNou](https://github.com/NouberNou)
|
||||
- [walterpearce](https://github.com/walterpearce)
|
12
addons/gforces/README.md
Normal file
12
addons/gforces/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_gforces
|
||||
===========
|
||||
|
||||
Adds G-force induced tunnel vision and unconsciousness.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
12
addons/goggles/README.md
Normal file
12
addons/goggles/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_goggles
|
||||
===========
|
||||
|
||||
Adds various effects to different kinds of goggles and ambient effects like dirt thrown up by explosions.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [CorruptedHeart](https://github.com/CorruptedHeart)
|
@ -58,7 +58,7 @@ player addEventHandler ["Explosion", {
|
||||
if (GETBROKEN) exitWith {};
|
||||
if (((_this select 1) call FUNC(GetExplosionIndex)) < getNumber(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_Resistance")) exitWith {};
|
||||
if !(ace_player call FUNC(isGogglesVisible)) exitWith {["GlassesCracked",[ace_player]] call EFUNC(common,localEvent);};
|
||||
_effects = GETGLASSES(ace_player,GLASSESDEFAULT);
|
||||
_effects = GETGLASSES(ace_player);
|
||||
_effects set [BROKEN, true];
|
||||
SETGLASSES(ace_player,_effects);
|
||||
if (getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_OverlayCracked") != "" && {cameraOn == ace_player}) then {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
if (cameraOn != ace_player || {call FUNC(externalCamera)}) exitWith{false};
|
||||
private "_dirtImage";
|
||||
_effects = GETGLASSES(ace_player,GLASSESDEFAULT);
|
||||
_effects = GETGLASSES(ace_player);
|
||||
_effects set [DIRT, true];
|
||||
SETGLASSES(ace_player,_effects);
|
||||
|
||||
|
12
addons/grenades/README.md
Normal file
12
addons/grenades/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_grenades
|
||||
============
|
||||
|
||||
Introduces different throwing modes for grenades, as well as a flashbang and hand flares.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
11
addons/gui/README.md
Normal file
11
addons/gui/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
ace_gui
|
||||
=======
|
||||
|
||||
to be scrapped.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Glowbal](https://github.com/Glowbal)
|
@ -176,76 +176,4 @@ class RscTitles {
|
||||
};
|
||||
};
|
||||
|
||||
class GVAR(ScreenEffectsBlack) {
|
||||
duration = 10e10;
|
||||
idd = 1111;
|
||||
movingenable = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(ScreenEffectsBlack))), _this select 0)]);
|
||||
|
||||
class controlsBackground {
|
||||
class blackScreen: ACE_gui_backgroundBase {
|
||||
text = QUOTE(PATHTOF(data\black_out.paa));
|
||||
colorText[] = {0.0, 0.0, 0.0, 0.0};
|
||||
idc = 11112;
|
||||
x = safezoneX;
|
||||
y = safezoneY;
|
||||
w = safezoneW;
|
||||
h = safezoneH;
|
||||
};
|
||||
};
|
||||
};
|
||||
class GVAR(ScreenEffectsBleeding) {
|
||||
duration = 1;
|
||||
idd = 1111;
|
||||
movingenable = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(ScreenEffectsBleeding))), _this select 0)]);
|
||||
|
||||
class controlsBackground {
|
||||
class bleedingScreen: ACE_gui_backgroundBase {
|
||||
text = QUOTE(PATHTOF(data\bleeding.paa));
|
||||
colorText[] = {0.9, 0.2, 0.2, 0.6};
|
||||
idc = 11113;
|
||||
x = safezoneX;
|
||||
y = safezoneY;
|
||||
w = safezoneW;
|
||||
h = safezoneH;
|
||||
};
|
||||
};
|
||||
};
|
||||
class GVAR(ScreenEffectsHit) {
|
||||
duration = 1.1;
|
||||
idd = 1111;
|
||||
movingenable = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(ScreenEffectsHit))), _this select 0)]);
|
||||
|
||||
class controlsBackground {
|
||||
class effectHit: ACE_gui_backgroundBase {
|
||||
text = QUOTE(PATHTOF(data\hit.paa));
|
||||
colorText[] = {0.7, 0.2, 0.2, 0.4};
|
||||
idc = 11113;
|
||||
x = safezoneX;
|
||||
y = safezoneY;
|
||||
w = safezoneW;
|
||||
h = safezoneH;
|
||||
};
|
||||
};
|
||||
};
|
||||
class GVAR(ScreenEffectsPain) {
|
||||
duration = 1;
|
||||
idd = 1111;
|
||||
movingenable = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(ScreenEffectsPain))), _this select 0)]);
|
||||
|
||||
class controlsBackground {
|
||||
class painScreen: ACE_gui_backgroundBase {
|
||||
text = QUOTE(PATHTOF(data\painScreen.paa));
|
||||
colorText[] = {1, 1, 1, 0.5};
|
||||
idc = 11115;
|
||||
x = safezoneX;
|
||||
y = safezoneY;
|
||||
w = safezoneW;
|
||||
h = safezoneH;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -17,9 +17,6 @@ PREP(displayInformation);
|
||||
PREP(displayMessage);
|
||||
PREP(blurScreen);
|
||||
PREP(displayIcon);
|
||||
PREP(effectPain);
|
||||
PREP(effectBleeding);
|
||||
PREP(effectBlackOut);
|
||||
PREP(sendHintTo);
|
||||
PREP(sendMessageTo);
|
||||
PREP(sendDisplayInformationTo);
|
||||
|
13
addons/hearing/README.md
Normal file
13
addons/hearing/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
ace_hearing
|
||||
===========
|
||||
|
||||
Introduces combat deafness.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
13
addons/interaction/README.md
Normal file
13
addons/interaction/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
ace_interaction
|
||||
===============
|
||||
|
||||
Provides interaction options between units.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
@ -16,6 +16,78 @@ GVAR(isOpeningDoor) = false;
|
||||
|
||||
|
||||
// Add keybinds
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenu",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(isNull (findDisplay 1713999)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
call FUNC(onButtonDown);
|
||||
true
|
||||
},
|
||||
[219, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenu",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
|
||||
|
||||
// Statement
|
||||
if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)};
|
||||
true
|
||||
},
|
||||
[219, [false, false, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenuSelf",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming", "ACE_Common_notOnMap"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(isNull (findDisplay 1713999)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
call FUNC(onButtonDownSelf);
|
||||
true
|
||||
},
|
||||
[219, [false, true, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_InteractionMenuSelf",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
|
||||
|
||||
// Statement
|
||||
if (GVAR(MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};
|
||||
true
|
||||
},
|
||||
[219, [false, true, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
|
@ -18,33 +18,6 @@ class CfgPatches {
|
||||
|
||||
#include <Menu_Config.hpp>
|
||||
|
||||
class ACE_Default_Keys {
|
||||
class openInteractionMenuNew {
|
||||
displayName = "$STR_ACE_Interaction_InteractionMenu";
|
||||
condition = "true";
|
||||
statement = QUOTE(call FUNC(onButtonDown));
|
||||
conditionUp = QUOTE(!isNull (findDisplay 1713999) && {profileNamespace getVariable [ARR_2(QUOTE(QGVAR(AutoCloseMenu)), false)]});
|
||||
statementUp = QUOTE(if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)};);
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"};
|
||||
key = 219;
|
||||
shift = 0;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
class openInteractionMenuSelfNew {
|
||||
displayName = "$STR_ACE_Interaction_InteractionMenuSelf";
|
||||
condition = "true";
|
||||
statement = QUOTE(call FUNC(onButtonDownSelf));
|
||||
conditionUp = QUOTE(!isNull (findDisplay 1713999) && {profileNamespace getVariable [ARR_2(QUOTE(QGVAR(AutoCloseMenu)), false)]});
|
||||
statementUp = QUOTE(if (EGVAR(interaction,MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};);
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming", "ACE_Common_notOnMap"};
|
||||
key = 219;
|
||||
shift = 0;
|
||||
control = 1;
|
||||
alt = 0;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Options {
|
||||
class Interaction_FlowMenu {
|
||||
displayName = "$STR_ACE_Interaction_FlowMenu";
|
||||
|
@ -59,8 +59,8 @@ if (_this select 2) then {
|
||||
|
||||
(findDisplay 46) createDisplay QGVAR(Dialog);
|
||||
// Add eventhandlers
|
||||
(findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE(_this call EGVAR(common,onKeyDown))];
|
||||
(findDisplay 1713999) displayAddEventHandler ["KeyUp", QUOTE(_this call EGVAR(common,onKeyUp))];
|
||||
/*(findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE(_this call EGVAR(common,onKeyDown))];
|
||||
(findDisplay 1713999) displayAddEventHandler ["KeyUp", QUOTE(_this call EGVAR(common,onKeyUp))];*/
|
||||
|
||||
(findDisplay 1713999) displayAddEventHandler ["KeyDown", QUOTE(_this call FUNC(menuKeyInput))];
|
||||
};
|
||||
|
12
addons/inventory/README.md
Normal file
12
addons/inventory/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_inventory
|
||||
=============
|
||||
|
||||
Increases the size of the inventory dialog.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
12
addons/kestrel/README.md
Normal file
12
addons/kestrel/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_kestrel
|
||||
===========
|
||||
|
||||
Adds the Kestrel weather and wind meter.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
12
addons/laser/README.md
Normal file
12
addons/laser/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_laser
|
||||
=========
|
||||
|
||||
Contains various functions necessary for the realitic protrayal of laser mechanics in other components.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [walterpearce](https://github.com/walterpearce)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
12
addons/laser_selfdesignate/README.md
Normal file
12
addons/laser_selfdesignate/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_laser_selfdesignate
|
||||
=======================
|
||||
|
||||
Allows gunners to lase their own targets.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [walterpearce](https://github.com/walterpearce)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
12
addons/laserpointer/README.md
Normal file
12
addons/laserpointer/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_laserpointer
|
||||
================
|
||||
|
||||
Adds a laser pointer visible during the day.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
12
addons/lockbackpacks/README.md
Normal file
12
addons/lockbackpacks/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_lockbackpacks
|
||||
=================
|
||||
|
||||
Introduces the ability to lock one's backpack.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
12
addons/magazinerepack/README.md
Normal file
12
addons/magazinerepack/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_magazinerepack
|
||||
==================
|
||||
|
||||
Adds the ability to consolidate multiple half-empty magazines.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
12
addons/magazines/README.md
Normal file
12
addons/magazines/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
ace_magazines
|
||||
=============
|
||||
|
||||
Adds new types of ammunition, such as sub-sonic rounds.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
13
addons/main/README.md
Normal file
13
addons/main/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
ace_main
|
||||
========
|
||||
|
||||
Backbone of other components, defining most of the commonly used macros.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [walterpearce](https://github.com/walterpearce)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
13
addons/map/README.md
Normal file
13
addons/map/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
ace_map
|
||||
=======
|
||||
|
||||
Various tweaks to the in-game map.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
13
addons/markers/README.md
Normal file
13
addons/markers/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
ace_markers
|
||||
===========
|
||||
|
||||
Completely replaces the default marker system, allowing quicker and more precise placement of markers.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [commy2](https://github.com/commy2)
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
1
addons/medical/$PBOPREFIX$
Normal file
1
addons/medical/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\Addons\medical
|
35
addons/medical/CfgEventHandlers.hpp
Normal file
35
addons/medical/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
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));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class Extended_Killed_Eventhandlers {
|
||||
class CaManBase {
|
||||
class ADDON {
|
||||
Killed = QUOTE(_this call FUNC(eh_killed));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Local_Eventhandlers {
|
||||
class CaManBase {
|
||||
class ADDON {
|
||||
Local = QUOTE(_this call FUNC(eh_local));
|
||||
};
|
||||
};
|
||||
};
|
||||
class Extended_Init_Eventhandlers {
|
||||
class CaManBase {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call FUNC(onInitForUnit););
|
||||
};
|
||||
};
|
||||
};
|
7
addons/medical/CfgFactionClasses.hpp
Normal file
7
addons/medical/CfgFactionClasses.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
class CfgFactionClasses
|
||||
{
|
||||
class NO_CATEGORY;
|
||||
class ACE_medical: NO_CATEGORY {
|
||||
displayName = "ACE Medical";
|
||||
};
|
||||
};
|
38
addons/medical/CfgHints.hpp
Normal file
38
addons/medical/CfgHints.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
class CfgHints
|
||||
{
|
||||
class Combat_Space_Enhancement
|
||||
{
|
||||
displayName = "Combat Space Enhancement";
|
||||
class ACE_Module
|
||||
{
|
||||
displayName = "Combat Medical System";
|
||||
displayNameShort = "Combat Medical System";
|
||||
description = "Combat Medical System is an advanced medical system for players and AI.";
|
||||
tip = "";
|
||||
arguments[] = {};
|
||||
image = "";
|
||||
noImage = true;
|
||||
};
|
||||
class Assessment
|
||||
{
|
||||
displayName = "Patient Assessment";
|
||||
displayNameShort = "Patient Assessment";
|
||||
description = "It is essential when treating a casualty that you fully assess each of the areas of the casualty to determine not only the injuries but the priority of each in severity. <br> You cna assess a patient by clicking on the Assessment ICON <br> Use Check Pulse, check Blood Pressure and Check Response to get an overview.";
|
||||
tip = "Medics will get a faster and more accurate result when assessing patients.";
|
||||
arguments[] = {};
|
||||
image = "";
|
||||
noImage = true;
|
||||
};
|
||||
|
||||
class Bleeding
|
||||
{
|
||||
displayName = "Bandaging a wound";
|
||||
displayNameShort = "Bandaging a wound";
|
||||
description = "For casualties the first priority is to stop the bleeding. You will want to bandage the largest wounds first, before attending to the smaller ones. <br>You can apply a tourniquet on the limbs to stem the bleeding faster, but remember to remove it!";
|
||||
tip = "Select a wound in the injury list to bandage that one first!";
|
||||
arguments[] = {};
|
||||
image = "";
|
||||
noImage = true;
|
||||
};
|
||||
};
|
||||
};
|
45
addons/medical/CfgSounds.hpp
Normal file
45
addons/medical/CfgSounds.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
class CfgSounds
|
||||
{
|
||||
class GVAR(heartbeat_fast_1)
|
||||
{
|
||||
name = QGVAR(heartbeat_fast_1);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_1.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
class GVAR(heartbeat_fast_2)
|
||||
{
|
||||
name = QGVAR(heartbeat_fast_2);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_2.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
class GVAR(heartbeat_fast_3)
|
||||
{
|
||||
name = QGVAR(heartbeat_fast_3);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_3.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
class GVAR(heartbeat_norm_1)
|
||||
{
|
||||
name = QGVAR(heartbeat_norm_1);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_1.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
class GVAR(heartbeat_norm_2)
|
||||
{
|
||||
name = QGVAR(heartbeat_norm_2);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_2.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
class GVAR(heartbeat_slow_1)
|
||||
{
|
||||
name = QGVAR(heartbeat_slow_1);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_1.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
class GVAR(heartbeat_slow_2)
|
||||
{
|
||||
name = QGVAR(heartbeat_slow_2);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_2.wav)),"db-1",1};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
1039
addons/medical/CfgVehicles.hpp
Normal file
1039
addons/medical/CfgVehicles.hpp
Normal file
File diff suppressed because it is too large
Load Diff
317
addons/medical/CfgWeapons.hpp
Normal file
317
addons/medical/CfgWeapons.hpp
Normal file
@ -0,0 +1,317 @@
|
||||
class CfgWeapons {
|
||||
class ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
class ACE_bandage_basic: ItemCore
|
||||
{
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_BANDAGE_BASIC_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\field_dressing.paa));
|
||||
model = QUOTE(PATHTOF(equipment\bandages\fielddressing.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_BANDAGE_BASIC_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_BANDAGE_BASIC_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=0.5;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_packing_bandage: ItemCore
|
||||
{
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_PACKING_BANDAGE_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\packing_bandage.paa));
|
||||
model = QUOTE(PATHTOF(equipment\bandages\packingbandage.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_PACKING_BANDAGE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_PACKING_BANDAGE_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_bandageElastic: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_BANDAGE_ELASTIC_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\bandageElastic.paa));
|
||||
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
|
||||
descriptionShort = $STR_ACE_MAG_BANDAGE_ELASTIC_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_BANDAGE_ELASTIC_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_tourniquet: ItemCore
|
||||
{
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_TOURNIQUET_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\tourniquet.paa));
|
||||
model = QUOTE(PATHTOF(equipment\Tourniquet.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_TOURNIQUET_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_TOURNIQUET_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_splint: ItemCore
|
||||
{
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_SPLINT_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\splint.paa));
|
||||
descriptionUse = $STR_ACE_MAG_SPLINT_DESC_USE;
|
||||
descriptionShort = $STR_ACE_MAG_SPLINT_DESC_SHORT;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_morphine: ItemCore
|
||||
{
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_MORPHINE_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\morphine.paa));
|
||||
model = QUOTE(PATHTOF(equipment\Morphinpen.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_MORPHINE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_MORPHINE_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_atropine: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_ATROPINE_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\atropine.paa));
|
||||
model = QUOTE(PATHTOF(equipment\Atropin-pen.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_ATROPINE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_ATROPINE_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_epinephrine: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_EPINEPHRINE_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\epinephrine.paa));
|
||||
model = QUOTE(PATHTOF(equipment\Epipen.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_EPINEPHRINE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_EPINEPHRINE_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_plasma_iv: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
displayName = $STR_ACE_MAG_PLASMA_IV;
|
||||
picture = QUOTE(PATHTOF(equipment\img\plasma_iv.paa));
|
||||
descriptionShort = $STR_ACE_MAG_PLASMA_IV_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_PLASMA_IV_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_plasma_iv_500: ACE_plasma_iv {
|
||||
displayName = $STR_ACE_MAG_PLASMA_IV_500;
|
||||
};
|
||||
class ACE_plasma_iv_250: ACE_plasma_iv_500 {
|
||||
displayName = $STR_ACE_MAG_PLASMA_IV_250;
|
||||
};
|
||||
class ACE_blood_iv: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
|
||||
displayName = $STR_ACE_MAG_BLOOD_IV;
|
||||
picture = QUOTE(PATHTOF(equipment\img\bloodbag.paa));
|
||||
descriptionShort = $STR_ACE_MAG_BLOOD_IV_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_BLOOD_IV_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_blood_iv_500: ACE_blood_iv {
|
||||
displayName = $STR_ACE_MAG_BLOOD_IV_500;
|
||||
};
|
||||
class ACE_blood_iv_250: ACE_blood_iv_500 {
|
||||
displayName = $STR_ACE_MAG_BLOOD_IV_250;
|
||||
};
|
||||
class ACE_saline_iv: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
displayName = $STR_ACE_MAG_SALINE_IV;
|
||||
picture = QUOTE(PATHTOF(equipment\img\saline_iv.paa));
|
||||
descriptionShort = $STR_ACE_MAG_SALINE_IV_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_SALINE_IV_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_saline_iv_500: ACE_saline_iv {
|
||||
displayName = $STR_ACE_MAG_SALINE_IV_500;
|
||||
};
|
||||
class ACE_saline_iv_250: ACE_saline_iv_500 {
|
||||
displayName = $STR_ACE_MAG_SALINE_IV_250;
|
||||
};
|
||||
class ACE_quikclot: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_QUIKCLOT_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\quickclot.paa));
|
||||
descriptionShort = $STR_ACE_MAG_QUIKCLOT_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_QUIKCLOT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_nasopharyngeal_tube: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_NPA_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\nasopharyngeal_tube.paa));
|
||||
descriptionUse = $STR_ACE_MAG_NPA_DESC_USE;
|
||||
descriptionShort = $STR_ACE_MAG_NPA_DESC_SHORT;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_opa: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_OPA_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\nasopharyngeal_tube.paa));
|
||||
descriptionShort = $STR_ACE_MAG_OPA_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_OPA_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_liquidSkin: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_LIQUID_SKIN_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\liquidSkin.paa));
|
||||
model = QUOTE(PATHTOF(equipment\skinliquid.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_LIQUID_SKIN_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_LIQUID_SKIN_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_chestseal: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_CHEST_SEAL_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\chestseal.paa));
|
||||
descriptionShort = $STR_ACE_MAG_CHEST_SEAL_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_CHEST_SEAL_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=1;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_personal_aid_kit: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MAG_AID_KIT_DISPLAY;
|
||||
picture = QUOTE(PATHTOF(equipment\img\personal_aid_kit.paa));
|
||||
model = QUOTE(PATHTOF(equipment\Personal-aidkits\MTP.p3d));
|
||||
descriptionShort = $STR_ACE_MAG_AID_KIT_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_AID_KIT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass=2;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_surgical_kit: ItemCore
|
||||
{
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MAG_SURGICALKIT_DISPLAY;
|
||||
model = QUOTE(PATHTOF(equipment\surgical_kit.p3d));
|
||||
picture = QUOTE(PATHTOF(equipment\img\surgical_kit.paa));
|
||||
descriptionShort = $STR_ACE_MAG_SURGICALKIT_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_SURGICALKIT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass= 5;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class ACE_itemBodyBag: ItemCore
|
||||
{
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MAG_BODYBAG_DISPLAY;
|
||||
model = QUOTE(PATHTOF(equipment\bodybagItem.p3d));
|
||||
picture = QUOTE(PATHTOF(equipment\img\bodybag.paa));
|
||||
descriptionShort = $STR_ACE_MAG_BODYBAG_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MAG_BODYBAG_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F
|
||||
{
|
||||
mass= 15;
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
};
|
10
addons/medical/README.md
Normal file
10
addons/medical/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
ace_medical
|
||||
===============
|
||||
|
||||
Provides a basic and advanced medical system.
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Glowbal](https://github.com/Glowbal)
|
245
addons/medical/XEH_postInit.sqf
Normal file
245
addons/medical/XEH_postInit.sqf
Normal file
@ -0,0 +1,245 @@
|
||||
/**
|
||||
* XEH_postInit.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
#include "variable_defines.sqf"
|
||||
|
||||
GVAR(injuredUnitCollection) = [];
|
||||
[{
|
||||
{
|
||||
if (!alive _x || !local _x) then {
|
||||
GVAR(injuredUnitCollection) set [ _forEachIndex, ObjNull];
|
||||
} else {
|
||||
[_x] call FUNC(handleUnitVitals);
|
||||
|
||||
private "_pain";
|
||||
_pain = _X getvariable [QGVAR(amountOfPain), 0];
|
||||
if (_pain > 5 && (random(1) > 0.5)) then {
|
||||
_x setvariable [QGVAR(amountOfPain), _pain + 0.002];
|
||||
};
|
||||
if (_pain > 45) then {
|
||||
if (random(1) > 0.6) then {
|
||||
[_X] call FUNC(setUnconsciousState);
|
||||
};
|
||||
//[_X] call FUNC(playInjuredSound);
|
||||
};
|
||||
};
|
||||
}foreach GVAR(injuredUnitCollection);
|
||||
GVAR(injuredUnitCollection) = GVAR(injuredUnitCollection) - [ObjNull];
|
||||
}, 1, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[
|
||||
{(([_this select 0,QGVAR(bloodVolume)] call EFUNC(common,getDefinedVariable)) < 65)},
|
||||
{(([_this select 0,QGVAR(amountOfPain)] call EFUNC(common,getDefinedVariable)) > 48)},
|
||||
{(((_this select 0) call FUNC(getBloodLoss)) > 0.25)},
|
||||
{((_this select 0) getvariable ["ACE_inReviveState", false])}
|
||||
] call FUNC(registerUnconsciousCondition);
|
||||
|
||||
call FUNC(handleDisplayEffects);
|
||||
|
||||
// Assigning all eventhandlers
|
||||
["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
|
||||
["onStartMovingUnit", FUNC(onStartMovingUnit)] call ace_common_fnc_addEventHandler;
|
||||
["onUnconscious", FUNC(onUnconscious)] call ace_common_fnc_addEventHandler;
|
||||
["carryObjectDropped", FUNC(onCarryObjectDropped)] call ace_common_fnc_addEventHandler;
|
||||
|
||||
if (isNil QGVAR(ENABLE_REVIVE_F)) then {
|
||||
GVAR(ENABLE_REVIVE_F) = 0;
|
||||
};
|
||||
|
||||
|
||||
// Keybindings
|
||||
GVAR(keyPressed) = false;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_OPEN_CMS_MENU_DESC",
|
||||
{ if (!GVAR(keyPressed)) then {
|
||||
GVAR(keyPressed) = true;
|
||||
GVAR(timeMenuOpened) = time;
|
||||
[] call FUNC(openMenu);
|
||||
|
||||
true;
|
||||
} else {
|
||||
false;
|
||||
};
|
||||
},
|
||||
[ 0, [false, false, false]],
|
||||
false,
|
||||
"keydown"] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_OPEN_CMS_MENU_DESC",
|
||||
{
|
||||
GVAR(keyPressed) = false;
|
||||
if (time - GVAR(timeMenuOpened) >= (0.25*accTime)) then {
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
||||
if (!isnil "_display") then {
|
||||
closeDialog 314412;
|
||||
};
|
||||
};
|
||||
false;
|
||||
},
|
||||
[ 0, [false, false, false]],
|
||||
false,
|
||||
"keyUp"] call cba_fnc_registerKeybind;
|
||||
|
||||
|
||||
// Adding the treatment options for all available medical equipment.
|
||||
|
||||
// Advanced Treatment options
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_1000ml","STR_ACE_ACTION_BLOODIV_1000ML_TOOLTIP",'ACE_blood_iv');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_500ml","STR_ACE_ACTION_BLOODIV_500ML_TOOLTIP",'ACE_blood_iv_500');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_250ml","STR_ACE_ACTION_BLOODIV_250ML_TOOLTIP",'ACE_blood_iv_250');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_1000ml","STR_ACE_ACTION_PLASMAIV_1000ML_TOOLTIP",'ACE_plasma_iv');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_500ml","STR_ACE_ACTION_PLASMAIV_500ML_TOOLTIP",'ACE_plasma_iv_500');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_250ml","STR_ACE_ACTION_PLASMAIV_250ML_TOOLTIP",'ACE_plasma_iv_250');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_1000ml","STR_ACE_ACTION_SALINEIV_1000ML_TOOLTIP",'ACE_saline_iv');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_500ml","STR_ACE_ACTION_SALINEIV_500ML_TOOLTIP",'ACE_saline_iv_500');
|
||||
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_250ml","STR_ACE_ACTION_SALINEIV_250ML_TOOLTIP",'ACE_saline_iv_250');
|
||||
|
||||
["STR_ACE_ACTION_PERSONAL_AID_KIT","STR_ACE_ACTION_PERSONAL_AID_KIT_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
if !([_this select 0,_this select 1, 'ACE_personal_aid_kit'] call FUNC(hasEquipment)) exitwith {
|
||||
false;
|
||||
};
|
||||
_inMedFacility = ([_caller] call FUNC(inMedicalFacility));
|
||||
_hasOpenWounds = ([_target] call FUNC(hasOpenWounds));
|
||||
|
||||
if ((GVAR(setting_aidKitRestrictions) == 0 && _inMedFacility) ||
|
||||
(GVAR(setting_aidKitRestrictions) == 1 && _inMedFacility && (!_hasOpenWounds)) ||
|
||||
(GVAR(setting_aidKitRestrictions) == 2) ||
|
||||
(GVAR(setting_aidKitRestrictions) == 3 && (!_hasOpenWounds))) exitwith {
|
||||
|
||||
((GVAR(setting_aidKitMedicsOnly) && [_caller] call FUNC(isMedic) || !GVAR(setting_aidKitMedicsOnly)));
|
||||
};
|
||||
false;
|
||||
},TREATMENT_ADVANCED('ACE_personal_aid_kit'),'advanced'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_PERFORM_CPR","STR_ACE_ACTION_PERFORM_CPR_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
(!(_caller getvariable[QGVAR(isProvidingCPR), false]) && ((_target getvariable [QGVAR(inCardiacArrest),false]) || !([_target] call EFUNC(common,isAwake))))
|
||||
},TREATMENT_ADVANCED('ACE_CPR'),'advanced'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_STOP_CPR","STR_ACE_ACTION_STOP_CPR_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
(_caller getvariable[QGVAR(isProvidingCPR), false])
|
||||
},{((_this select 0) setvariable[QGVAR(isProvidingCPR), nil, true])},'advanced'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_STITCHING","STR_ACE_ACTION_STITCHING_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
((GVAR(setting_allowStitching) == 0 && [_Caller] call FUNC(isMedic)) || GVAR(setting_allowStitching) == 1)
|
||||
},TREATMENT_ADVANCED('ACE_surgical_kit'),'advanced'] call FUNC(addTreatmentOption);
|
||||
|
||||
// Airway Management
|
||||
["STR_ACE_ACTION_APPLY_NPA","STR_ACE_ACTION_APPLY_NPA_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
if !([_this select 0,_this select 1, 'ACE_nasopharyngeal_tube'] call FUNC(hasEquipment)) exitwith {
|
||||
false;
|
||||
};
|
||||
(!([_target, QGVAR(airwayTreated)] call EFUNC(common,getDefinedVariable)) && !([_target] call EFUNC(common,isAwake)))
|
||||
},TREATMENT_AIRWAY('ACE_nasopharyngeal_tube'),'advanced'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_REMOVE_NPA","STR_ACE_ACTION_REMOVE_NPA_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
([_target, QGVAR(airwayTreated)] call EFUNC(common,getDefinedVariable));
|
||||
}, {GVAR(INTERACTION_TARGET) setvariable [QGVAR(airwayTreated), nil, true]; (_this select 0) addItem 'ACE_nasopharyngeal_tube';},'airway'] call FUNC(addTreatmentOption);
|
||||
|
||||
|
||||
// Bandaging
|
||||
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_BANDAGE_BASIC","STR_ACE_ACTION_BANDAGE_BASIC_TOOLTIP",'ACE_bandage_basic');
|
||||
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_QUIKCLOT","STR_ACE_ACTION_QUIKCLOT_TOOLTIP",'ACE_quikclot');
|
||||
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_BANDAGE_ELASTIC","STR_ACE_ACTION_BANDAGE_ELASTIC_TOOLTIP",'ACE_bandageElastic');
|
||||
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_PACKING_BANDAGE","STR_ACE_ACTION_PACKING_BANDAGE_TOOLTIP",'ACE_packing_bandage');
|
||||
|
||||
["STR_ACE_ACTION_REMOVE_TOURNIQUET","STR_ACE_ACTION_REMOVE_TOURNIQUET_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
([_target, call FUNC(getSelectedBodyPart)] call FUNC(hasTourniquetAppliedTo));
|
||||
},{[_this select 0,_this select 1,call FUNC(getSelectedBodyPart)] call FUNC(actionRemoveTourniquet)},'bandage'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_APPLY_TOURNIQUET","STR_ACE_ACTION_APPLY_TOURNIQUET_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
(!([_target, call FUNC(getSelectedBodyPart)] call FUNC(hasTourniquetAppliedTo)) && ([_caller,_target,'ACE_tourniquet'] call FUNC(hasEquipment)));
|
||||
},TREATMENT_BANDAGE('ACE_tourniquet'),'bandage'] call FUNC(addTreatmentOption);
|
||||
|
||||
|
||||
// Medication
|
||||
ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_MORPHINE","STR_ACE_ACTION_MORPHINE_TOOLTIP",'ACE_morphine');
|
||||
ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_ATROPINE","STR_ACE_ACTION_ATROPINE_TOOLTIP",'ACE_atropine');
|
||||
ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_EPINEPHRINE","STR_ACE_ACTION_EPINEPHRINE_TOOLTIP",'ACE_epinephrine');
|
||||
|
||||
|
||||
// Examine
|
||||
["STR_ACE_ACTION_CHECK_PULSE","STR_ACE_ACTION_CHECK_PULSE_TOOLTIP",{
|
||||
true;
|
||||
},{[_this select 0,_this select 1] call FUNC(actionCheckPulse)},'examine'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_CHECK_BP","STR_ACE_ACTION_CHECK_BP_TOOLTIP",{
|
||||
true;
|
||||
},{[_this select 0,_this select 1] call FUNC(actionCheckBloodPressure);},'examine'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_CHECK_RESPONSE","STR_ACE_ACTION_CHECK_RESPONSE_TOOLTIP",{
|
||||
true;
|
||||
},{[_this select 0,_this select 1] call FUNC(actionCheckResponse)},'examine'] call FUNC(addTreatmentOption);
|
||||
|
||||
|
||||
// Drag/Movement
|
||||
["STR_ACE_ACTION_DRAG_PATIENT","STR_ACE_ACTION_DRAG_PATIENT_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
(isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (_caller != _target) && (vehicle _target == _target));
|
||||
}, {[_this select 0,_this select 1] call FUNC(actionDragUnit)},'drag'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_CARRY_PATIENT","STR_ACE_ACTION_CARRY_PATIENT_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
(isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (_caller != _target) && (vehicle _target == _target));
|
||||
}, {[_this select 0,_this select 1] call FUNC(actionCarryUnit)},'drag'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_BODYBAG","STR_ACE_ACTION_BODYBAG_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
(isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (_caller != _target) && (vehicle _target == _target) && ([_caller, _target] call FUNC(canPutInBodyBag)));
|
||||
}, {[_this select 0,_this select 1] call FUNC(actionPlaceInBodyBag)},'drag'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_DROP_PATIENT","STR_ACE_ACTION_DROP_PATIENT_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
(!(isNull ([_caller] call EFUNC(common,getCarriedObj))) && ([_caller] call FUNC(isMovingUnit)));
|
||||
}, {[_this select 0,_this select 1] call FUNC(actionDropUnit)},'drag'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_LOAD_PATIENT","STR_ACE_ACTION_LOAD_PATIENT_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
((vehicle _target == _target));
|
||||
}, {[_this select 0,_this select 1] call FUNC(actionLoadUnit)},'drag'] call FUNC(addTreatmentOption);
|
||||
|
||||
["STR_ACE_ACTION_UNLOAD_PATIENT","STR_ACE_ACTION_UNLOAD_PATIENT_TOOLTIP",{
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
((vehicle _target != _target));
|
||||
}, {[_this select 0,_this select 1] call FUNC(actionUnloadUnit)},'drag'] call FUNC(addTreatmentOption);
|
169
addons/medical/XEH_preInit.sqf
Normal file
169
addons/medical/XEH_preInit.sqf
Normal file
@ -0,0 +1,169 @@
|
||||
/**
|
||||
* XEH_preInit);
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(actionCarryUnit);
|
||||
PREP(ActioncheckBloodPressure);
|
||||
PREP(ActionCheckBloodPressureLocal);
|
||||
PREP(ActionCheckPulse);
|
||||
PREP(actionCheckPulseLocal);
|
||||
PREP(actionCheckResponse);
|
||||
PREP(actionDragUnit);
|
||||
PREP(actionDropUnit);
|
||||
PREP(actionLoadUnit);
|
||||
PREP(actionPlaceInBodyBag);
|
||||
PREP(actionRemoveTourniquet);
|
||||
PREP(actionUnloadUnit);
|
||||
|
||||
PREP(addActivityToLog);
|
||||
PREP(addHeartRateAdjustment);
|
||||
PREP(addOpenWounds);
|
||||
PREP(addToInjuredCollection);
|
||||
PREP(addToQuickViewLog);
|
||||
PREP(addToTriageList);
|
||||
PREP(addTreatmentOption);
|
||||
|
||||
PREP(canAccessMedicalEquipment);
|
||||
PREP(canPutInBodyBag);
|
||||
PREP(determineIfFatal);
|
||||
PREP(determineIfUnconscious);
|
||||
PREP(fromNumberToBodyPart);
|
||||
|
||||
PREP(effectPain);
|
||||
PREP(effectBleeding);
|
||||
PREP(effectBlackOut);
|
||||
|
||||
PREP(getActivityLog);
|
||||
PREP(getBloodLoss);
|
||||
PREP(getBloodPressure);
|
||||
PREP(getBloodVolumeChange);
|
||||
PREP(getBodyPartNumber);
|
||||
PREP(getCardiacOutput);
|
||||
PREP(getCurrentSelectedInjuryData);
|
||||
PREP(getHeartRateChange);
|
||||
PREP(getNewDamageBodyPart);
|
||||
PREP(getQuickViewLog);
|
||||
PREP(getSelectedBodyPart);
|
||||
PREP(getTreatmentOptions);
|
||||
PREP(getTriageList);
|
||||
PREP(getTriageStatus);
|
||||
PREP(getTypeOfDamage);
|
||||
|
||||
// Handling events & actions
|
||||
PREP(handleBandageOpening);
|
||||
PREP(handleDamage);
|
||||
PREP(handleDisplayEffects);
|
||||
PREP(handleHeal);
|
||||
PREP(handleReactionHit);
|
||||
PREP(handleTreatment);
|
||||
PREP(handleTreatment_Action_AdvancedLocal);
|
||||
PREP(handleTreatment_Action_AirwayLocal);
|
||||
PREP(handleTreatment_Action_BandageLocal);
|
||||
PREP(handleTreatment_Action_CPR);
|
||||
PREP(handleTreatment_Action_CPRLocal);
|
||||
PREP(handleTreatment_Action_fullHeal);
|
||||
PREP(handleTreatment_Action_fullHealLocal);
|
||||
PREP(handleTreatment_Action_MedicationLocal);
|
||||
PREP(handleTreatment_Action_Stitching);
|
||||
PREP(handleTreatment_Action_tourniquet);
|
||||
PREP(handleTreatment_Action_tourniquetLocal);
|
||||
PREP(handleTreatment_Category_Advanced);
|
||||
PREP(handleTreatment_Category_Airway);
|
||||
PREP(handleTreatment_Category_Bandaging);
|
||||
PREP(handleTreatment_Category_Medication);
|
||||
PREP(handleUI_DisplayOptions);
|
||||
PREP(handleUI_dropDownTriageCard);
|
||||
PREP(handleUnitVitals);
|
||||
PREP(handleDropUnit);
|
||||
|
||||
PREP(hasEquipment);
|
||||
PREP(hasMedicalEnabled);
|
||||
PREP(hasOpenWounds);
|
||||
PREP(hasTourniquetAppliedTo);
|
||||
|
||||
PREP(increasePain);
|
||||
PREP(initalizeModuleCMS);
|
||||
PREP(inMedicalFacility);
|
||||
PREP(isMedic);
|
||||
PREP(isMedicalVehicle);
|
||||
PREP(isSetTreatmentMutex);
|
||||
PREP(isMovingUnit);
|
||||
|
||||
PREP(moduleAssignMedicalEquipment);
|
||||
PREP(moduleAssignMedicalFacility);
|
||||
PREP(moduleAssignMedicalVehicle);
|
||||
PREP(moduleAssignMedicRoles);
|
||||
PREP(moduleDamageSettings);
|
||||
|
||||
PREP(onInitForUnit);
|
||||
PREP(onInjury_assignAirwayStatus);
|
||||
PREP(onInjury_assignFractures);
|
||||
PREP(onInjury_assignOpenWounds);
|
||||
PREP(onKilled);
|
||||
PREP(onLocal);
|
||||
PREP(onMenuOpen);
|
||||
PREP(onTreatmentCompleted);
|
||||
PREP(onUnconscious);
|
||||
PREP(onStartMovingUnit);
|
||||
PREP(onCarryObjectDropped);
|
||||
PREP(onDamage);
|
||||
|
||||
PREP(openMenu);
|
||||
PREP(playInjuredSound);
|
||||
PREP(setCardiacArrest);
|
||||
PREP(setDamageBodyPart);
|
||||
PREP(setDead);
|
||||
PREP(setMedicRole);
|
||||
PREP(setTriageStatus);
|
||||
PREP(treatmentMutex);
|
||||
|
||||
PREP(updateActivityLog);
|
||||
PREP(updateBodyImg);
|
||||
PREP(updateIcons);
|
||||
PREP(updateUIInfo);
|
||||
|
||||
PREP(useEquipment);
|
||||
PREP(cacheHandledamageCall);
|
||||
PREP(checkDamage);
|
||||
|
||||
|
||||
PREP(setUnconsciousState);
|
||||
PREP(isUnconscious);
|
||||
PREP(getUnconsciousCondition);
|
||||
PREP(registerUnconsciousCondition);
|
||||
PREP(cleanUpCopyOfBody_F);
|
||||
PREP(makeCopyOfBody_F);
|
||||
PREP(canGoUnconsciousState);
|
||||
PREP(setDead);
|
||||
PREP(moduleBasicRevive);
|
||||
|
||||
PREP(setWeaponsCorrectUnconscious);
|
||||
PREP(setCaptiveSwitch);
|
||||
|
||||
|
||||
// initalize all module parameters.
|
||||
GVAR(setting_allowInstantDead) = true;
|
||||
GVAR(setting_AdvancedLevel) = 0;
|
||||
GVAR(setting_advancedWoundsSetting) = false;
|
||||
GVAR(setting_advancedMedicRoles) = false;
|
||||
GVAR(setting_medicalDifficulty) = 1;
|
||||
GVAR(setting_enableBandagingAid) = true;
|
||||
GVAR(setting_allowAIFullHeal) = false;
|
||||
GVAR(setting_enableForUnits) = 1;
|
||||
GVAR(setting_allowAirwayInjuries) = false;
|
||||
GVAR(setting_aidKitRestrictions) = 0;
|
||||
GVAR(setting_removeAidKitOnUse) = true;
|
||||
GVAR(setting_aidKitMedicsOnly) = false;
|
||||
GVAR(setting_bandageWaitingTime) = 5;
|
||||
GVAR(setting_allowVehicleCrashInjuries) = true;
|
||||
GVAR(setting_allowStitching) = 0;
|
||||
|
||||
ADDON = true;
|
31
addons/medical/config.cpp
Normal file
31
addons/medical/config.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches
|
||||
{
|
||||
class ADDON
|
||||
{
|
||||
units[] = {"ACE_medical_supply_crate_cms", "ACE_bandage_basicItem","ACE_packing_bandageItem","ACE_bandageElasticItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_atropineItem","ACE_epinephrineItem","ACE_plasma_ivItem","ACE_plasma_iv_500Item","ACE_plasma_iv250Item","ACE_blood_ivItem","ACE_blood_iv_500Item","ACE_blood_iv_250Item","ACE_saline_ivItem","ACE_saline_iv_500Item","ACE_saline_iv_250Item","ACE_quikclotItem","ACE_nasopharyngeal_tubeItem","ACE_opaItem","ACE_liquidSkinItem","ACE_chestsealItem","ACE_personal_aid_kitItem"};
|
||||
weapons[] = {"ACE_surgical_kit"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ACE_gui","ACE_common"};
|
||||
version = VERSION;
|
||||
author[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
|
||||
authorUrl = "http://csemod.com";
|
||||
};
|
||||
};
|
||||
class CfgAddons {
|
||||
class PreloadAddons {
|
||||
class ADDON {
|
||||
list[] = {QUOTE(ADDON)};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgFactionClasses.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "ui\define.hpp"
|
||||
#include "ui\menu.hpp"
|
||||
#include "ui\RscTitles.hpp"
|
BIN
addons/medical/data/ACE_medical_module.paa
Normal file
BIN
addons/medical/data/ACE_medical_module.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/background_img.paa
Normal file
BIN
addons/medical/data/background_img.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_arm_left.paa
Normal file
BIN
addons/medical/data/body_arm_left.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_arm_right.paa
Normal file
BIN
addons/medical/data/body_arm_right.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_arms.paa
Normal file
BIN
addons/medical/data/body_arms.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_background.paa
Normal file
BIN
addons/medical/data/body_background.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_head.paa
Normal file
BIN
addons/medical/data/body_head.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_img-arms.paa
Normal file
BIN
addons/medical/data/body_img-arms.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_img-head.paa
Normal file
BIN
addons/medical/data/body_img-head.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_img-legs.paa
Normal file
BIN
addons/medical/data/body_img-legs.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_img-torso.paa
Normal file
BIN
addons/medical/data/body_img-torso.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_leg_left.paa
Normal file
BIN
addons/medical/data/body_leg_left.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_leg_right.paa
Normal file
BIN
addons/medical/data/body_leg_right.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_legs.paa
Normal file
BIN
addons/medical/data/body_legs.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/body_torso.paa
Normal file
BIN
addons/medical/data/body_torso.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/border_arm_left.paa
Normal file
BIN
addons/medical/data/border_arm_left.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/border_arm_right.paa
Normal file
BIN
addons/medical/data/border_arm_right.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/border_head.paa
Normal file
BIN
addons/medical/data/border_head.paa
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user