From 573279bd30fdec83f7bf696f385a836cc5c12e3a Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 2 Oct 2015 23:19:14 +0200 Subject: [PATCH 01/40] add selection, collision, fall and drowning damage events --- addons/medical/XEH_init.sqf | 3 +- addons/medical/XEH_postInit.sqf | 5 + addons/medical/XEH_preInit.sqf | 5 + .../functions/fnc_handleCollisionDamage.sqf | 14 ++ .../medical/functions/fnc_handleDamageNew.sqf | 167 ++++++++++++++++++ .../functions/fnc_handleDrowningDamage.sqf | 14 ++ .../functions/fnc_handleFallDamage.sqf | 14 ++ .../functions/fnc_handleSelectionDamage.sqf | 11 ++ 8 files changed, 232 insertions(+), 1 deletion(-) create mode 100644 addons/medical/functions/fnc_handleCollisionDamage.sqf create mode 100644 addons/medical/functions/fnc_handleDamageNew.sqf create mode 100644 addons/medical/functions/fnc_handleDrowningDamage.sqf create mode 100644 addons/medical/functions/fnc_handleFallDamage.sqf create mode 100644 addons/medical/functions/fnc_handleSelectionDamage.sqf diff --git a/addons/medical/XEH_init.sqf b/addons/medical/XEH_init.sqf index acdd50ce82..8b2b0ae1cd 100644 --- a/addons/medical/XEH_init.sqf +++ b/addons/medical/XEH_init.sqf @@ -2,7 +2,8 @@ params ["_unit"]; -_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; +//_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; +_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamageNew)}]; if (local _unit) then { if (!EGVAR(common,settingsInitFinished)) exitWith { diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 064f78682f..b893c0349c 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -2,6 +2,11 @@ #include "script_component.hpp" +["medical_selectionDamage", {_this call FUNC(handleSelectionDamage)}] call EFUNC(common,addEventhandler); +["medical_fallDamage", {_this call FUNC(handleFallDamage)}] call EFUNC(common,addEventhandler); +["medical_drowningDamage", {_this call FUNC(handleDrowningDamage)}] call EFUNC(common,addEventhandler); +["medical_collisionDamage", {_this call FUNC(handleCollisionDamage)}] call EFUNC(common,addEventhandler); + GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"]; GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 2625bf4b8a..94590c5077 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -41,6 +41,11 @@ PREP(handleDamage_fractures); PREP(handleDamage_internalInjuries); PREP(handleDamage_wounds); PREP(handleDamage_woundsOld); +PREP(handleDamageNew); +PREP(handleSelectionDamage); +PREP(handleFallDamage); +PREP(handleCollisionDamage); +PREP(handleDrowningDamage); PREP(handleUnitVitals); PREP(handleKilled); PREP(handleLocal); diff --git a/addons/medical/functions/fnc_handleCollisionDamage.sqf b/addons/medical/functions/fnc_handleCollisionDamage.sqf new file mode 100644 index 0000000000..191a91cb6a --- /dev/null +++ b/addons/medical/functions/fnc_handleCollisionDamage.sqf @@ -0,0 +1,14 @@ +// by commy2 +#include "script_component.hpp" + +params ["_unit", "_newDamage"]; + +private ["_selection", "_totalDamage"]; + +_selection = "body"; + +_totalDamage = (_unit getHit _selection) + _newDamage; + +_unit setHit [_selection, _totalDamage]; + +systemChat format ["collision: %1", _this]; diff --git a/addons/medical/functions/fnc_handleDamageNew.sqf b/addons/medical/functions/fnc_handleDamageNew.sqf new file mode 100644 index 0000000000..143c70dddb --- /dev/null +++ b/addons/medical/functions/fnc_handleDamageNew.sqf @@ -0,0 +1,167 @@ +/* + * Author: KoffeinFlummi, Glowbal, commy2 + * Main HandleDamage EH function. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Name Of Hit Selection + * 2: Amount Of Damage + * 3: Shooter + * 4: Projectile + * + * Return Value: + * Damage To Be Inflicted + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_selection", "_damage", "_shooter", "_projectile"]; +TRACE_5("ACE_DEBUG: HandleDamage Called",_unit,_selection,_damage,_shooter,_projectile); + +// bug, apparently can fire for remote units in special cases +if !(local _unit) exitWith { + TRACE_2("ACE_DEBUG: HandleDamage on remote unit!",_unit,isServer); + nil +}; + +// bug, assumed fixed, @todo excessive testing, if nothing happens remove +if (typeName _projectile == "OBJECT") then { + TRACE_3("ACE_DEBUG: HandleDamage found projectile instead of classname of ammo!",_unit,_projectile,typeOf _projectile); + _projectile = typeOf _projectile; + _this set [4, _projectile]; +}; + +// Exit now we disable damage, replaces "allowDamage false" +if !(_unit getVariable [QGVAR(allowDamage), true]) exitWith { + TRACE_2("ACE_DEBUG: HandleDamage damage disabled.",_selection,_unit); + if (_selection == "") then { + damage _unit + } else { + _unit getHit _selection + }; +}; + + +diag_log text str _selection; +diag_log text str _damage; + + +private ["_damageReturn", "_newDamage", "_index"]; + +// apply damage scripted +if (_selection == "") then { + _damageReturn = _damage; + _newDamage = _damage - damage _unit; + + _index = -1; + + private "_cachedStructuralDamage"; + _cachedStructuralDamage = _unit getVariable [QGVAR(cachedStructuralDamageNew), 0]; + + // handle damage always tries to start and end with the same structural damage call. Use that to find and set the final damage. discard everything the game discards too. + // this correctly handles: bullets, explosions, fire + if (_damage == _cachedStructuralDamage) then { + private "_cachedNewHitpointDamages"; + _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + + // this is the only point damage actually counts. all additional vitality functions should use these values. + { + if (_x > 0) then { + ["medical_selectionDamage", [_unit, GVAR(Selections) select _forEachIndex, _x, _projectile]] call EFUNC(common,localEvent); + }; + } forEach _cachedNewHitpointDamages; + } else { + scopeName "findDamageSource"; + + // check for fall damage. this triggers twice, but seems to happen on the same frame. shouldn't fall twice in a few frames anyway. tested at 7FPS on local host MP + if (animationState _unit select [0,4] == "afal") then { + private "_cachedLastFallDamageFrame"; + _cachedLastFallDamageFrame = _unit getVariable [QGVAR(cachedLastFallDamageFrame), -1]; + + if (diag_frameno != _cachedLastFallDamageFrame) then { + ["medical_fallDamage", [_unit, _newDamage]] call EFUNC(common,localEvent); + _unit setVariable [QGVAR(cachedLastFallDamageFrame), diag_frameno]; + }; + + _damageReturn = damage _unit; + breakOut "findDamageSource"; + }; + + // check for drowning damage. Pretty relyable damage output. triggers only once. + if (getOxygenRemaining _unit < 0.5) then { + // typical drowning damage + if (_newDamage == 0.005) then { + ["medical_drowningDamage", [_unit, _newDamage]] call EFUNC(common,localEvent); + _damageReturn = damage _unit - 0.005; // engine applies damage before hd call. subtract again here. + breakOut "findDamageSource"; + }; + + // suffocated under water might use atypical new damage (mostly 1.005) + if (getOxygenRemaining _unit == 0) then { + ["medical_drowningDamage", [_unit, _newDamage min 1]] call EFUNC(common,localEvent); + _damageReturn = damage _unit; // you will die regardless of hd return value + breakOut "findDamageSource"; + }; + }; + + // check for misc. damage. Probably collision. + if (_projectile == "" && _newDamage > 0) then { + private "_cachedLastCollisionDamageFrame"; + _cachedLastCollisionDamageFrame = _unit getVariable [QGVAR(cachedLastFallDamageFrame), -1]; + + // collision only happens once. engine ignores all further calls on that frame as well + if (_cachedLastCollisionDamageFrame != diag_frameno) then { + _unit setVariable [QGVAR(cachedLastFallDamageFrame), diag_frameno]; + _unit setVariable [QGVAR(cachedLastCollisionDamage), 0]; + + ["medical_collisionDamage", [_unit, _newDamage max (_unit getVariable [QGVAR(cachedLastCollisionDamage), 0])]] call EFUNC(common,localEvent); + + _damageReturn = damage _unit - _newDamage; + breakOut "findDamageSource"; + }; + _damageReturn = damage _unit; + }; + }; + + // reset everything, get ready for the next bullet + _unit setVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + _unit setVariable [QGVAR(cachedStructuralDamageNew), _damage]; + +} else { + // selections are done scripted. return same value to change nothing. + _damageReturn = _unit getHit _selection; + _newDamage = _damage - _damageReturn; // _damageReturn because it saves one getHit call + + _index = GVAR(SELECTIONS) find _selection; + + // a selection we care for was hit. now save the new damage to apply it by a later structural damage call + if (_index != -1) then { + private "_cachedNewHitpointDamages"; + _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + + // prevents multiple selections from being hit by one bullet due to hitpoint radius system + { + // ignore this damage if it's a secondary selection (minor damage) + if (_x > _newDamage) exitWith { + _newDamage = 0; + }; + + // overwrite minor damage in secondary selections + if (_x > 0) then { + _cachedNewHitpointDamages set [_forEachIndex, 0]; + }; + } forEach _cachedNewHitpointDamages; + + // apply these by the next matching hd call with selection "". If that one is not matching, this gets discarded + _cachedNewHitpointDamages set [_index, _newDamage]; + _unit setVariable [QGVAR(cachedNewHitpointDamages), _cachedNewHitpointDamages]; + }; + + // use this to detect collision damage. + if (_projectile == "") then { + _unit setVariable [QGVAR(cachedLastCollisionDamage), _newDamage max (_unit getVariable [QGVAR(cachedLastCollisionDamage), 0])]; + }; +}; + +_damageReturn diff --git a/addons/medical/functions/fnc_handleDrowningDamage.sqf b/addons/medical/functions/fnc_handleDrowningDamage.sqf new file mode 100644 index 0000000000..2dc538aac9 --- /dev/null +++ b/addons/medical/functions/fnc_handleDrowningDamage.sqf @@ -0,0 +1,14 @@ +// by commy2 +#include "script_component.hpp" + +params ["_unit", "_newDamage"]; + +private ["_selection", "_totalDamage"]; + +_selection = "head"; + +_totalDamage = (_unit getHit _selection) + _newDamage; + +_unit setHit [_selection, _totalDamage]; + +systemChat format ["drowning: %1", _this]; diff --git a/addons/medical/functions/fnc_handleFallDamage.sqf b/addons/medical/functions/fnc_handleFallDamage.sqf new file mode 100644 index 0000000000..cea73b16bf --- /dev/null +++ b/addons/medical/functions/fnc_handleFallDamage.sqf @@ -0,0 +1,14 @@ +// by commy2 +#include "script_component.hpp" + +params ["_unit", "_newDamage"]; + +private ["_totalDamageL", "_totalDamageR"]; + +_totalDamageL = (_unit getHitPointDamage "HitLeftLeg") + _newDamage; +_totalDamageR = (_unit getHitPointDamage "HitRightLeg") + _newDamage; + +_unit setHitPointDamage ["HitLeftLeg", _totalDamageL]; +_unit setHitPointDamage ["HitRightLeg", _totalDamageR]; + +systemChat format ["falling: %1", _this]; diff --git a/addons/medical/functions/fnc_handleSelectionDamage.sqf b/addons/medical/functions/fnc_handleSelectionDamage.sqf new file mode 100644 index 0000000000..27c8debe63 --- /dev/null +++ b/addons/medical/functions/fnc_handleSelectionDamage.sqf @@ -0,0 +1,11 @@ +// by commy2 +#include "script_component.hpp" + +params ["_unit", "_selection", "_newDamage", "_projectile"]; + +private "_totalDamage"; +_totalDamage = (_unit getHit _selection) + _newDamage; + +_unit setHit [_selection, _totalDamage]; + +systemChat format ["selection: %1", _this]; From 6e42a10d4751a231b0b5bbc886e98b89b7cce839 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 17 Jan 2016 12:28:08 +0100 Subject: [PATCH 02/40] Add selectionDamage implementation --- addons/medical/XEH_postInit.sqf | 4 +- .../medical/functions/fnc_handleDamageNew.sqf | 33 ++++++-- .../functions/fnc_handleSelectionDamage.sqf | 75 +++++++++++++++++-- 3 files changed, 98 insertions(+), 14 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 41778361a2..95df32b8cd 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -3,8 +3,8 @@ #include "script_component.hpp" ["medical_selectionDamage", {_this call FUNC(handleSelectionDamage)}] call EFUNC(common,addEventhandler); -["medical_fallDamage", {_this call FUNC(handleFallDamage)}] call EFUNC(common,addEventhandler); -["medical_drowningDamage", {_this call FUNC(handleDrowningDamage)}] call EFUNC(common,addEventhandler); +["medical_fallDamage", {_this call FUNC(handleFallDamage)}] call EFUNC(common,addEventhandler); +["medical_drowningDamage", {_this call FUNC(handleDrowningDamage)}] call EFUNC(common,addEventhandler); ["medical_collisionDamage", {_this call FUNC(handleCollisionDamage)}] call EFUNC(common,addEventhandler); GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"]; diff --git a/addons/medical/functions/fnc_handleDamageNew.sqf b/addons/medical/functions/fnc_handleDamageNew.sqf index 143c70dddb..63278c6751 100644 --- a/addons/medical/functions/fnc_handleDamageNew.sqf +++ b/addons/medical/functions/fnc_handleDamageNew.sqf @@ -42,10 +42,21 @@ if !(_unit getVariable [QGVAR(allowDamage), true]) exitWith { }; }; +// If damage is in dummy hitpoints, "hands" and "legs", don't change anything +if (_selection == "hands") exitWith {_unit getHit "hands"}; +if (_selection == "legs") exitWith {_unit getHit "legs"}; +if (_selection == "arms") exitWith {_unit getHit "arms"}; + +// Deal with the new hitpoint and selection names introduced with Arma v1.50 and later. +// This will convert new selection names into selection names that the medical system understands +// TODO This should be cleaned up when we revisit the medical system at a later stage +// and instead we should deal with the new hitpoints directly +_selection = [_unit, _selection, _hitPointIndex] call FUNC(translateSelections); diag_log text str _selection; diag_log text str _damage; +// systemChat format["_selection %1 _damage %2", _selection, _damage]; private ["_damageReturn", "_newDamage", "_index"]; @@ -62,13 +73,13 @@ if (_selection == "") then { // handle damage always tries to start and end with the same structural damage call. Use that to find and set the final damage. discard everything the game discards too. // this correctly handles: bullets, explosions, fire if (_damage == _cachedStructuralDamage) then { - private "_cachedNewHitpointDamages"; - _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + private _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + private _cachedNewHitpointProjectiles = _unit getVariable [QGVAR(cachedNewHitpointProjectiles), ["", "", "", "", "", ""]]; // this is the only point damage actually counts. all additional vitality functions should use these values. { if (_x > 0) then { - ["medical_selectionDamage", [_unit, GVAR(Selections) select _forEachIndex, _x, _projectile]] call EFUNC(common,localEvent); + ["medical_selectionDamage", [_unit, GVAR(Selections) select _forEachIndex, _x, _cachedNewHitpointProjectiles select _forEachIndex]] call EFUNC(common,localEvent); }; } forEach _cachedNewHitpointDamages; } else { @@ -126,6 +137,7 @@ if (_selection == "") then { // reset everything, get ready for the next bullet _unit setVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + _unit setVariable [QGVAR(cachedNewHitpointProjectiles), ["", "", "", "", "", ""]]; _unit setVariable [QGVAR(cachedStructuralDamageNew), _damage]; } else { @@ -137,8 +149,8 @@ if (_selection == "") then { // a selection we care for was hit. now save the new damage to apply it by a later structural damage call if (_index != -1) then { - private "_cachedNewHitpointDamages"; - _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + private _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; + private _cachedNewHitpointProjectiles = _unit getVariable [QGVAR(cachedNewHitpointProjectiles), ["", "", "", "", "", ""]]; // prevents multiple selections from being hit by one bullet due to hitpoint radius system { @@ -150,12 +162,19 @@ if (_selection == "") then { // overwrite minor damage in secondary selections if (_x > 0) then { _cachedNewHitpointDamages set [_forEachIndex, 0]; + _cachedNewHitpointProjectiles set [_forEachIndex, ""]; }; } forEach _cachedNewHitpointDamages; - // apply these by the next matching hd call with selection "". If that one is not matching, this gets discarded - _cachedNewHitpointDamages set [_index, _newDamage]; + if (_cachedNewHitpointDamages select _index < _newDamage) then { + // apply these by the next matching hd call with selection "". If that one is not matching, this gets discarded + _cachedNewHitpointDamages set [_index, _newDamage]; + _cachedNewHitpointProjectiles set [_index, _projectile]; + } else { + diag_log format["PREVENTED OVERWRITE: %1", [_newDamage, _projectile, _selection]]; + }; _unit setVariable [QGVAR(cachedNewHitpointDamages), _cachedNewHitpointDamages]; + _unit setVariable [QGVAR(cachedNewHitpointProjectiles), _cachedNewHitpointProjectiles]; }; // use this to detect collision damage. diff --git a/addons/medical/functions/fnc_handleSelectionDamage.sqf b/addons/medical/functions/fnc_handleSelectionDamage.sqf index 27c8debe63..247589ae03 100644 --- a/addons/medical/functions/fnc_handleSelectionDamage.sqf +++ b/addons/medical/functions/fnc_handleSelectionDamage.sqf @@ -1,11 +1,76 @@ -// by commy2 +/* + * Author: Glowbal, Commy2 & KoffeinFlummi + * Sets the hitpoint damage for an unit to the correct values + * + * Arguments: + * 0: Unit for which the hitpoint damage will be sorted out + * 1: Selection name + * 2: new damage + * 3: projectile + * + * Return Value: + * None + * + * Public: No + */ + #include "script_component.hpp" params ["_unit", "_selection", "_newDamage", "_projectile"]; -private "_totalDamage"; -_totalDamage = (_unit getHit _selection) + _newDamage; +// private _totalDamage = (_unit getHit _selection) + _newDamage; +systemChat format["handleSelectionDamage: %1", _this]; -_unit setHit [_selection, _totalDamage]; +private _part = [_selection] call FUNC(selectionNameToNumber); +if (_part < 0) exitwith {systemchat format["Selection name part is below 0"]}; -systemChat format ["selection: %1", _this]; +// Store the new damage values in our damageBodyParts store +private _damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; +_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; + +// our unconscious calculation for selection damages +if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { + // If it reaches this, we can assume that the hit did not kill this unit, as this function is called some time after the damage has been passed. + if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { + [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); + }; +}; + +if (GVAR(level) > 1) then { // advanced medical is enabled + systemChat format["LEVEL OF MEDICAL SYSTEM IS ADVANCED"]; + _typeOfDamage = [_projectile] call FUNC(getTypeOfDamage); // Get the exact type of damage + [_unit, _selection, _newDamage, _projectile, _typeOfDamage] call FUNC(handleDamage_assignWounds); + + // TODO Disabled until implemented fully + //if (GVAR(enableAirway)) then { + // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway); + //}; + //if (GVAR(enableFractures)) then { + // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures); + //}; + //if (GVAR(enableInternalBleeding)) then { + // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); + //}; +} else { + systemChat format["LEVEL OF MEDICAL SYSTEM IS BASIC"]; + // New pain values + _pain = _unit getVariable [QGVAR(pain), 0]; + _pain = _pain + (_newDamage / 4) * (1 - (_unit getVariable [QGVAR(morphine), 0])); + _unit setVariable [QGVAR(pain), _pain min 1, true]; +}; + +// Store the hitpoint values so blood ends up on the unit textures +_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +TRACE_2("ACE_DEBUG: HandleSelectionDamage Broadcast value here", _unit, _unit getVariable QGVAR(bodyPartStatus)); + +EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); +_unit setHitPointDamage ["hitHead", _headDamage min 0.95]; +_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95]; +_unit setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95]; +_unit setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; + +{ + private _hitPointName = [_unit, _x, true] call FUNC(translateSelections); + _unit setHitPointDamage [_hitPointName, (_damageBodyParts select _foreachIndex) min 0.95]; +}foreach GVAR(SELECTIONS); From 209d10065bddbe9d386b3129fdee40ffe856c85a Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 17 Jan 2016 12:28:37 +0100 Subject: [PATCH 03/40] Fix missing event log entries #3134 --- addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf | 2 ++ addons/medical/stringtable.xml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf index f86e620625..09cbd9ad96 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf @@ -19,6 +19,8 @@ params ["_caller", "_target", "_selectionName", "_className", "_items"]; if (alive _target && {(_target getVariable [QGVAR(inCardiacArrest), false] || _target getVariable [QGVAR(inReviveState), false])}) then { + [_target, "activity_view", LSTRING(Activity_cpr), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); + [[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; true; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index bc460741e6..5d8d5aa30c 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -2064,6 +2064,9 @@ %1 aplicou bandagem no paciente %1 již obvázal pacienta + + %1 started CPR + %1 used %2 %1 usó %2 @@ -3887,4 +3890,4 @@ Žádné škrtidlo na této části těla! - \ No newline at end of file + From 7de1a7bc6c5bd0694df77a77bf83aa60ae83df81 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 17 Jan 2016 13:21:18 +0100 Subject: [PATCH 04/40] add initial implementation of drowning and collision damage handling --- .../functions/fnc_handleDrowningDamage.sqf | 27 +++++--- .../functions/fnc_handleFallDamage.sqf | 63 ++++++++++++++++--- .../functions/fnc_handleSelectionDamage.sqf | 5 -- 3 files changed, 73 insertions(+), 22 deletions(-) diff --git a/addons/medical/functions/fnc_handleDrowningDamage.sqf b/addons/medical/functions/fnc_handleDrowningDamage.sqf index 2dc538aac9..1116d07762 100644 --- a/addons/medical/functions/fnc_handleDrowningDamage.sqf +++ b/addons/medical/functions/fnc_handleDrowningDamage.sqf @@ -1,14 +1,21 @@ -// by commy2 +/* + * Author: Glowbal + * Handle drowning damage to unit + * + * Arguments: + * 0: Unit for which the hitpoint damage will be sorted out + * 1: new damage + * + * Return Value: + * None + * + * Public: No + */ + #include "script_component.hpp" params ["_unit", "_newDamage"]; -private ["_selection", "_totalDamage"]; - -_selection = "head"; - -_totalDamage = (_unit getHit _selection) + _newDamage; - -_unit setHit [_selection, _totalDamage]; - -systemChat format ["drowning: %1", _this]; +// At the moment we will just not do anything +// We reserve this until a later stage +// A unit will automatically die once oxygen has ran out anyway diff --git a/addons/medical/functions/fnc_handleFallDamage.sqf b/addons/medical/functions/fnc_handleFallDamage.sqf index cea73b16bf..3161364f98 100644 --- a/addons/medical/functions/fnc_handleFallDamage.sqf +++ b/addons/medical/functions/fnc_handleFallDamage.sqf @@ -1,14 +1,63 @@ -// by commy2 +/* + * Author: Glowbal + * Handle fall damage to unit + * + * Arguments: + * 0: Unit for which the hitpoint damage will be sorted out + * 1: new damage + * + * Return Value: + * None + * + * Public: No + */ + #include "script_component.hpp" params ["_unit", "_newDamage"]; -private ["_totalDamageL", "_totalDamageR"]; +private _part = ["leg_l"] call FUNC(selectionNameToNumber); +private _part2 = ["leg_r"] call FUNC(selectionNameToNumber); -_totalDamageL = (_unit getHitPointDamage "HitLeftLeg") + _newDamage; -_totalDamageR = (_unit getHitPointDamage "HitRightLeg") + _newDamage; +// Store the new damage values in our damageBodyParts store +private _damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; +_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; +_damageBodyParts set [_part2, (_damageBodyParts select _part2) + _newDamage]; +_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; -_unit setHitPointDamage ["HitLeftLeg", _totalDamageL]; -_unit setHitPointDamage ["HitRightLeg", _totalDamageR]; +// our unconscious calculation for selection damages +if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { + // If it reaches this, we can assume that the hit did not kill this unit, as this function is called some time after the damage has been passed. + if ([_unit, _part, _newDamage * 1.3] call FUNC(determineIfFatal)) then { + [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); + } else { + if ([_unit, _part2, _newDamage * 1.3] call FUNC(determineIfFatal)) then { + [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); + }; + }; +}; -systemChat format ["falling: %1", _this]; +if (GVAR(level) > 1) then { // advanced medical is enabled + [_unit, "leg_l", _newDamage, "", "falling"] call FUNC(handleDamage_assignWounds); // cover both left and right legs + [_unit, "leg_r", _newDamage, "", "falling"] call FUNC(handleDamage_assignWounds); +} else { + // New pain values + _pain = _unit getVariable [QGVAR(pain), 0]; + _pain = _pain + (_newDamage / 4) * (1 - (_unit getVariable [QGVAR(morphine), 0])); + _unit setVariable [QGVAR(pain), _pain min 1, true]; +}; + +// Store the hitpoint values so blood ends up on the unit textures +_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; +TRACE_2("ACE_DEBUG: HandleSelectionDamage Broadcast value here", _unit, _unit getVariable QGVAR(bodyPartStatus)); + +EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); +_unit setHitPointDamage ["hitHead", _headDamage min 0.95]; +_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95]; +_unit setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95]; +_unit setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; + +{ + private _hitPointName = [_unit, _x, true] call FUNC(translateSelections); + _unit setHitPointDamage [_hitPointName, (_damageBodyParts select _foreachIndex) min 0.95]; +}foreach GVAR(SELECTIONS); diff --git a/addons/medical/functions/fnc_handleSelectionDamage.sqf b/addons/medical/functions/fnc_handleSelectionDamage.sqf index 247589ae03..a72f973c79 100644 --- a/addons/medical/functions/fnc_handleSelectionDamage.sqf +++ b/addons/medical/functions/fnc_handleSelectionDamage.sqf @@ -18,9 +18,6 @@ params ["_unit", "_selection", "_newDamage", "_projectile"]; -// private _totalDamage = (_unit getHit _selection) + _newDamage; -systemChat format["handleSelectionDamage: %1", _this]; - private _part = [_selection] call FUNC(selectionNameToNumber); if (_part < 0) exitwith {systemchat format["Selection name part is below 0"]}; @@ -38,7 +35,6 @@ if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { }; if (GVAR(level) > 1) then { // advanced medical is enabled - systemChat format["LEVEL OF MEDICAL SYSTEM IS ADVANCED"]; _typeOfDamage = [_projectile] call FUNC(getTypeOfDamage); // Get the exact type of damage [_unit, _selection, _newDamage, _projectile, _typeOfDamage] call FUNC(handleDamage_assignWounds); @@ -53,7 +49,6 @@ if (GVAR(level) > 1) then { // advanced medical is enabled // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); //}; } else { - systemChat format["LEVEL OF MEDICAL SYSTEM IS BASIC"]; // New pain values _pain = _unit getVariable [QGVAR(pain), 0]; _pain = _pain + (_newDamage / 4) * (1 - (_unit getVariable [QGVAR(morphine), 0])); From 86158ac45b5e9ce200be5fc65d585d9ee4b9a5d4 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 17 Jan 2016 14:09:22 +0100 Subject: [PATCH 05/40] Stage improvements bandage effectiveness --- addons/medical/ACE_Medical_Treatments.hpp | 280 ++++++++++++++++++---- 1 file changed, 235 insertions(+), 45 deletions(-) diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 51fb4ca701..73248dc4f4 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -700,15 +700,23 @@ class ACE_Medical_Advanced { class AbrasionMinor: Abrasion {}; class AbrasionMedium: Abrasion {}; class AbrasionLarge: Abrasion {}; + class Avulsions: Abrasion { + effectiveness = 0.9; + reopeningChance = 0.1; + }; + class AvulsionsMinor: Avulsions {}; + class AvulsionsMedium: Avulsions { + effectiveness = 0.7; + reopeningChance = 0.35; + }; + class AvulsionsLarge: Avulsions { effectiveness = 0.3; reopeningChance = 0.5; reopeningMinDelay = 120; reopeningMaxDelay = 200; }; - class AvulsionsMinor: Avulsions {}; - class AvulsionsMedium: Avulsions {}; - class AvulsionsLarge: Avulsions {}; + class Contusion: Abrasion { effectiveness = 1; reopeningChance = 0; @@ -718,34 +726,61 @@ class ACE_Medical_Advanced { class ContusionMinor: Contusion {}; class ContusionMedium: Contusion {}; class ContusionLarge: Contusion {}; + class CrushWound: Abrasion { - effectiveness = 0.6; - reopeningChance = 0.2; + effectiveness = 2; + reopeningChance = 0; reopeningMinDelay = 120; reopeningMaxDelay = 200; }; - class CrushWoundMinor: CrushWound {}; - class CrushWoundMedium: CrushWound {}; - class CrushWoundLarge: CrushWound {}; + class CrushWoundMinor: CrushWound { + effectiveness = 0.8; + reopeningChance = 0; + }; + class CrushWoundMedium: CrushWound { + effectiveness = 0.7; + reopeningChance = 0.1; + }; + class CrushWoundLarge: CrushWound { + effectiveness = 0.6; + reopeningChance = 0.6; + }; + class Cut: Abrasion { - effectiveness = 0.4; - reopeningChance = 0.5; + effectiveness = 1; + reopeningChance = 0.7; reopeningMinDelay = 220; reopeningMaxDelay = 260; }; class CutMinor: Cut {}; - class CutMedium: Cut {}; - class CutLarge: Cut {}; + class CutMedium: Cut { + effectiveness = 0.8; + reopeningChance = 0.5; + }; + class CutLarge: Cut { + effectiveness = 0.6; + reopeningChance = 0.9; + reopeningMinDelay = 220; + reopeningMaxDelay = 260; + }; class Laceration: Abrasion { - effectiveness = 0.7; + effectiveness = 0.9; reopeningChance = 0.3; reopeningMinDelay = 120; reopeningMaxDelay = 260; }; class LacerationMinor: Laceration {}; - class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration {}; + class LacerationMedium: Laceration { + effectiveness = 0.8; + reopeningChance = 0.2; + }; + class LacerationLarge: Laceration { + effectiveness = 0.7; + reopeningChance = 0.3; + reopeningMinDelay = 120; + reopeningMaxDelay = 260; + }; class velocityWound: Abrasion { effectiveness = 0.3; @@ -753,9 +788,19 @@ class ACE_Medical_Advanced { reopeningMinDelay = 20; reopeningMaxDelay = 300; }; - class velocityWoundMinor: velocityWound {}; - class velocityWoundMedium: velocityWound {}; - class velocityWoundLarge: velocityWound {}; + class velocityWoundMinor: velocityWound { + effectiveness = 0.8; + reopeningChance = 0.8; + }; + class velocityWoundMedium: velocityWound { + effectiveness = 0.6; + reopeningChance = 0.8; + }; + class velocityWoundLarge: velocityWound { + effectiveness = 0.3; + reopeningChance = 0.8; + }; + class punctureWound: Abrasion { effectiveness = 0.5; reopeningChance = 0.8; @@ -764,7 +809,12 @@ class ACE_Medical_Advanced { }; class punctureWoundMinor: punctureWound {}; class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound {}; + class punctureWoundLarge: punctureWound { + effectiveness = 0.5; + reopeningChance = 0.8; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; }; class PackingBandage: fieldDressing { class Abrasion { @@ -775,7 +825,13 @@ class ACE_Medical_Advanced { }; class AbrasionMinor: Abrasion {}; class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion {}; + class AbrasionLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class Avulsions: Abrasion { effectiveness = 1; reopeningChance = 0.3; @@ -784,7 +840,13 @@ class ACE_Medical_Advanced { }; class AvulsionsMinor: Avulsions {}; class AvulsionsMedium: Avulsions {}; - class AvulsionsLarge: Avulsions {}; + class AvulsionsLarge: Avulsions { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class Contusion: Abrasion { effectiveness = 1; reopeningChance = 0; @@ -793,7 +855,13 @@ class ACE_Medical_Advanced { }; class ContusionMinor: Contusion {}; class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion {}; + class ContusionLarge: Contusion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class CrushWound: Abrasion { effectiveness = 0.6; reopeningChance = 0.2; @@ -802,16 +870,28 @@ class ACE_Medical_Advanced { }; class CrushWoundMinor: CrushWound {}; class CrushWoundMedium: CrushWound {}; - class CrushWoundLarge: CrushWound {}; + class CrushWoundLarge: CrushWound { + effectiveness = 0.6; + reopeningChance = 0.2; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class Cut: Abrasion { - effectiveness = 0.2; + effectiveness = 0.6; reopeningChance = 0.6; reopeningMinDelay = 30; reopeningMaxDelay = 260; }; class CutMinor: Cut {}; class CutMedium: Cut {}; - class CutLarge: Cut {}; + class CutLarge: Cut { + effectiveness = 0.2; + reopeningChance = 0.6; + reopeningMinDelay = 30; + reopeningMaxDelay = 260; + }; + class Laceration: Abrasion { effectiveness = 0.3; reopeningChance = 0.3; @@ -820,7 +900,13 @@ class ACE_Medical_Advanced { }; class LacerationMinor: Laceration {}; class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration {}; + class LacerationLarge: Laceration { + effectiveness = 0.3; + reopeningChance = 0.3; + reopeningMinDelay = 120; + reopeningMaxDelay = 260; + }; + class velocityWound: Abrasion { effectiveness = 1; reopeningChance = 0.5; @@ -829,16 +915,27 @@ class ACE_Medical_Advanced { }; class velocityWoundMinor: velocityWound {}; class velocityWoundMedium: velocityWound {}; - class velocityWoundLarge: velocityWound {}; + class velocityWoundLarge: velocityWound { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; + class punctureWound: Abrasion { - effectiveness = 0.3; + effectiveness = 0.6; reopeningChance = 0.5; reopeningMinDelay = 20; reopeningMaxDelay = 300; }; class punctureWoundMinor: punctureWound {}; class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound {}; + class punctureWoundLarge: punctureWound { + effectiveness = 0.3; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; }; class ElasticBandage: fieldDressing { class Abrasion { @@ -849,7 +946,12 @@ class ACE_Medical_Advanced { }; class AbrasionMinor: Abrasion {}; class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion {}; + class AbrasionLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + }; + class Avulsions: Abrasion { effectiveness = 0.3; reopeningChance = 0.4; @@ -858,7 +960,13 @@ class ACE_Medical_Advanced { }; class AvulsionsMinor: Avulsions {}; class AvulsionsMedium: Avulsions {}; - class AvulsionsLarge: Avulsions {}; + class AvulsionsLarge: Avulsions { + effectiveness = 0.3; + reopeningChance = 0.4; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class Contusion: Abrasion { effectiveness = 1; reopeningChance = 0; @@ -867,7 +975,13 @@ class ACE_Medical_Advanced { }; class ContusionMinor: Contusion {}; class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion {}; + class ContusionLarge: Contusion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class CrushWound: Abrasion { effectiveness = 1; reopeningChance = 0; @@ -876,7 +990,13 @@ class ACE_Medical_Advanced { }; class CrushWoundMinor: CrushWound {}; class CrushWoundMedium: CrushWound {}; - class CrushWoundLarge: CrushWound {}; + class CrushWoundLarge: CrushWound { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class Cut: Abrasion { effectiveness = 1; reopeningChance = 0.2; @@ -885,7 +1005,13 @@ class ACE_Medical_Advanced { }; class CutMinor: Cut {}; class CutMedium: Cut {}; - class CutLarge: Cut {}; + class CutLarge: Cut { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 10; + reopeningMaxDelay = 400; + }; + class Laceration: Abrasion { effectiveness = 1; reopeningChance = 0.3; @@ -894,7 +1020,13 @@ class ACE_Medical_Advanced { }; class LacerationMinor: Laceration {}; class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration {}; + class LacerationLarge: Laceration { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 120; + reopeningMaxDelay = 260; + }; + class velocityWound: Abrasion { effectiveness = 0.5; reopeningChance = 0.5; @@ -903,7 +1035,13 @@ class ACE_Medical_Advanced { }; class velocityWoundMinor: velocityWound {}; class velocityWoundMedium: velocityWound {}; - class velocityWoundLarge: velocityWound {}; + class velocityWoundLarge: velocityWound { + effectiveness = 0.5; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; + class punctureWound: Abrasion { effectiveness = 0.85; reopeningChance = 0.5; @@ -912,7 +1050,12 @@ class ACE_Medical_Advanced { }; class punctureWoundMinor: punctureWound {}; class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound {}; + class punctureWoundLarge: punctureWound { + effectiveness = 0.85; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; }; class QuikClot: fieldDressing { class Abrasion { @@ -923,7 +1066,13 @@ class ACE_Medical_Advanced { }; class AbrasionMinor: Abrasion {}; class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion {}; + class AbrasionLarge: Abrasion { + effectiveness = 0.7; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class Avulsions: Abrasion { effectiveness = 0.2; reopeningChance = 0.1; @@ -932,7 +1081,13 @@ class ACE_Medical_Advanced { }; class AvulsionsMinor: Avulsions {}; class AvulsionsMedium: Avulsions {}; - class AvulsionsLarge: Avulsions {}; + class AvulsionsLarge: Avulsions { + effectiveness = 0.2; + reopeningChance = 0.1; + reopeningMinDelay = 300; + reopeningMaxDelay = 350; + }; + class Contusion: Abrasion { effectiveness = 0.7; reopeningChance = 0; @@ -941,7 +1096,13 @@ class ACE_Medical_Advanced { }; class ContusionMinor: Contusion {}; class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion {}; + class ContusionLarge: Contusion { + effectiveness = 0.7; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class CrushWound: Abrasion { effectiveness = 0.7; reopeningChance = 0; @@ -950,7 +1111,13 @@ class ACE_Medical_Advanced { }; class CrushWoundMinor: CrushWound {}; class CrushWoundMedium: CrushWound {}; - class CrushWoundLarge: CrushWound {}; + class CrushWoundLarge: CrushWound { + effectiveness = 0.7; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class Cut: Abrasion { effectiveness = 0.7; reopeningChance = 0.2; @@ -959,7 +1126,13 @@ class ACE_Medical_Advanced { }; class CutMinor: Cut {}; class CutMedium: Cut {}; - class CutLarge: Cut {}; + class CutLarge: Cut { + effectiveness = 0.7; + reopeningChance = 0.2; + reopeningMinDelay = 100; + reopeningMaxDelay = 400; + }; + class Laceration: Abrasion { effectiveness = 0.7; reopeningChance = 0; @@ -968,7 +1141,13 @@ class ACE_Medical_Advanced { }; class LacerationMinor: Laceration {}; class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration {}; + class LacerationLarge: Laceration { + effectiveness = 0.7; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class velocityWound: Abrasion { effectiveness = 0.7; reopeningChance = 0.1; @@ -977,7 +1156,13 @@ class ACE_Medical_Advanced { }; class velocityWoundMinor: velocityWound {}; class velocityWoundMedium: velocityWound {}; - class velocityWoundLarge: velocityWound {}; + class velocityWoundLarge: velocityWound { + effectiveness = 0.7; + reopeningChance = 0.1; + reopeningMinDelay = 200; + reopeningMaxDelay = 300; + }; + class punctureWound: Abrasion { effectiveness = 0.5; reopeningChance = 0.1; @@ -986,7 +1171,12 @@ class ACE_Medical_Advanced { }; class punctureWoundMinor: punctureWound {}; class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound {}; + class punctureWoundLarge: punctureWound { + effectiveness = 0.5; + reopeningChance = 0.1; + reopeningMinDelay = 200; + reopeningMaxDelay = 300; + }; }; }; From 34613b42f2a1040bb09f26491f36fdab4298f4b9 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Wed, 20 Jan 2016 11:49:10 +0100 Subject: [PATCH 06/40] Increase heart rate increase speed #3134 --- addons/medical/ACE_Medical_Treatments.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 73248dc4f4..027184a12e 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -1212,9 +1212,9 @@ class ACE_Medical_Advanced { }; class Epinephrine { painReduce = 0; - hrIncreaseLow[] = {10, 20, 30}; - hrIncreaseNormal[] = {10, 50, 20}; - hrIncreaseHigh[] = {10, 40, 10}; + hrIncreaseLow[] = {10, 20, 15}; + hrIncreaseNormal[] = {10, 50, 10}; + hrIncreaseHigh[] = {10, 40, 5}; timeInSystem = 120; maxDose = 10; inCompatableMedication[] = {}; From 39cf11367f2465d2be1d43f4663eee7c77b76fbc Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 7 Feb 2016 12:37:00 +0100 Subject: [PATCH 07/40] improve medical bandage configuration --- addons/medical/ACE_Medical_Treatments.hpp | 767 +++++++++++++--------- 1 file changed, 459 insertions(+), 308 deletions(-) diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 027184a12e..23340965db 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -692,27 +692,408 @@ class ACE_Medical_Advanced { reopeningMinDelay = 120; reopeningMaxDelay = 200; class Abrasion { + effectiveness = 3; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class AbrasionMinor: Abrasion { + effectiveness = 5; + reopeningChance = 0; + reopeningMinDelay = 1000; + reopeningMaxDelay = 5000; + }; + class AbrasionMedium: Abrasion { + effectiveness = 3; + reopeningChance = 0.7; + reopeningMinDelay = 750; + reopeningMaxDelay = 3000; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + reopeningChance = 0.9; + reopeningMinDelay = 300; + reopeningMaxDelay = 1000; + }; + + + class Avulsions: Abrasion { + effectiveness = 0.2; + reopeningChance = 0.8; + reopeningMinDelay = 5; + reopeningMaxDelay = 20; + }; + class AvulsionsMinor: Avulsions { + effectiveness = 0.4; + reopeningChance = 0.75; + reopeningMinDelay = 5; + reopeningMaxDelay = 20; + }; + class AvulsionsMedium: Avulsions { + effectiveness = 0.3; + reopeningChance = 0.85; + reopeningMinDelay = 5; + reopeningMaxDelay = 10; + }; + class AvulsionsLarge: Avulsions { + effectiveness = 0.1; + reopeningChance = 0.9; + reopeningMinDelay = 2; + reopeningMaxDelay = 10; + }; + + class Contusion: Abrasion { effectiveness = 1; reopeningChance = 0; reopeningMinDelay = 0; reopeningMaxDelay = 0; }; - class AbrasionMinor: Abrasion {}; - class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion {}; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class CrushWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class CrushWoundMinor: CrushWound { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class CrushWoundMedium: CrushWound { + effectiveness = 0.4; + reopeningChance = 0.3; + reopeningMinDelay = 100; + reopeningMaxDelay = 150; + }; + class CrushWoundLarge: CrushWound { + effectiveness = 0.2; + reopeningChance = 0.2; + reopeningMinDelay = 50; + reopeningMaxDelay = 70; + }; + + class Cut: Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 2000; + reopeningMaxDelay = 5000; + }; + class CutMinor: Cut { + effectiveness = 6; + reopeningChance = 0.1; + reopeningMinDelay = 5000; + reopeningMaxDelay = 8000; + }; + class CutMedium: Cut { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 1200; + reopeningMaxDelay = 2000; + }; + class CutLarge: Cut { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 220; + reopeningMaxDelay = 260; + }; + + class Laceration: Abrasion { + effectiveness = 0.8; + reopeningChance = 0.3; + reopeningMinDelay = 220; + reopeningMaxDelay = 500; + }; + class LacerationMinor: Laceration { + effectiveness = 0.8; + reopeningChance = 0.3; + reopeningMinDelay = 400; + reopeningMaxDelay = 800; + }; + class LacerationMedium: Laceration { + effectiveness = 0.5; + reopeningChance = 0.5; + reopeningMinDelay = 220; + reopeningMaxDelay = 500; + }; + class LacerationLarge: Laceration { + effectiveness = 0.3; + reopeningChance = 0.7; + reopeningMinDelay = 120; + reopeningMaxDelay = 260; + }; + + class velocityWound: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 100; + reopeningMaxDelay = 300; + }; + class velocityWoundMinor: velocityWound { + effectiveness = 0.8; + reopeningChance = 0.4; + reopeningMinDelay = 300; + reopeningMaxDelay = 550; + }; + class velocityWoundMedium: velocityWound { + effectiveness = 0.6; + reopeningChance = 0.8; + reopeningMinDelay = 100; + reopeningMaxDelay = 300; + }; + class velocityWoundLarge: velocityWound { + effectiveness = 0.3; + reopeningChance = 0.9; + reopeningMinDelay = 50; + reopeningMaxDelay = 170; + }; + + class punctureWound: Abrasion { + effectiveness = 0.6; + reopeningChance = 0.3; + reopeningMinDelay = 200; + reopeningMaxDelay = 300; + }; + class punctureWoundMinor: punctureWound { + effectiveness = 0.8; + reopeningChance = 0.5; + reopeningMinDelay = 500; + reopeningMaxDelay = 800; + }; + class punctureWoundMedium: punctureWound { + effectiveness = 0.6; + reopeningChance = 0.3; + reopeningMinDelay = 400; + reopeningMaxDelay = 600; + }; + class punctureWoundLarge: punctureWound { + effectiveness = 0.3; + reopeningChance = 0.8; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; + }; + class PackingBandage: fieldDressing { + class Abrasion { + effectiveness = 0.1; + reopeningChance = 0.9; + reopeningMinDelay = 5; + reopeningMaxDelay = 10; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0.1; + reopeningChance = 0.9; + reopeningMinDelay = 5; + reopeningMaxDelay = 10; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0.1; + reopeningChance = 0.9; + reopeningMinDelay = 5; + reopeningMaxDelay = 10; + }; + class AbrasionLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.9; + reopeningMinDelay = 5; + reopeningMaxDelay = 10; + }; class Avulsions: Abrasion { - effectiveness = 0.9; - reopeningChance = 0.1; + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class AvulsionsMinor: Avulsions { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 500; + reopeningMaxDelay = 1000; + }; + class AvulsionsMedium: Avulsions {{ + effectiveness = 0.7; + reopeningChance = 0.4; + reopeningMinDelay = 250; + reopeningMaxDelay = 750; + }; + class AvulsionsLarge: Avulsions { + effectiveness = 0.5; + reopeningChance = 0.5; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + + class Contusion: Abrasion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + + class CrushWound: Abrasion { + effectiveness = 0.6; + reopeningChance = 0.2; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class CrushWoundMinor: CrushWound { + effectiveness = 0.8; + reopeningChance = 0.4; + reopeningMinDelay = 500; + reopeningMaxDelay = 1000; + }; + class CrushWoundMedium: CrushWound { + effectiveness = 0.6; + reopeningChance = 0.6; + reopeningMinDelay = 280; + reopeningMaxDelay = 320; + }; + class CrushWoundLarge: CrushWound { + effectiveness = 0.4; + reopeningChance = 0.8; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + + class Cut: Abrasion { + effectiveness = 0.2; + reopeningChance = 0.4; + reopeningMinDelay = 10000; + reopeningMaxDelay = 20000; + }; + class CutMinor: Cut { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 20000; + reopeningMaxDelay = 30000; + }; + class CutMedium: Cut { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 2000; + reopeningMaxDelay = 3000; + }; + class CutLarge: Cut { + effectiveness = 0.7; + reopeningChance = 0.6; + reopeningMinDelay = 300; + reopeningMaxDelay = 2060; + }; + + class Laceration: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.5; + reopeningMinDelay = 120; + reopeningMaxDelay = 260; + }; + class LacerationMinor: Laceration { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 500; + reopeningMaxDelay = 700; + }; + class LacerationMedium: Laceration { + effectiveness = 0.7; + reopeningChance = 0.3; + reopeningMinDelay = 300; + reopeningMaxDelay = 600; + }; + class LacerationLarge: Laceration { + effectiveness = 0.3; + reopeningChance = 0.5; + reopeningMinDelay = 220; + reopeningMaxDelay = 360; + }; + class velocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; + class velocityWoundMinor: velocityWound { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 800; + reopeningMaxDelay = 1000; + }; + class velocityWoundMedium: velocityWound { + effectiveness = 0.6; + reopeningChance = 0.6; + reopeningMinDelay = 500; + reopeningMaxDelay = 800; + }; + class velocityWoundLarge: velocityWound { + effectiveness = 0.3; + reopeningChance = 0.5; + reopeningMinDelay = 300; + reopeningMaxDelay = 500; + }; + class punctureWound: Abrasion { + effectiveness = 0.1; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; + class punctureWoundMinor: punctureWound {}; + class punctureWoundMedium: punctureWound { + effectiveness = 0.2; + reopeningChance = 0.5; + }; + class punctureWoundLarge: punctureWound { + effectiveness = 0.3; + reopeningChance = 0.5; + reopeningMinDelay = 20; + reopeningMaxDelay = 300; + }; + }; + + class ElasticBandage: fieldDressing { + class Abrasion { + effectiveness = 2; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class AbrasionMinor: Abrasion {}; + class AbrasionMedium: Abrasion { + effectiveness = 1.5; + }; + class AbrasionLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + }; + + class Avulsions: Abrasion { + effectiveness = 0.3; + reopeningChance = 0.4; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class AvulsionsMinor: Avulsions { + effectiveness = 0.9; + reopeningChance = 0.2; }; - class AvulsionsMinor: Avulsions {}; class AvulsionsMedium: Avulsions { effectiveness = 0.7; - reopeningChance = 0.35; + reopeningChance = 0.4; }; class AvulsionsLarge: Avulsions { effectiveness = 0.3; - reopeningChance = 0.5; + reopeningChance = 0.4; reopeningMinDelay = 120; reopeningMaxDelay = 200; }; @@ -728,331 +1109,86 @@ class ACE_Medical_Advanced { class ContusionLarge: Contusion {}; class CrushWound: Abrasion { - effectiveness = 2; + effectiveness = 1; reopeningChance = 0; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - class CrushWoundMinor: CrushWound { - effectiveness = 0.8; - reopeningChance = 0; - }; - class CrushWoundMedium: CrushWound { - effectiveness = 0.7; - reopeningChance = 0.1; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; }; + class CrushWoundMinor: CrushWound {}; + class CrushWoundMedium: CrushWound {}; class CrushWoundLarge: CrushWound { - effectiveness = 0.6; - reopeningChance = 0.6; + effectiveness = 1; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; }; class Cut: Abrasion { - effectiveness = 1; - reopeningChance = 0.7; - reopeningMinDelay = 220; - reopeningMaxDelay = 260; + effectiveness = 1.5; + reopeningChance = 0.2; + reopeningMinDelay = 10; + reopeningMaxDelay = 400; }; class CutMinor: Cut {}; class CutMedium: Cut { - effectiveness = 0.8; - reopeningChance = 0.5; + effectiveness = 1.2; + reopeningChance = 0.3; }; class CutLarge: Cut { - effectiveness = 0.6; - reopeningChance = 0.9; - reopeningMinDelay = 220; - reopeningMaxDelay = 260; + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 10; + reopeningMaxDelay = 400; }; class Laceration: Abrasion { - effectiveness = 0.9; + effectiveness = 1; reopeningChance = 0.3; reopeningMinDelay = 120; reopeningMaxDelay = 260; }; class LacerationMinor: Laceration {}; class LacerationMedium: Laceration { - effectiveness = 0.8; - reopeningChance = 0.2; + effectiveness = 0.75; }; class LacerationLarge: Laceration { + effectiveness = 0.5; + reopeningChance = 0.3; + reopeningMinDelay = 120; + reopeningMaxDelay = 260; + }; + + class velocityWound: Abrasion { effectiveness = 0.7; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 260; - }; - - class velocityWound: Abrasion { - effectiveness = 0.3; - reopeningChance = 0.8; + reopeningChance = 0.5; reopeningMinDelay = 20; reopeningMaxDelay = 300; }; - class velocityWoundMinor: velocityWound { - effectiveness = 0.8; - reopeningChance = 0.8; - }; + class velocityWoundMinor: velocityWound {}; class velocityWoundMedium: velocityWound { - effectiveness = 0.6; - reopeningChance = 0.8; + effectiveness = 0.5; }; class velocityWoundLarge: velocityWound { - effectiveness = 0.3; - reopeningChance = 0.8; - }; - - class punctureWound: Abrasion { - effectiveness = 0.5; - reopeningChance = 0.8; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; - }; - class punctureWoundMinor: punctureWound {}; - class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound { - effectiveness = 0.5; - reopeningChance = 0.8; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; - }; - }; - class PackingBandage: fieldDressing { - class Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - class AbrasionMinor: Abrasion {}; - class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - - class Avulsions: Abrasion { - effectiveness = 1; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - class AvulsionsMinor: Avulsions {}; - class AvulsionsMedium: Avulsions {}; - class AvulsionsLarge: Avulsions { - effectiveness = 1; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - - class Contusion: Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - class ContusionMinor: Contusion {}; - class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - - class CrushWound: Abrasion { - effectiveness = 0.6; - reopeningChance = 0.2; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - class CrushWoundMinor: CrushWound {}; - class CrushWoundMedium: CrushWound {}; - class CrushWoundLarge: CrushWound { - effectiveness = 0.6; - reopeningChance = 0.2; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - - class Cut: Abrasion { - effectiveness = 0.6; - reopeningChance = 0.6; - reopeningMinDelay = 30; - reopeningMaxDelay = 260; - }; - class CutMinor: Cut {}; - class CutMedium: Cut {}; - class CutLarge: Cut { - effectiveness = 0.2; - reopeningChance = 0.6; - reopeningMinDelay = 30; - reopeningMaxDelay = 260; - }; - - class Laceration: Abrasion { - effectiveness = 0.3; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 260; - }; - class LacerationMinor: Laceration {}; - class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration { - effectiveness = 0.3; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 260; - }; - - class velocityWound: Abrasion { - effectiveness = 1; - reopeningChance = 0.5; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; - }; - class velocityWoundMinor: velocityWound {}; - class velocityWoundMedium: velocityWound {}; - class velocityWoundLarge: velocityWound { - effectiveness = 1; - reopeningChance = 0.5; + effectiveness = 0.25; + reopeningChance = 0.7; reopeningMinDelay = 20; reopeningMaxDelay = 300; }; class punctureWound: Abrasion { - effectiveness = 0.6; - reopeningChance = 0.5; + effectiveness = 0.9; + reopeningChance = 0.3; reopeningMinDelay = 20; reopeningMaxDelay = 300; }; class punctureWoundMinor: punctureWound {}; - class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound { - effectiveness = 0.3; + class punctureWoundMedium: punctureWound { + effectiveness = 0.9; reopeningChance = 0.5; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; }; - }; - class ElasticBandage: fieldDressing { - class Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - class AbrasionMinor: Abrasion {}; - class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - }; - - class Avulsions: Abrasion { - effectiveness = 0.3; - reopeningChance = 0.4; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - class AvulsionsMinor: Avulsions {}; - class AvulsionsMedium: Avulsions {}; - class AvulsionsLarge: Avulsions { - effectiveness = 0.3; - reopeningChance = 0.4; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - - class Contusion: Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - class ContusionMinor: Contusion {}; - class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - - class CrushWound: Abrasion { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - class CrushWoundMinor: CrushWound {}; - class CrushWoundMedium: CrushWound {}; - class CrushWoundLarge: CrushWound { - effectiveness = 1; - reopeningChance = 0; - reopeningMinDelay = 0; - reopeningMaxDelay = 0; - }; - - class Cut: Abrasion { - effectiveness = 1; - reopeningChance = 0.2; - reopeningMinDelay = 10; - reopeningMaxDelay = 400; - }; - class CutMinor: Cut {}; - class CutMedium: Cut {}; - class CutLarge: Cut { - effectiveness = 1; - reopeningChance = 0.2; - reopeningMinDelay = 10; - reopeningMaxDelay = 400; - }; - - class Laceration: Abrasion { - effectiveness = 1; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 260; - }; - class LacerationMinor: Laceration {}; - class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration { - effectiveness = 1; - reopeningChance = 0.3; - reopeningMinDelay = 120; - reopeningMaxDelay = 260; - }; - - class velocityWound: Abrasion { - effectiveness = 0.5; - reopeningChance = 0.5; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; - }; - class velocityWoundMinor: velocityWound {}; - class velocityWoundMedium: velocityWound {}; - class velocityWoundLarge: velocityWound { - effectiveness = 0.5; - reopeningChance = 0.5; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; - }; - - class punctureWound: Abrasion { - effectiveness = 0.85; - reopeningChance = 0.5; - reopeningMinDelay = 20; - reopeningMaxDelay = 300; - }; - class punctureWoundMinor: punctureWound {}; - class punctureWoundMedium: punctureWound {}; class punctureWoundLarge: punctureWound { effectiveness = 0.85; - reopeningChance = 0.5; + reopeningChance = 0.7; reopeningMinDelay = 20; reopeningMaxDelay = 300; }; @@ -1074,13 +1210,15 @@ class ACE_Medical_Advanced { }; class Avulsions: Abrasion { - effectiveness = 0.2; + effectiveness = 0.6; reopeningChance = 0.1; reopeningMinDelay = 300; reopeningMaxDelay = 350; }; class AvulsionsMinor: Avulsions {}; - class AvulsionsMedium: Avulsions {}; + class AvulsionsMedium: Avulsions { + effectiveness = 0.4; + }; class AvulsionsLarge: Avulsions { effectiveness = 0.2; reopeningChance = 0.1; @@ -1104,30 +1242,36 @@ class ACE_Medical_Advanced { }; class CrushWound: Abrasion { - effectiveness = 0.7; + effectiveness = 1; reopeningChance = 0; reopeningMinDelay = 0; reopeningMaxDelay = 0; }; class CrushWoundMinor: CrushWound {}; - class CrushWoundMedium: CrushWound {}; + class CrushWoundMedium: CrushWound { + effectiveness = 0.9; + reopeningChance = 0.05; + }; class CrushWoundLarge: CrushWound { effectiveness = 0.7; - reopeningChance = 0; + reopeningChance = 0.1; reopeningMinDelay = 0; reopeningMaxDelay = 0; }; class Cut: Abrasion { effectiveness = 0.7; - reopeningChance = 0.2; + reopeningChance = 0; reopeningMinDelay = 100; reopeningMaxDelay = 400; }; class CutMinor: Cut {}; - class CutMedium: Cut {}; + class CutMedium: Cut { + effectiveness = 0.6; + reopeningChance = 0; + }; class CutLarge: Cut { - effectiveness = 0.7; + effectiveness = 0.5; reopeningChance = 0.2; reopeningMinDelay = 100; reopeningMaxDelay = 400; @@ -1140,9 +1284,11 @@ class ACE_Medical_Advanced { reopeningMaxDelay = 0; }; class LacerationMinor: Laceration {}; - class LacerationMedium: Laceration {}; + class LacerationMedium: Laceration { + effectiveness = 0.6; + }; class LacerationLarge: Laceration { - effectiveness = 0.7; + effectiveness = 0.5; reopeningChance = 0; reopeningMinDelay = 0; reopeningMaxDelay = 0; @@ -1150,14 +1296,16 @@ class ACE_Medical_Advanced { class velocityWound: Abrasion { effectiveness = 0.7; - reopeningChance = 0.1; + reopeningChance = 0; reopeningMinDelay = 200; reopeningMaxDelay = 300; }; class velocityWoundMinor: velocityWound {}; - class velocityWoundMedium: velocityWound {}; + class velocityWoundMedium: velocityWound { + effectiveness = 0.6; + }; class velocityWoundLarge: velocityWound { - effectiveness = 0.7; + effectiveness = 0.5; reopeningChance = 0.1; reopeningMinDelay = 200; reopeningMaxDelay = 300; @@ -1165,15 +1313,18 @@ class ACE_Medical_Advanced { class punctureWound: Abrasion { effectiveness = 0.5; - reopeningChance = 0.1; + reopeningChance = 0.05; reopeningMinDelay = 200; reopeningMaxDelay = 300; }; class punctureWoundMinor: punctureWound {}; - class punctureWoundMedium: punctureWound {}; - class punctureWoundLarge: punctureWound { - effectiveness = 0.5; + class punctureWoundMedium: punctureWound { + effectiveness = 0.4; reopeningChance = 0.1; + }; + class punctureWoundLarge: punctureWound { + effectiveness = 0.3; + reopeningChance = 0.15; reopeningMinDelay = 200; reopeningMaxDelay = 300; }; From bfd90cd5d36e65087c27dee85e5f4285adf063be Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 7 Feb 2016 12:54:23 +0100 Subject: [PATCH 08/40] Add Adenosine to replace atropine #1573 --- addons/medical/ACE_Medical_Actions.hpp | 29 ++++++++++++++++++ addons/medical/ACE_Medical_SelfActions.hpp | 28 +++++++++++++++++ addons/medical/ACE_Medical_Treatments.hpp | 21 +++++++++++-- addons/medical/CfgVehicles.hpp | 14 +++++++++ addons/medical/CfgWeapons.hpp | 12 +++++++- addons/medical/data/adenosine.p3d | Bin 0 -> 10214 bytes .../medical/data/littergeneric_adenosine.p3d | Bin 0 -> 17876 bytes addons/medical/stringtable.xml | 15 +++++++++ addons/medical/ui/items/adenosine_x_ca.paa | Bin 0 -> 35563 bytes 9 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 addons/medical/data/adenosine.p3d create mode 100644 addons/medical/data/littergeneric_adenosine.p3d create mode 100644 addons/medical/ui/items/adenosine_x_ca.paa diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp index 48cf6c87dc..5934203333 100644 --- a/addons/medical/ACE_Medical_Actions.hpp +++ b/addons/medical/ACE_Medical_Actions.hpp @@ -250,6 +250,13 @@ class ACE_ArmLeft { EXCEPTIONS icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Adenosine); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment)); + EXCEPTIONS + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); @@ -404,6 +411,14 @@ class ACE_ArmRight { EXCEPTIONS icon = PATHTOF(UI\icons\autoInjector.paa); }; + + class Adenosine: Morphine { + displayName = CSTRING(Inject_Adenosine); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment)); + EXCEPTIONS + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached)); @@ -558,6 +573,13 @@ class ACE_LegLeft { EXCEPTIONS icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Atropine); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment)); + EXCEPTIONS + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); @@ -699,6 +721,13 @@ class ACE_LegRight { EXCEPTIONS icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Atropine); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment)); + EXCEPTIONS + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached)); diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp index 4217e43e91..54a8ba60f5 100644 --- a/addons/medical/ACE_Medical_SelfActions.hpp +++ b/addons/medical/ACE_Medical_SelfActions.hpp @@ -204,6 +204,13 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Atropine); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); @@ -302,6 +309,13 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Atropine); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached)); @@ -399,6 +413,13 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Atropine); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); @@ -484,6 +505,13 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); icon = PATHTOF(UI\icons\autoInjector.paa); }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Atropine); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached)); diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 23340965db..201db4519a 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -214,6 +214,12 @@ class ACE_Medical_Actions { animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} }; }; + class Adenosine: Morphine { + displayName = CSTRING(Inject_Adenosine); + displayNameProgress = CSTRING(Injecting_Adenosine); + items[] = {"ACE_adenosine"}; + litter[] = { {"All", "", {"ACE_MedicalLitter_adenosine"}} }; + }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); displayNameProgress = CSTRING(Injecting_Atropine); @@ -1370,11 +1376,20 @@ class ACE_Medical_Advanced { maxDose = 10; inCompatableMedication[] = {}; }; + class Adenosine { + painReduce = 0; + hrIncreaseLow[] = {-7, -10, 15}; + hrIncreaseNormal[] = {-15, -30, 20}; + hrIncreaseHigh[] = {-15, -35, 10}; + timeInSystem = 120; + maxDose = 6; + inCompatableMedication[] = {}; + }; class Atropine { painReduce = 0; - hrIncreaseLow[] = {-5, -7, 15}; - hrIncreaseNormal[] = {-10, -30, 20}; - hrIncreaseHigh[] = {-10, -20, 10}; + hrIncreaseLow[] = {-2, -5, 15}; + hrIncreaseNormal[] = {-10, -15, 20}; + hrIncreaseHigh[] = {-5, -20, 10}; timeInSystem = 120; maxDose = 6; inCompatableMedication[] = {}; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index bb98c7f1fa..a7b4765ce2 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -660,6 +660,9 @@ class CfgVehicles { class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase { model = QUOTE(PATHTOF(data\littergeneric_gloves.p3d)); }; + class ACE_MedicalLitter_adenosine: ACE_MedicalLitterBase { + model = QUOTE(PATHTOF(data\littergeneric_adenosine.p3d)); + }; class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase { model = QUOTE(PATHTOF(data\littergeneric_atropine.p3d)); }; @@ -723,6 +726,16 @@ class CfgVehicles { MACRO_ADDITEM(ACE_morphine,1); }; }; + class ACE_adenosineItem: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(Adenosine_Display); + author = ECSTRING(common,ACETeam); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_adenosine,1); + }; + }; class ACE_atropineItem: Item_Base_F { scope = 2; scopeCurator = 2; @@ -841,6 +854,7 @@ class CfgVehicles { MACRO_ADDITEM(ACE_elasticBandage,25); MACRO_ADDITEM(ACE_tourniquet,15); MACRO_ADDITEM(ACE_morphine,15); + MACRO_ADDITEM(ACE_adenosine,15); MACRO_ADDITEM(ACE_atropine,15); MACRO_ADDITEM(ACE_epinephrine,15); MACRO_ADDITEM(ACE_plasmaIV,7); diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 6de00eff22..4bd5452794 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -75,6 +75,17 @@ class CfgWeapons { mass = 1; }; }; + class ACE_adenosine: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Adenosine_Display); + picture = QUOTE(PATHTOF(ui\items\adenosine_x_ca.paa)); + model = QUOTE(PATHTOF(data\adenosine.p3d)); + descriptionShort = CSTRING(adenosine_Desc_Short); + descriptionUse = CSTRING(adenosine_Desc_Use); + class ItemInfo: InventoryItem_Base_F { + mass = 1; + }; + }; class ACE_atropine: ACE_ItemCore { scope = 2; displayName = CSTRING(Atropine_Display); @@ -84,7 +95,6 @@ class CfgWeapons { descriptionUse = CSTRING(Atropine_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; - }; }; class ACE_epinephrine: ACE_ItemCore { diff --git a/addons/medical/data/adenosine.p3d b/addons/medical/data/adenosine.p3d new file mode 100644 index 0000000000000000000000000000000000000000..fa9fb72c84a5298edadb7e4a94c97941408c94b7 GIT binary patch literal 10214 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 literal 0 HcmV?d00001 diff --git a/addons/medical/data/littergeneric_adenosine.p3d b/addons/medical/data/littergeneric_adenosine.p3d new file mode 100644 index 0000000000000000000000000000000000000000..4490a11c0e11d2e76712eac889d2621eecc38380 GIT binary patch literal 17876 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 nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente. Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi. + + Inject Adenosine + Inject Atropine Atropin injizieren @@ -241,6 +244,9 @@ Injetando Epinefrina ... Inietto l'epinefrina ... + + Injecting Adenosine ... + Injecting Atropine ... Atropin injizieren ... @@ -949,6 +955,15 @@ Um analgésico usado para combater dores moderadas e fortes. Analgetikum slouží k tlumení středně těžkých a těžkých bolestí + + Adenosine autoinjector + + + Used to counter effects of Epinephrine + + + A drug used to counter the effects of Epinephrine + Atropine autoinjector Атропин в пневмошприце diff --git a/addons/medical/ui/items/adenosine_x_ca.paa b/addons/medical/ui/items/adenosine_x_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..49b79e99e52d13e8d9805243d52663be9815b636 GIT binary patch literal 35563 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 KtN#EE1_1yNNf__| literal 0 HcmV?d00001 From 575f362fb668b9d2f2456863b3a6f2d36904c8ae Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 7 Feb 2016 13:10:38 +0100 Subject: [PATCH 09/40] Add setting for limiting usage of Epinephrine in basic medical #1792 Part of focus feature medical #3134. Default settings are inline with old default. --- addons/medical/ACE_Medical_Treatments.hpp | 3 +- addons/medical/ACE_Settings.hpp | 12 ++++++ addons/medical/CfgVehicles.hpp | 41 +++++++++++++++++++ addons/medical/XEH_preInit.sqf | 1 + .../fnc_moduleBasicMedicalSettings.sqf | 23 +++++++++++ addons/medical/stringtable.xml | 20 ++++++++- 6 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 201db4519a..834bc905ea 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -50,12 +50,13 @@ class ACE_Medical_Actions { allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; allowSelfTreatment = 1; category = "medication"; - requiredMedic = 1; + requiredMedic = QGVAR(medicSetting_basicEpi); treatmentTime = 3; items[] = {"ACE_epinephrine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} }; + treatmentLocations[] = {QGVAR(useLocation_basicEpi)}; }; class BloodIV: Bandage { displayName = CSTRING(Transfuse_Blood); diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 5c3ba86b12..e4dc1ea69c 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -133,6 +133,12 @@ class ACE_Settings { typeName = "SCALAR"; value = 0; }; + class GVAR(medicSetting_basicEpi) { + category = CSTRING(Category_Medical); + typeName = "SCALAR"; + value = 1; + values[] = {"Anyone", "Medics only", "Doctors only"}; + }; class GVAR(medicSetting_PAK) { category = CSTRING(Category_Medical); typeName = "SCALAR"; @@ -157,6 +163,12 @@ class ACE_Settings { value = 0; values[] = {"No", "Yes"}; }; + class GVAR(useLocation_basicEpi) { + category = CSTRING(Category_Medical); + typeName = "SCALAR"; + value = 0; + values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; + }; class GVAR(useLocation_PAK) { category = CSTRING(Category_Medical); typeName = "SCALAR"; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index a7b4765ce2..bddb8fc8a6 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -151,7 +151,48 @@ class CfgVehicles { sync[] = {}; }; }; + class ACE_moduleBasicMedicalSettings: ACE_Module { + scope = 2; + displayName = CSTRING(BasicMedicalSettings_Module_DisplayName); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + category = "ACE_medical"; + function = QUOTE(FUNC(moduleBasicMedicalSettings)); + functionPriority = 10; + isGlobal = 2; + isSingular = 1; + isTriggerActivated = 0; + isDisposable = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class medicSetting_basicEpi { + displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName); + description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description); + typeName = "NUMBER"; + class values { + class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; }; + class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; }; + class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; }; + }; + }; + class useLocation_basicEpi { + displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName); + description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description); + typeName = "NUMBER"; + class values { + class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; default = 1; }; + class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; }; + class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; }; + class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; }; + class disabled { name = ECSTRING(common,Disabled); value = 4;}; + }; + }; + }; + class ModuleDescription { + description = CSTRING(BasicMedicalSettings_Module_Description); + sync[] = {}; + }; + }; class ACE_moduleAdvancedMedicalSettings: ACE_Module { scope = 2; displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName); diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 78f3a6bbc0..a12ebf05ea 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -107,6 +107,7 @@ PREP(displayPatientInformation); PREP(displayTriageCard); PREP(dropDownTriageCard); PREP(moduleMedicalSettings); +PREP(moduleBasicMedicalSettings); PREP(moduleAdvancedMedicalSettings); PREP(moduleReviveSettings); PREP(moduleAssignMedicRoles); diff --git a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf new file mode 100644 index 0000000000..08076878f2 --- /dev/null +++ b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf @@ -0,0 +1,23 @@ +/* + * Author: Glowbal + * Module for adjusting the medical treatment settings + * + * Arguments: + * 0: The module logic + * 1: units + * 2: activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; + +if !(_activated) exitWith {}; + +[_logic, QGVAR(medicSetting_basicEpi), "medicSetting_basicEpi"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(useLocation_basicEpi), "useLocation_basicEpi"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index ab57789eb3..1a422f5fa1 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -3126,6 +3126,9 @@ Fourni un système médical pour les joueurs tout comme pour les IA. Egy orvosi rendszert ad játékosok és AI-k számára. + + Basic Medical Settings [ACE] + Advanced Medical Settings [ACE] Настройки усложненной медицины [ACE] @@ -3225,6 +3228,12 @@ Les unités subissent des dégats lors d'accident Sérülnek-e az egységek autós ütközés során? + + Allow Epinephrine + + + Who can use Epinephrine for full heal? (Basic medical only) + Allow PAK Использование аптечки @@ -3302,6 +3311,12 @@ Le Kit de Premier Secours doit il être enlevé à l'utilisation? Eltávolítódjon az elsősegélycsomag használatkor? + + Locations Epinephrine + + + Where can the Epinephrine be used? (Basic Medical) + Locations PAK Место использования аптечки @@ -3518,8 +3533,11 @@ A fájdalom csak ideiglenesen csökken, nem távolítódik el Боль приглушается только временно + + Configure the treatment settings from ACE Basic Medical + - Configure the treatment settings from ACE Medical + Configure the treatment settings from ACE Advanced Medical Настройка лечения в медицинской системе ACE Skonfiguruj zaawansowane ustawienia leczenia systemu medycznego ACE Configure las opciones de tratamiento del ACE Médico From e754c89c7336d510f89dcd8f89ed3e9a26dbe7b4 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 7 Feb 2016 13:18:19 +0100 Subject: [PATCH 10/40] Remove non functional event driven handleDamage --- addons/medical/XEH_init.sqf | 3 +- addons/medical/XEH_postInit.sqf | 5 - addons/medical/XEH_preInit.sqf | 5 - .../medical/functions/fnc_handleDamageNew.sqf | 186 ------------------ .../functions/fnc_handleDrowningDamage.sqf | 21 -- .../functions/fnc_handleFallDamage.sqf | 63 ------ .../functions/fnc_handleSelectionDamage.sqf | 71 ------- 7 files changed, 1 insertion(+), 353 deletions(-) delete mode 100644 addons/medical/functions/fnc_handleDamageNew.sqf delete mode 100644 addons/medical/functions/fnc_handleDrowningDamage.sqf delete mode 100644 addons/medical/functions/fnc_handleFallDamage.sqf delete mode 100644 addons/medical/functions/fnc_handleSelectionDamage.sqf diff --git a/addons/medical/XEH_init.sqf b/addons/medical/XEH_init.sqf index 8b2b0ae1cd..acdd50ce82 100644 --- a/addons/medical/XEH_init.sqf +++ b/addons/medical/XEH_init.sqf @@ -2,8 +2,7 @@ params ["_unit"]; -//_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; -_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamageNew)}]; +_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; if (local _unit) then { if (!EGVAR(common,settingsInitFinished)) exitWith { diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 26c12f6ddf..7345c2a54e 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -2,11 +2,6 @@ #include "script_component.hpp" -["medical_selectionDamage", {_this call FUNC(handleSelectionDamage)}] call EFUNC(common,addEventhandler); -["medical_fallDamage", {_this call FUNC(handleFallDamage)}] call EFUNC(common,addEventhandler); -["medical_drowningDamage", {_this call FUNC(handleDrowningDamage)}] call EFUNC(common,addEventhandler); -["medical_collisionDamage", {_this call FUNC(handleCollisionDamage)}] call EFUNC(common,addEventhandler); - GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"]; GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index a12ebf05ea..e8d6f0372d 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -42,11 +42,6 @@ PREP(handleDamage_fractures); PREP(handleDamage_internalInjuries); PREP(handleDamage_wounds); PREP(handleDamage_woundsOld); -PREP(handleDamageNew); -PREP(handleSelectionDamage); -PREP(handleFallDamage); -PREP(handleCollisionDamage); -PREP(handleDrowningDamage); PREP(handleUnitVitals); PREP(handleKilled); PREP(handleLocal); diff --git a/addons/medical/functions/fnc_handleDamageNew.sqf b/addons/medical/functions/fnc_handleDamageNew.sqf deleted file mode 100644 index 63278c6751..0000000000 --- a/addons/medical/functions/fnc_handleDamageNew.sqf +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Author: KoffeinFlummi, Glowbal, commy2 - * Main HandleDamage EH function. - * - * Arguments: - * 0: Unit That Was Hit - * 1: Name Of Hit Selection - * 2: Amount Of Damage - * 3: Shooter - * 4: Projectile - * - * Return Value: - * Damage To Be Inflicted - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit", "_selection", "_damage", "_shooter", "_projectile"]; -TRACE_5("ACE_DEBUG: HandleDamage Called",_unit,_selection,_damage,_shooter,_projectile); - -// bug, apparently can fire for remote units in special cases -if !(local _unit) exitWith { - TRACE_2("ACE_DEBUG: HandleDamage on remote unit!",_unit,isServer); - nil -}; - -// bug, assumed fixed, @todo excessive testing, if nothing happens remove -if (typeName _projectile == "OBJECT") then { - TRACE_3("ACE_DEBUG: HandleDamage found projectile instead of classname of ammo!",_unit,_projectile,typeOf _projectile); - _projectile = typeOf _projectile; - _this set [4, _projectile]; -}; - -// Exit now we disable damage, replaces "allowDamage false" -if !(_unit getVariable [QGVAR(allowDamage), true]) exitWith { - TRACE_2("ACE_DEBUG: HandleDamage damage disabled.",_selection,_unit); - if (_selection == "") then { - damage _unit - } else { - _unit getHit _selection - }; -}; - -// If damage is in dummy hitpoints, "hands" and "legs", don't change anything -if (_selection == "hands") exitWith {_unit getHit "hands"}; -if (_selection == "legs") exitWith {_unit getHit "legs"}; -if (_selection == "arms") exitWith {_unit getHit "arms"}; - -// Deal with the new hitpoint and selection names introduced with Arma v1.50 and later. -// This will convert new selection names into selection names that the medical system understands -// TODO This should be cleaned up when we revisit the medical system at a later stage -// and instead we should deal with the new hitpoints directly -_selection = [_unit, _selection, _hitPointIndex] call FUNC(translateSelections); - -diag_log text str _selection; -diag_log text str _damage; - -// systemChat format["_selection %1 _damage %2", _selection, _damage]; - -private ["_damageReturn", "_newDamage", "_index"]; - -// apply damage scripted -if (_selection == "") then { - _damageReturn = _damage; - _newDamage = _damage - damage _unit; - - _index = -1; - - private "_cachedStructuralDamage"; - _cachedStructuralDamage = _unit getVariable [QGVAR(cachedStructuralDamageNew), 0]; - - // handle damage always tries to start and end with the same structural damage call. Use that to find and set the final damage. discard everything the game discards too. - // this correctly handles: bullets, explosions, fire - if (_damage == _cachedStructuralDamage) then { - private _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; - private _cachedNewHitpointProjectiles = _unit getVariable [QGVAR(cachedNewHitpointProjectiles), ["", "", "", "", "", ""]]; - - // this is the only point damage actually counts. all additional vitality functions should use these values. - { - if (_x > 0) then { - ["medical_selectionDamage", [_unit, GVAR(Selections) select _forEachIndex, _x, _cachedNewHitpointProjectiles select _forEachIndex]] call EFUNC(common,localEvent); - }; - } forEach _cachedNewHitpointDamages; - } else { - scopeName "findDamageSource"; - - // check for fall damage. this triggers twice, but seems to happen on the same frame. shouldn't fall twice in a few frames anyway. tested at 7FPS on local host MP - if (animationState _unit select [0,4] == "afal") then { - private "_cachedLastFallDamageFrame"; - _cachedLastFallDamageFrame = _unit getVariable [QGVAR(cachedLastFallDamageFrame), -1]; - - if (diag_frameno != _cachedLastFallDamageFrame) then { - ["medical_fallDamage", [_unit, _newDamage]] call EFUNC(common,localEvent); - _unit setVariable [QGVAR(cachedLastFallDamageFrame), diag_frameno]; - }; - - _damageReturn = damage _unit; - breakOut "findDamageSource"; - }; - - // check for drowning damage. Pretty relyable damage output. triggers only once. - if (getOxygenRemaining _unit < 0.5) then { - // typical drowning damage - if (_newDamage == 0.005) then { - ["medical_drowningDamage", [_unit, _newDamage]] call EFUNC(common,localEvent); - _damageReturn = damage _unit - 0.005; // engine applies damage before hd call. subtract again here. - breakOut "findDamageSource"; - }; - - // suffocated under water might use atypical new damage (mostly 1.005) - if (getOxygenRemaining _unit == 0) then { - ["medical_drowningDamage", [_unit, _newDamage min 1]] call EFUNC(common,localEvent); - _damageReturn = damage _unit; // you will die regardless of hd return value - breakOut "findDamageSource"; - }; - }; - - // check for misc. damage. Probably collision. - if (_projectile == "" && _newDamage > 0) then { - private "_cachedLastCollisionDamageFrame"; - _cachedLastCollisionDamageFrame = _unit getVariable [QGVAR(cachedLastFallDamageFrame), -1]; - - // collision only happens once. engine ignores all further calls on that frame as well - if (_cachedLastCollisionDamageFrame != diag_frameno) then { - _unit setVariable [QGVAR(cachedLastFallDamageFrame), diag_frameno]; - _unit setVariable [QGVAR(cachedLastCollisionDamage), 0]; - - ["medical_collisionDamage", [_unit, _newDamage max (_unit getVariable [QGVAR(cachedLastCollisionDamage), 0])]] call EFUNC(common,localEvent); - - _damageReturn = damage _unit - _newDamage; - breakOut "findDamageSource"; - }; - _damageReturn = damage _unit; - }; - }; - - // reset everything, get ready for the next bullet - _unit setVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; - _unit setVariable [QGVAR(cachedNewHitpointProjectiles), ["", "", "", "", "", ""]]; - _unit setVariable [QGVAR(cachedStructuralDamageNew), _damage]; - -} else { - // selections are done scripted. return same value to change nothing. - _damageReturn = _unit getHit _selection; - _newDamage = _damage - _damageReturn; // _damageReturn because it saves one getHit call - - _index = GVAR(SELECTIONS) find _selection; - - // a selection we care for was hit. now save the new damage to apply it by a later structural damage call - if (_index != -1) then { - private _cachedNewHitpointDamages = _unit getVariable [QGVAR(cachedNewHitpointDamages), [0,0,0,0,0,0]]; - private _cachedNewHitpointProjectiles = _unit getVariable [QGVAR(cachedNewHitpointProjectiles), ["", "", "", "", "", ""]]; - - // prevents multiple selections from being hit by one bullet due to hitpoint radius system - { - // ignore this damage if it's a secondary selection (minor damage) - if (_x > _newDamage) exitWith { - _newDamage = 0; - }; - - // overwrite minor damage in secondary selections - if (_x > 0) then { - _cachedNewHitpointDamages set [_forEachIndex, 0]; - _cachedNewHitpointProjectiles set [_forEachIndex, ""]; - }; - } forEach _cachedNewHitpointDamages; - - if (_cachedNewHitpointDamages select _index < _newDamage) then { - // apply these by the next matching hd call with selection "". If that one is not matching, this gets discarded - _cachedNewHitpointDamages set [_index, _newDamage]; - _cachedNewHitpointProjectiles set [_index, _projectile]; - } else { - diag_log format["PREVENTED OVERWRITE: %1", [_newDamage, _projectile, _selection]]; - }; - _unit setVariable [QGVAR(cachedNewHitpointDamages), _cachedNewHitpointDamages]; - _unit setVariable [QGVAR(cachedNewHitpointProjectiles), _cachedNewHitpointProjectiles]; - }; - - // use this to detect collision damage. - if (_projectile == "") then { - _unit setVariable [QGVAR(cachedLastCollisionDamage), _newDamage max (_unit getVariable [QGVAR(cachedLastCollisionDamage), 0])]; - }; -}; - -_damageReturn diff --git a/addons/medical/functions/fnc_handleDrowningDamage.sqf b/addons/medical/functions/fnc_handleDrowningDamage.sqf deleted file mode 100644 index 1116d07762..0000000000 --- a/addons/medical/functions/fnc_handleDrowningDamage.sqf +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Author: Glowbal - * Handle drowning damage to unit - * - * Arguments: - * 0: Unit for which the hitpoint damage will be sorted out - * 1: new damage - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit", "_newDamage"]; - -// At the moment we will just not do anything -// We reserve this until a later stage -// A unit will automatically die once oxygen has ran out anyway diff --git a/addons/medical/functions/fnc_handleFallDamage.sqf b/addons/medical/functions/fnc_handleFallDamage.sqf deleted file mode 100644 index 3161364f98..0000000000 --- a/addons/medical/functions/fnc_handleFallDamage.sqf +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Author: Glowbal - * Handle fall damage to unit - * - * Arguments: - * 0: Unit for which the hitpoint damage will be sorted out - * 1: new damage - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit", "_newDamage"]; - -private _part = ["leg_l"] call FUNC(selectionNameToNumber); -private _part2 = ["leg_r"] call FUNC(selectionNameToNumber); - -// Store the new damage values in our damageBodyParts store -private _damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; -_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; -_damageBodyParts set [_part2, (_damageBodyParts select _part2) + _newDamage]; -_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; - -// our unconscious calculation for selection damages -if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { - // If it reaches this, we can assume that the hit did not kill this unit, as this function is called some time after the damage has been passed. - if ([_unit, _part, _newDamage * 1.3] call FUNC(determineIfFatal)) then { - [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); - } else { - if ([_unit, _part2, _newDamage * 1.3] call FUNC(determineIfFatal)) then { - [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); - }; - }; -}; - -if (GVAR(level) > 1) then { // advanced medical is enabled - [_unit, "leg_l", _newDamage, "", "falling"] call FUNC(handleDamage_assignWounds); // cover both left and right legs - [_unit, "leg_r", _newDamage, "", "falling"] call FUNC(handleDamage_assignWounds); -} else { - // New pain values - _pain = _unit getVariable [QGVAR(pain), 0]; - _pain = _pain + (_newDamage / 4) * (1 - (_unit getVariable [QGVAR(morphine), 0])); - _unit setVariable [QGVAR(pain), _pain min 1, true]; -}; - -// Store the hitpoint values so blood ends up on the unit textures -_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; -TRACE_2("ACE_DEBUG: HandleSelectionDamage Broadcast value here", _unit, _unit getVariable QGVAR(bodyPartStatus)); - -EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); -_unit setHitPointDamage ["hitHead", _headDamage min 0.95]; -_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95]; -_unit setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95]; -_unit setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; - -{ - private _hitPointName = [_unit, _x, true] call FUNC(translateSelections); - _unit setHitPointDamage [_hitPointName, (_damageBodyParts select _foreachIndex) min 0.95]; -}foreach GVAR(SELECTIONS); diff --git a/addons/medical/functions/fnc_handleSelectionDamage.sqf b/addons/medical/functions/fnc_handleSelectionDamage.sqf deleted file mode 100644 index a72f973c79..0000000000 --- a/addons/medical/functions/fnc_handleSelectionDamage.sqf +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Author: Glowbal, Commy2 & KoffeinFlummi - * Sets the hitpoint damage for an unit to the correct values - * - * Arguments: - * 0: Unit for which the hitpoint damage will be sorted out - * 1: Selection name - * 2: new damage - * 3: projectile - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit", "_selection", "_newDamage", "_projectile"]; - -private _part = [_selection] call FUNC(selectionNameToNumber); -if (_part < 0) exitwith {systemchat format["Selection name part is below 0"]}; - -// Store the new damage values in our damageBodyParts store -private _damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; -_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; -_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts]; - -// our unconscious calculation for selection damages -if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { - // If it reaches this, we can assume that the hit did not kill this unit, as this function is called some time after the damage has been passed. - if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { - [_unit, true, 0.5+random(10)] call FUNC(setUnconscious); - }; -}; - -if (GVAR(level) > 1) then { // advanced medical is enabled - _typeOfDamage = [_projectile] call FUNC(getTypeOfDamage); // Get the exact type of damage - [_unit, _selection, _newDamage, _projectile, _typeOfDamage] call FUNC(handleDamage_assignWounds); - - // TODO Disabled until implemented fully - //if (GVAR(enableAirway)) then { - // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway); - //}; - //if (GVAR(enableFractures)) then { - // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures); - //}; - //if (GVAR(enableInternalBleeding)) then { - // [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); - //}; -} else { - // New pain values - _pain = _unit getVariable [QGVAR(pain), 0]; - _pain = _pain + (_newDamage / 4) * (1 - (_unit getVariable [QGVAR(morphine), 0])); - _unit setVariable [QGVAR(pain), _pain min 1, true]; -}; - -// Store the hitpoint values so blood ends up on the unit textures -_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; -TRACE_2("ACE_DEBUG: HandleSelectionDamage Broadcast value here", _unit, _unit getVariable QGVAR(bodyPartStatus)); - -EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); -_unit setHitPointDamage ["hitHead", _headDamage min 0.95]; -_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95]; -_unit setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95]; -_unit setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; - -{ - private _hitPointName = [_unit, _x, true] call FUNC(translateSelections); - _unit setHitPointDamage [_hitPointName, (_damageBodyParts select _foreachIndex) min 0.95]; -}foreach GVAR(SELECTIONS); From 2dd835b56b49bf46412f6073d60b912cd05acda9 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Thu, 18 Feb 2016 15:58:44 -0300 Subject: [PATCH 11/40] Substantially increase overheating when using silencers or flash suppresors. Optimize overheating calculations for the player through caching. --- addons/overheating/XEH_postInit.sqf | 5 ++- addons/overheating/functions/fnc_overheat.sqf | 43 +++++++++++++++---- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 38c0298b0f..29ad6edf28 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -13,8 +13,9 @@ if (isServer) then { if !(hasInterface) exitWith {}; -GVAR(cacheWeaponData) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0]; -GVAR(cacheWeaponData) setText QGVAR(cacheWeaponData); +GVAR(cacheWeaponData) = call CBA_fnc_createNamespace(); +GVAR(cacheAmmoData) = call CBA_fnc_createNamespace(); +GVAR(cacheSilencerData) = call CBA_fnc_createNamespace(); // Add keybinds ["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon), diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index 8c934e80ad..e85ec8c1c5 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -20,22 +20,47 @@ params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"]; TRACE_4("params",_unit,_weapon,_ammo,_projectile); -//Only do heat calculations every 3 bullets +// Only do heat calculations every 3 bullets if (((_unit ammo _weapon) % 3) != 0) exitWith {}; BEGIN_COUNTER(overheat); -// Get physical parameters -private _bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass"); -if (_bulletMass == 0) then { - // If the bullet mass is not configured, estimate it - _bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber")); +// Get bullet parameters +private _bulletMass = GVAR(cacheAmmoData) getVariable _ammo; +if (!isNil "_bulletMass") then { + _bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass"); + if (_bulletMass == 0) then { + // If the bullet mass is not configured, estimate it + _bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber")); + }; + GVAR(cacheAmmoData) setVariable [_ammo, _bulletMass]; }; -//https://en.wikipedia.org/wiki/Physics_of_firearms - Projectile motion is roughly equal to Barrel heat -//Muzzle Engergy = 1/2 * m * v^2 (1/2 * 0.001 g/kg * bulletMass (grams) * v^2) -//Multiple by 3 becase we only calc every 3rd bullet: (3 * 1/2 * 0.001) = 0.0015 + +// Projectile motion is roughly equal to Barrel heat +// Ref: https://en.wikipedia.org/wiki/Physics_of_firearms +// Muzzle Engergy = 1/2 * m * v^2 = (1/2 * 0.001 g/kg * bulletMass (grams) * v^2) +// Multiple by 3 becase we only calc every 3rd bullet: (3 * 1/2 * 0.001) = 0.0015 private _energyIncrement = 0.0015 * _bulletMass * (vectorMagnitudeSqr velocity _projectile); +// Increase overheating depending on how obstrusive is the current supressor, +// if any. Typical arma supressors have visibleFire=0.5 and audibleFire=0.3, +// so they produce x2.1 overheating +private _silencer = switch (_weapon) do { + case (primaryWeapon _unit) : {(primaryWeaponItems _unit) select 0}; + case (handgunWeapon _unit) : {(handgunItems _unit) select 0}; + default {""}; +}; +if (_silencer != "") then { + private _silencerCoef = GVAR(cacheSilencerData) getVariable _silencer; + if (!isNil "_silencerCoef") then { + _silencerCoef = 1 + + (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire")) + (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire")); + GVAR(cacheSilencerData) setVariable [_silencer, _silencerCoef]; + }; + _energyIncrement = _energyIncrement * _silencerCoef; +}; + TRACE_2("heat",_bulletMass,_energyIncrement); [_unit, _weapon, _energyIncrement] call FUNC(updateTemperature); From e22b1c0d25d1a7f702de2976437c5527a0d99183 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Thu, 18 Feb 2016 16:07:39 -0300 Subject: [PATCH 12/40] Derp --- addons/overheating/XEH_postInit.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 29ad6edf28..995d85728c 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -13,9 +13,9 @@ if (isServer) then { if !(hasInterface) exitWith {}; -GVAR(cacheWeaponData) = call CBA_fnc_createNamespace(); -GVAR(cacheAmmoData) = call CBA_fnc_createNamespace(); -GVAR(cacheSilencerData) = call CBA_fnc_createNamespace(); +GVAR(cacheWeaponData) = call CBA_fnc_createNamespace; +GVAR(cacheAmmoData) = call CBA_fnc_createNamespace; +GVAR(cacheSilencerData) = call CBA_fnc_createNamespace; // Add keybinds ["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon), From 2c2626aade9e32a4cbba1e8a8f1c3eab6c62b651 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 19 Feb 2016 01:33:27 -0600 Subject: [PATCH 13/40] Add flashsupressor to asdg_MuzzleSlot_338 --- addons/flashsuppressors/CfgWeapons.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index 198fec7316..f24a43aa24 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -1,3 +1,10 @@ +class asdg_MuzzleSlot; +class asdg_MuzzleSlot_338: asdg_MuzzleSlot { // for .338 universal mount suppressors + class compatibleItems { + ACE_muzzle_mzls_338 = 1; + }; +}; + class MuzzleSlot; @@ -62,14 +69,6 @@ class CfgWeapons { }; }; - class DMR_02_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_338"}; - }; - }; - }; - class DMR_03_base_F: Rifle_Long_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { class MuzzleSlot: MuzzleSlot { From 54b71cc7ba7ccc0c33b3ff9382e98dfa1280b1a3 Mon Sep 17 00:00:00 2001 From: gienkov Date: Sat, 20 Feb 2016 13:36:53 +0100 Subject: [PATCH 14/40] integrate captivity modules with 3DEN --- addons/captives/CfgEden.hpp | 30 ++++++++++++++++++++++++++++++ addons/captives/config.cpp | 1 + 2 files changed, 31 insertions(+) create mode 100644 addons/captives/CfgEden.hpp diff --git a/addons/captives/CfgEden.hpp b/addons/captives/CfgEden.hpp new file mode 100644 index 0000000000..8da21e7d39 --- /dev/null +++ b/addons/captives/CfgEden.hpp @@ -0,0 +1,30 @@ +class Cfg3DEN { + class Object { + class AttributeCategories { + class ace_attributes { + class Attributes { + class ace_isHandcuffed { + property = QUOTE(ace_isHandcuffed); + control = "Checkbox"; + displayName = CSTRING(ModuleHandcuffed_DisplayName); + tooltip = CSTRING(ModuleHandcuffed_Description); + expression = QUOTE([ARR_2(_this,_value)]call FUNC(setHandcuffed)); + typeName = "BOOL"; + condition = "objectBrain"; + defaultValue = false; + }; + class ace_isSurrendered { + property = QUOTE(ace_isSurrendered); + control = "Checkbox"; + displayName = CSTRING(ModuleSurrender_DisplayName); + tooltip = CSTRING(ModuleSurrender_Description); + expression = QUOTE([ARR_2(_this,_value)]call FUNC(setSurrendered)); + typeName = "BOOL"; + condition = "objectBrain"; + defaultValue = false; + }; + }; + }; + }; + }; +}; diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp index a9ec2950ee..c87408b341 100644 --- a/addons/captives/config.cpp +++ b/addons/captives/config.cpp @@ -17,3 +17,4 @@ class CfgPatches { #include "CfgMoves.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" +#include "CfgEden.hpp" \ No newline at end of file From 1b03ee76fd21ea1f71b0bc3380a9a107ad0113ac Mon Sep 17 00:00:00 2001 From: gienkov Date: Sat, 20 Feb 2016 14:07:39 +0100 Subject: [PATCH 15/40] tabs --- addons/captives/CfgEden.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/captives/CfgEden.hpp b/addons/captives/CfgEden.hpp index 8da21e7d39..6ee6230ee5 100644 --- a/addons/captives/CfgEden.hpp +++ b/addons/captives/CfgEden.hpp @@ -3,17 +3,17 @@ class Cfg3DEN { class AttributeCategories { class ace_attributes { class Attributes { - class ace_isHandcuffed { + class ace_isHandcuffed { property = QUOTE(ace_isHandcuffed); control = "Checkbox"; displayName = CSTRING(ModuleHandcuffed_DisplayName); tooltip = CSTRING(ModuleHandcuffed_Description); - expression = QUOTE([ARR_2(_this,_value)]call FUNC(setHandcuffed)); + expression = QUOTE([ARR_2(_this,_value)]call FUNC(setHandcuffed)); typeName = "BOOL"; condition = "objectBrain"; defaultValue = false; }; - class ace_isSurrendered { + class ace_isSurrendered { property = QUOTE(ace_isSurrendered); control = "Checkbox"; displayName = CSTRING(ModuleSurrender_DisplayName); From c9aa221b01349335f424980c4a21ef3a719c1ad3 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 20 Feb 2016 12:01:34 -0600 Subject: [PATCH 16/40] Convert other weapons with join muzzles --- addons/flashsuppressors/CfgWeapons.hpp | 80 +++++--------------------- 1 file changed, 15 insertions(+), 65 deletions(-) diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index f24a43aa24..bb720262f6 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -4,7 +4,21 @@ class asdg_MuzzleSlot_338: asdg_MuzzleSlot { // for .338 universal mount suppres ACE_muzzle_mzls_338 = 1; }; }; - +class asdg_MuzzleSlot_762: asdg_MuzzleSlot { // for 7.62x51 universal mount suppressors + class compatibleItems { + ACE_muzzle_mzls_B = 1; + }; +}; +class asdg_MuzzleSlot_93x64: asdg_MuzzleSlot { // for 9.3x64 universal mount suppressors + class compatibleItems { + ACE_muzzle_mzls_93mmg = 1; + }; +}; +class asdg_MuzzleSlot_9MM_SMG: asdg_MuzzleSlot { // for 9x19mm universal mount SMG suppressors + class compatibleItems { + ACE_muzzle_mzls_smg_02 = 1; + }; +}; class MuzzleSlot; @@ -53,14 +67,6 @@ class CfgWeapons { class WeaponSlotsInfo; }; - class EBR_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; - }; - class DMR_01_base_F: Rifle_Long_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { class MuzzleSlot: MuzzleSlot { @@ -69,46 +75,6 @@ class CfgWeapons { }; }; - class DMR_03_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; - }; - - class DMR_05_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_93mmg"}; - }; - }; - }; - - class DMR_06_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; - }; - - class MMG_01_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_93mmg"}; - }; - }; - }; - - class MMG_02_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_338"}; - }; - }; - }; - class LMG_Mk200_F: Rifle_Long_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { class MuzzleSlot: MuzzleSlot { @@ -147,14 +113,6 @@ class CfgWeapons { /* SMGs */ - class pdw2000_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; - }; - }; - }; - class SMG_01_Base: Rifle_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { class MuzzleSlot: MuzzleSlot { @@ -163,14 +121,6 @@ class CfgWeapons { }; }; - class SMG_02_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; - }; - }; - }; - /* Pistols */ From d00587f367adf8c89638f6e06cf25dbabc421972 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 20 Feb 2016 17:40:19 -0300 Subject: [PATCH 17/40] Minor fixes --- addons/overheating/functions/fnc_overheat.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index e85ec8c1c5..57a4bd7cba 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -27,7 +27,7 @@ BEGIN_COUNTER(overheat); // Get bullet parameters private _bulletMass = GVAR(cacheAmmoData) getVariable _ammo; -if (!isNil "_bulletMass") then { +if (isNil "_bulletMass") then { _bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass"); if (_bulletMass == 0) then { // If the bullet mass is not configured, estimate it @@ -52,9 +52,9 @@ private _silencer = switch (_weapon) do { }; if (_silencer != "") then { private _silencerCoef = GVAR(cacheSilencerData) getVariable _silencer; - if (!isNil "_silencerCoef") then { + if (isNil "_silencerCoef") then { _silencerCoef = 1 + - (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire")) + (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire")) + (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire")); GVAR(cacheSilencerData) setVariable [_silencer, _silencerCoef]; }; From 073a476ed120dd2bcbf232056d994104b4c0516f Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 22:57:45 +0100 Subject: [PATCH 18/40] Update German Stringtable Since my other PR was merged I have to open another one to add a few things a fix one or two mistakes. It should be done in <30 minutes. (Guess you guys want to realease 3.5.0 as soon as possible.) --- addons/overheating/stringtable.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 3ecd67c8f6..4e56521601 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -51,7 +51,7 @@ Overheating Dispersion - Ungenauigkeit bei Überhitzung + Streuung bei Überhitzung Wpływ na rozrzut Dispersione Surriscaldamento @@ -206,4 +206,4 @@ Температура - \ No newline at end of file + From b41efc39ff018cd8453bbcfacbdafdcfe03d310b Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:02:02 +0100 Subject: [PATCH 19/40] cargo --- addons/cargo/stringtable.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 04569e8a25..a7ac525a7b 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -165,6 +165,7 @@ Object's Size + Objektgröße Rozmiar obiektu Dimensioni dell'oggetto From cdb58b62330e1f1fae6c3f1ba92eb0f875a566f8 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:06:29 +0100 Subject: [PATCH 20/40] common --- addons/common/stringtable.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 95b7a47718..a8c485cd38 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -729,6 +729,7 @@ ACE3 Equipment + ACE-Ausrüstung ACE3 Wyposażenie Equipamentos ACE3 ACE3 Снаряжение From d4cca149290fe97b7be0151c6444d53f15daf609 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:19:51 +0100 Subject: [PATCH 21/40] explosives --- addons/explosives/stringtable.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 3aee559b4f..bcccb1f601 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -39,7 +39,7 @@ Detonate All - Zünden Alles + Alle Zünden Detonar Todo Подрыв всех Odpálit VŠE @@ -455,7 +455,7 @@ No triggers available for %1 Brak dostępnych zapalników dla %1 No hay detonadores disponibles para %1 - Keine Auslöser vorhanden für %1 + Keine Auslöser für %1 vorhanden Pas de mise à feu disponible pour %1 Žádný detonátor k dispozici pro %1 Nessun attivatore disponibile per %1 @@ -635,7 +635,7 @@ M6 SLAM Mine (Bottom Attack) - + M6-SLAM-Mine (Bodenangriff) @@ -647,7 +647,7 @@ M6 SLAM Mine (Side Attack) - + M6-SLAM-Mine (Seitenangriff) @@ -659,7 +659,7 @@ Large IED (Urban, Pressure Plate) - + Große USBV (Stadt, Druckplatte) @@ -671,7 +671,7 @@ Large IED (Dug-in, Pressure Plate) - + Große USBV (Eingegraben, Druckplatte) @@ -683,7 +683,7 @@ Small IED (Urban, Pressure Plate) - + Kleine USBV (Stadt, Druckplatte) @@ -695,7 +695,7 @@ Small IED (Dug-in, Pressure Plate) - + Kleine USBV (Eingegraben, Druckplatte) From 5569790e0b2097d468aca07b841cbd40b63c1cf6 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:25:19 +0100 Subject: [PATCH 22/40] hearing --- addons/hearing/stringtable.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 14d6deb38b..d95b96d6ae 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -111,6 +111,7 @@ Remove tinnitus effect when the player takes hearing damage + Deaktiviert "Ohrfiepen" wenn der Spieler Hörschäden davonträgt. Hearing From 91bdceead689fe02d12539272670e335213cb6b2 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:27:32 +0100 Subject: [PATCH 23/40] interaction --- addons/interaction/stringtable.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index c81277ce24..223ddc5a1a 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -703,10 +703,12 @@ Turn on + Aktivieren Włącz Turn off + Deaktivieren Wyłącz From 747cd8c4cfdac2ef8f62063ee5800d24fa4a5916 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:33:12 +0100 Subject: [PATCH 24/40] Viewdistance --- addons/viewdistance/stringtable.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 72df9200ad..d106df7da8 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -255,6 +255,7 @@ FoV Based + Sichtfeld basiert Зависит от зума Baseado em FoV Založeno na FoV @@ -310,4 +311,4 @@ Impostazioni Video - \ No newline at end of file + From 50dc6ec3418783247d9ece88287f00007558cbbf Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:43:16 +0100 Subject: [PATCH 25/40] finger Iam not happy with my translation in any way. "Zeige Zeiger" sounds terrible "Zeige Fingerzeig (middlefinger)" can be misunderstood (maybe there is a nice solution Iam not aware of.) This is truely a pain in the ass --- addons/finger/stringtable.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 6383aaf82b..16230b23c0 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -3,6 +3,7 @@ Show pointing indicator to self + Zeige Fingerzeig einem selbst Индикатор пальца для показывающего Afficher un indicateur de pointage pour soit même Pokaż indykator wskazywania palcem dla siebie @@ -14,6 +15,7 @@ Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator + Zeigt ein Symbol für den zeigenden Spieler. Diese Option beeinflusst nicht, ob andere Spieler dies sehen können. Отображать индикатор указания пальцем для показывающего игрока. Эта настройка не влияет на то, будут ли другие игроки видеть индикатор Affiche l'indicateur pour le joueur qui pointe. Cette option n'affecte pas les autres joueurs Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie. @@ -25,6 +27,7 @@ Pointing indicator + Fingerzeiger Anzeige Индикатор указания пальцем Indicateur de pointage Indykator palca @@ -36,6 +39,7 @@ Color of the pointing indicator circle + Farbe des Zeigersymbols Цвет индикатора указания пальцем Couleur de l'indicateur Kolor okręgu wyświetlanego przy wskazywaniu palcem @@ -47,6 +51,7 @@ Action "point a finger at" + Aktion: "Zeiger Finger auf" Действие "показать пальцем на" Action 'Pointer le doigt à" Akcja "wskaż palcem" @@ -58,6 +63,7 @@ Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. + Zeigt anderen,nahen Spielern die eigene Blickrichtung mittels eines Symbols. Kann dauerhaft ausgeführt werden. Montre du doigt et affiche un marqueur virtuel de la direction pointée aux uinités proches. Peut être maintenu Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany. Mutat, és elhelyez egy virtuális jelölőt a nézett területhez közeli egységekhez. Lenyomva tartható. @@ -69,6 +75,7 @@ Pointing Settings + Fingerzeig Einstellungen Option "Montrer du doigt" Ustawienia wskazywania palcem Ujj beállításai @@ -80,6 +87,7 @@ Pointing Enabled + Fingerzeig aktiviert Activer "Montrer du doigt" Aktywuj wskazywanie Mutatás engedélyezése @@ -91,6 +99,7 @@ Pointing Max Range + Fingerzeig: Maximale Reichweite Distance maximale du pointage Maks. zasięg wskazywania Ujj maximum hatótávja @@ -102,6 +111,7 @@ Max range between players to show the pointing indicator [default: 4 meters] + Maximale Reichweite zwischen Spielern, welche den Fingerzeig des anderen sehen können. (Standart: 4 Meter) Distance maximale entre joueurs pour afficher l'indicateur (défaut: 4 mètres) Określ dystans na jakim można wskazywać coś palcem innym graczom. [domyślnie: 4m] A maximális távolság, amelyben a közeli játékosoknak megjelenik az indikátor. [alapértelmezett: 4 méter] From fb20492573143c5fe5fb53c924cd78f87f45ad9c Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 20 Feb 2016 23:53:02 +0100 Subject: [PATCH 26/40] switchunits --- addons/switchunits/stringtable.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 0315768091..1afef6ccd4 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -190,6 +190,7 @@ Module allows you to switch side during the game. + Dieses Modul gestattet die Fraktion während des Spiels zu wechseln Moduł ten pozwala na zmianę strony w trakcie gry. Tento modul umožňuje přepínání mazi dostupnými stranami. Este módulo permite mudar o lado à disposição dos jogadores. @@ -198,4 +199,4 @@ Questo modulo ti permette di cambiare lato durante la partita. - \ No newline at end of file + From 8b932fd5a0cecf992cf35de2e9e985397c16d133 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 20 Feb 2016 16:58:45 -0600 Subject: [PATCH 27/40] Fix some undefined functions / strings --- addons/advanced_ballistics/XEH_postInit.sqf | 2 -- addons/cargo/CfgVehicles.hpp | 2 +- addons/gestures/CfgVehicles.hpp | 2 +- addons/medical/XEH_postInit.sqf | 2 +- .../medical/functions/fnc_addToTriageCard.sqf | 2 +- .../functions/fnc_seekerType_Optic.sqf | 2 +- addons/repair/functions/fnc_setDamage.sqf | 14 ++------ addons/zeus/CfgVehicles.hpp | 36 +++++++++---------- 8 files changed, 26 insertions(+), 36 deletions(-) diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index 498006d83e..a541d30ce8 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -33,8 +33,6 @@ if (!hasInterface) exitWith {}; ["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); ["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); - [] call FUNC(updateTrajectoryPFH); - }] call EFUNC(common,addEventHandler); #ifdef DEBUG_MODE_FULL diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index caf5fbb843..9104533302 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -53,7 +53,7 @@ class CfgVehicles { }; }; class ModuleDescription: ModuleDescription { - description = CSTRING(module_MakeLoadable_description); + description = CSTRING(makeLoadable_description); sync[] = {"AnyStaticObject"}; }; }; diff --git a/addons/gestures/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp index 6ada84c736..d3c7b5ca21 100644 --- a/addons/gestures/CfgVehicles.hpp +++ b/addons/gestures/CfgVehicles.hpp @@ -127,7 +127,7 @@ class CfgVehicles { }; class class GVAR(Hi) { - displayName = CSTRING(Gestures_Hi); + displayName = CSTRING(Hi); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3);); showDisabled = 1; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 92ca46ce86..5d29d22cec 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -15,7 +15,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; ["actionCheckPulseLocal", DFUNC(actionCheckPulseLocal)] call EFUNC(common,addEventHandler); ["addToInjuredCollection", DFUNC(addToInjuredCollection)] call EFUNC(common,addEventHandler); ["addToMedicalLog", DFUNC(addToLog)] call EFUNC(common,addEventHandler); -["addToTriageList", DFUNC(addToTriageList)] call EFUNC(common,addEventHandler); +["addToTriageCard", DFUNC(addToTriageCard)] call EFUNC(common,addEventHandler); ["setDead", DFUNC(setDead)] call EFUNC(common,addEventHandler); ["setHitPointDamage", DFUNC(setHitPointDamage)] call EFUNC(common,addEventHandler); ["setUnconscious", DFUNC(setUnconscious)] call EFUNC(common,addEventHandler); diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 6fc9777ddf..ca54d8cd27 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -18,7 +18,7 @@ private ["_log", "_inList", "_amount"]; params ["_unit", "_newItem"]; if (!local _unit) exitWith { - ["addToTriageList", _unit, _this] call EFUNC(common,targetEvent); + ["addToTriageCard", _unit, _this] call EFUNC(common,targetEvent); }; _log = _unit getVariable [QGVAR(triageCard), []]; diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 1cc71c1d94..0d80a2309e 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -27,7 +27,7 @@ _angleOkay = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngl _losOkay = false; if(_angleOkay) then { - _losOkay = [_projectile, _target] call FUNC(checkSeekerLos); + _losOkay = [_projectile, _target] call FUNC(checkSeekerLos); //Note: Func does not exist? probably FUNC(checkLos)?? }; TRACE_2("", _angleOkay, _losOkay); diff --git a/addons/repair/functions/fnc_setDamage.sqf b/addons/repair/functions/fnc_setDamage.sqf index 410a9b0396..78c7cae709 100644 --- a/addons/repair/functions/fnc_setDamage.sqf +++ b/addons/repair/functions/fnc_setDamage.sqf @@ -23,23 +23,15 @@ TRACE_2("params",_vehicle,_damage); if !(local _vehicle) exitWith {}; // save array with damage values of all hitpoints -private ["_hitPoints", "_hitPointDamages"]; - -_hitPoints = [_vehicle] call EFUNC(common,getHitpoints); - -_hitPointDamages = []; - -{ - _hitPointDamages set [_forEachIndex, _vehicle getHitPointDamage _x]; -} forEach _hitPoints; +(getAllHitPointsDamage _vehicle) params [["_allHitPoints", []], ["_allHitPointsSelections", []], ["_allHitPointDamages", []]]; // set damage of the vehicle _vehicle setDamage _damage; // restore original hitpoint damage values { - _vehicle setHitPointDamage [_x, _hitPointDamages select _forEachIndex]; -} forEach _hitPoints; + _vehicle setHitIndex [_forEachIndex, _x]; +} forEach _allHitPointDamages; // normalize hitpoints [_vehicle] call FUNC(normalizeHitPoints); diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index c80fed4a5b..0013355370 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -168,22 +168,22 @@ class CfgVehicles { }; }; - class GVAR(moduleSetSuppression): GVAR(moduleBase) { - curatorCanAttach = 1; - displayName = CSTRING(ModuleSetSupp_DisplayName); - function = QFUNC(moduleSetSuppression); - class ModuleDescription { - description = "Set group of units to supressed."; - sync[] = {}; - }; - }; - class GVAR(moduleDisableSuppression): GVAR(moduleBase) { - curatorCanAttach = 1; - displayName = CSTRING(ModuleDisableSupp_DisplayName); - function = QFUNC(moduleDisableSuppression); - class ModuleDescription { - description = "Remove suppression for units in group"; - sync[] = {}; - }; - }; + // class GVAR(moduleSetSuppression): GVAR(moduleBase) { + // curatorCanAttach = 1; + // displayName = CSTRING(ModuleSetSupp_DisplayName); + // function = QFUNC(moduleSetSuppression); + // class ModuleDescription { + // description = "Set group of units to supressed."; + // sync[] = {}; + // }; + // }; + // class GVAR(moduleDisableSuppression): GVAR(moduleBase) { + // curatorCanAttach = 1; + // displayName = CSTRING(ModuleDisableSupp_DisplayName); + // function = QFUNC(moduleDisableSuppression); + // class ModuleDescription { + // description = "Remove suppression for units in group"; + // sync[] = {}; + // }; + // }; }; From 23eb6ec1f5d52f2905e90160aa6c919c9d4aa572 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 20 Feb 2016 18:01:55 -0600 Subject: [PATCH 28/40] Fix double { --- addons/medical/ACE_Medical_Treatments.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 09401bdfe2..47d78d23e1 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -922,7 +922,7 @@ class ACE_Medical_Advanced { reopeningMinDelay = 500; reopeningMaxDelay = 1000; }; - class AvulsionsMedium: Avulsions {{ + class AvulsionsMedium: Avulsions { effectiveness = 0.7; reopeningChance = 0.4; reopeningMinDelay = 250; From ea113b8e61debdbe962df39540e153eda8dbb816 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 21 Feb 2016 01:04:12 +0100 Subject: [PATCH 29/40] Fix duplicate { --- addons/medical/ACE_Medical_Treatments.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 09401bdfe2..47d78d23e1 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -922,7 +922,7 @@ class ACE_Medical_Advanced { reopeningMinDelay = 500; reopeningMaxDelay = 1000; }; - class AvulsionsMedium: Avulsions {{ + class AvulsionsMedium: Avulsions { effectiveness = 0.7; reopeningChance = 0.4; reopeningMinDelay = 250; From 0a0400a7a2f986d63e05c33b3ec5d57a568c3ae9 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 02:03:30 +0100 Subject: [PATCH 30/40] deleted all lines exept for 2 because of obvious reason. --- addons/finger/stringtable.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 16230b23c0..0dd64884d6 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -3,7 +3,6 @@ Show pointing indicator to self - Zeige Fingerzeig einem selbst Индикатор пальца для показывающего Afficher un indicateur de pointage pour soit même Pokaż indykator wskazywania palcem dla siebie @@ -15,7 +14,6 @@ Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator - Zeigt ein Symbol für den zeigenden Spieler. Diese Option beeinflusst nicht, ob andere Spieler dies sehen können. Отображать индикатор указания пальцем для показывающего игрока. Эта настройка не влияет на то, будут ли другие игроки видеть индикатор Affiche l'indicateur pour le joueur qui pointe. Cette option n'affecte pas les autres joueurs Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie. @@ -27,7 +25,6 @@ Pointing indicator - Fingerzeiger Anzeige Индикатор указания пальцем Indicateur de pointage Indykator palca @@ -51,7 +48,7 @@ Action "point a finger at" - Aktion: "Zeiger Finger auf" + Aktion: "Zeige Finger auf" Действие "показать пальцем на" Action 'Pointer le doigt à" Akcja "wskaż palcem" @@ -63,7 +60,7 @@ Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. - Zeigt anderen,nahen Spielern die eigene Blickrichtung mittels eines Symbols. Kann dauerhaft ausgeführt werden. + Zeigt anderen, nahen Spielern die eigene Blickrichtung mittels eines Symbols. Kann dauerhaft ausgeführt werden. Montre du doigt et affiche un marqueur virtuel de la direction pointée aux uinités proches. Peut être maintenu Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany. Mutat, és elhelyez egy virtuális jelölőt a nézett területhez közeli egységekhez. Lenyomva tartható. @@ -75,7 +72,6 @@ Pointing Settings - Fingerzeig Einstellungen Option "Montrer du doigt" Ustawienia wskazywania palcem Ujj beállításai @@ -87,7 +83,6 @@ Pointing Enabled - Fingerzeig aktiviert Activer "Montrer du doigt" Aktywuj wskazywanie Mutatás engedélyezése @@ -99,7 +94,6 @@ Pointing Max Range - Fingerzeig: Maximale Reichweite Distance maximale du pointage Maks. zasięg wskazywania Ujj maximum hatótávja @@ -111,7 +105,6 @@ Max range between players to show the pointing indicator [default: 4 meters] - Maximale Reichweite zwischen Spielern, welche den Fingerzeig des anderen sehen können. (Standart: 4 Meter) Distance maximale entre joueurs pour afficher l'indicateur (défaut: 4 mètres) Określ dystans na jakim można wskazywać coś palcem innym graczom. [domyślnie: 4m] A maximális távolság, amelyben a közeli játékosoknak megjelenik az indikátor. [alapértelmezett: 4 méter] From 360c35dc9c77b0e686a3e7aa58d24139593317db Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 02:04:58 +0100 Subject: [PATCH 31/40] Update stringtable.xml --- addons/viewdistance/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index d106df7da8..b8261a369a 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -255,7 +255,7 @@ FoV Based - Sichtfeld basiert + Sichtfeld basierend Зависит от зума Baseado em FoV Založeno na FoV From 3d4602e4619474b0d0b019cc12c2ce5d665b3487 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 20 Feb 2016 20:03:10 -0600 Subject: [PATCH 32/40] Add all joint muzzles and remove from ballistics --- addons/ballistics/CfgWeapons.hpp | 124 ++----------------------- addons/flashsuppressors/CfgWeapons.hpp | 41 ++------ 2 files changed, 19 insertions(+), 146 deletions(-) diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index e0cc3f203d..3f6835bbba 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -14,7 +14,6 @@ class CfgWeapons { class MMG_02_base_F; class Rifle_Base_F; class Rifle_Long_Base_F; - class WeaponSlotsInfo; class MuzzleSlot; /* Long Rifles */ @@ -74,22 +73,12 @@ class CfgWeapons { }; class DMR_01_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; class Single: Mode_SemiAuto { dispersion = 0.0004; // radians. Equal to 1.375 MOA. }; }; class EBR_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; @@ -101,13 +90,7 @@ class CfgWeapons { /* MX */ - class arifle_MX_Base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; - }; - }; - }; + class arifle_MX_Base_F: Rifle_Base_F {}; class arifle_MX_SW_F: arifle_MX_Base_F { magazines[] = { "100Rnd_65x39_caseless_mag_Tracer", @@ -120,13 +103,6 @@ class CfgWeapons { initSpeed = -1.0; ACE_barrelTwist=228.6; ACE_barrelLength=406.4; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - // Shit is broken again - //compatibleItems[] += {"ACE_muzzle_mzls_H"}; - compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"}; - }; - }; }; class arifle_MXM_F: arifle_MX_Base_F { magazines[] = { @@ -150,13 +126,7 @@ class CfgWeapons { /* Katiba */ - class arifle_katiba_Base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; - }; - }; - }; + class arifle_katiba_Base_F: Rifle_Base_F {}; /* Other */ @@ -167,42 +137,16 @@ class CfgWeapons { "ACE_200Rnd_65x39_cased_Box_Tracer_Dim" }; initSpeed = -0.9763; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; - }; - }; ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; class LMG_Zafir_F: Rifle_Long_Base_F { initSpeed = -1.0; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; ACE_barrelTwist=304.8; ACE_barrelLength=459.74; }; - - - /* Assault Rifles */ - class Tavor_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_L"}; - }; - }; - }; - class mk20_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_L"}; - }; - }; - }; - + class Tavor_base_F: Rifle_Base_F {}; + class mk20_base_F: Rifle_Base_F {}; /* SMGs */ class SDAR_base_F: Rifle_Base_F { @@ -219,93 +163,43 @@ class CfgWeapons { dispersion = 0.0008727; // radians. Equal to 3 MOA. }; }; - class pdw2000_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; - }; - }; - }; - class SMG_01_Base: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; - }; - }; - }; - class SMG_02_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; - }; - }; - }; - + class pdw2000_base_F: Rifle_Base_F {}; + class SMG_01_Base: Rifle_Base_F {}; + class SMG_02_base_F: Rifle_Base_F {}; + /* Pistols */ class Pistol; - class Pistol_Base_F: Pistol { - class WeaponSlotsInfo; - }; + class Pistol_Base_F: Pistol {}; class hgun_P07_F: Pistol_Base_F { initSpeed = -0.9778; ACE_barrelTwist=254.0; ACE_barrelLength=101.6; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; - compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; - }; - }; }; class hgun_Rook40_F: Pistol_Base_F { initSpeed = -1.0; ACE_barrelTwist=254.0; ACE_barrelLength=111.76; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; - compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; - }; - }; }; class hgun_ACPC2_F: Pistol_Base_F { initSpeed = -1.0; ACE_barrelTwist=406.4; ACE_barrelLength=127.0; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; - }; - }; }; class hgun_Pistol_heavy_01_F: Pistol_Base_F { initSpeed = -0.96; ACE_barrelTwist=406.4; ACE_barrelLength=114.3; - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; - }; - }; }; class hgun_Pistol_heavy_02_F: Pistol_Base_F { initSpeed = -0.92; ACE_barrelTwist=406.4; ACE_barrelLength=76.2; - /* - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot { - linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; - compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; - }; - }; - */ }; class hgun_PDW2000_F: pdw2000_base_F { initSpeed = -1.157; diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index bb720262f6..ae957ba4b0 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -19,6 +19,16 @@ class asdg_MuzzleSlot_9MM_SMG: asdg_MuzzleSlot { // for 9x19mm universal mount S ACE_muzzle_mzls_smg_02 = 1; }; }; +class asdg_MuzzleSlot_556: asdg_MuzzleSlot { // for 5.56x45 universal mount suppressors + class compatibleItems { + ACE_muzzle_mzls_L = 1; + }; +}; +class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount SMG suppressors + class compatibleItems { + ACE_muzzle_mzls_smg_01 = 1; + }; +}; class MuzzleSlot; @@ -91,37 +101,6 @@ class CfgWeapons { }; }; - - /* Assault Rifles */ - - class Tavor_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_L"}; - }; - }; - }; - - class mk20_base_F: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_L"}; - }; - }; - }; - - - /* SMGs */ - - class SMG_01_Base: Rifle_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; - }; - }; - }; - - /* Pistols */ class Pistol; From 38c1b45fb9d0d31bda4b95e0384c394c496f7182 Mon Sep 17 00:00:00 2001 From: bux Date: Sun, 21 Feb 2016 11:41:53 +0100 Subject: [PATCH 33/40] properly fix the medical translation file --- addons/medical/stringtable.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 79809d1312..70363577be 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -955,7 +955,7 @@ Um analgésico usado para combater dores moderadas e fortes. Analgetikum slouží k tlumení středně těžkých a těžkých bolestí - + Adenosine autoinjector @@ -2082,7 +2082,7 @@ %1 started CPR - + %1 used %2 %1 usó %2 From 2467fa7b0cb989728451b16d338fabaf78de80c9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 21 Feb 2016 11:34:25 -0600 Subject: [PATCH 34/40] Fix empty callbacks in medical/repair --- addons/medical/functions/fnc_treatment_failure.sqf | 1 + addons/medical/functions/fnc_treatment_success.sqf | 1 + addons/repair/functions/fnc_repair_failure.sqf | 1 + addons/repair/functions/fnc_repair_success.sqf | 2 ++ 4 files changed, 5 insertions(+) diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index 4029721566..826443a154 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -69,6 +69,7 @@ _callback = if (isNil _callback) then { } else { missionNamespace getVariable _callback }; +if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};}; _args call _callback; diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index 81c3a588ba..d8a4d3b336 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -64,6 +64,7 @@ if (isNil _callback) then { } else { _callback = missionNamespace getVariable _callback; }; +if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};}; //Get current blood loose on limb (for "bloody" litter) private _bloodLossOnSelection = 0; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 3fabb58e80..8616dd4808 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -63,6 +63,7 @@ if (isNil _callback) then { } else { _callback = missionNamespace getVariable _callback; }; +if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};}; _args call _callback; diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index 9625dad1df..c18116f862 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -58,6 +58,8 @@ if (isNil _callback) then { } else { _callback = missionNamespace getVariable _callback; }; +if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};}; + _args call _callback; //todo: repair litter? From 574a6a32ea1edf461cef40059570904ce87aa25b Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 19:54:24 +0100 Subject: [PATCH 35/40] Update stringtable.xml --- addons/finger/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 0dd64884d6..c93fe25ed2 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -60,7 +60,7 @@ Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. - Zeigt anderen, nahen Spielern die eigene Blickrichtung mittels eines Symbols. Kann dauerhaft ausgeführt werden. + Zeigt in der Nähe befindlichen Spielern die eigene Blickrichtung mit Hilfe eines Kreissymbols an. Montre du doigt et affiche un marqueur virtuel de la direction pointée aux uinités proches. Peut être maintenu Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany. Mutat, és elhelyez egy virtuális jelölőt a nézett területhez közeli egységekhez. Lenyomva tartható. From ce97916fbfd07119f8f3006f0bf6bf31af71e5fe Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 19:55:08 +0100 Subject: [PATCH 36/40] Update stringtable.xml --- addons/hearing/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index d95b96d6ae..0878e25379 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -111,7 +111,7 @@ Remove tinnitus effect when the player takes hearing damage - Deaktiviert "Ohrfiepen" wenn der Spieler Hörschäden davonträgt. + Deaktiviert Ohrklingeln wenn der Spieler Hörschäden davonträgt. Hearing From 3c8b3031d8e42610d2e58a81aa8e8c3984a0a5c7 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 19:59:06 +0100 Subject: [PATCH 37/40] Update stringtable.xml --- addons/switchunits/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 1afef6ccd4..11127a57be 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -190,7 +190,7 @@ Module allows you to switch side during the game. - Dieses Modul gestattet die Fraktion während des Spiels zu wechseln + Dieses Modul gestattet, die Fraktion während des Spiels zu wechseln Moduł ten pozwala na zmianę strony w trakcie gry. Tento modul umožňuje přepínání mazi dostupnými stranami. Este módulo permite mudar o lado à disposição dos jogadores. From 62dc2ffd06005e626b45df94f0f4e74647941f61 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 20:04:32 +0100 Subject: [PATCH 38/40] Update stringtable.xml --- addons/finger/stringtable.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index c93fe25ed2..85f6ed6bc6 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -3,6 +3,7 @@ Show pointing indicator to self + Zeigersymbol einem selbst anzeigen Индикатор пальца для показывающего Afficher un indicateur de pointage pour soit même Pokaż indykator wskazywania palcem dla siebie @@ -14,6 +15,7 @@ Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator + Zeigt das Zeigersymbol einem selbst an. Diese Einstellung beeinflusst jedoch nicht andere Spieler, welche das Zeigersymbol sehen werden. Отображать индикатор указания пальцем для показывающего игрока. Эта настройка не влияет на то, будут ли другие игроки видеть индикатор Affiche l'indicateur pour le joueur qui pointe. Cette option n'affecte pas les autres joueurs Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie. @@ -25,6 +27,7 @@ Pointing indicator + Zeigersymbol Индикатор указания пальцем Indicateur de pointage Indykator palca @@ -36,6 +39,7 @@ Color of the pointing indicator circle + Farbe des Zeigersymbols (Kreis) Farbe des Zeigersymbols Цвет индикатора указания пальцем Couleur de l'indicateur @@ -72,6 +76,7 @@ Pointing Settings + Zeigen Einstellungen Option "Montrer du doigt" Ustawienia wskazywania palcem Ujj beállításai @@ -83,6 +88,7 @@ Pointing Enabled + Zeigen aktiviert Activer "Montrer du doigt" Aktywuj wskazywanie Mutatás engedélyezése @@ -94,6 +100,7 @@ Pointing Max Range + Maximale Zeigerreichweite Distance maximale du pointage Maks. zasięg wskazywania Ujj maximum hatótávja @@ -105,6 +112,7 @@ Max range between players to show the pointing indicator [default: 4 meters] + Maximale Reichweite zwischen Spielern, welche das Zeigesymbol des jeweils anderen sehen können. (Standart: 4 Meter) Distance maximale entre joueurs pour afficher l'indicateur (défaut: 4 mètres) Określ dystans na jakim można wskazywać coś palcem innym graczom. [domyślnie: 4m] A maximális távolság, amelyben a közeli játékosoknak megjelenik az indikátor. [alapértelmezett: 4 méter] From 4036dcaa8e8c4bb328b364cc394d42f85944862b Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sun, 21 Feb 2016 20:05:26 +0100 Subject: [PATCH 39/40] Update stringtable.xml --- addons/finger/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 85f6ed6bc6..e5cd57eaf9 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -15,7 +15,7 @@ Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator - Zeigt das Zeigersymbol einem selbst an. Diese Einstellung beeinflusst jedoch nicht andere Spieler, welche das Zeigersymbol sehen werden. + Zeigt das eigene Zeigersymbol an. Diese Einstellung beeinflusst jedoch nicht andere Spieler, welche das Zeigersymbol sehen können. Отображать индикатор указания пальцем для показывающего игрока. Эта настройка не влияет на то, будут ли другие игроки видеть индикатор Affiche l'indicateur pour le joueur qui pointe. Cette option n'affecte pas les autres joueurs Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie. From 46a239f9f6f5084ac10ee5f5542420bbbc12671e Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 22 Feb 2016 15:20:36 +0100 Subject: [PATCH 40/40] precompile on game start --- .../advanced_ballistics/CfgEventHandlers.hpp | 7 + addons/advanced_ballistics/XEH_PREP.hpp | 14 + addons/advanced_ballistics/XEH_preInit.sqf | 15 +- .../XEH_preStart.sqf} | 4 +- addons/apl/CfgEventHandlers.hpp | 7 - addons/apl/config.cpp | 2 - addons/atragmx/CfgEventHandlers.hpp | 7 + addons/atragmx/XEH_PREP.hpp | 67 ++++ addons/atragmx/XEH_preInit.sqf | 67 +--- addons/atragmx/XEH_preStart.sqf | 3 + addons/attach/CfgEventHandlers.hpp | 7 + addons/attach/XEH_PREP.hpp | 10 + addons/attach/XEH_preInit.sqf | 10 +- addons/attach/XEH_preStart.sqf | 3 + addons/backpacks/CfgEventHandlers.hpp | 6 + addons/backpacks/XEH_PREP.hpp | 4 + addons/backpacks/XEH_preInit.sqf | 4 +- addons/backpacks/XEH_preStart.sqf | 3 + addons/captives/CfgEventHandlers.hpp | 7 + addons/captives/XEH_PREP.hpp | 30 ++ addons/captives/XEH_preInit.sqf | 30 +- addons/captives/XEH_preStart.sqf | 3 + addons/cargo/CfgEventHandlers.hpp | 7 + addons/cargo/XEH_PREP.hpp | 20 ++ addons/cargo/XEH_preInit.sqf | 20 +- addons/cargo/XEH_preStart.sqf | 3 + addons/common/CfgEventHandlers.hpp | 6 + addons/common/XEH_PREP.hpp | 288 ++++++++++++++++++ addons/common/XEH_preInit.sqf | 287 +---------------- addons/common/XEH_preStart.sqf | 3 + addons/concertina_wire/CfgEventHandlers.hpp | 7 + addons/concertina_wire/XEH_PREP.hpp | 7 + addons/concertina_wire/XEH_preInit.sqf | 7 +- addons/concertina_wire/XEH_preStart.sqf | 3 + addons/dagr/CfgEventHandlers.hpp | 7 + addons/dagr/XEH_PREP.hpp | 7 + addons/dagr/XEH_preInit.sqf | 7 +- addons/dagr/XEH_preStart.sqf | 3 + addons/disarming/CfgEventHandlers.hpp | 7 + addons/disarming/XEH_PREP.hpp | 12 + addons/disarming/XEH_preInit.sqf | 12 +- addons/disarming/XEH_preStart.sqf | 3 + addons/disposable/CfgEventHandlers.hpp | 7 + addons/disposable/XEH_PREP.hpp | 4 + addons/disposable/XEH_preInit.sqf | 4 +- addons/disposable/XEH_preStart.sqf | 3 + addons/dragging/CfgEventHandlers.hpp | 6 + addons/dragging/XEH_PREP.hpp | 27 ++ addons/dragging/XEH_preInit.sqf | 27 +- addons/dragging/XEH_preStart.sqf | 3 + addons/explosives/CfgEventHandlers.hpp | 7 + addons/explosives/XEH_PREP.hpp | 46 +++ addons/explosives/XEH_preInit.sqf | 46 +-- addons/explosives/XEH_preStart.sqf | 3 + addons/fcs/CfgEventHandlers.hpp | 6 + addons/fcs/XEH_PREP.hpp | 16 + addons/fcs/XEH_preInit.sqf | 16 +- addons/fcs/XEH_preStart.sqf | 3 + addons/finger/CfgEventHandlers.hpp | 8 + addons/finger/XEH_PREP.hpp | 5 + addons/finger/XEH_preInit.sqf | 5 +- addons/finger/XEH_preStart.sqf | 3 + addons/flashlights/CfgEventHandlers.hpp | 1 + addons/frag/CfgEventhandlers.hpp | 7 + addons/frag/XEH_PREP.hpp | 27 ++ addons/frag/XEH_preInit.sqf | 28 +- addons/frag/XEH_preStart.sqf | 3 + addons/gestures/CfgEventHandlers.hpp | 9 +- addons/gestures/XEH_PREP.hpp | 2 + addons/gestures/XEH_preInit.sqf | 2 +- addons/gestures/XEH_preStart.sqf | 3 + addons/gforces/CfgEventHandlers.hpp | 10 +- addons/gforces/XEH_PREP.hpp | 2 + addons/gforces/XEH_preInit.sqf | 2 +- addons/gforces/XEH_preStart.sqf | 3 + addons/goggles/CfgEventHandlers.hpp | 6 + addons/goggles/XEH_PREP.hpp | 26 ++ addons/goggles/XEH_preInit.sqf | 26 +- addons/goggles/XEH_preStart.sqf | 3 + addons/grenades/CfgEventHandlers.hpp | 6 + addons/grenades/XEH_PREP.hpp | 6 + addons/grenades/XEH_preInit.sqf | 6 +- addons/grenades/XEH_preStart.sqf | 3 + addons/headless/CfgEventHandlers.hpp | 7 + addons/headless/XEH_PREP.hpp | 7 + addons/headless/XEH_preInit.sqf | 7 +- addons/headless/XEH_preStart.sqf | 3 + addons/hearing/CfgEventHandlers.hpp | 7 + addons/hearing/XEH_PREP.hpp | 13 + addons/hearing/XEH_preInit.sqf | 13 +- addons/hearing/XEH_preStart.sqf | 3 + addons/hitreactions/CfgEventHandlers.hpp | 6 + addons/hitreactions/XEH_PREP.hpp | 3 + addons/hitreactions/XEH_preInit.sqf | 3 +- addons/hitreactions/XEH_preStart.sqf | 3 + addons/huntir/CfgEventhandlers.hpp | 7 + addons/huntir/XEH_PREP.hpp | 6 + addons/huntir/XEH_preInit.sqf | 6 +- addons/huntir/XEH_preStart.sqf | 3 + addons/interact_menu/CfgEventHandlers.hpp | 9 +- addons/interact_menu/XEH_PREP.hpp | 27 ++ addons/interact_menu/XEH_preInit.sqf | 27 +- addons/interact_menu/XEH_preStart.sqf | 3 + addons/interaction/CfgEventHandlers.hpp | 6 + addons/interaction/XEH_PREP.hpp | 38 +++ addons/interaction/XEH_preInit.sqf | 39 +-- addons/interaction/XEH_preStart.sqf | 3 + addons/inventory/CfgEventHandlers.hpp | 6 + addons/inventory/XEH_PREP.hpp | 16 + addons/inventory/XEH_preInit.sqf | 16 +- addons/inventory/XEH_preStart.sqf | 3 + addons/javelin/CfgEventhandlers.hpp | 9 +- addons/javelin/XEH_PREP.hpp | 11 + addons/javelin/XEH_preStart.sqf | 3 + addons/javelin/XEH_pre_init.sqf | 13 +- addons/kestrel4500/CfgEventHandlers.hpp | 9 +- addons/kestrel4500/XEH_PREP.hpp | 16 + addons/kestrel4500/XEH_preInit.sqf | 17 +- addons/kestrel4500/XEH_preStart.sqf | 3 + addons/laser/CfgEventhandlers.hpp | 9 +- addons/laser/XEH_PREP.hpp | 26 ++ addons/laser/XEH_preStart.sqf | 3 + addons/laser/XEH_pre_init.sqf | 30 +- .../laser_selfdesignate/CfgEventhandlers.hpp | 9 +- addons/laser_selfdesignate/XEH_PREP.hpp | 7 + addons/laser_selfdesignate/XEH_preStart.sqf | 3 + addons/laser_selfdesignate/XEH_pre_init.sqf | 9 +- addons/laserpointer/CfgEventHandlers.hpp | 6 + addons/laserpointer/XEH_PREP.hpp | 4 + addons/laserpointer/XEH_preInit.sqf | 4 +- addons/laserpointer/XEH_preStart.sqf | 3 + .../logistics_uavbattery/CfgEventHandlers.hpp | 7 + addons/logistics_uavbattery/XEH_PREP.hpp | 3 + addons/logistics_uavbattery/XEH_preInit.sqf | 3 +- addons/logistics_uavbattery/XEH_preStart.sqf | 3 + .../logistics_wirecutter/CfgEventHandlers.hpp | 8 + addons/logistics_wirecutter/XEH_PREP.hpp | 4 + addons/logistics_wirecutter/XEH_preInit.sqf | 4 +- addons/logistics_wirecutter/XEH_preStart.sqf | 3 + addons/magazinerepack/CfgEventHandlers.hpp | 7 + addons/magazinerepack/XEH_PREP.hpp | 6 + addons/magazinerepack/XEH_preInit.sqf | 6 +- addons/magazinerepack/XEH_preStart.sqf | 3 + addons/main/config.cpp | 7 + addons/map/CfgEventHandlers.hpp | 7 + addons/map/XEH_PREP.hpp | 13 + addons/map/XEH_preInit.sqf | 13 +- addons/map/XEH_preStart.sqf | 3 + addons/map_gestures/CfgEventHandlers.hpp | 7 + addons/map_gestures/XEH_PREP.hpp | 12 + addons/map_gestures/XEH_preInit.sqf | 12 +- addons/map_gestures/XEH_preStart.sqf | 3 + addons/maptools/CfgEventHandlers.hpp | 7 + addons/maptools/XEH_PREP.hpp | 20 ++ addons/maptools/XEH_preInit.sqf | 20 +- addons/maptools/XEH_preStart.sqf | 3 + addons/markers/CfgEventHandlers.hpp | 6 + addons/markers/XEH_PREP.hpp | 12 + addons/markers/XEH_preInit.sqf | 12 +- addons/markers/XEH_preStart.sqf | 3 + addons/medical/CfgEventHandlers.hpp | 6 + addons/medical/XEH_PREP.hpp | 115 +++++++ addons/medical/XEH_preInit.sqf | 115 +------ addons/medical/XEH_preStart.sqf | 3 + addons/medical_menu/CfgEventHandlers.hpp | 7 + addons/medical_menu/XEH_PREP.hpp | 18 ++ addons/medical_menu/XEH_preInit.sqf | 18 +- addons/medical_menu/XEH_preStart.sqf | 3 + addons/microdagr/CfgEventHandlers.hpp | 7 + addons/microdagr/XEH_PREP.hpp | 21 ++ addons/microdagr/XEH_preInit.sqf | 21 +- addons/microdagr/XEH_preStart.sqf | 3 + addons/missileguidance/CfgEventhandlers.hpp | 9 +- addons/missileguidance/XEH_PREP.hpp | 32 ++ addons/missileguidance/XEH_preStart.sqf | 3 + addons/missileguidance/XEH_pre_init.sqf | 32 +- addons/missionmodules/CfgEventHandlers.hpp | 6 + addons/missionmodules/XEH_PREP.hpp | 2 + addons/missionmodules/XEH_preInit.sqf | 2 +- addons/missionmodules/XEH_preStart.sqf | 3 + addons/mk6mortar/CfgEventHandlers.hpp | 9 + addons/mk6mortar/XEH_PREP.hpp | 23 ++ addons/mk6mortar/XEH_preInit.sqf | 23 +- addons/mk6mortar/XEH_preStart.sqf | 3 + addons/modules/CfgEventHandlers.hpp | 6 + addons/modules/XEH_PREP.hpp | 2 + addons/modules/XEH_preInit.sqf | 2 +- addons/modules/XEH_preStart.sqf | 3 + addons/movement/CfgEventHandlers.hpp | 7 + addons/movement/XEH_PREP.hpp | 5 + addons/movement/XEH_preInit.sqf | 5 +- addons/movement/XEH_preStart.sqf | 3 + addons/nametags/CfgEventHandlers.hpp | 7 + addons/nametags/XEH_PREP.hpp | 10 + addons/nametags/XEH_preInit.sqf | 10 +- addons/nametags/XEH_preStart.sqf | 3 + addons/nightvision/CfgEventHandlers.hpp | 7 + addons/nightvision/XEH_PREP.hpp | 7 + addons/nightvision/XEH_preInit.sqf | 7 +- addons/nightvision/XEH_preStart.sqf | 3 + addons/optics/CfgEventHandlers.hpp | 7 + addons/optics/XEH_PREP.hpp | 4 + addons/optics/XEH_preInit.sqf | 4 +- addons/optics/XEH_preStart.sqf | 3 + addons/optionsmenu/CfgEventHandlers.hpp | 8 + addons/optionsmenu/XEH_PREP.hpp | 22 ++ addons/optionsmenu/XEH_preInit.sqf | 22 +- addons/optionsmenu/XEH_preStart.sqf | 3 + addons/overheating/CfgEventHandlers.hpp | 7 + addons/overheating/XEH_PREP.hpp | 13 + addons/overheating/XEH_preInit.sqf | 13 +- addons/overheating/XEH_preStart.sqf | 3 + addons/overpressure/CfgEventHandlers.hpp | 6 + addons/overpressure/XEH_PREP.hpp | 6 + addons/overpressure/XEH_preInit.sqf | 7 +- addons/overpressure/XEH_preStart.sqf | 3 + addons/parachute/CfgEventHandlers.hpp | 11 +- addons/parachute/XEH_PREP.hpp | 9 + addons/parachute/XEH_preInit.sqf | 10 +- addons/parachute/XEH_preStart.sqf | 3 + addons/rangecard/CfgEventHandlers.hpp | 9 +- addons/rangecard/XEH_PREP.hpp | 9 + addons/rangecard/XEH_preInit.sqf | 9 +- addons/rangecard/XEH_preStart.sqf | 3 + addons/rearm/CfgEventHandlers.hpp | 8 +- addons/rearm/XEH_PREP.hpp | 25 ++ addons/rearm/XEH_preInit.sqf | 25 +- addons/rearm/XEH_preStart.sqf | 3 + addons/recoil/CfgEventHandlers.hpp | 7 + addons/recoil/XEH_PREP.hpp | 2 + addons/recoil/XEH_preInit.sqf | 2 +- addons/recoil/XEH_preStart.sqf | 3 + addons/refuel/CfgEventHandlers.hpp | 7 + addons/refuel/XEH_PREP.hpp | 28 ++ addons/refuel/XEH_preInit.sqf | 28 +- addons/refuel/XEH_preStart.sqf | 3 + addons/reload/CfgEventHandlers.hpp | 7 + addons/reload/XEH_PREP.hpp | 6 + addons/reload/XEH_preInit.sqf | 6 +- addons/reload/XEH_preStart.sqf | 3 + addons/reloadlaunchers/CfgEventHandlers.hpp | 6 + addons/reloadlaunchers/XEH_PREP.hpp | 6 + addons/reloadlaunchers/XEH_preInit.sqf | 6 +- addons/reloadlaunchers/XEH_preStart.sqf | 3 + addons/repair/CfgEventHandlers.hpp | 7 + addons/repair/XEH_PREP.hpp | 39 +++ addons/repair/XEH_preInit.sqf | 39 +-- addons/repair/XEH_preStart.sqf | 3 + addons/respawn/CfgEventHandlers.hpp | 6 + addons/respawn/XEH_PREP.hpp | 16 + addons/respawn/XEH_preInit.sqf | 16 +- addons/respawn/XEH_preStart.sqf | 3 + addons/safemode/CfgEventHandlers.hpp | 6 + addons/safemode/XEH_PREP.hpp | 5 + addons/safemode/XEH_preInit.sqf | 5 +- addons/safemode/XEH_preStart.sqf | 3 + addons/sandbag/CfgEventHandlers.hpp | 6 + addons/sandbag/XEH_PREP.hpp | 12 + addons/sandbag/XEH_preInit.sqf | 12 +- addons/sandbag/XEH_preStart.sqf | 3 + addons/scopes/CfgEventHandlers.hpp | 7 + addons/scopes/XEH_PREP.hpp | 9 + addons/scopes/XEH_preInit.sqf | 9 +- addons/scopes/XEH_preStart.sqf | 3 + addons/sitting/CfgEventHandlers.hpp | 7 + addons/sitting/XEH_PREP.hpp | 9 + addons/sitting/XEH_preInit.sqf | 9 +- addons/sitting/XEH_preStart.sqf | 3 + addons/slideshow/CfgEventHandlers.hpp | 7 + addons/slideshow/XEH_PREP.hpp | 5 + addons/slideshow/XEH_preInit.sqf | 5 +- addons/slideshow/XEH_preStart.sqf | 3 + addons/spectator/CfgEventHandlers.hpp | 7 + addons/spectator/XEH_PREP.hpp | 23 ++ addons/spectator/XEH_preInit.sqf | 23 +- addons/spectator/XEH_preStart.sqf | 3 + addons/spottingscope/CfgEventHandlers.hpp | 7 + addons/spottingscope/XEH_PREP.hpp | 3 + addons/spottingscope/XEH_preInit.sqf | 3 +- addons/spottingscope/XEH_preStart.sqf | 3 + addons/switchunits/CfgEventHandlers.hpp | 7 + addons/switchunits/XEH_PREP.hpp | 11 + addons/switchunits/XEH_preInit.sqf | 11 +- addons/switchunits/XEH_preStart.sqf | 3 + addons/tacticalladder/CfgEventHandlers.hpp | 6 + addons/tacticalladder/XEH_PREP.hpp | 12 + addons/tacticalladder/XEH_preInit.sqf | 12 +- addons/tacticalladder/XEH_preStart.sqf | 3 + addons/tagging/CfgEventHandlers.hpp | 6 + addons/tagging/XEH_PREP.hpp | 7 + addons/tagging/XEH_preInit.sqf | 7 +- addons/tagging/XEH_preStart.sqf | 3 + addons/trenches/CfgEventHandlers.hpp | 6 + addons/trenches/XEH_PREP.hpp | 11 + addons/trenches/XEH_preInit.sqf | 11 +- addons/trenches/XEH_preStart.sqf | 3 + addons/tripod/CfgEventHandlers.hpp | 6 + addons/tripod/XEH_PREP.hpp | 9 + addons/tripod/XEH_preInit.sqf | 9 +- addons/tripod/XEH_preStart.sqf | 3 + addons/vector/CfgEventHandlers.hpp | 6 + addons/vector/XEH_PREP.hpp | 31 ++ addons/vector/XEH_preInit.sqf | 31 +- addons/vector/XEH_preStart.sqf | 3 + addons/vehiclelock/CfgEventHandlers.hpp | 10 + addons/vehiclelock/XEH_PREP.hpp | 11 + addons/vehiclelock/XEH_preInit.sqf | 11 +- addons/vehiclelock/XEH_preStart.sqf | 3 + addons/vehicles/CfgEventHandlers.hpp | 6 + addons/vehicles/XEH_PREP.hpp | 3 + addons/vehicles/XEH_preInit.sqf | 3 +- addons/vehicles/XEH_preStart.sqf | 3 + addons/viewdistance/CfgEventHandlers.hpp | 7 + addons/viewdistance/XEH_PREP.hpp | 7 + addons/viewdistance/XEH_preInit.sqf | 7 +- addons/viewdistance/XEH_preStart.sqf | 3 + addons/weaponselect/CfgEventHandlers.hpp | 6 + addons/weaponselect/XEH_PREP.hpp | 10 + addons/weaponselect/XEH_preInit.sqf | 10 +- addons/weaponselect/XEH_preStart.sqf | 3 + addons/weather/CfgEventhandlers.hpp | 8 + addons/weather/XEH_PREP.hpp | 23 ++ addons/weather/XEH_preInit.sqf | 23 +- addons/weather/XEH_preStart.sqf | 3 + addons/winddeflection/CfgEventHandlers.hpp | 8 + addons/winddeflection/XEH_PREP.hpp | 4 + addons/winddeflection/XEH_preInit.sqf | 4 +- addons/winddeflection/XEH_preStart.sqf | 3 + addons/yardage450/CfgEventHandlers.hpp | 9 +- addons/yardage450/XEH_PREP.hpp | 3 + addons/yardage450/XEH_preInit.sqf | 3 +- addons/yardage450/XEH_preStart.sqf | 3 + addons/zeus/CfgEventHandlers.hpp | 6 + addons/zeus/XEH_PREP.hpp | 16 + addons/zeus/XEH_preInit.sqf | 16 +- addons/zeus/XEH_preStart.sqf | 3 + extras/blank/CfgEventHandlers.hpp | 6 + extras/blank/XEH_PREP.hpp | 2 + extras/blank/XEH_preInit.sqf | 2 +- extras/blank/XEH_preStart.sqf | 3 + 340 files changed, 2451 insertions(+), 1448 deletions(-) create mode 100644 addons/advanced_ballistics/XEH_PREP.hpp rename addons/{apl/XEH_preInit.sqf => advanced_ballistics/XEH_preStart.sqf} (52%) delete mode 100644 addons/apl/CfgEventHandlers.hpp create mode 100644 addons/atragmx/XEH_PREP.hpp create mode 100644 addons/atragmx/XEH_preStart.sqf create mode 100644 addons/attach/XEH_PREP.hpp create mode 100644 addons/attach/XEH_preStart.sqf create mode 100644 addons/backpacks/XEH_PREP.hpp create mode 100644 addons/backpacks/XEH_preStart.sqf create mode 100644 addons/captives/XEH_PREP.hpp create mode 100644 addons/captives/XEH_preStart.sqf create mode 100644 addons/cargo/XEH_PREP.hpp create mode 100644 addons/cargo/XEH_preStart.sqf create mode 100644 addons/common/XEH_PREP.hpp create mode 100644 addons/common/XEH_preStart.sqf create mode 100644 addons/concertina_wire/XEH_PREP.hpp create mode 100644 addons/concertina_wire/XEH_preStart.sqf create mode 100644 addons/dagr/XEH_PREP.hpp create mode 100644 addons/dagr/XEH_preStart.sqf create mode 100644 addons/disarming/XEH_PREP.hpp create mode 100644 addons/disarming/XEH_preStart.sqf create mode 100644 addons/disposable/XEH_PREP.hpp create mode 100644 addons/disposable/XEH_preStart.sqf create mode 100644 addons/dragging/XEH_PREP.hpp create mode 100644 addons/dragging/XEH_preStart.sqf create mode 100644 addons/explosives/XEH_PREP.hpp create mode 100644 addons/explosives/XEH_preStart.sqf create mode 100644 addons/fcs/XEH_PREP.hpp create mode 100644 addons/fcs/XEH_preStart.sqf create mode 100644 addons/finger/XEH_PREP.hpp create mode 100644 addons/finger/XEH_preStart.sqf create mode 100644 addons/frag/XEH_PREP.hpp create mode 100644 addons/frag/XEH_preStart.sqf create mode 100644 addons/gestures/XEH_PREP.hpp create mode 100644 addons/gestures/XEH_preStart.sqf create mode 100644 addons/gforces/XEH_PREP.hpp create mode 100644 addons/gforces/XEH_preStart.sqf create mode 100644 addons/goggles/XEH_PREP.hpp create mode 100644 addons/goggles/XEH_preStart.sqf create mode 100644 addons/grenades/XEH_PREP.hpp create mode 100644 addons/grenades/XEH_preStart.sqf create mode 100644 addons/headless/XEH_PREP.hpp create mode 100644 addons/headless/XEH_preStart.sqf create mode 100644 addons/hearing/XEH_PREP.hpp create mode 100644 addons/hearing/XEH_preStart.sqf create mode 100644 addons/hitreactions/XEH_PREP.hpp create mode 100644 addons/hitreactions/XEH_preStart.sqf create mode 100644 addons/huntir/XEH_PREP.hpp create mode 100644 addons/huntir/XEH_preStart.sqf create mode 100644 addons/interact_menu/XEH_PREP.hpp create mode 100644 addons/interact_menu/XEH_preStart.sqf create mode 100644 addons/interaction/XEH_PREP.hpp create mode 100644 addons/interaction/XEH_preStart.sqf create mode 100644 addons/inventory/XEH_PREP.hpp create mode 100644 addons/inventory/XEH_preStart.sqf create mode 100644 addons/javelin/XEH_PREP.hpp create mode 100644 addons/javelin/XEH_preStart.sqf create mode 100644 addons/kestrel4500/XEH_PREP.hpp create mode 100644 addons/kestrel4500/XEH_preStart.sqf create mode 100644 addons/laser/XEH_PREP.hpp create mode 100644 addons/laser/XEH_preStart.sqf create mode 100644 addons/laser_selfdesignate/XEH_PREP.hpp create mode 100644 addons/laser_selfdesignate/XEH_preStart.sqf create mode 100644 addons/laserpointer/XEH_PREP.hpp create mode 100644 addons/laserpointer/XEH_preStart.sqf create mode 100644 addons/logistics_uavbattery/XEH_PREP.hpp create mode 100644 addons/logistics_uavbattery/XEH_preStart.sqf create mode 100644 addons/logistics_wirecutter/XEH_PREP.hpp create mode 100644 addons/logistics_wirecutter/XEH_preStart.sqf create mode 100644 addons/magazinerepack/XEH_PREP.hpp create mode 100644 addons/magazinerepack/XEH_preStart.sqf create mode 100644 addons/map/XEH_PREP.hpp create mode 100644 addons/map/XEH_preStart.sqf create mode 100644 addons/map_gestures/XEH_PREP.hpp create mode 100644 addons/map_gestures/XEH_preStart.sqf create mode 100644 addons/maptools/XEH_PREP.hpp create mode 100644 addons/maptools/XEH_preStart.sqf create mode 100644 addons/markers/XEH_PREP.hpp create mode 100644 addons/markers/XEH_preStart.sqf create mode 100644 addons/medical/XEH_PREP.hpp create mode 100644 addons/medical/XEH_preStart.sqf create mode 100644 addons/medical_menu/XEH_PREP.hpp create mode 100644 addons/medical_menu/XEH_preStart.sqf create mode 100644 addons/microdagr/XEH_PREP.hpp create mode 100644 addons/microdagr/XEH_preStart.sqf create mode 100644 addons/missileguidance/XEH_PREP.hpp create mode 100644 addons/missileguidance/XEH_preStart.sqf create mode 100644 addons/missionmodules/XEH_PREP.hpp create mode 100644 addons/missionmodules/XEH_preStart.sqf create mode 100644 addons/mk6mortar/XEH_PREP.hpp create mode 100644 addons/mk6mortar/XEH_preStart.sqf create mode 100644 addons/modules/XEH_PREP.hpp create mode 100644 addons/modules/XEH_preStart.sqf create mode 100644 addons/movement/XEH_PREP.hpp create mode 100644 addons/movement/XEH_preStart.sqf create mode 100644 addons/nametags/XEH_PREP.hpp create mode 100644 addons/nametags/XEH_preStart.sqf create mode 100644 addons/nightvision/XEH_PREP.hpp create mode 100644 addons/nightvision/XEH_preStart.sqf create mode 100644 addons/optics/XEH_PREP.hpp create mode 100644 addons/optics/XEH_preStart.sqf create mode 100644 addons/optionsmenu/XEH_PREP.hpp create mode 100644 addons/optionsmenu/XEH_preStart.sqf create mode 100644 addons/overheating/XEH_PREP.hpp create mode 100644 addons/overheating/XEH_preStart.sqf create mode 100644 addons/overpressure/XEH_PREP.hpp create mode 100644 addons/overpressure/XEH_preStart.sqf create mode 100644 addons/parachute/XEH_PREP.hpp create mode 100644 addons/parachute/XEH_preStart.sqf create mode 100644 addons/rangecard/XEH_PREP.hpp create mode 100644 addons/rangecard/XEH_preStart.sqf create mode 100644 addons/rearm/XEH_PREP.hpp create mode 100644 addons/rearm/XEH_preStart.sqf create mode 100644 addons/recoil/XEH_PREP.hpp create mode 100644 addons/recoil/XEH_preStart.sqf create mode 100644 addons/refuel/XEH_PREP.hpp create mode 100644 addons/refuel/XEH_preStart.sqf create mode 100644 addons/reload/XEH_PREP.hpp create mode 100644 addons/reload/XEH_preStart.sqf create mode 100644 addons/reloadlaunchers/XEH_PREP.hpp create mode 100644 addons/reloadlaunchers/XEH_preStart.sqf create mode 100644 addons/repair/XEH_PREP.hpp create mode 100644 addons/repair/XEH_preStart.sqf create mode 100644 addons/respawn/XEH_PREP.hpp create mode 100644 addons/respawn/XEH_preStart.sqf create mode 100644 addons/safemode/XEH_PREP.hpp create mode 100644 addons/safemode/XEH_preStart.sqf create mode 100644 addons/sandbag/XEH_PREP.hpp create mode 100644 addons/sandbag/XEH_preStart.sqf create mode 100644 addons/scopes/XEH_PREP.hpp create mode 100644 addons/scopes/XEH_preStart.sqf create mode 100644 addons/sitting/XEH_PREP.hpp create mode 100644 addons/sitting/XEH_preStart.sqf create mode 100644 addons/slideshow/XEH_PREP.hpp create mode 100644 addons/slideshow/XEH_preStart.sqf create mode 100644 addons/spectator/XEH_PREP.hpp create mode 100644 addons/spectator/XEH_preStart.sqf create mode 100644 addons/spottingscope/XEH_PREP.hpp create mode 100644 addons/spottingscope/XEH_preStart.sqf create mode 100644 addons/switchunits/XEH_PREP.hpp create mode 100644 addons/switchunits/XEH_preStart.sqf create mode 100644 addons/tacticalladder/XEH_PREP.hpp create mode 100644 addons/tacticalladder/XEH_preStart.sqf create mode 100644 addons/tagging/XEH_PREP.hpp create mode 100644 addons/tagging/XEH_preStart.sqf create mode 100644 addons/trenches/XEH_PREP.hpp create mode 100644 addons/trenches/XEH_preStart.sqf create mode 100644 addons/tripod/XEH_PREP.hpp create mode 100644 addons/tripod/XEH_preStart.sqf create mode 100644 addons/vector/XEH_PREP.hpp create mode 100644 addons/vector/XEH_preStart.sqf create mode 100644 addons/vehiclelock/XEH_PREP.hpp create mode 100644 addons/vehiclelock/XEH_preStart.sqf create mode 100644 addons/vehicles/XEH_PREP.hpp create mode 100644 addons/vehicles/XEH_preStart.sqf create mode 100644 addons/viewdistance/XEH_PREP.hpp create mode 100644 addons/viewdistance/XEH_preStart.sqf create mode 100644 addons/weaponselect/XEH_PREP.hpp create mode 100644 addons/weaponselect/XEH_preStart.sqf create mode 100644 addons/weather/XEH_PREP.hpp create mode 100644 addons/weather/XEH_preStart.sqf create mode 100644 addons/winddeflection/XEH_PREP.hpp create mode 100644 addons/winddeflection/XEH_preStart.sqf create mode 100644 addons/yardage450/XEH_PREP.hpp create mode 100644 addons/yardage450/XEH_preStart.sqf create mode 100644 addons/zeus/XEH_PREP.hpp create mode 100644 addons/zeus/XEH_preStart.sqf create mode 100644 extras/blank/XEH_PREP.hpp create mode 100644 extras/blank/XEH_preStart.sqf diff --git a/addons/advanced_ballistics/CfgEventHandlers.hpp b/addons/advanced_ballistics/CfgEventHandlers.hpp index 44b6e8e6ff..5da5fd0dc2 100644 --- a/addons/advanced_ballistics/CfgEventHandlers.hpp +++ b/addons/advanced_ballistics/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/advanced_ballistics/XEH_PREP.hpp b/addons/advanced_ballistics/XEH_PREP.hpp new file mode 100644 index 0000000000..df2501467f --- /dev/null +++ b/addons/advanced_ballistics/XEH_PREP.hpp @@ -0,0 +1,14 @@ + +PREP(calculateAmmoTemperatureVelocityShift); +PREP(calculateAtmosphericCorrection); +PREP(calculateBarrelLengthVelocityShift); +PREP(calculateRetardation); +PREP(calculateStabilityFactor); +PREP(diagnoseWeapons); +PREP(displayProtractor); +PREP(handleFired); +PREP(initializeTerrainExtension); +PREP(initModuleSettings); +PREP(readAmmoDataFromConfig); +PREP(readWeaponDataFromConfig); +PREP(handleFirePFH); diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf index 1404f08bc0..a7feade1c3 100644 --- a/addons/advanced_ballistics/XEH_preInit.sqf +++ b/addons/advanced_ballistics/XEH_preInit.sqf @@ -2,17 +2,6 @@ ADDON = false; -PREP(calculateAmmoTemperatureVelocityShift); -PREP(calculateAtmosphericCorrection); -PREP(calculateBarrelLengthVelocityShift); -PREP(calculateRetardation); -PREP(calculateStabilityFactor); -PREP(diagnoseWeapons); -PREP(displayProtractor); -PREP(handleFired); -PREP(initializeTerrainExtension); -PREP(initModuleSettings); -PREP(readAmmoDataFromConfig); -PREP(readWeaponDataFromConfig); -PREP(handleFirePFH); +#include "XEH_PREP.hpp" + ADDON = true; diff --git a/addons/apl/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preStart.sqf similarity index 52% rename from addons/apl/XEH_preInit.sqf rename to addons/advanced_ballistics/XEH_preStart.sqf index 6899f59bd9..022888575e 100644 --- a/addons/apl/XEH_preInit.sqf +++ b/addons/advanced_ballistics/XEH_preStart.sqf @@ -1,5 +1,3 @@ #include "script_component.hpp" -ADDON = false; - -ADDON = true; +#include "XEH_PREP.hpp" diff --git a/addons/apl/CfgEventHandlers.hpp b/addons/apl/CfgEventHandlers.hpp deleted file mode 100644 index 5bacc02434..0000000000 --- a/addons/apl/CfgEventHandlers.hpp +++ /dev/null @@ -1,7 +0,0 @@ -/* -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; -*/ \ No newline at end of file diff --git a/addons/apl/config.cpp b/addons/apl/config.cpp index fff902d962..089f4bffe0 100644 --- a/addons/apl/config.cpp +++ b/addons/apl/config.cpp @@ -11,5 +11,3 @@ class CfgPatches { VERSION_CONFIG; }; }; - -#include "CfgEventHandlers.hpp" diff --git a/addons/atragmx/CfgEventHandlers.hpp b/addons/atragmx/CfgEventHandlers.hpp index 3996e3371d..1bd535a305 100644 --- a/addons/atragmx/CfgEventHandlers.hpp +++ b/addons/atragmx/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/atragmx/XEH_PREP.hpp b/addons/atragmx/XEH_PREP.hpp new file mode 100644 index 0000000000..20900711c3 --- /dev/null +++ b/addons/atragmx/XEH_PREP.hpp @@ -0,0 +1,67 @@ + +PREP(add_new_gun); +PREP(calculate_range_card); +PREP(calculate_solution); +PREP(calculate_target_range_assist); +PREP(calculate_target_solution); +PREP(calculate_target_speed_assist); +PREP(can_show); +PREP(change_gun); +PREP(change_target_slot); +PREP(clear_user_data); +PREP(create_dialog); +PREP(cycle_gun_list); +PREP(cycle_image_size_units); +PREP(cycle_num_ticks_units); +PREP(cycle_range_card_columns); +PREP(cycle_scope_unit); +PREP(cycle_target_size_units); +PREP(cycle_target_speed_direction); +PREP(delete_gun); +PREP(init); +PREP(parse_input); +PREP(reset_relative_click_memory); +PREP(restore_atmo_default); +PREP(restore_user_data); +PREP(save_gun); +PREP(show_add_new_gun); +PREP(show_atmo_env_data); +PREP(show_gun_ammo_data); +PREP(show_gun_list); +PREP(show_main_page); +PREP(show_range_card); +PREP(show_range_card_setup); +PREP(show_solution_setup); +PREP(show_target_data); +PREP(show_target_range_assist); +PREP(show_target_speed_assist); +PREP(show_target_speed_assist_timer); +PREP(sord); +PREP(store_user_data); +PREP(target_speed_assist_timer); +PREP(toggle_atmo_env_data); +PREP(toggle_gun_ammo_data); +PREP(toggle_gun_list); +PREP(toggle_range_card); +PREP(toggle_range_card_setup); +PREP(toggle_solution_setup); +PREP(toggle_target_data); +PREP(toggle_target_range_assist); +PREP(toggle_target_speed_assist); +PREP(update_atmosphere); +PREP(update_atmo_env_data); +PREP(update_atmo_selection); +PREP(update_gun); +PREP(update_gun_ammo_data); +PREP(update_inclination_angle); +PREP(update_range_card); +PREP(update_relative_click_memory); +PREP(update_result); +PREP(update_scope_unit); +PREP(update_solution_setup); +PREP(update_target); +PREP(update_target_data); +PREP(update_target_selection); +PREP(update_unit_selection); +PREP(update_zero_range); +PREP(on_close_dialog); diff --git a/addons/atragmx/XEH_preInit.sqf b/addons/atragmx/XEH_preInit.sqf index 0277de1c14..a7feade1c3 100644 --- a/addons/atragmx/XEH_preInit.sqf +++ b/addons/atragmx/XEH_preInit.sqf @@ -2,71 +2,6 @@ ADDON = false; -PREP(add_new_gun); -PREP(calculate_range_card); -PREP(calculate_solution); -PREP(calculate_target_range_assist); -PREP(calculate_target_solution); -PREP(calculate_target_speed_assist); -PREP(can_show); -PREP(change_gun); -PREP(change_target_slot); -PREP(clear_user_data); -PREP(create_dialog); -PREP(cycle_gun_list); -PREP(cycle_image_size_units); -PREP(cycle_num_ticks_units); -PREP(cycle_range_card_columns); -PREP(cycle_scope_unit); -PREP(cycle_target_size_units); -PREP(cycle_target_speed_direction); -PREP(delete_gun); -PREP(init); -PREP(parse_input); -PREP(reset_relative_click_memory); -PREP(restore_atmo_default); -PREP(restore_user_data); -PREP(save_gun); -PREP(show_add_new_gun); -PREP(show_atmo_env_data); -PREP(show_gun_ammo_data); -PREP(show_gun_list); -PREP(show_main_page); -PREP(show_range_card); -PREP(show_range_card_setup); -PREP(show_solution_setup); -PREP(show_target_data); -PREP(show_target_range_assist); -PREP(show_target_speed_assist); -PREP(show_target_speed_assist_timer); -PREP(sord); -PREP(store_user_data); -PREP(target_speed_assist_timer); -PREP(toggle_atmo_env_data); -PREP(toggle_gun_ammo_data); -PREP(toggle_gun_list); -PREP(toggle_range_card); -PREP(toggle_range_card_setup); -PREP(toggle_solution_setup); -PREP(toggle_target_data); -PREP(toggle_target_range_assist); -PREP(toggle_target_speed_assist); -PREP(update_atmosphere); -PREP(update_atmo_env_data); -PREP(update_atmo_selection); -PREP(update_gun); -PREP(update_gun_ammo_data); -PREP(update_inclination_angle); -PREP(update_range_card); -PREP(update_relative_click_memory); -PREP(update_result); -PREP(update_scope_unit); -PREP(update_solution_setup); -PREP(update_target); -PREP(update_target_data); -PREP(update_target_selection); -PREP(update_unit_selection); -PREP(update_zero_range); -PREP(on_close_dialog); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/atragmx/XEH_preStart.sqf b/addons/atragmx/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/atragmx/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/attach/CfgEventHandlers.hpp b/addons/attach/CfgEventHandlers.hpp index c050fbd1c7..73b8553839 100644 --- a/addons/attach/CfgEventHandlers.hpp +++ b/addons/attach/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/attach/XEH_PREP.hpp b/addons/attach/XEH_PREP.hpp new file mode 100644 index 0000000000..5dedc2254e --- /dev/null +++ b/addons/attach/XEH_PREP.hpp @@ -0,0 +1,10 @@ + +PREP(attach); +PREP(canAttach); +PREP(canDetach); +PREP(detach); +PREP(getChildrenAttachActions); +PREP(handleGetIn); +PREP(handleGetOut); +PREP(handleKilled); +PREP(placeApprove); diff --git a/addons/attach/XEH_preInit.sqf b/addons/attach/XEH_preInit.sqf index 17b8490a77..a7feade1c3 100644 --- a/addons/attach/XEH_preInit.sqf +++ b/addons/attach/XEH_preInit.sqf @@ -2,14 +2,6 @@ ADDON = false; -PREP(attach); -PREP(canAttach); -PREP(canDetach); -PREP(detach); -PREP(getChildrenAttachActions); -PREP(handleGetIn); -PREP(handleGetOut); -PREP(handleKilled); -PREP(placeApprove); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/attach/XEH_preStart.sqf b/addons/attach/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/attach/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/backpacks/CfgEventHandlers.hpp b/addons/backpacks/CfgEventHandlers.hpp index 1aad146690..20cf8f83bf 100644 --- a/addons/backpacks/CfgEventHandlers.hpp +++ b/addons/backpacks/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/backpacks/XEH_PREP.hpp b/addons/backpacks/XEH_PREP.hpp new file mode 100644 index 0000000000..8c8a014235 --- /dev/null +++ b/addons/backpacks/XEH_PREP.hpp @@ -0,0 +1,4 @@ + +PREP(backpackOpened); +PREP(isBackpack); +PREP(onOpenInventory); diff --git a/addons/backpacks/XEH_preInit.sqf b/addons/backpacks/XEH_preInit.sqf index f4c6a1a5d8..a7feade1c3 100644 --- a/addons/backpacks/XEH_preInit.sqf +++ b/addons/backpacks/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP(backpackOpened); -PREP(isBackpack); -PREP(onOpenInventory); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/backpacks/XEH_preStart.sqf b/addons/backpacks/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/backpacks/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/captives/CfgEventHandlers.hpp b/addons/captives/CfgEventHandlers.hpp index 4d12dc10c4..bed80b8b58 100644 --- a/addons/captives/CfgEventHandlers.hpp +++ b/addons/captives/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/captives/XEH_PREP.hpp b/addons/captives/XEH_PREP.hpp new file mode 100644 index 0000000000..2722214e1b --- /dev/null +++ b/addons/captives/XEH_PREP.hpp @@ -0,0 +1,30 @@ + +PREP(canApplyHandcuffs); +PREP(canEscortCaptive); +PREP(canFriskPerson); +PREP(canLoadCaptive); +PREP(canRemoveHandcuffs); +PREP(canStopEscorting); +PREP(canSurrender); +PREP(canUnloadCaptive); +PREP(doApplyHandcuffs); +PREP(doEscortCaptive); +PREP(doFriskPerson); +PREP(doLoadCaptive); +PREP(doRemoveHandcuffs); +PREP(doUnloadCaptive); +PREP(findEmptyNonFFVCargoSeat); +PREP(handleGetIn); +PREP(handleGetOut); +PREP(handleOnUnconscious); +PREP(handlePlayerChanged); +PREP(handleRespawn); +PREP(handleUnitInitPost); +PREP(handleZeusDisplayChanged); +PREP(moduleHandcuffed); +PREP(moduleSettings); +PREP(moduleSurrender); +PREP(setHandcuffed); +PREP(setSurrendered); +PREP(vehicleCaptiveMoveIn); +PREP(vehicleCaptiveMoveOut); diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index e419d4d11b..81657a8960 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -2,35 +2,7 @@ ADDON = false; -PREP(canApplyHandcuffs); -PREP(canEscortCaptive); -PREP(canFriskPerson); -PREP(canLoadCaptive); -PREP(canRemoveHandcuffs); -PREP(canStopEscorting); -PREP(canSurrender); -PREP(canUnloadCaptive); -PREP(doApplyHandcuffs); -PREP(doEscortCaptive); -PREP(doFriskPerson); -PREP(doLoadCaptive); -PREP(doRemoveHandcuffs); -PREP(doUnloadCaptive); -PREP(findEmptyNonFFVCargoSeat); -PREP(handleGetIn); -PREP(handleGetOut); -PREP(handleOnUnconscious); -PREP(handlePlayerChanged); -PREP(handleRespawn); -PREP(handleUnitInitPost); -PREP(handleZeusDisplayChanged); -PREP(moduleHandcuffed); -PREP(moduleSettings); -PREP(moduleSurrender); -PREP(setHandcuffed); -PREP(setSurrendered); -PREP(vehicleCaptiveMoveIn); -PREP(vehicleCaptiveMoveOut); +#include "XEH_PREP.hpp" GVAR(captivityEnabled) = false; diff --git a/addons/captives/XEH_preStart.sqf b/addons/captives/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/captives/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp index f65dc24e06..3f784e7ab4 100644 --- a/addons/cargo/CfgEventHandlers.hpp +++ b/addons/cargo/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp new file mode 100644 index 0000000000..9ccd0d587d --- /dev/null +++ b/addons/cargo/XEH_PREP.hpp @@ -0,0 +1,20 @@ + +PREP(addCargoItem); +PREP(canLoad); +PREP(canLoadItemIn); +PREP(canUnloadItem); +PREP(findNearestVehicle); +PREP(getCargoSpaceLeft); +PREP(getSizeItem); +PREP(handleDestroyed); +PREP(initObject); +PREP(initVehicle); +PREP(loadItem); +PREP(makeLoadable); +PREP(moduleMakeLoadable); +PREP(moduleSettings); +PREP(onMenuOpen); +PREP(startLoadIn); +PREP(startUnload); +PREP(unloadItem); +PREP(validateCargoSpace); diff --git a/addons/cargo/XEH_preInit.sqf b/addons/cargo/XEH_preInit.sqf index 1f2be9894b..a24ce048b5 100644 --- a/addons/cargo/XEH_preInit.sqf +++ b/addons/cargo/XEH_preInit.sqf @@ -2,25 +2,7 @@ ADDON = false; -PREP(addCargoItem); -PREP(canLoad); -PREP(canLoadItemIn); -PREP(canUnloadItem); -PREP(findNearestVehicle); -PREP(getCargoSpaceLeft); -PREP(getSizeItem); -PREP(handleDestroyed); -PREP(initObject); -PREP(initVehicle); -PREP(loadItem); -PREP(makeLoadable); -PREP(moduleMakeLoadable); -PREP(moduleSettings); -PREP(onMenuOpen); -PREP(startLoadIn); -PREP(startUnload); -PREP(unloadItem); -PREP(validateCargoSpace); +#include "XEH_PREP.hpp" GVAR(initializedItemClasses) = []; GVAR(initializedVehicleClasses) = []; diff --git a/addons/cargo/XEH_preStart.sqf b/addons/cargo/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/cargo/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index 1afbe16512..e199f34ab0 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp new file mode 100644 index 0000000000..569a1f5bd2 --- /dev/null +++ b/addons/common/XEH_PREP.hpp @@ -0,0 +1,288 @@ + +PREP(addCanInteractWithCondition); +PREP(addLineToDebugDraw); +PREP(addSetting); +PREP(addToInventory); +PREP(assignedItemFix); +PREP(assignObjectsInList); +PREP(ambientBrightness); +PREP(ASLToPosition); +PREP(binarizeNumber); +PREP(blurScreen); +PREP(cachedCall); +PREP(canGetInPosition); +PREP(canInteractWith); +PREP(canUseWeapon); +PREP(changeProjectileDirection); +PREP(checkFiles); +PREP(checkPBOs); +PREP(claim); +PREP(codeToString); +PREP(createOrthonormalReference); +PREP(currentChannel); +PREP(debug); +PREP(debugModule); +PREP(defineVariable); +PREP(deviceKeyFindValidIndex); +PREP(deviceKeyRegisterNew); +PREP(disableAI); +PREP(disableUserInput); +PREP(displayIcon); +PREP(displayText); +PREP(displayTextPicture); +PREP(displayTextStructured); +PREP(doAnimation); +PREP(dropBackpack); +PREP(endRadioTransmission); +PREP(eraseCache); +PREP(errorMessage); +PREP(execNextFrame); +PREP(execPersistentFnc); +PREP(execRemoteFnc); +PREP(executePersistent); +PREP(filter); +PREP(findUnloadPosition); +PREP(firedEH); +PREP(fixCollision); +PREP(fixFloating); +PREP(fixLoweredRifleAnimation); +PREP(fixPosition); +PREP(getAllDefinedSetVariables); +PREP(getAllGear); +PREP(getDeathAnim); +PREP(getCaptivityStatus); +PREP(getDefaultAnim); +PREP(getDefinedVariable); +PREP(getDefinedVariableDefault); +PREP(getDefinedVariableInfo); +PREP(getFirstObjectIntersection); +PREP(getFirstTerrainIntersection); +PREP(getForceWalkStatus); +PREP(getGunner); +PREP(getInPosition); +PREP(getMapGridData); +PREP(getMapGridFromPos); +PREP(getMapPosFromGrid); +PREP(getMarkerType); +PREP(getMGRSdata); +PREP(getName); +PREP(getNumberFromMissionSQM); +PREP(getNumberMagazinesIn); +PREP(getPitchBankYaw); +PREP(getSettingData); +PREP(getStaminaBarControl); +PREP(getStringFromMissionSQM); +PREP(getTargetAzimuthAndInclination); +PREP(getTargetDistance); +PREP(getTargetObject); +PREP(getTurnedOnLights); +PREP(getTurretDirection); +PREP(getUavControlPosition); +PREP(getVehicleCargo); +PREP(getVehicleCodriver); +PREP(getVersion); +PREP(getWeaponAzimuthAndInclination); +PREP(getWeaponIndex); +PREP(getWeaponState); +PREP(getWindDirection); +PREP(getZoom); +PREP(goKneeling); +PREP(hadamardProduct); +PREP(handleModifierKey); +PREP(handleModifierKeyUp); +PREP(handleModifierKeyInit); +PREP(handleScrollWheel); +PREP(handleScrollWheelInit); +PREP(hasItem); +PREP(hasMagazine); +PREP(headBugFix); +PREP(hideUnit); +PREP(insertionSort); +PREP(interpolateFromArray); +PREP(inTransitionAnim); +PREP(isAutoWind); +PREP(isAwake); +PREP(isEngineer); +PREP(isEOD); +PREP(isFeatureCameraActive); +PREP(isInBuilding); +PREP(isModLoaded); +PREP(isPlayer); +PREP(isUnderwater); +PREP(lightIntensityFromObject); +PREP(loadPerson); +PREP(loadPersonLocal); +PREP(loadSettingsFromProfile); +PREP(loadSettingsOnServer); +PREP(loadSettingsLocalizedText); +PREP(map); +PREP(moduleCheckPBOs); +PREP(moduleLSDVehicles); +PREP(muteUnit); +PREP(muteUnitHandleInitPost); +PREP(muteUnitHandleRespawn); +PREP(numberToDigits); +PREP(numberToDigitsString); +PREP(numberToString); +PREP(onAnswerRequest); +PREP(owned); +PREP(parseList); +PREP(player); +PREP(playerSide); +PREP(positionToASL); +PREP(progressBar); +PREP(readSettingFromModule); +PREP(readSettingsFromParamsArray); +PREP(receiveRequest); +PREP(removeCanInteractWithCondition); +PREP(removeSpecificMagazine); +PREP(requestCallback); +PREP(resetAllDefaults); +PREP(restoreVariablesJIP); +PREP(runAfterSettingsInit); +PREP(sanitizeString); +PREP(selectWeaponMode); +PREP(sendRequest); +PREP(serverLog); +PREP(setAllGear); +PREP(setApproximateVariablePublic); +PREP(setCaptivityStatus); +PREP(setDefinedVariable); +PREP(setDisableUserInputStatus); +PREP(setForceWalkStatus); +PREP(setHearingCapability); +PREP(setName); +PREP(setParameter); +PREP(setPitchBankYaw); +PREP(setProne); +PREP(setSetting); +PREP(setSettingFromConfig); +PREP(setVariableJIP); +PREP(setVariablePublic); +PREP(setVolume); +PREP(showHud); +PREP(statusEffect_addType); +PREP(statusEffect_get); +PREP(statusEffect_localEH); +PREP(statusEffect_resetVariables); +PREP(statusEffect_respawnEH); +PREP(statusEffect_sendEffects); +PREP(statusEffect_set); +PREP(stringCompare); +PREP(stringToColoredText); +PREP(stringRemoveWhiteSpace); +PREP(switchToGroupSide); +PREP(throttledPublicVariable); +PREP(toBin); +PREP(toBitmask); +PREP(toHex); +PREP(toNumber); +PREP(unhideUnit); +PREP(uniqueElements); +PREP(unloadPerson); +PREP(unloadPersonLocal); +PREP(unmuteUnit); +PREP(useItem); +PREP(useMagazine); +PREP(waitAndExecute); +PREP(waitUntilAndExecute); +PREP(waveHeightAt); + +PREP(translateToWeaponSpace); +PREP(translateToModelSpace); + +// Model and drawing helpers +PREP(worldToScreenBounds); + +// config items +PREP(getConfigType); +PREP(getItemType); +PREP(getWeaponType); +PREP(getWeaponModes); +PREP(getWeaponMuzzles); + +// config objects +PREP(getConfigTypeObject); +PREP(getConfigGunner); +PREP(getConfigCommander); +PREP(getSelectionsWithoutHitPoints); +PREP(getReflectorsWithSelections); +PREP(getLightProperties); +PREP(getLightPropertiesWeapon); +PREP(getVehicleCrew); +PREP(getVehicleUAVCrew); + +// turrets +PREP(getTurrets); +PREP(getTurretIndex); +PREP(getTurretConfigPath); +PREP(getTurretGunner); +PREP(getTurretCommander); +PREP(getTurretCopilot); +PREP(getDoorTurrets); +PREP(getTurretsFFV); +PREP(getTurretsOther); +PREP(hasHatch); + +// missing inventory commands +PREP(binocularMagazine); +PREP(removeBinocularMagazine); + +// ACE_Debug +PREP(exportConfig); +PREP(getChildren); +PREP(getDisplayConfigName); +PREP(monitor); +PREP(showUser); + +PREP(dumpPerformanceCounters); +PREP(dumpArray); + +// ACE_CuratorFix +PREP(addCuratorUnloadEventhandler); +PREP(fixCrateContent); + +PREP(globalEvent); +PREP(_handleNetEvent); +PREP(addEventHandler); +PREP(targetEvent); +PREP(serverEvent); +PREP(localEvent); +PREP(removeEventHandler); +PREP(removeAlLEventHandlers); + +// Synchronized Events +PREP(syncedEventPFH); +PREP(addSyncedEventHandler); +PREP(removeSyncedEventHandler); +PREP(requestSyncedEvent); +PREP(syncedEvent); + +PREP(_handleSyncedEvent); +PREP(_handleRequestSyncedEvent); +PREP(_handleRequestAllSyncedEvents); + +// other eventhandlers +PREP(addActionEventHandler); +PREP(addActionMenuEventHandler); +PREP(addScrollWheelEventHandler); +PREP(addMapMarkerCreatedEventHandler); + +PREP(removeActionEventHandler); +PREP(removeActionMenuEventHandler); +PREP(removeScrollWheelEventHandler); +PREP(removeMapMarkerCreatedEventHandler); + +// hashes +PREP(hashCreate); +PREP(hashSet); +PREP(hashGet); +PREP(hashHasKey); +PREP(hashRem); +PREP(hashListCreateList); +PREP(hashListCreateHash); +PREP(hashListSelect); +PREP(hashListSet); +PREP(hashListPush); + +PREP(timePFH); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index f96028c352..c235c56b3f 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -3,296 +3,12 @@ ADDON = false; -PREP(addCanInteractWithCondition); -PREP(addLineToDebugDraw); -PREP(addSetting); -PREP(addToInventory); -PREP(assignedItemFix); -PREP(assignObjectsInList); -PREP(ambientBrightness); -PREP(ASLToPosition); -PREP(binarizeNumber); -PREP(blurScreen); -PREP(cachedCall); -PREP(canGetInPosition); -PREP(canInteractWith); -PREP(canUseWeapon); -PREP(changeProjectileDirection); -PREP(checkFiles); -PREP(checkPBOs); -PREP(claim); -PREP(codeToString); -PREP(createOrthonormalReference); -PREP(currentChannel); -PREP(debug); -PREP(debugModule); -PREP(defineVariable); -PREP(deviceKeyFindValidIndex); -PREP(deviceKeyRegisterNew); -PREP(disableAI); -PREP(disableUserInput); -PREP(displayIcon); -PREP(displayText); -PREP(displayTextPicture); -PREP(displayTextStructured); -PREP(doAnimation); -PREP(dropBackpack); -PREP(endRadioTransmission); -PREP(eraseCache); -PREP(errorMessage); -PREP(execNextFrame); -PREP(execPersistentFnc); -PREP(execRemoteFnc); -PREP(executePersistent); -PREP(filter); -PREP(findUnloadPosition); -PREP(firedEH); -PREP(fixCollision); -PREP(fixFloating); -PREP(fixLoweredRifleAnimation); -PREP(fixPosition); -PREP(getAllDefinedSetVariables); -PREP(getAllGear); -PREP(getDeathAnim); -PREP(getCaptivityStatus); -PREP(getDefaultAnim); -PREP(getDefinedVariable); -PREP(getDefinedVariableDefault); -PREP(getDefinedVariableInfo); -PREP(getFirstObjectIntersection); -PREP(getFirstTerrainIntersection); -PREP(getForceWalkStatus); -PREP(getGunner); -PREP(getInPosition); -PREP(getMapGridData); -PREP(getMapGridFromPos); -PREP(getMapPosFromGrid); -PREP(getMarkerType); -PREP(getMGRSdata); -PREP(getName); -PREP(getNumberFromMissionSQM); -PREP(getNumberMagazinesIn); -PREP(getPitchBankYaw); -PREP(getSettingData); -PREP(getStaminaBarControl); -PREP(getStringFromMissionSQM); -PREP(getTargetAzimuthAndInclination); -PREP(getTargetDistance); -PREP(getTargetObject); -PREP(getTurnedOnLights); -PREP(getTurretDirection); -PREP(getUavControlPosition); -PREP(getVehicleCargo); -PREP(getVehicleCodriver); -PREP(getVersion); -PREP(getWeaponAzimuthAndInclination); -PREP(getWeaponIndex); -PREP(getWeaponState); -PREP(getWindDirection); -PREP(getZoom); -PREP(goKneeling); -PREP(hadamardProduct); -PREP(handleModifierKey); -PREP(handleModifierKeyUp); -PREP(handleModifierKeyInit); -PREP(handleScrollWheel); -PREP(handleScrollWheelInit); -PREP(hasItem); -PREP(hasMagazine); -PREP(headBugFix); -PREP(hideUnit); -PREP(insertionSort); -PREP(interpolateFromArray); -PREP(inTransitionAnim); -PREP(isAutoWind); -PREP(isAwake); -PREP(isEngineer); -PREP(isEOD); -PREP(isFeatureCameraActive); -PREP(isInBuilding); -PREP(isModLoaded); -PREP(isPlayer); -PREP(isUnderwater); -PREP(lightIntensityFromObject); -PREP(loadPerson); -PREP(loadPersonLocal); -PREP(loadSettingsFromProfile); -PREP(loadSettingsOnServer); -PREP(loadSettingsLocalizedText); -PREP(map); -PREP(moduleCheckPBOs); -PREP(moduleLSDVehicles); -PREP(muteUnit); -PREP(muteUnitHandleInitPost); -PREP(muteUnitHandleRespawn); -PREP(numberToDigits); -PREP(numberToDigitsString); -PREP(numberToString); -PREP(onAnswerRequest); -PREP(owned); -PREP(parseList); -PREP(player); -PREP(playerSide); -PREP(positionToASL); -PREP(progressBar); -PREP(readSettingFromModule); -PREP(readSettingsFromParamsArray); -PREP(receiveRequest); -PREP(removeCanInteractWithCondition); -PREP(removeSpecificMagazine); -PREP(requestCallback); -PREP(resetAllDefaults); -PREP(restoreVariablesJIP); -PREP(runAfterSettingsInit); -PREP(sanitizeString); -PREP(selectWeaponMode); -PREP(sendRequest); -PREP(serverLog); -PREP(setAllGear); -PREP(setApproximateVariablePublic); -PREP(setCaptivityStatus); -PREP(setDefinedVariable); -PREP(setDisableUserInputStatus); -PREP(setForceWalkStatus); -PREP(setHearingCapability); -PREP(setName); -PREP(setParameter); -PREP(setPitchBankYaw); -PREP(setProne); -PREP(setSetting); -PREP(setSettingFromConfig); -PREP(setVariableJIP); -PREP(setVariablePublic); -PREP(setVolume); -PREP(showHud); -PREP(statusEffect_addType); -PREP(statusEffect_get); -PREP(statusEffect_localEH); -PREP(statusEffect_resetVariables); -PREP(statusEffect_respawnEH); -PREP(statusEffect_sendEffects); -PREP(statusEffect_set); -PREP(stringCompare); -PREP(stringToColoredText); -PREP(stringRemoveWhiteSpace); -PREP(switchToGroupSide); -PREP(throttledPublicVariable); -PREP(toBin); -PREP(toBitmask); -PREP(toHex); -PREP(toNumber); -PREP(unhideUnit); -PREP(uniqueElements); -PREP(unloadPerson); -PREP(unloadPersonLocal); -PREP(unmuteUnit); -PREP(useItem); -PREP(useMagazine); -PREP(waitAndExecute); -PREP(waitUntilAndExecute); -PREP(waveHeightAt); - -PREP(translateToWeaponSpace); -PREP(translateToModelSpace); - -// Model and drawing helpers -PREP(worldToScreenBounds); - -// config items -PREP(getConfigType); -PREP(getItemType); -PREP(getWeaponType); -PREP(getWeaponModes); -PREP(getWeaponMuzzles); - -// config objects -PREP(getConfigTypeObject); -PREP(getConfigGunner); -PREP(getConfigCommander); -PREP(getSelectionsWithoutHitPoints); -PREP(getReflectorsWithSelections); -PREP(getLightProperties); -PREP(getLightPropertiesWeapon); -PREP(getVehicleCrew); -PREP(getVehicleUAVCrew); - -// turrets -PREP(getTurrets); -PREP(getTurretIndex); -PREP(getTurretConfigPath); -PREP(getTurretGunner); -PREP(getTurretCommander); -PREP(getTurretCopilot); -PREP(getDoorTurrets); -PREP(getTurretsFFV); -PREP(getTurretsOther); -PREP(hasHatch); - -// missing inventory commands -PREP(binocularMagazine); -PREP(removeBinocularMagazine); - -// ACE_Debug -PREP(exportConfig); -PREP(getChildren); -PREP(getDisplayConfigName); -PREP(monitor); -PREP(showUser); - -PREP(dumpPerformanceCounters); -PREP(dumpArray); - -// ACE_CuratorFix -PREP(addCuratorUnloadEventhandler); -PREP(fixCrateContent); +#include "XEH_PREP.hpp" //ACE events global variables GVAR(eventsLocation) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0]; GVAR(eventsLocation) setText QGVAR(eventsLocation); -PREP(globalEvent); -PREP(_handleNetEvent); -PREP(addEventHandler); -PREP(targetEvent); -PREP(serverEvent); -PREP(localEvent); -PREP(removeEventHandler); -PREP(removeAlLEventHandlers); - -// Synchronized Events -PREP(syncedEventPFH); -PREP(addSyncedEventHandler); -PREP(removeSyncedEventHandler); -PREP(requestSyncedEvent); -PREP(syncedEvent); - -PREP(_handleSyncedEvent); -PREP(_handleRequestSyncedEvent); -PREP(_handleRequestAllSyncedEvents); - -// other eventhandlers -PREP(addActionEventHandler); -PREP(addActionMenuEventHandler); -PREP(addScrollWheelEventHandler); -PREP(addMapMarkerCreatedEventHandler); - -PREP(removeActionEventHandler); -PREP(removeActionMenuEventHandler); -PREP(removeScrollWheelEventHandler); -PREP(removeMapMarkerCreatedEventHandler); - -// hashes -PREP(hashCreate); -PREP(hashSet); -PREP(hashGet); -PREP(hashHasKey); -PREP(hashRem); -PREP(hashListCreateList); -PREP(hashListCreateHash); -PREP(hashListSelect); -PREP(hashListSet); -PREP(hashListPush); - GVAR(syncedEvents) = HASH_CREATE; GVAR(showHudHash) = [] call FUNC(hashCreate); @@ -355,7 +71,6 @@ ACE_gameTime = time; ACE_pausedTime = 0; ACE_virtualPausedTime = 0; -PREP(timePFH); [FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler; // Init toHex diff --git a/addons/common/XEH_preStart.sqf b/addons/common/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/common/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/concertina_wire/CfgEventHandlers.hpp b/addons/concertina_wire/CfgEventHandlers.hpp index 026afb4e2d..80711b5390 100644 --- a/addons/concertina_wire/CfgEventHandlers.hpp +++ b/addons/concertina_wire/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/concertina_wire/XEH_PREP.hpp b/addons/concertina_wire/XEH_PREP.hpp new file mode 100644 index 0000000000..34a666a6b9 --- /dev/null +++ b/addons/concertina_wire/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(deploy); +PREP(dismount); +PREP(dismountSuccess); +PREP(handleDamage); +PREP(handleKilled); +PREP(vehicleDamage); diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf index 582d642484..a7feade1c3 100644 --- a/addons/concertina_wire/XEH_preInit.sqf +++ b/addons/concertina_wire/XEH_preInit.sqf @@ -2,11 +2,6 @@ ADDON = false; -PREP(deploy); -PREP(dismount); -PREP(dismountSuccess); -PREP(handleDamage); -PREP(handleKilled); -PREP(vehicleDamage); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/concertina_wire/XEH_preStart.sqf b/addons/concertina_wire/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/concertina_wire/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/dagr/CfgEventHandlers.hpp b/addons/dagr/CfgEventHandlers.hpp index 2a05b72298..ccbe4f4abb 100644 --- a/addons/dagr/CfgEventHandlers.hpp +++ b/addons/dagr/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/dagr/XEH_PREP.hpp b/addons/dagr/XEH_PREP.hpp new file mode 100644 index 0000000000..746a36de38 --- /dev/null +++ b/addons/dagr/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(handleRangeFinderData); +PREP(menuInit); +PREP(outputData); +PREP(outputVector); +PREP(outputWP); +PREP(toggleOverlay); diff --git a/addons/dagr/XEH_preInit.sqf b/addons/dagr/XEH_preInit.sqf index 7c61d71775..a7feade1c3 100644 --- a/addons/dagr/XEH_preInit.sqf +++ b/addons/dagr/XEH_preInit.sqf @@ -2,11 +2,6 @@ ADDON = false; -PREP(handleRangeFinderData); -PREP(menuInit); -PREP(outputData); -PREP(outputVector); -PREP(outputWP); -PREP(toggleOverlay); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/dagr/XEH_preStart.sqf b/addons/dagr/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/dagr/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/disarming/CfgEventHandlers.hpp b/addons/disarming/CfgEventHandlers.hpp index e75956f440..becf395052 100644 --- a/addons/disarming/CfgEventHandlers.hpp +++ b/addons/disarming/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/disarming/XEH_PREP.hpp b/addons/disarming/XEH_PREP.hpp new file mode 100644 index 0000000000..1a0e85f447 --- /dev/null +++ b/addons/disarming/XEH_PREP.hpp @@ -0,0 +1,12 @@ + +PREP(canBeDisarmed); +PREP(canPlayerDisarmUnit); +PREP(disarmDropItems); +PREP(eventCallerFinish); +PREP(eventTargetFinish); +PREP(eventTargetStart); +PREP(getAllGearContainer); +PREP(getAllGearUnit); +PREP(openDisarmDialog); +PREP(showItemsInListbox); +PREP(verifyMagazinesMoved); diff --git a/addons/disarming/XEH_preInit.sqf b/addons/disarming/XEH_preInit.sqf index 84534e41b4..a7feade1c3 100644 --- a/addons/disarming/XEH_preInit.sqf +++ b/addons/disarming/XEH_preInit.sqf @@ -2,16 +2,6 @@ ADDON = false; -PREP(canBeDisarmed); -PREP(canPlayerDisarmUnit); -PREP(disarmDropItems); -PREP(eventCallerFinish); -PREP(eventTargetFinish); -PREP(eventTargetStart); -PREP(getAllGearContainer); -PREP(getAllGearUnit); -PREP(openDisarmDialog); -PREP(showItemsInListbox); -PREP(verifyMagazinesMoved); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/disarming/XEH_preStart.sqf b/addons/disarming/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/disarming/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/disposable/CfgEventHandlers.hpp b/addons/disposable/CfgEventHandlers.hpp index c236fb6f57..50dda6ce5b 100644 --- a/addons/disposable/CfgEventHandlers.hpp +++ b/addons/disposable/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/disposable/XEH_PREP.hpp b/addons/disposable/XEH_PREP.hpp new file mode 100644 index 0000000000..8319e582aa --- /dev/null +++ b/addons/disposable/XEH_PREP.hpp @@ -0,0 +1,4 @@ + +PREP(replaceATWeapon); +PREP(takeLoadedATWeapon); +PREP(updateInventoryDisplay); diff --git a/addons/disposable/XEH_preInit.sqf b/addons/disposable/XEH_preInit.sqf index 020187b730..a7feade1c3 100644 --- a/addons/disposable/XEH_preInit.sqf +++ b/addons/disposable/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP(replaceATWeapon); -PREP(takeLoadedATWeapon); -PREP(updateInventoryDisplay); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/disposable/XEH_preStart.sqf b/addons/disposable/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/disposable/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index ca706f8427..313406a3f1 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/dragging/XEH_PREP.hpp b/addons/dragging/XEH_PREP.hpp new file mode 100644 index 0000000000..b04c15e7ec --- /dev/null +++ b/addons/dragging/XEH_PREP.hpp @@ -0,0 +1,27 @@ + +PREP(canCarry); +PREP(canDrag); +PREP(canDrop); +PREP(canDrop_carry); +PREP(carryObject); +PREP(carryObjectPFH); +PREP(dragObject); +PREP(dragObjectPFH); +PREP(dropObject); +PREP(dropObject_carry); +PREP(getWeight); +PREP(handleAnimChanged); +PREP(handleKilled); +PREP(handlePlayerChanged); +PREP(handlePlayerWeaponChanged); +PREP(handleScrollWheel); +PREP(handleUnconscious); +PREP(initObject); +PREP(initPerson); +PREP(isObjectOnObject); +PREP(setCarryable); +PREP(setDraggable); +PREP(startCarry); +PREP(startCarryPFH); +PREP(startDrag); +PREP(startDragPFH); diff --git a/addons/dragging/XEH_preInit.sqf b/addons/dragging/XEH_preInit.sqf index f596a89493..a7feade1c3 100644 --- a/addons/dragging/XEH_preInit.sqf +++ b/addons/dragging/XEH_preInit.sqf @@ -2,31 +2,6 @@ ADDON = false; -PREP(canCarry); -PREP(canDrag); -PREP(canDrop); -PREP(canDrop_carry); -PREP(carryObject); -PREP(carryObjectPFH); -PREP(dragObject); -PREP(dragObjectPFH); -PREP(dropObject); -PREP(dropObject_carry); -PREP(getWeight); -PREP(handleAnimChanged); -PREP(handleKilled); -PREP(handlePlayerChanged); -PREP(handlePlayerWeaponChanged); -PREP(handleScrollWheel); -PREP(handleUnconscious); -PREP(initObject); -PREP(initPerson); -PREP(isObjectOnObject); -PREP(setCarryable); -PREP(setDraggable); -PREP(startCarry); -PREP(startCarryPFH); -PREP(startDrag); -PREP(startDragPFH); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/dragging/XEH_preStart.sqf b/addons/dragging/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/dragging/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index e7bf74e414..0a40c12726 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp new file mode 100644 index 0000000000..b3686a986f --- /dev/null +++ b/addons/explosives/XEH_PREP.hpp @@ -0,0 +1,46 @@ + +PREP(addCellphoneIED); +PREP(addClacker); +PREP(addDetonateActions); +PREP(addExplosiveActions); +PREP(addToSpeedDial); +PREP(addTransmitterActions); +PREP(addTriggerActions); +PREP(canDefuse); +PREP(canDetonate); +PREP(connectExplosive); +PREP(defuseExplosive); +PREP(detonateExplosive); +PREP(detonateExplosiveAll); +PREP(dialPhone); +PREP(dialingPhone); + +PREP(handleScrollWheel); + +PREP(hasExplosives); +PREP(hasPlacedExplosives); + +PREP(interactEH); + +PREP(getDetonators); +PREP(getPlacedExplosives); +PREP(getSpeedDialExplosive); + +PREP(module); + +PREP(onIncapacitated); +PREP(onInventoryChanged); + +PREP(openTimerSetUI); + +PREP(placeExplosive); +PREP(removeFromSpeedDial); + +PREP(scriptedExplosive); +PREP(selectTrigger); +PREP(setupExplosive); +PREP(setPosition); +PREP(setSpeedDial); +PREP(startDefuse); +PREP(startTimer); +PREP(triggerType); diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 1facffccb3..8ec4fa3817 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -17,50 +17,6 @@ ADDON = false; -PREP(addCellphoneIED); -PREP(addClacker); -PREP(addDetonateActions); -PREP(addExplosiveActions); -PREP(addToSpeedDial); -PREP(addTransmitterActions); -PREP(addTriggerActions); -PREP(canDefuse); -PREP(canDetonate); -PREP(connectExplosive); -PREP(defuseExplosive); -PREP(detonateExplosive); -PREP(detonateExplosiveAll); -PREP(dialPhone); -PREP(dialingPhone); - -PREP(handleScrollWheel); - -PREP(hasExplosives); -PREP(hasPlacedExplosives); - -PREP(interactEH); - -PREP(getDetonators); -PREP(getPlacedExplosives); -PREP(getSpeedDialExplosive); - -PREP(module); - -PREP(onIncapacitated); -PREP(onInventoryChanged); - -PREP(openTimerSetUI); - -PREP(placeExplosive); -PREP(removeFromSpeedDial); - -PREP(scriptedExplosive); -PREP(selectTrigger); -PREP(setupExplosive); -PREP(setPosition); -PREP(setSpeedDial); -PREP(startDefuse); -PREP(startTimer); -PREP(triggerType); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/explosives/XEH_preStart.sqf b/addons/explosives/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/explosives/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/fcs/CfgEventHandlers.hpp b/addons/fcs/CfgEventHandlers.hpp index 8c5b768ca9..b477f93d6a 100644 --- a/addons/fcs/CfgEventHandlers.hpp +++ b/addons/fcs/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/fcs/XEH_PREP.hpp b/addons/fcs/XEH_PREP.hpp new file mode 100644 index 0000000000..be505b95fe --- /dev/null +++ b/addons/fcs/XEH_PREP.hpp @@ -0,0 +1,16 @@ + +PREP(adjustRange); +PREP(calculateSolution); +PREP(canResetFCS); +PREP(canUseFCS); +PREP(canUseRangefinder); +PREP(firedEH); +PREP(getAngle); +PREP(getRange); +PREP(handleAirBurstAmmunitionPFH); +PREP(onForceUpdate); +PREP(keyDown); +PREP(keyUp); +PREP(reset); +PREP(updateRangeHUD); +PREP(vehicleInit); diff --git a/addons/fcs/XEH_preInit.sqf b/addons/fcs/XEH_preInit.sqf index c3fa171adf..a7feade1c3 100644 --- a/addons/fcs/XEH_preInit.sqf +++ b/addons/fcs/XEH_preInit.sqf @@ -2,20 +2,6 @@ ADDON = false; -PREP(adjustRange); -PREP(calculateSolution); -PREP(canResetFCS); -PREP(canUseFCS); -PREP(canUseRangefinder); -PREP(firedEH); -PREP(getAngle); -PREP(getRange); -PREP(handleAirBurstAmmunitionPFH); -PREP(onForceUpdate); -PREP(keyDown); -PREP(keyUp); -PREP(reset); -PREP(updateRangeHUD); -PREP(vehicleInit); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/fcs/XEH_preStart.sqf b/addons/fcs/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/fcs/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/finger/CfgEventHandlers.hpp b/addons/finger/CfgEventHandlers.hpp index 917a0acbd7..becf395052 100644 --- a/addons/finger/CfgEventHandlers.hpp +++ b/addons/finger/CfgEventHandlers.hpp @@ -1,8 +1,16 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + 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)); diff --git a/addons/finger/XEH_PREP.hpp b/addons/finger/XEH_PREP.hpp new file mode 100644 index 0000000000..6965917bd8 --- /dev/null +++ b/addons/finger/XEH_PREP.hpp @@ -0,0 +1,5 @@ + +PREP(incomingFinger); +PREP(keyPress); +PREP(moduleSettings); +PREP(perFrameEH); diff --git a/addons/finger/XEH_preInit.sqf b/addons/finger/XEH_preInit.sqf index e7e68cf8ec..a7feade1c3 100644 --- a/addons/finger/XEH_preInit.sqf +++ b/addons/finger/XEH_preInit.sqf @@ -2,9 +2,6 @@ ADDON = false; -PREP(incomingFinger); -PREP(keyPress); -PREP(moduleSettings); -PREP(perFrameEH); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/finger/XEH_preStart.sqf b/addons/finger/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/finger/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/flashlights/CfgEventHandlers.hpp b/addons/flashlights/CfgEventHandlers.hpp index d5f49bd5c3..30381d7200 100644 --- a/addons/flashlights/CfgEventHandlers.hpp +++ b/addons/flashlights/CfgEventHandlers.hpp @@ -1,3 +1,4 @@ + class Extended_PostInit_EventHandlers { class ADDON { clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) ); diff --git a/addons/frag/CfgEventhandlers.hpp b/addons/frag/CfgEventhandlers.hpp index 3b3f4898e5..415e205fba 100644 --- a/addons/frag/CfgEventhandlers.hpp +++ b/addons/frag/CfgEventhandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp new file mode 100644 index 0000000000..926cbaab0c --- /dev/null +++ b/addons/frag/XEH_PREP.hpp @@ -0,0 +1,27 @@ + +PREP(doSpall); +PREP(fired); +PREP(frago); +PREP(spallTrack); + +// * Other */ +PREP(addBlackList); +PREP(addTrack); +PREP(drawTraces); +PREP(removeTrack); +PREP(spallHP); +PREP(startTracing); +PREP(stopTracing); +PREP(trackTrace); + +// New tracking mechanisms +PREP(masterPFH); +PREP(pfhRound); +PREP(addPfhRound); +PREP(removePfhRound); // THIS SHOULD ABE USED SPARINGLY + +// Explosive Reflection +GVAR(replacedBisArtyWrapper) = true; +PREP(findReflections); +PREP(doExplosions); +PREP(doReflections); diff --git a/addons/frag/XEH_preInit.sqf b/addons/frag/XEH_preInit.sqf index cdd9342ffd..1de9a467eb 100644 --- a/addons/frag/XEH_preInit.sqf +++ b/addons/frag/XEH_preInit.sqf @@ -2,10 +2,7 @@ ADDON = false; -PREP(doSpall); -PREP(fired); -PREP(frago); -PREP(spallTrack); +#include "XEH_PREP.hpp" GVAR(blackList) = []; GVAR(traceFrags) = false; @@ -20,29 +17,6 @@ GVAR(traceID) = -1; GVAR(traces) = []; GVAR(tracesStarted) = false; -// * Other Shit */ -PREP(addBlackList); -PREP(addTrack); -PREP(drawTraces); -PREP(removeTrack); -PREP(spallHP); -PREP(startTracing); -PREP(stopTracing); -PREP(trackTrace); - -// New tracking mechanisms -PREP(masterPFH); -PREP(pfhRound); -PREP(addPfhRound); -PREP(removePfhRound); // THIS SHOULD ABE USED SPARINGLY - -// Explosive Reflection -GVAR(replacedBisArtyWrapper) = true; -PREP(findReflections); -PREP(doExplosions); -PREP(doReflections); - - GVAR(lastIterationIndex) = 0; GVAR(objects) = []; GVAR(objectTypes) = []; diff --git a/addons/frag/XEH_preStart.sqf b/addons/frag/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/frag/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/gestures/CfgEventHandlers.hpp b/addons/gestures/CfgEventHandlers.hpp index 7b003bbe8c..becf395052 100644 --- a/addons/gestures/CfgEventHandlers.hpp +++ b/addons/gestures/CfgEventHandlers.hpp @@ -1,6 +1,13 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; diff --git a/addons/gestures/XEH_PREP.hpp b/addons/gestures/XEH_PREP.hpp new file mode 100644 index 0000000000..dba0c4d0cc --- /dev/null +++ b/addons/gestures/XEH_PREP.hpp @@ -0,0 +1,2 @@ + +PREP(playSignal); diff --git a/addons/gestures/XEH_preInit.sqf b/addons/gestures/XEH_preInit.sqf index 7fd2bb47f2..a7feade1c3 100644 --- a/addons/gestures/XEH_preInit.sqf +++ b/addons/gestures/XEH_preInit.sqf @@ -2,6 +2,6 @@ ADDON = false; -PREP(playSignal); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/gestures/XEH_preStart.sqf b/addons/gestures/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/gestures/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/gforces/CfgEventHandlers.hpp b/addons/gforces/CfgEventHandlers.hpp index eefe61652b..f82caf47dd 100644 --- a/addons/gforces/CfgEventHandlers.hpp +++ b/addons/gforces/CfgEventHandlers.hpp @@ -1,12 +1,18 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit) ); + init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE( call COMPILE_FILE(XEH_postInit) ); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; diff --git a/addons/gforces/XEH_PREP.hpp b/addons/gforces/XEH_PREP.hpp new file mode 100644 index 0000000000..1d3d8dac05 --- /dev/null +++ b/addons/gforces/XEH_PREP.hpp @@ -0,0 +1,2 @@ + +PREP(pfhUpdateGForces); diff --git a/addons/gforces/XEH_preInit.sqf b/addons/gforces/XEH_preInit.sqf index 1d249ff6a0..99e6461c54 100644 --- a/addons/gforces/XEH_preInit.sqf +++ b/addons/gforces/XEH_preInit.sqf @@ -2,7 +2,7 @@ ADDON = false; -PREP(pfhUpdateGForces); +#include "XEH_PREP.hpp" GVAR(GForces) = []; GVAR(GForces_Index) = 0; diff --git a/addons/gforces/XEH_preStart.sqf b/addons/gforces/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/gforces/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/goggles/CfgEventHandlers.hpp b/addons/goggles/CfgEventHandlers.hpp index 36bbadbb3e..578b4ebebb 100644 --- a/addons/goggles/CfgEventHandlers.hpp +++ b/addons/goggles/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/goggles/XEH_PREP.hpp b/addons/goggles/XEH_PREP.hpp new file mode 100644 index 0000000000..ba198439b5 --- /dev/null +++ b/addons/goggles/XEH_PREP.hpp @@ -0,0 +1,26 @@ + +// effects +PREP(applyDirtEffect); +PREP(applyDustEffect); +PREP(applyGlassesEffect); +PREP(applyRainEffect); +PREP(applyRotorWashEffect); +PREP(removeDirtEffect); +PREP(removeDustEffect); +PREP(removeGlassesEffect); +PREP(removeRainEffect); + +// public +PREP(externalCamera); +PREP(isDivingGoggles); +PREP(isGogglesVisible); +PREP(isInRotorWash); + +// general +PREP(clearGlasses); +PREP(getExplosionIndex); + +// eventhandlers +PREP(handleExplosion); +PREP(handleFired); +PREP(handleKilled); diff --git a/addons/goggles/XEH_preInit.sqf b/addons/goggles/XEH_preInit.sqf index ba5fa2373e..a7feade1c3 100644 --- a/addons/goggles/XEH_preInit.sqf +++ b/addons/goggles/XEH_preInit.sqf @@ -2,30 +2,6 @@ ADDON = false; -// effects -PREP(applyDirtEffect); -PREP(applyDustEffect); -PREP(applyGlassesEffect); -PREP(applyRainEffect); -PREP(applyRotorWashEffect); -PREP(removeDirtEffect); -PREP(removeDustEffect); -PREP(removeGlassesEffect); -PREP(removeRainEffect); - -// public -PREP(externalCamera); -PREP(isDivingGoggles); -PREP(isGogglesVisible); -PREP(isInRotorWash); - -// general -PREP(clearGlasses); -PREP(getExplosionIndex); - -// eventhandlers -PREP(handleExplosion); -PREP(handleFired); -PREP(handleKilled); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/goggles/XEH_preStart.sqf b/addons/goggles/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/goggles/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/grenades/CfgEventHandlers.hpp b/addons/grenades/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/grenades/CfgEventHandlers.hpp +++ b/addons/grenades/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/grenades/XEH_PREP.hpp b/addons/grenades/XEH_PREP.hpp new file mode 100644 index 0000000000..b95c0d6961 --- /dev/null +++ b/addons/grenades/XEH_PREP.hpp @@ -0,0 +1,6 @@ + +PREP(flare); +PREP(flashbangExplosionEH); +PREP(flashbangThrownFuze); +PREP(nextMode); +PREP(throwGrenade); diff --git a/addons/grenades/XEH_preInit.sqf b/addons/grenades/XEH_preInit.sqf index 631cecca85..a7feade1c3 100644 --- a/addons/grenades/XEH_preInit.sqf +++ b/addons/grenades/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP(flare); -PREP(flashbangExplosionEH); -PREP(flashbangThrownFuze); -PREP(nextMode); -PREP(throwGrenade); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/grenades/XEH_preStart.sqf b/addons/grenades/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/grenades/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/headless/CfgEventHandlers.hpp b/addons/headless/CfgEventHandlers.hpp index 864912227c..b9c2681558 100644 --- a/addons/headless/CfgEventHandlers.hpp +++ b/addons/headless/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/headless/XEH_PREP.hpp b/addons/headless/XEH_PREP.hpp new file mode 100644 index 0000000000..8d2aaa2cfb --- /dev/null +++ b/addons/headless/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(handleConnectHC); +PREP(handleDisconnect); +PREP(handleInitPost); +PREP(moduleInit); +PREP(rebalance); +PREP(transferGroups); diff --git a/addons/headless/XEH_preInit.sqf b/addons/headless/XEH_preInit.sqf index 23e1541c6c..2455c9f999 100644 --- a/addons/headless/XEH_preInit.sqf +++ b/addons/headless/XEH_preInit.sqf @@ -2,12 +2,7 @@ ADDON = false; -PREP(handleConnectHC); -PREP(handleDisconnect); -PREP(handleInitPost); -PREP(moduleInit); -PREP(rebalance); -PREP(transferGroups); +#include "XEH_PREP.hpp" if (isServer) then { GVAR(headlessClients) = []; diff --git a/addons/headless/XEH_preStart.sqf b/addons/headless/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/headless/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/hearing/CfgEventHandlers.hpp b/addons/hearing/CfgEventHandlers.hpp index e31501d1c3..352f802435 100644 --- a/addons/hearing/CfgEventHandlers.hpp +++ b/addons/hearing/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/hearing/XEH_PREP.hpp b/addons/hearing/XEH_PREP.hpp new file mode 100644 index 0000000000..e06fa5d56c --- /dev/null +++ b/addons/hearing/XEH_PREP.hpp @@ -0,0 +1,13 @@ + +PREP(addEarPlugs); +PREP(earRinging); +PREP(explosionNear); +PREP(firedNear); +PREP(handleRespawn); +PREP(hasEarPlugsIn); +PREP(moduleHearing); +PREP(putInEarPlugs); +PREP(removeEarPlugs); +PREP(updateHearingProtection); +PREP(updatePlayerVehAttenuation); +PREP(updateVolume); diff --git a/addons/hearing/XEH_preInit.sqf b/addons/hearing/XEH_preInit.sqf index b451f0eab4..a7feade1c3 100644 --- a/addons/hearing/XEH_preInit.sqf +++ b/addons/hearing/XEH_preInit.sqf @@ -2,17 +2,6 @@ ADDON = false; -PREP(addEarPlugs); -PREP(earRinging); -PREP(explosionNear); -PREP(firedNear); -PREP(handleRespawn); -PREP(hasEarPlugsIn); -PREP(moduleHearing); -PREP(putInEarPlugs); -PREP(removeEarPlugs); -PREP(updateHearingProtection); -PREP(updatePlayerVehAttenuation); -PREP(updateVolume); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/hearing/XEH_preStart.sqf b/addons/hearing/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/hearing/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/hitreactions/CfgEventHandlers.hpp b/addons/hitreactions/CfgEventHandlers.hpp index 1eea968973..bb990cafea 100644 --- a/addons/hitreactions/CfgEventHandlers.hpp +++ b/addons/hitreactions/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/hitreactions/XEH_PREP.hpp b/addons/hitreactions/XEH_PREP.hpp new file mode 100644 index 0000000000..7701b8ef19 --- /dev/null +++ b/addons/hitreactions/XEH_PREP.hpp @@ -0,0 +1,3 @@ + +PREP(fallDown); +PREP(getRandomAnimation); diff --git a/addons/hitreactions/XEH_preInit.sqf b/addons/hitreactions/XEH_preInit.sqf index 88df4102a1..a7feade1c3 100644 --- a/addons/hitreactions/XEH_preInit.sqf +++ b/addons/hitreactions/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(fallDown); -PREP(getRandomAnimation); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/hitreactions/XEH_preStart.sqf b/addons/hitreactions/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/hitreactions/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/huntir/CfgEventhandlers.hpp b/addons/huntir/CfgEventhandlers.hpp index 44b6e8e6ff..5da5fd0dc2 100644 --- a/addons/huntir/CfgEventhandlers.hpp +++ b/addons/huntir/CfgEventhandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/huntir/XEH_PREP.hpp b/addons/huntir/XEH_PREP.hpp new file mode 100644 index 0000000000..52597f486c --- /dev/null +++ b/addons/huntir/XEH_PREP.hpp @@ -0,0 +1,6 @@ + +PREP(cam); +PREP(handleFired); +PREP(huntir); +PREP(huntirCompass); +PREP(keypressed); diff --git a/addons/huntir/XEH_preInit.sqf b/addons/huntir/XEH_preInit.sqf index 0ae45c1540..a7feade1c3 100644 --- a/addons/huntir/XEH_preInit.sqf +++ b/addons/huntir/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP(cam); -PREP(handleFired); -PREP(huntir); -PREP(huntirCompass); -PREP(keypressed); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/huntir/XEH_preStart.sqf b/addons/huntir/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/huntir/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/interact_menu/CfgEventHandlers.hpp b/addons/interact_menu/CfgEventHandlers.hpp index 1301f022d3..ca88fff466 100644 --- a/addons/interact_menu/CfgEventHandlers.hpp +++ b/addons/interact_menu/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); @@ -16,4 +23,4 @@ class Extended_InitPost_EventHandlers { init = QUOTE(_this call FUNC(compileMenu);_this call FUNC(compileMenuSelfAction)); }; }; -}; \ No newline at end of file +}; diff --git a/addons/interact_menu/XEH_PREP.hpp b/addons/interact_menu/XEH_PREP.hpp new file mode 100644 index 0000000000..b571b19162 --- /dev/null +++ b/addons/interact_menu/XEH_PREP.hpp @@ -0,0 +1,27 @@ + +PREP(addActionToClass); +PREP(addActionToObject); +PREP(addMainAction); +PREP(compileMenu); +PREP(compileMenuSelfAction); +PREP(compileMenuZeus); +PREP(collectActiveActionTree); +PREP(createAction); +PREP(ctrlSetParsedTextCached); +PREP(findActionNode); +PREP(handlePlayerChanged); +PREP(isSubPath); +PREP(keyDown); +PREP(keyUp); +PREP(removeActionFromClass); +PREP(removeActionFromObject); +PREP(render); +PREP(renderActionPoints); +PREP(renderBaseMenu); +PREP(renderIcon); +PREP(renderMenu); +PREP(renderSelector); +PREP(setupTextColors); +PREP(splitPath); +PREP(userActions_addHouseActions); +PREP(userActions_getHouseActions); diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index 92f6d61fde..ac3ee9b0f5 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -2,32 +2,7 @@ ADDON = false; -PREP(addActionToClass); -PREP(addActionToObject); -PREP(addMainAction); -PREP(compileMenu); -PREP(compileMenuSelfAction); -PREP(compileMenuZeus); -PREP(collectActiveActionTree); -PREP(createAction); -PREP(ctrlSetParsedTextCached); -PREP(findActionNode); -PREP(handlePlayerChanged); -PREP(isSubPath); -PREP(keyDown); -PREP(keyUp); -PREP(removeActionFromClass); -PREP(removeActionFromObject); -PREP(render); -PREP(renderActionPoints); -PREP(renderBaseMenu); -PREP(renderIcon); -PREP(renderMenu); -PREP(renderSelector); -PREP(setupTextColors); -PREP(splitPath); -PREP(userActions_addHouseActions); -PREP(userActions_getHouseActions); +#include "XEH_PREP.hpp" // Event handlers for all interact menu controls DFUNC(handleMouseMovement) = { diff --git a/addons/interact_menu/XEH_preStart.sqf b/addons/interact_menu/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/interact_menu/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp index 60a8fdfcf6..93be6e902b 100644 --- a/addons/interaction/CfgEventHandlers.hpp +++ b/addons/interaction/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp new file mode 100644 index 0000000000..d24a3623dd --- /dev/null +++ b/addons/interaction/XEH_PREP.hpp @@ -0,0 +1,38 @@ + +// interaction menu +PREP(addPassengerActions); +PREP(addPassengersActions); +PREP(getWeaponPos); +PREP(moduleInteraction); +PREP(removeTag); + +// scroll wheel hint +PREP(showMouseHint); +PREP(hideMouseHint); + +// interaction with units +PREP(canInteractWithCivilian); +PREP(getDown); +PREP(sendAway); +PREP(canJoinGroup); +PREP(canJoinTeam); +PREP(joinTeam); +PREP(canPassMagazine); +PREP(passMagazine); +PREP(canBecomeLeader); +PREP(doBecomeLeader); +PREP(canTapShoulder); +PREP(tapShoulder); +PREP(canPardon); +PREP(pardon); + +// interaction with doors +PREP(getDoor); +PREP(getDoorAnimations); +PREP(handleScrollWheel); +PREP(openDoor); + +// interaction with boats +PREP(push); + +PREP(switchLamp); diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index f0f8c05178..a7feade1c3 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -2,43 +2,6 @@ ADDON = false; -// interaction menu -PREP(addPassengerActions); -PREP(addPassengersActions); -PREP(getWeaponPos); -PREP(moduleInteraction); -PREP(removeTag); - -// scroll wheel hint -PREP(showMouseHint); -PREP(hideMouseHint); - -// interaction with units -PREP(canInteractWithCivilian); -PREP(getDown); -PREP(sendAway); -PREP(canJoinGroup); -PREP(canJoinTeam); -PREP(joinTeam); -PREP(canPassMagazine); -PREP(passMagazine); -PREP(canBecomeLeader); -PREP(doBecomeLeader); -PREP(canTapShoulder); -PREP(tapShoulder); -PREP(canPardon); -PREP(pardon); - -// interaction with doors -PREP(getDoor); -PREP(getDoorAnimations); -PREP(handleScrollWheel); -PREP(openDoor); - -// interaction with boats -PREP(push); - - -PREP(switchLamp); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/interaction/XEH_preStart.sqf b/addons/interaction/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/interaction/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/inventory/CfgEventHandlers.hpp b/addons/inventory/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/inventory/CfgEventHandlers.hpp +++ b/addons/inventory/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/inventory/XEH_PREP.hpp b/addons/inventory/XEH_PREP.hpp new file mode 100644 index 0000000000..53282d1fc0 --- /dev/null +++ b/addons/inventory/XEH_PREP.hpp @@ -0,0 +1,16 @@ + +PREP(addCustomFilter); +PREP(currentItemListBox); +PREP(forceItemListUpdate); +PREP(inventoryDisplayLoaded); +PREP(onLBSelChanged); + +PREP(filterWeapons); +PREP(filterMagazines); +PREP(filterItems); +PREP(filterHeadgear); +PREP(filterUniforms); +PREP(filterVests); +PREP(filterBackpacks); +PREP(filterGrenades); +PREP(filterMedical); diff --git a/addons/inventory/XEH_preInit.sqf b/addons/inventory/XEH_preInit.sqf index d574cacf3b..535b9be656 100644 --- a/addons/inventory/XEH_preInit.sqf +++ b/addons/inventory/XEH_preInit.sqf @@ -2,11 +2,7 @@ ADDON = false; -PREP(addCustomFilter); -PREP(currentItemListBox); -PREP(forceItemListUpdate); -PREP(inventoryDisplayLoaded); -PREP(onLBSelChanged); +#include "XEH_PREP.hpp" // cache config // items in the inventory display can only be distinguished by their lb names and pictures @@ -51,14 +47,4 @@ if !(uiNamespace getVariable [QGVAR(configCached), false]) then { uiNamespace setVariable [QGVAR(configCached), true]; }; -PREP(filterWeapons); -PREP(filterMagazines); -PREP(filterItems); -PREP(filterHeadgear); -PREP(filterUniforms); -PREP(filterVests); -PREP(filterBackpacks); -PREP(filterGrenades); -PREP(filterMedical); - ADDON = true; diff --git a/addons/inventory/XEH_preStart.sqf b/addons/inventory/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/inventory/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/javelin/CfgEventhandlers.hpp b/addons/javelin/CfgEventhandlers.hpp index ae7f95b232..9c0c367ba6 100644 --- a/addons/javelin/CfgEventhandlers.hpp +++ b/addons/javelin/CfgEventhandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_pre_init)); @@ -15,4 +22,4 @@ class Extended_FiredBIS_EventHandlers { class All { ADDON = QUOTE(_this call FUNC(onFired)); }; -}; \ No newline at end of file +}; diff --git a/addons/javelin/XEH_PREP.hpp b/addons/javelin/XEH_PREP.hpp new file mode 100644 index 0000000000..fe9bbc553b --- /dev/null +++ b/addons/javelin/XEH_PREP.hpp @@ -0,0 +1,11 @@ + +PREP(lockKeyDown); +PREP(lockKeyUp); + +PREP(cycleFireMode); +PREP(showFireMode); + +PREP(onFired); +PREP(onOpticLoad); +PREP(onOpticDraw); +PREP(onOpticUnload); diff --git a/addons/javelin/XEH_preStart.sqf b/addons/javelin/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/javelin/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/javelin/XEH_pre_init.sqf b/addons/javelin/XEH_pre_init.sqf index 961f9af93d..045e4a46aa 100644 --- a/addons/javelin/XEH_pre_init.sqf +++ b/addons/javelin/XEH_pre_init.sqf @@ -1,15 +1,10 @@ #include "script_component.hpp" -PREP(lockKeyDown); -PREP(lockKeyUp); +ADDON = false; -PREP(cycleFireMode); -PREP(showFireMode); - -PREP(onFired); -PREP(onOpticLoad); -PREP(onOpticDraw); -PREP(onOpticUnload); +#include "XEH_PREP.hpp" GVAR(isLockKeyDown) = false; GVAR(pfehID) = -1; + +ADDON = true; diff --git a/addons/kestrel4500/CfgEventHandlers.hpp b/addons/kestrel4500/CfgEventHandlers.hpp index 2a05b72298..10dce0a9bf 100644 --- a/addons/kestrel4500/CfgEventHandlers.hpp +++ b/addons/kestrel4500/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); @@ -8,4 +15,4 @@ class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; -}; \ No newline at end of file +}; diff --git a/addons/kestrel4500/XEH_PREP.hpp b/addons/kestrel4500/XEH_PREP.hpp new file mode 100644 index 0000000000..7d062c9ac8 --- /dev/null +++ b/addons/kestrel4500/XEH_PREP.hpp @@ -0,0 +1,16 @@ + +PREP(buttonPressed); +PREP(canShow); +PREP(collectData); +PREP(createKestrelDialog); +PREP(displayKestrel); +PREP(generateOutputData); +PREP(measureWindSpeed); +PREP(onCloseDialog); +PREP(onCloseDisplay); +PREP(restoreUserData); +PREP(storeUserData); +PREP(updateDisplay); +PREP(updateImpellerState); +PREP(updateMemory); +PREP(dayOfWeek); diff --git a/addons/kestrel4500/XEH_preInit.sqf b/addons/kestrel4500/XEH_preInit.sqf index b3f8ba755f..a7feade1c3 100644 --- a/addons/kestrel4500/XEH_preInit.sqf +++ b/addons/kestrel4500/XEH_preInit.sqf @@ -2,19 +2,6 @@ ADDON = false; -PREP(buttonPressed); -PREP(canShow); -PREP(collectData); -PREP(createKestrelDialog); -PREP(displayKestrel); -PREP(generateOutputData); -PREP(measureWindSpeed); -PREP(onCloseDialog); -PREP(onCloseDisplay); -PREP(restoreUserData); -PREP(storeUserData); -PREP(updateDisplay); -PREP(updateImpellerState); -PREP(updateMemory); -PREP(dayOfWeek); +#include "XEH_PREP.hpp" + ADDON = true; diff --git a/addons/kestrel4500/XEH_preStart.sqf b/addons/kestrel4500/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/kestrel4500/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/laser/CfgEventhandlers.hpp b/addons/laser/CfgEventhandlers.hpp index d925d0a12e..2abad68362 100644 --- a/addons/laser/CfgEventhandlers.hpp +++ b/addons/laser/CfgEventhandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_pre_init)); @@ -16,4 +23,4 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(laser_init)); }; }; -}; \ No newline at end of file +}; diff --git a/addons/laser/XEH_PREP.hpp b/addons/laser/XEH_PREP.hpp new file mode 100644 index 0000000000..df185221ff --- /dev/null +++ b/addons/laser/XEH_PREP.hpp @@ -0,0 +1,26 @@ + +PREP(rotateVectLineGetMap); +PREP(rotateVectLine); +PREP(shootRay); +PREP(shootCone); +PREP(checkLos); + +PREP(findStrongestRay); + +PREP(onLaserDesignatorDraw); + +PREP(seekerFindLaserSpot); +PREP(laserOn); +PREP(laserOff); +PREP(handleLaserOn); +PREP(handleLaserOff); + +PREP(drawVisibleLaserTargets); + +PREP(laser_init); +PREP(vanillaLaserSeekerHandler); +PREP(laserTargetPFH); + +PREP(unitTurretCanLockLaser); +PREP(keyLaserCodeUp); +PREP(keyLaserCodeDown); diff --git a/addons/laser/XEH_preStart.sqf b/addons/laser/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/laser/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/laser/XEH_pre_init.sqf b/addons/laser/XEH_pre_init.sqf index 20f31d9e5b..502f47a9dc 100644 --- a/addons/laser/XEH_pre_init.sqf +++ b/addons/laser/XEH_pre_init.sqf @@ -1,36 +1,16 @@ #include "script_component.hpp" -PREP(rotateVectLineGetMap); -PREP(rotateVectLine); -PREP(shootRay); -PREP(shootCone); -PREP(checkLos); +ADDON = false; -PREP(findStrongestRay); - -PREP(onLaserDesignatorDraw); - -PREP(seekerFindLaserSpot); -PREP(laserOn); -PREP(laserOff); -PREP(handleLaserOn); -PREP(handleLaserOff); - -PREP(drawVisibleLaserTargets); - -PREP(laser_init); -PREP(vanillaLaserSeekerHandler); -PREP(laserTargetPFH); +#include "XEH_PREP.hpp" GVAR(VanillaLasers) = []; -PREP(unitTurretCanLockLaser); -PREP(keyLaserCodeUp); -PREP(keyLaserCodeDown); - // Laser default variables ACE_DEFAULT_LASER_CODE = 1001; ACE_DEFAULT_LASER_WAVELENGTH = 1550; ACE_DEFAULT_LASER_BEAMSPREAD = 1; -GVAR(laserEmitters) = HASH_CREATE; \ No newline at end of file +GVAR(laserEmitters) = HASH_CREATE; + +ADDON = true; diff --git a/addons/laser_selfdesignate/CfgEventhandlers.hpp b/addons/laser_selfdesignate/CfgEventhandlers.hpp index 4cef7be4a3..cfa8d65d7c 100644 --- a/addons/laser_selfdesignate/CfgEventhandlers.hpp +++ b/addons/laser_selfdesignate/CfgEventhandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_pre_init)); @@ -16,4 +23,4 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initDesignatorActions)); }; }; -}; \ No newline at end of file +}; diff --git a/addons/laser_selfdesignate/XEH_PREP.hpp b/addons/laser_selfdesignate/XEH_PREP.hpp new file mode 100644 index 0000000000..6c05680db4 --- /dev/null +++ b/addons/laser_selfdesignate/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(initDesignatorActions); +PREP(laserHudDesignateOn); +PREP(laserHudDesignateOff); +PREP(unitTurretHasDesignator); + +PREP(findLaserSource); diff --git a/addons/laser_selfdesignate/XEH_preStart.sqf b/addons/laser_selfdesignate/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/laser_selfdesignate/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/laser_selfdesignate/XEH_pre_init.sqf b/addons/laser_selfdesignate/XEH_pre_init.sqf index 3f8c92e4db..aa41d7e9bb 100644 --- a/addons/laser_selfdesignate/XEH_pre_init.sqf +++ b/addons/laser_selfdesignate/XEH_pre_init.sqf @@ -1,12 +1,11 @@ #include "script_component.hpp" -PREP(initDesignatorActions); -PREP(laserHudDesignateOn); -PREP(laserHudDesignateOff); -PREP(unitTurretHasDesignator); +ADDON = false; -PREP(findLaserSource); +#include "XEH_PREP.hpp" GVAR(active) = false; FUNC(getPosASL) = {visiblePositionASL (_this select 0)}; + +ADDON = true; diff --git a/addons/laserpointer/CfgEventHandlers.hpp b/addons/laserpointer/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/laserpointer/CfgEventHandlers.hpp +++ b/addons/laserpointer/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/laserpointer/XEH_PREP.hpp b/addons/laserpointer/XEH_PREP.hpp new file mode 100644 index 0000000000..c5dcd74a75 --- /dev/null +++ b/addons/laserpointer/XEH_PREP.hpp @@ -0,0 +1,4 @@ + +PREP(drawLaserpoint); +PREP(onDraw); +PREP(switchLaserLightMode); diff --git a/addons/laserpointer/XEH_preInit.sqf b/addons/laserpointer/XEH_preInit.sqf index 1460abda36..a7feade1c3 100644 --- a/addons/laserpointer/XEH_preInit.sqf +++ b/addons/laserpointer/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP(drawLaserpoint); -PREP(onDraw); -PREP(switchLaserLightMode); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/laserpointer/XEH_preStart.sqf b/addons/laserpointer/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/laserpointer/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/logistics_uavbattery/CfgEventHandlers.hpp b/addons/logistics_uavbattery/CfgEventHandlers.hpp index b928bc2de6..be284a9d70 100644 --- a/addons/logistics_uavbattery/CfgEventHandlers.hpp +++ b/addons/logistics_uavbattery/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/logistics_uavbattery/XEH_PREP.hpp b/addons/logistics_uavbattery/XEH_PREP.hpp new file mode 100644 index 0000000000..9631f53c24 --- /dev/null +++ b/addons/logistics_uavbattery/XEH_PREP.hpp @@ -0,0 +1,3 @@ + +PREP(canRefuelUAV); +PREP(refuelUAV); diff --git a/addons/logistics_uavbattery/XEH_preInit.sqf b/addons/logistics_uavbattery/XEH_preInit.sqf index f41b2c4ce8..a7feade1c3 100644 --- a/addons/logistics_uavbattery/XEH_preInit.sqf +++ b/addons/logistics_uavbattery/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(canRefuelUAV); -PREP(refuelUAV); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/logistics_uavbattery/XEH_preStart.sqf b/addons/logistics_uavbattery/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/logistics_uavbattery/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/logistics_wirecutter/CfgEventHandlers.hpp b/addons/logistics_wirecutter/CfgEventHandlers.hpp index 3daad1425a..47564cbd2d 100644 --- a/addons/logistics_wirecutter/CfgEventHandlers.hpp +++ b/addons/logistics_wirecutter/CfgEventHandlers.hpp @@ -1,8 +1,16 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; + class Extended_PostInit_EventHandlers { class ADDON { clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) ); diff --git a/addons/logistics_wirecutter/XEH_PREP.hpp b/addons/logistics_wirecutter/XEH_PREP.hpp new file mode 100644 index 0000000000..d52c83547b --- /dev/null +++ b/addons/logistics_wirecutter/XEH_PREP.hpp @@ -0,0 +1,4 @@ + +PREP(cutDownFence); +PREP(interactEH); +PREP(isFence); diff --git a/addons/logistics_wirecutter/XEH_preInit.sqf b/addons/logistics_wirecutter/XEH_preInit.sqf index 39620bf35c..a7feade1c3 100644 --- a/addons/logistics_wirecutter/XEH_preInit.sqf +++ b/addons/logistics_wirecutter/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP(cutDownFence); -PREP(interactEH); -PREP(isFence); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/logistics_wirecutter/XEH_preStart.sqf b/addons/logistics_wirecutter/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/logistics_wirecutter/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/magazinerepack/CfgEventHandlers.hpp b/addons/magazinerepack/CfgEventHandlers.hpp index b928bc2de6..be284a9d70 100644 --- a/addons/magazinerepack/CfgEventHandlers.hpp +++ b/addons/magazinerepack/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/magazinerepack/XEH_PREP.hpp b/addons/magazinerepack/XEH_PREP.hpp new file mode 100644 index 0000000000..fc1861dc3d --- /dev/null +++ b/addons/magazinerepack/XEH_PREP.hpp @@ -0,0 +1,6 @@ + +PREP(getMagazineChildren); +PREP(magazineRepackFinish); +PREP(magazineRepackProgress); +PREP(simulateRepackEvents); +PREP(startRepackingMagazine); diff --git a/addons/magazinerepack/XEH_preInit.sqf b/addons/magazinerepack/XEH_preInit.sqf index f78cf34ee4..a7feade1c3 100644 --- a/addons/magazinerepack/XEH_preInit.sqf +++ b/addons/magazinerepack/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP(getMagazineChildren); -PREP(magazineRepackFinish); -PREP(magazineRepackProgress); -PREP(simulateRepackEvents); -PREP(startRepackingMagazine); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/magazinerepack/XEH_preStart.sqf b/addons/magazinerepack/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/magazinerepack/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/main/config.cpp b/addons/main/config.cpp index a013d8e971..57e2c782b8 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -564,3 +564,10 @@ class CfgMods { #include "CfgModuleCategories.hpp" #include "CfgVehicleClasses.hpp" + +// @todo delete this after CBA update, defines undefined global variable +class Extended_PreStart_EventHandlers { + class ADDON { + init = "with uiNamespace do {SLX_XEH_COMPILE_NEW = CBA_fnc_compileFunction};"; + }; +}; diff --git a/addons/map/CfgEventHandlers.hpp b/addons/map/CfgEventHandlers.hpp index 49b87fb4fd..5c77927e53 100644 --- a/addons/map/CfgEventHandlers.hpp +++ b/addons/map/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/map/XEH_PREP.hpp b/addons/map/XEH_PREP.hpp new file mode 100644 index 0000000000..6737249165 --- /dev/null +++ b/addons/map/XEH_PREP.hpp @@ -0,0 +1,13 @@ + +PREP(blueForceTrackingModule); +PREP(blueForceTrackingUpdate); +PREP(compileFlashlightMenu); +PREP(determineMapLight); +PREP(determineZoom); +PREP(flashlightGlow); +PREP(getUnitFlashlights); +PREP(moduleMap); +PREP(onDrawMap); +PREP(simulateMapLight); +PREP(switchFlashlight); +PREP(updateMapEffects); diff --git a/addons/map/XEH_preInit.sqf b/addons/map/XEH_preInit.sqf index 9e123a3877..7d00e938cf 100644 --- a/addons/map/XEH_preInit.sqf +++ b/addons/map/XEH_preInit.sqf @@ -3,17 +3,6 @@ ADDON = false; LOG(MSG_INIT); -PREP(blueForceTrackingModule); -PREP(blueForceTrackingUpdate); -PREP(compileFlashlightMenu); -PREP(determineMapLight); -PREP(determineZoom); -PREP(flashlightGlow); -PREP(getUnitFlashlights); -PREP(moduleMap); -PREP(onDrawMap); -PREP(simulateMapLight); -PREP(switchFlashlight); -PREP(updateMapEffects); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/map/XEH_preStart.sqf b/addons/map/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/map/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/map_gestures/CfgEventHandlers.hpp b/addons/map_gestures/CfgEventHandlers.hpp index 7e0c8d2ce3..b0848d0248 100644 --- a/addons/map_gestures/CfgEventHandlers.hpp +++ b/addons/map_gestures/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/map_gestures/XEH_PREP.hpp b/addons/map_gestures/XEH_PREP.hpp new file mode 100644 index 0000000000..eba9f5bfe8 --- /dev/null +++ b/addons/map_gestures/XEH_PREP.hpp @@ -0,0 +1,12 @@ + +PREP(assignClientIDOnServer); +PREP(drawMapGestures); +PREP(endTransmit); +PREP(getProximityPlayers); +PREP(initTransmit); +PREP(isValidColorArray); +PREP(moduleGroupSettings); +PREP(moduleSettings); +PREP(receiverInit); +PREP(transmit); +PREP(transmitterInit); diff --git a/addons/map_gestures/XEH_preInit.sqf b/addons/map_gestures/XEH_preInit.sqf index 8154106fd6..a7feade1c3 100644 --- a/addons/map_gestures/XEH_preInit.sqf +++ b/addons/map_gestures/XEH_preInit.sqf @@ -2,16 +2,6 @@ ADDON = false; -PREP(assignClientIDOnServer); -PREP(drawMapGestures); -PREP(endTransmit); -PREP(getProximityPlayers); -PREP(initTransmit); -PREP(isValidColorArray); -PREP(moduleGroupSettings); -PREP(moduleSettings); -PREP(receiverInit); -PREP(transmit); -PREP(transmitterInit); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/map_gestures/XEH_preStart.sqf b/addons/map_gestures/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/map_gestures/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/maptools/CfgEventHandlers.hpp b/addons/maptools/CfgEventHandlers.hpp index 27bbf326d3..5c876708f2 100644 --- a/addons/maptools/CfgEventHandlers.hpp +++ b/addons/maptools/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/maptools/XEH_PREP.hpp b/addons/maptools/XEH_PREP.hpp new file mode 100644 index 0000000000..cff37aa65d --- /dev/null +++ b/addons/maptools/XEH_PREP.hpp @@ -0,0 +1,20 @@ + +PREP(addLineMarker); +PREP(calculateMapScale); +PREP(cancelDrawing); +PREP(canDraw); +PREP(canUseMapTools); +PREP(canUseMapGPS); +PREP(copyMapReceiveMarkers); +PREP(copyMapRemoteSend); +PREP(copyMapStart); +PREP(handleKeyDown); +PREP(handleMouseButton); +PREP(handleMouseMove); +PREP(handleMouseZChanged); +PREP(isInsideMapTool); +PREP(openMapGps); +PREP(openMapGpsUpdate); +PREP(removeLineMarker); +PREP(updateMapToolMarkers); +PREP(updateLineMarker); diff --git a/addons/maptools/XEH_preInit.sqf b/addons/maptools/XEH_preInit.sqf index 2bcd68385a..3022d53753 100644 --- a/addons/maptools/XEH_preInit.sqf +++ b/addons/maptools/XEH_preInit.sqf @@ -2,25 +2,7 @@ ADDON = false; -PREP(addLineMarker); -PREP(calculateMapScale); -PREP(cancelDrawing); -PREP(canDraw); -PREP(canUseMapTools); -PREP(canUseMapGPS); -PREP(copyMapReceiveMarkers); -PREP(copyMapRemoteSend); -PREP(copyMapStart); -PREP(handleKeyDown); -PREP(handleMouseButton); -PREP(handleMouseMove); -PREP(handleMouseZChanged); -PREP(isInsideMapTool); -PREP(openMapGps); -PREP(openMapGpsUpdate); -PREP(removeLineMarker); -PREP(updateMapToolMarkers); -PREP(updateLineMarker); +#include "XEH_PREP.hpp" if (isServer) then { GVAR(drawing_serverLineMarkers) = []; diff --git a/addons/maptools/XEH_preStart.sqf b/addons/maptools/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/maptools/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/markers/CfgEventHandlers.hpp b/addons/markers/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/markers/CfgEventHandlers.hpp +++ b/addons/markers/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp new file mode 100644 index 0000000000..67344454ec --- /dev/null +++ b/addons/markers/XEH_PREP.hpp @@ -0,0 +1,12 @@ + +PREP(getEnabledChannels); +PREP(initInsertMarker); +PREP(mapDrawEH); +PREP(onLBSelChangedChannel); +PREP(onLBSelChangedColor); +PREP(onLBSelChangedShape); +PREP(onSliderPosChangedAngle); +PREP(placeMarker); +PREP(sendMarkersJIP); +PREP(setMarkerJIP); +PREP(setMarkerNetwork); diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index 477632d225..5308117754 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -2,17 +2,7 @@ ADDON = false; -PREP(getEnabledChannels); -PREP(initInsertMarker); -PREP(mapDrawEH); -PREP(onLBSelChangedChannel); -PREP(onLBSelChangedColor); -PREP(onLBSelChangedShape); -PREP(onSliderPosChangedAngle); -PREP(placeMarker); -PREP(sendMarkersJIP); -PREP(setMarkerJIP); -PREP(setMarkerNetwork); +#include "XEH_PREP.hpp" // init marker types if (isNil QGVAR(MarkersCache)) then { diff --git a/addons/markers/XEH_preStart.sqf b/addons/markers/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/markers/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp index 2fe5d0a9e5..ab7c1868ab 100644 --- a/addons/medical/CfgEventHandlers.hpp +++ b/addons/medical/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp new file mode 100644 index 0000000000..4184f096f7 --- /dev/null +++ b/addons/medical/XEH_PREP.hpp @@ -0,0 +1,115 @@ + +PREP(actionCheckBloodPressure); +PREP(actionCheckBloodPressureLocal); +PREP(actionCheckPulse); +PREP(actionCheckPulseLocal); +PREP(actionCheckResponse); +PREP(actionDiagnose); +PREP(actionPlaceInBodyBag); +PREP(actionRemoveTourniquet); +PREP(actionLoadUnit); +PREP(actionUnloadUnit); +PREP(addDamageToUnit); +PREP(addHeartRateAdjustment); +PREP(addToInjuredCollection); +PREP(addToLog); +PREP(addToTriageCard); +PREP(addUnconsciousCondition); +PREP(addUnloadPatientActions); +PREP(adjustPainLevel); +PREP(canAccessMedicalEquipment); +PREP(canTreat); +PREP(canTreatCached); +PREP(determineIfFatal); +PREP(getBloodLoss); +PREP(getBloodPressure); +PREP(getBloodVolumeChange); +PREP(getCardiacOutput); +PREP(getTypeOfDamage); +PREP(getHeartRateChange); +PREP(getTriageStatus); +PREP(getUnconsciousCondition); +PREP(handleDamage); +PREP(handleDamage_advanced); +PREP(handleDamage_advancedSetDamage); +PREP(handleDamage_airway); +PREP(handleDamage_basic); +PREP(handleDamage_caching); +PREP(handleDamage_fractures); +PREP(handleDamage_internalInjuries); +PREP(handleDamage_wounds); +PREP(handleDamage_woundsOld); +PREP(handleUnitVitals); +PREP(handleKilled); +PREP(handleLocal); +PREP(handleBandageOpening); +PREP(hasItem); +PREP(hasItems); +PREP(hasMedicalEnabled); +PREP(hasTourniquetAppliedTo); +PREP(init); +PREP(isBeingCarried); +PREP(isBeingDragged); +PREP(isInMedicalFacility); +PREP(isInMedicalVehicle); +PREP(isMedic); +PREP(isMedicalVehicle); +PREP(isInStableCondition); +PREP(itemCheck); +PREP(modifyMedicalAction); +PREP(onMedicationUsage); +PREP(onWoundUpdateRequest); +PREP(onPropagateWound); +PREP(parseConfigForInjuries); +PREP(playInjuredSound); +PREP(selectionNameToNumber); +PREP(serverRemoveBody); +PREP(setCardiacArrest); +PREP(setDead); +PREP(setHitPointDamage); +PREP(setStructuralDamage); +PREP(setUnconscious); +PREP(translateSelections); +PREP(treatment); +PREP(treatment_failure); +PREP(treatment_success); +PREP(treatmentAdvanced_bandage); +PREP(treatmentAdvanced_bandageLocal); +PREP(treatmentAdvanced_CPR); +PREP(treatmentAdvanced_CPRLocal); +PREP(treatmentAdvanced_fullHeal); +PREP(treatmentAdvanced_fullHealLocal); +PREP(treatmentAdvanced_fullHealTreatmentTime); +PREP(treatmentAdvanced_medication); +PREP(treatmentAdvanced_medicationLocal); +PREP(treatmentAdvanced_surgicalKit_onProgress); +PREP(treatmentBasic_bandage); +PREP(treatmentBasic_bandageLocal); +PREP(treatmentBasic_bloodbag); +PREP(treatmentBasic_bloodbagLocal); +PREP(treatmentBasic_epipen); +PREP(treatmentBasic_morphine); +PREP(treatmentBasic_morphineLocal); +PREP(treatmentIV); +PREP(treatmentIVLocal); +PREP(treatmentTourniquet); +PREP(treatmentTourniquetLocal); +PREP(useItem); +PREP(useItems); +PREP(displayPatientInformation); +PREP(displayTriageCard); +PREP(dropDownTriageCard); +PREP(moduleMedicalSettings); +PREP(moduleBasicMedicalSettings); +PREP(moduleAdvancedMedicalSettings); +PREP(moduleReviveSettings); +PREP(moduleAssignMedicRoles); +PREP(moduleAssignMedicalVehicle); +PREP(moduleAssignMedicalFacility); +PREP(copyDeadBody); +PREP(requestWoundSync); +PREP(unconsciousPFH); + +// Networked litter +PREP(createLitter); +PREP(handleCreateLitter); diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index d4cbe66ae1..85232498bd 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -2,120 +2,7 @@ ADDON = false; -PREP(actionCheckBloodPressure); -PREP(actionCheckBloodPressureLocal); -PREP(actionCheckPulse); -PREP(actionCheckPulseLocal); -PREP(actionCheckResponse); -PREP(actionDiagnose); -PREP(actionPlaceInBodyBag); -PREP(actionRemoveTourniquet); -PREP(actionLoadUnit); -PREP(actionUnloadUnit); -PREP(addDamageToUnit); -PREP(addHeartRateAdjustment); -PREP(addToInjuredCollection); -PREP(addToLog); -PREP(addToTriageCard); -PREP(addUnconsciousCondition); -PREP(addUnloadPatientActions); -PREP(adjustPainLevel); -PREP(canAccessMedicalEquipment); -PREP(canTreat); -PREP(canTreatCached); -PREP(determineIfFatal); -PREP(getBloodLoss); -PREP(getBloodPressure); -PREP(getBloodVolumeChange); -PREP(getCardiacOutput); -PREP(getTypeOfDamage); -PREP(getHeartRateChange); -PREP(getTriageStatus); -PREP(getUnconsciousCondition); -PREP(handleDamage); -PREP(handleDamage_advanced); -PREP(handleDamage_advancedSetDamage); -PREP(handleDamage_airway); -PREP(handleDamage_basic); -PREP(handleDamage_caching); -PREP(handleDamage_fractures); -PREP(handleDamage_internalInjuries); -PREP(handleDamage_wounds); -PREP(handleDamage_woundsOld); -PREP(handleUnitVitals); -PREP(handleKilled); -PREP(handleLocal); -PREP(handleBandageOpening); -PREP(hasItem); -PREP(hasItems); -PREP(hasMedicalEnabled); -PREP(hasTourniquetAppliedTo); -PREP(init); -PREP(isBeingCarried); -PREP(isBeingDragged); -PREP(isInMedicalFacility); -PREP(isInMedicalVehicle); -PREP(isMedic); -PREP(isMedicalVehicle); -PREP(isInStableCondition); -PREP(itemCheck); -PREP(modifyMedicalAction); -PREP(onMedicationUsage); -PREP(onWoundUpdateRequest); -PREP(onPropagateWound); -PREP(parseConfigForInjuries); -PREP(playInjuredSound); -PREP(selectionNameToNumber); -PREP(serverRemoveBody); -PREP(setCardiacArrest); -PREP(setDead); -PREP(setHitPointDamage); -PREP(setStructuralDamage); -PREP(setUnconscious); -PREP(translateSelections); -PREP(treatment); -PREP(treatment_failure); -PREP(treatment_success); -PREP(treatmentAdvanced_bandage); -PREP(treatmentAdvanced_bandageLocal); -PREP(treatmentAdvanced_CPR); -PREP(treatmentAdvanced_CPRLocal); -PREP(treatmentAdvanced_fullHeal); -PREP(treatmentAdvanced_fullHealLocal); -PREP(treatmentAdvanced_fullHealTreatmentTime); -PREP(treatmentAdvanced_medication); -PREP(treatmentAdvanced_medicationLocal); -PREP(treatmentAdvanced_surgicalKit_onProgress); -PREP(treatmentBasic_bandage); -PREP(treatmentBasic_bandageLocal); -PREP(treatmentBasic_bloodbag); -PREP(treatmentBasic_bloodbagLocal); -PREP(treatmentBasic_epipen); -PREP(treatmentBasic_morphine); -PREP(treatmentBasic_morphineLocal); -PREP(treatmentIV); -PREP(treatmentIVLocal); -PREP(treatmentTourniquet); -PREP(treatmentTourniquetLocal); -PREP(useItem); -PREP(useItems); -PREP(displayPatientInformation); -PREP(displayTriageCard); -PREP(dropDownTriageCard); -PREP(moduleMedicalSettings); -PREP(moduleBasicMedicalSettings); -PREP(moduleAdvancedMedicalSettings); -PREP(moduleReviveSettings); -PREP(moduleAssignMedicRoles); -PREP(moduleAssignMedicalVehicle); -PREP(moduleAssignMedicalFacility); -PREP(copyDeadBody); -PREP(requestWoundSync); -PREP(unconsciousPFH); - -// Networked litter -PREP(createLitter); -PREP(handleCreateLitter); +#include "XEH_PREP.hpp" GVAR(injuredUnitCollection) = []; GVAR(IVBags) = []; diff --git a/addons/medical/XEH_preStart.sqf b/addons/medical/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/medical/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/medical_menu/CfgEventHandlers.hpp b/addons/medical_menu/CfgEventHandlers.hpp index 7392999c9a..da45b1d12e 100644 --- a/addons/medical_menu/CfgEventHandlers.hpp +++ b/addons/medical_menu/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/medical_menu/XEH_PREP.hpp b/addons/medical_menu/XEH_PREP.hpp new file mode 100644 index 0000000000..8a44bd2bdc --- /dev/null +++ b/addons/medical_menu/XEH_PREP.hpp @@ -0,0 +1,18 @@ + +PREP(onMenuOpen); +PREP(onMenuClose); +PREP(openMenu); + +PREP(canOpenMenu); +PREP(updateIcons); +PREP(updateUIInfo); +PREP(handleUI_DisplayOptions); +PREP(handleUI_dropDownTriageCard); +PREP(getTreatmentOptions); +PREP(updateActivityLog); +PREP(updateQuickViewLog); +PREP(updateBodyImage); +PREP(updateInformationLists); +PREP(setTriageStatus); +PREP(collectActions); +PREP(module); diff --git a/addons/medical_menu/XEH_preInit.sqf b/addons/medical_menu/XEH_preInit.sqf index 65ac88e245..009a9ed1a6 100644 --- a/addons/medical_menu/XEH_preInit.sqf +++ b/addons/medical_menu/XEH_preInit.sqf @@ -2,23 +2,7 @@ ADDON = false; -PREP(onMenuOpen); -PREP(onMenuClose); -PREP(openMenu); - -PREP(canOpenMenu); -PREP(updateIcons); -PREP(updateUIInfo); -PREP(handleUI_DisplayOptions); -PREP(handleUI_dropDownTriageCard); -PREP(getTreatmentOptions); -PREP(updateActivityLog); -PREP(updateQuickViewLog); -PREP(updateBodyImage); -PREP(updateInformationLists); -PREP(setTriageStatus); -PREP(collectActions); -PREP(module); +#include "XEH_PREP.hpp" GVAR(INTERACTION_TARGET) = objNull; GVAR(actionsOther) = []; diff --git a/addons/medical_menu/XEH_preStart.sqf b/addons/medical_menu/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/medical_menu/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/microdagr/CfgEventHandlers.hpp b/addons/microdagr/CfgEventHandlers.hpp index 6d1d3b6dfb..47564cbd2d 100644 --- a/addons/microdagr/CfgEventHandlers.hpp +++ b/addons/microdagr/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/microdagr/XEH_PREP.hpp b/addons/microdagr/XEH_PREP.hpp new file mode 100644 index 0000000000..9803a19702 --- /dev/null +++ b/addons/microdagr/XEH_PREP.hpp @@ -0,0 +1,21 @@ + +PREP(appMarkKeypadEntry); +PREP(appMenuButtonConnectRangefinder); +PREP(appSettingsLBClick); +PREP(appWaypointsButtonDeleteWP); +PREP(appWaypointsButtonSetWP); +PREP(canShow); +PREP(deviceAddWaypoint); +PREP(deviceDeleteWaypoint); +PREP(deviceGetWaypoints); +PREP(dialogClosedEH); +PREP(mapButtonDownEH); +PREP(mapDoubleTapEH); +PREP(mapOnDrawEH); +PREP(modeMapButtons); +PREP(moduleMapFill); +PREP(openDisplay); +PREP(recieveRangefinderData); +PREP(saveCurrentAndSetNewMode); +PREP(showApplicationPage); +PREP(updateDisplay); diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf index 39a1b313c6..ba262ec8c5 100644 --- a/addons/microdagr/XEH_preInit.sqf +++ b/addons/microdagr/XEH_preInit.sqf @@ -2,26 +2,7 @@ ADDON = false; -PREP(appMarkKeypadEntry); -PREP(appMenuButtonConnectRangefinder); -PREP(appSettingsLBClick); -PREP(appWaypointsButtonDeleteWP); -PREP(appWaypointsButtonSetWP); -PREP(canShow); -PREP(deviceAddWaypoint); -PREP(deviceDeleteWaypoint); -PREP(deviceGetWaypoints); -PREP(dialogClosedEH); -PREP(mapButtonDownEH); -PREP(mapDoubleTapEH); -PREP(mapOnDrawEH); -PREP(modeMapButtons); -PREP(moduleMapFill); -PREP(openDisplay); -PREP(recieveRangefinderData); -PREP(saveCurrentAndSetNewMode); -PREP(showApplicationPage); -PREP(updateDisplay); +#include "XEH_PREP.hpp" //Functions that are called for each draw of the map: GVAR(miniMapDrawHandlers) = []; diff --git a/addons/microdagr/XEH_preStart.sqf b/addons/microdagr/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/microdagr/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/missileguidance/CfgEventhandlers.hpp b/addons/missileguidance/CfgEventhandlers.hpp index 8afeb9245e..5ec1d7d652 100644 --- a/addons/missileguidance/CfgEventhandlers.hpp +++ b/addons/missileguidance/CfgEventhandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_pre_init)); @@ -20,4 +27,4 @@ class Extended_IncomingMissile_EventHandlers { class All { ADDON = QUOTE(_this call FUNC(onIncomingMissile)); }; -}; \ No newline at end of file +}; diff --git a/addons/missileguidance/XEH_PREP.hpp b/addons/missileguidance/XEH_PREP.hpp new file mode 100644 index 0000000000..55948e7171 --- /dev/null +++ b/addons/missileguidance/XEH_PREP.hpp @@ -0,0 +1,32 @@ + +PREP(rotateVectLineGetMap); +PREP(rotateVectLine); +PREP(changeMissileDirection); + +PREP(checkSeekerAngle); +PREP(checkLos); + +PREP(onFired); +PREP(onIncomingMissile); + +PREP(guidancePFH); +PREP(doAttackProfile); +PREP(doSeekerSearch); + +PREP(doHandoff); +PREP(handleHandoff); + +// Attack Profiles +PREP(attackProfile_LIN); +PREP(attackProfile_DIR); +PREP(attackProfile_MID); +PREP(attackProfile_HI); +PREP(attackProfile_AIR); + +// Javelin profiles +PREP(attackProfile_JAV_DIR); +PREP(attackProfile_JAV_TOP); + +// Seeker search functions +PREP(seekerType_SALH); +PREP(seekerType_Optic); diff --git a/addons/missileguidance/XEH_preStart.sqf b/addons/missileguidance/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/missileguidance/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index 08219e02f0..c3d42816c1 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -1,33 +1,7 @@ #include "script_component.hpp" -PREP(rotateVectLineGetMap); -PREP(rotateVectLine); -PREP(changeMissileDirection); +ADDON = false; -PREP(checkSeekerAngle); -PREP(checkLos); +#include "XEH_PREP.hpp" -PREP(onFired); -PREP(onIncomingMissile); - -PREP(guidancePFH); -PREP(doAttackProfile); -PREP(doSeekerSearch); - -PREP(doHandoff); -PREP(handleHandoff); - -// Attack Profiles -PREP(attackProfile_LIN); -PREP(attackProfile_DIR); -PREP(attackProfile_MID); -PREP(attackProfile_HI); -PREP(attackProfile_AIR); - -// Javelin profiles -PREP(attackProfile_JAV_DIR); -PREP(attackProfile_JAV_TOP); - -// Seeker search functions -PREP(seekerType_SALH); -PREP(seekerType_Optic); \ No newline at end of file +ADDON = true; diff --git a/addons/missionmodules/CfgEventHandlers.hpp b/addons/missionmodules/CfgEventHandlers.hpp index f0a9f14d91..be284a9d70 100644 --- a/addons/missionmodules/CfgEventHandlers.hpp +++ b/addons/missionmodules/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/missionmodules/XEH_PREP.hpp b/addons/missionmodules/XEH_PREP.hpp new file mode 100644 index 0000000000..bc24252b52 --- /dev/null +++ b/addons/missionmodules/XEH_PREP.hpp @@ -0,0 +1,2 @@ + +PREP(moduleAmbianceSound); diff --git a/addons/missionmodules/XEH_preInit.sqf b/addons/missionmodules/XEH_preInit.sqf index cadbbabdd1..a7feade1c3 100644 --- a/addons/missionmodules/XEH_preInit.sqf +++ b/addons/missionmodules/XEH_preInit.sqf @@ -2,6 +2,6 @@ ADDON = false; -PREP(moduleAmbianceSound); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/missionmodules/XEH_preStart.sqf b/addons/missionmodules/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/missionmodules/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/mk6mortar/CfgEventHandlers.hpp b/addons/mk6mortar/CfgEventHandlers.hpp index 3a04fae9f0..957fefb736 100644 --- a/addons/mk6mortar/CfgEventHandlers.hpp +++ b/addons/mk6mortar/CfgEventHandlers.hpp @@ -1,13 +1,22 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + 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_FiredBIS_EventHandlers { class Mortar_01_base_F { class ADDON { diff --git a/addons/mk6mortar/XEH_PREP.hpp b/addons/mk6mortar/XEH_PREP.hpp new file mode 100644 index 0000000000..600fc0707f --- /dev/null +++ b/addons/mk6mortar/XEH_PREP.hpp @@ -0,0 +1,23 @@ + +PREP(dev_buildTable); +PREP(dev_formatNumber); +PREP(dev_simulateCalcRangeTableLine); +PREP(dev_simulateFindSolution); +PREP(dev_simulateShot); + +PREP(canLoadMagazine); +PREP(canUnloadMagazine); +PREP(handleFired); +PREP(handlePlayerVehicleChanged); +PREP(loadMagazine); +PREP(loadMagazineTimer); +PREP(moduleInit); +PREP(mortarInit); +PREP(rangeTableCanUse); +PREP(rangeTableOpen); +PREP(rangeTablePageChange); +PREP(rangeTablePreCalculatedValues); +PREP(toggleMils); +PREP(turretDisplayLoaded); +PREP(unloadMagazine); +PREP(unloadMagazineTimer); diff --git a/addons/mk6mortar/XEH_preInit.sqf b/addons/mk6mortar/XEH_preInit.sqf index 057618cd7a..a7feade1c3 100644 --- a/addons/mk6mortar/XEH_preInit.sqf +++ b/addons/mk6mortar/XEH_preInit.sqf @@ -2,27 +2,6 @@ ADDON = false; -PREP(dev_buildTable); -PREP(dev_formatNumber); -PREP(dev_simulateCalcRangeTableLine); -PREP(dev_simulateFindSolution); -PREP(dev_simulateShot); - -PREP(canLoadMagazine); -PREP(canUnloadMagazine); -PREP(handleFired); -PREP(handlePlayerVehicleChanged); -PREP(loadMagazine); -PREP(loadMagazineTimer); -PREP(moduleInit); -PREP(mortarInit); -PREP(rangeTableCanUse); -PREP(rangeTableOpen); -PREP(rangeTablePageChange); -PREP(rangeTablePreCalculatedValues); -PREP(toggleMils); -PREP(turretDisplayLoaded); -PREP(unloadMagazine); -PREP(unloadMagazineTimer); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/mk6mortar/XEH_preStart.sqf b/addons/mk6mortar/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/mk6mortar/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/modules/CfgEventHandlers.hpp b/addons/modules/CfgEventHandlers.hpp index 82d1c55d10..cd12d1938e 100644 --- a/addons/modules/CfgEventHandlers.hpp +++ b/addons/modules/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/modules/XEH_PREP.hpp b/addons/modules/XEH_PREP.hpp new file mode 100644 index 0000000000..66edc4e817 --- /dev/null +++ b/addons/modules/XEH_PREP.hpp @@ -0,0 +1,2 @@ + +PREP(moduleInit); diff --git a/addons/modules/XEH_preInit.sqf b/addons/modules/XEH_preInit.sqf index 7573d34352..419cd902b5 100644 --- a/addons/modules/XEH_preInit.sqf +++ b/addons/modules/XEH_preInit.sqf @@ -2,7 +2,7 @@ ADDON = false; -PREP(moduleInit); +#include "XEH_PREP.hpp" GVAR(moduleInitCollection) = []; diff --git a/addons/modules/XEH_preStart.sqf b/addons/modules/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/modules/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/movement/CfgEventHandlers.hpp b/addons/movement/CfgEventHandlers.hpp index e75956f440..becf395052 100644 --- a/addons/movement/CfgEventHandlers.hpp +++ b/addons/movement/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/movement/XEH_PREP.hpp b/addons/movement/XEH_PREP.hpp new file mode 100644 index 0000000000..8e465970eb --- /dev/null +++ b/addons/movement/XEH_PREP.hpp @@ -0,0 +1,5 @@ + +PREP(getWeight); +PREP(canClimb); +PREP(climb); +PREP(handleClimb); diff --git a/addons/movement/XEH_preInit.sqf b/addons/movement/XEH_preInit.sqf index 3047be3518..a7feade1c3 100644 --- a/addons/movement/XEH_preInit.sqf +++ b/addons/movement/XEH_preInit.sqf @@ -2,9 +2,6 @@ ADDON = false; -PREP(getWeight); -PREP(canClimb); -PREP(climb); -PREP(handleClimb); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/movement/XEH_preStart.sqf b/addons/movement/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/movement/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/nametags/CfgEventHandlers.hpp b/addons/nametags/CfgEventHandlers.hpp index e75956f440..becf395052 100644 --- a/addons/nametags/CfgEventHandlers.hpp +++ b/addons/nametags/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/nametags/XEH_PREP.hpp b/addons/nametags/XEH_PREP.hpp new file mode 100644 index 0000000000..93a8ff6626 --- /dev/null +++ b/addons/nametags/XEH_PREP.hpp @@ -0,0 +1,10 @@ + +PREP(canShow); +PREP(doShow); +PREP(drawNameTagIcon); +PREP(getVehicleData); +PREP(initIsSpeaking); +PREP(moduleNameTags); +PREP(onDraw3d); +PREP(setText); +PREP(updateSettings); diff --git a/addons/nametags/XEH_preInit.sqf b/addons/nametags/XEH_preInit.sqf index 51b926cbb3..a7feade1c3 100644 --- a/addons/nametags/XEH_preInit.sqf +++ b/addons/nametags/XEH_preInit.sqf @@ -2,14 +2,6 @@ ADDON = false; -PREP(canShow); -PREP(doShow); -PREP(drawNameTagIcon); -PREP(getVehicleData); -PREP(initIsSpeaking); -PREP(moduleNameTags); -PREP(onDraw3d); -PREP(setText); -PREP(updateSettings); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/nametags/XEH_preStart.sqf b/addons/nametags/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/nametags/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/nightvision/CfgEventHandlers.hpp b/addons/nightvision/CfgEventHandlers.hpp index 49b87fb4fd..5c77927e53 100644 --- a/addons/nightvision/CfgEventHandlers.hpp +++ b/addons/nightvision/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/nightvision/XEH_PREP.hpp b/addons/nightvision/XEH_PREP.hpp new file mode 100644 index 0000000000..251c8cc5dd --- /dev/null +++ b/addons/nightvision/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(blending); +PREP(changeNVGBrightness); +PREP(initModule); +PREP(onCameraViewChanged); +PREP(onVisionModeChanged); +PREP(updatePPEffects); diff --git a/addons/nightvision/XEH_preInit.sqf b/addons/nightvision/XEH_preInit.sqf index ed02b9524e..a7feade1c3 100644 --- a/addons/nightvision/XEH_preInit.sqf +++ b/addons/nightvision/XEH_preInit.sqf @@ -2,11 +2,6 @@ ADDON = false; -PREP(blending); -PREP(changeNVGBrightness); -PREP(initModule); -PREP(onCameraViewChanged); -PREP(onVisionModeChanged); -PREP(updatePPEffects); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/nightvision/XEH_preStart.sqf b/addons/nightvision/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/nightvision/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/optics/CfgEventHandlers.hpp b/addons/optics/CfgEventHandlers.hpp index e75956f440..becf395052 100644 --- a/addons/optics/CfgEventHandlers.hpp +++ b/addons/optics/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/optics/XEH_PREP.hpp b/addons/optics/XEH_PREP.hpp new file mode 100644 index 0000000000..2b846a552a --- /dev/null +++ b/addons/optics/XEH_PREP.hpp @@ -0,0 +1,4 @@ + +PREP(handleFired); +PREP(onDrawScope); +PREP(onDrawScope2D); diff --git a/addons/optics/XEH_preInit.sqf b/addons/optics/XEH_preInit.sqf index 9616b7158a..a7feade1c3 100644 --- a/addons/optics/XEH_preInit.sqf +++ b/addons/optics/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP(handleFired); -PREP(onDrawScope); -PREP(onDrawScope2D); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/optics/XEH_preStart.sqf b/addons/optics/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/optics/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/optionsmenu/CfgEventHandlers.hpp b/addons/optionsmenu/CfgEventHandlers.hpp index 917a0acbd7..becf395052 100644 --- a/addons/optionsmenu/CfgEventHandlers.hpp +++ b/addons/optionsmenu/CfgEventHandlers.hpp @@ -1,8 +1,16 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + 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)); diff --git a/addons/optionsmenu/XEH_PREP.hpp b/addons/optionsmenu/XEH_PREP.hpp new file mode 100644 index 0000000000..f1ffe1ed98 --- /dev/null +++ b/addons/optionsmenu/XEH_PREP.hpp @@ -0,0 +1,22 @@ + +PREP(debugDumpToClipboard); +PREP(onListBoxSettingsChanged); +PREP(onListBoxShowSelectionChanged); +PREP(onSettingsMenuOpen); +PREP(onSliderPosChanged); +PREP(onServerSaveInputField); +PREP(onServerSettingsMenuOpen); +PREP(onServerListBoxShowSelectionChanged); +PREP(onCategorySelectChanged); +PREP(resetSettings); +PREP(serverResetSettings); +PREP(settingsMenuUpdateKeyView); +PREP(settingsMenuUpdateList); +PREP(serverSettingsMenuUpdateKeyView); +PREP(serverSettingsMenuUpdateList); +PREP(onServerCategorySelectChanged); +PREP(updateSetting); +PREP(exportSettings); +PREP(toggleIncludeClientSettings); +PREP(moduleAllowConfigExport); +PREP(stringEscape); diff --git a/addons/optionsmenu/XEH_preInit.sqf b/addons/optionsmenu/XEH_preInit.sqf index 21f64c4f46..8b6f55a0ca 100644 --- a/addons/optionsmenu/XEH_preInit.sqf +++ b/addons/optionsmenu/XEH_preInit.sqf @@ -2,27 +2,7 @@ ADDON = false; -PREP(debugDumpToClipboard); -PREP(onListBoxSettingsChanged); -PREP(onListBoxShowSelectionChanged); -PREP(onSettingsMenuOpen); -PREP(onSliderPosChanged); -PREP(onServerSaveInputField); -PREP(onServerSettingsMenuOpen); -PREP(onServerListBoxShowSelectionChanged); -PREP(onCategorySelectChanged); -PREP(resetSettings); -PREP(serverResetSettings); -PREP(settingsMenuUpdateKeyView); -PREP(settingsMenuUpdateList); -PREP(serverSettingsMenuUpdateKeyView); -PREP(serverSettingsMenuUpdateList); -PREP(onServerCategorySelectChanged); -PREP(updateSetting); -PREP(exportSettings); -PREP(toggleIncludeClientSettings); -PREP(moduleAllowConfigExport); -PREP(stringEscape); +#include "XEH_PREP.hpp" GVAR(clientSideOptions) = []; GVAR(clientSideColors) = []; diff --git a/addons/optionsmenu/XEH_preStart.sqf b/addons/optionsmenu/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/optionsmenu/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/overheating/CfgEventHandlers.hpp b/addons/overheating/CfgEventHandlers.hpp index 7f43c8b903..492230513f 100644 --- a/addons/overheating/CfgEventHandlers.hpp +++ b/addons/overheating/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/overheating/XEH_PREP.hpp b/addons/overheating/XEH_PREP.hpp new file mode 100644 index 0000000000..76bdef2bef --- /dev/null +++ b/addons/overheating/XEH_PREP.hpp @@ -0,0 +1,13 @@ + +PREP(checkTemperature); +PREP(clearJam); +PREP(displayTemperature); +PREP(firedEH); +PREP(getWeaponData); +PREP(handleTakeEH); +PREP(jamWeapon); +PREP(overheat); +PREP(swapBarrel); +PREP(swapBarrelCallback); +PREP(updateTemperature); +PREP(updateTemperatureThread); diff --git a/addons/overheating/XEH_preInit.sqf b/addons/overheating/XEH_preInit.sqf index be9936f214..a7feade1c3 100644 --- a/addons/overheating/XEH_preInit.sqf +++ b/addons/overheating/XEH_preInit.sqf @@ -2,17 +2,6 @@ ADDON = false; -PREP(checkTemperature); -PREP(clearJam); -PREP(displayTemperature); -PREP(firedEH); -PREP(getWeaponData); -PREP(handleTakeEH); -PREP(jamWeapon); -PREP(overheat); -PREP(swapBarrel); -PREP(swapBarrelCallback); -PREP(updateTemperature); -PREP(updateTemperatureThread); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/overheating/XEH_preStart.sqf b/addons/overheating/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/overheating/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/overpressure/CfgEventHandlers.hpp b/addons/overpressure/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/overpressure/CfgEventHandlers.hpp +++ b/addons/overpressure/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/overpressure/XEH_PREP.hpp b/addons/overpressure/XEH_PREP.hpp new file mode 100644 index 0000000000..1efd39d6e5 --- /dev/null +++ b/addons/overpressure/XEH_PREP.hpp @@ -0,0 +1,6 @@ + +PREP(getDistance); +PREP(overpressureDamage); +PREP(cacheOverPressureValues); +PREP(firedEHOP); +PREP(firedEHBB); diff --git a/addons/overpressure/XEH_preInit.sqf b/addons/overpressure/XEH_preInit.sqf index 37f44a2e9a..a7feade1c3 100644 --- a/addons/overpressure/XEH_preInit.sqf +++ b/addons/overpressure/XEH_preInit.sqf @@ -2,9 +2,6 @@ ADDON = false; -PREP(getDistance); -PREP(overpressureDamage); -PREP(cacheOverPressureValues); -PREP(firedEHOP); -PREP(firedEHBB); +#include "XEH_PREP.hpp" + ADDON = true; diff --git a/addons/overpressure/XEH_preStart.sqf b/addons/overpressure/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/overpressure/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp index 7a1f8119ca..f972afc2ca 100644 --- a/addons/parachute/CfgEventHandlers.hpp +++ b/addons/parachute/CfgEventHandlers.hpp @@ -1,17 +1,26 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + 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_Respawn_EventHandlers { class CAManBase { class ADDON { respawn = QUOTE(call COMPILE_FILE(XEH_respawn)); }; }; -}; \ No newline at end of file +}; diff --git a/addons/parachute/XEH_PREP.hpp b/addons/parachute/XEH_PREP.hpp new file mode 100644 index 0000000000..c2567b8468 --- /dev/null +++ b/addons/parachute/XEH_PREP.hpp @@ -0,0 +1,9 @@ + +PREP(doLanding); +PREP(handleInfoDisplayChanged); +PREP(hideAltimeter); +PREP(onEachFrame); +PREP(showAltimeter); +PREP(cutParachute); +PREP(checkCutParachute); +PREP(storeParachute); diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index 7bc0823215..bffa5623b8 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -17,12 +17,6 @@ ADDON = false; -PREP(doLanding); -PREP(handleInfoDisplayChanged); -PREP(hideAltimeter); -PREP(onEachFrame); -PREP(showAltimeter); -PREP(cutParachute); -PREP(checkCutParachute); -PREP(storeParachute); +#include "XEH_PREP.hpp" + ADDON = true; diff --git a/addons/parachute/XEH_preStart.sqf b/addons/parachute/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/parachute/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/rangecard/CfgEventHandlers.hpp b/addons/rangecard/CfgEventHandlers.hpp index 3996e3371d..5da5fd0dc2 100644 --- a/addons/rangecard/CfgEventHandlers.hpp +++ b/addons/rangecard/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); @@ -8,4 +15,4 @@ class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; -}; \ No newline at end of file +}; diff --git a/addons/rangecard/XEH_PREP.hpp b/addons/rangecard/XEH_PREP.hpp new file mode 100644 index 0000000000..6b13dcc45a --- /dev/null +++ b/addons/rangecard/XEH_PREP.hpp @@ -0,0 +1,9 @@ + +PREP(calculateSolution); +PREP(canCopy); +PREP(canShow); +PREP(canShowCopy); +PREP(onCloseDialog); +PREP(openRangeCard); +PREP(updateClassNames); +PREP(updateRangeCard); diff --git a/addons/rangecard/XEH_preInit.sqf b/addons/rangecard/XEH_preInit.sqf index 5e5685d30f..a7feade1c3 100644 --- a/addons/rangecard/XEH_preInit.sqf +++ b/addons/rangecard/XEH_preInit.sqf @@ -2,13 +2,6 @@ ADDON = false; -PREP(calculateSolution); -PREP(canCopy); -PREP(canShow); -PREP(canShowCopy); -PREP(onCloseDialog); -PREP(openRangeCard); -PREP(updateClassNames); -PREP(updateRangeCard); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/rangecard/XEH_preStart.sqf b/addons/rangecard/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/rangecard/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/rearm/CfgEventHandlers.hpp b/addons/rearm/CfgEventHandlers.hpp index 93371889e1..17edc1dc30 100644 --- a/addons/rearm/CfgEventHandlers.hpp +++ b/addons/rearm/CfgEventHandlers.hpp @@ -1,10 +1,16 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; - class Extended_Init_EventHandlers { class GVAR(defaultCarriedObject) { // TODO check if we need to add all subclasses class ADDON { diff --git a/addons/rearm/XEH_PREP.hpp b/addons/rearm/XEH_PREP.hpp new file mode 100644 index 0000000000..20dfaf8211 --- /dev/null +++ b/addons/rearm/XEH_PREP.hpp @@ -0,0 +1,25 @@ + +PREP(addRearmActions); +PREP(canRearm); +PREP(canStoreAmmo); +PREP(canTakeAmmo); +PREP(createDummy); +PREP(dropAmmo); +PREP(getConfigMagazines); +PREP(getMaxMagazines); +PREP(getNeedRearmMagazines); +PREP(grabAmmo); +PREP(handleKilled); +PREP(handleUnconscious); +PREP(makeDummy); +PREP(moduleRearmSettings); +PREP(pickUpAmmo); +PREP(rearm); +PREP(rearmEntireVehicle); +PREP(rearmEntireVehicleSuccess); +PREP(rearmEntireVehicleSuccessLocal); +PREP(rearmSuccess); +PREP(rearmSuccessLocal); +PREP(storeAmmo); +PREP(takeAmmo); +PREP(takeSuccess); diff --git a/addons/rearm/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf index c52423f67f..a7feade1c3 100644 --- a/addons/rearm/XEH_preInit.sqf +++ b/addons/rearm/XEH_preInit.sqf @@ -2,29 +2,6 @@ ADDON = false; -PREP(addRearmActions); -PREP(canRearm); -PREP(canStoreAmmo); -PREP(canTakeAmmo); -PREP(createDummy); -PREP(dropAmmo); -PREP(getConfigMagazines); -PREP(getMaxMagazines); -PREP(getNeedRearmMagazines); -PREP(grabAmmo); -PREP(handleKilled); -PREP(handleUnconscious); -PREP(makeDummy); -PREP(moduleRearmSettings); -PREP(pickUpAmmo); -PREP(rearm); -PREP(rearmEntireVehicle); -PREP(rearmEntireVehicleSuccess); -PREP(rearmEntireVehicleSuccessLocal); -PREP(rearmSuccess); -PREP(rearmSuccessLocal); -PREP(storeAmmo); -PREP(takeAmmo); -PREP(takeSuccess); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/rearm/XEH_preStart.sqf b/addons/rearm/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/rearm/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/recoil/CfgEventHandlers.hpp b/addons/recoil/CfgEventHandlers.hpp index 76963cf182..c0726f161a 100644 --- a/addons/recoil/CfgEventHandlers.hpp +++ b/addons/recoil/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/recoil/XEH_PREP.hpp b/addons/recoil/XEH_PREP.hpp new file mode 100644 index 0000000000..9e34c47492 --- /dev/null +++ b/addons/recoil/XEH_PREP.hpp @@ -0,0 +1,2 @@ + +PREP(camshake); diff --git a/addons/recoil/XEH_preInit.sqf b/addons/recoil/XEH_preInit.sqf index f6d04886c1..c503c2edbc 100644 --- a/addons/recoil/XEH_preInit.sqf +++ b/addons/recoil/XEH_preInit.sqf @@ -3,6 +3,6 @@ ADDON = false; -PREP(camshake); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/recoil/XEH_preStart.sqf b/addons/recoil/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/recoil/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/refuel/CfgEventHandlers.hpp b/addons/refuel/CfgEventHandlers.hpp index f1a9f1a3c8..c6f26efe1a 100644 --- a/addons/refuel/CfgEventHandlers.hpp +++ b/addons/refuel/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/refuel/XEH_PREP.hpp b/addons/refuel/XEH_PREP.hpp new file mode 100644 index 0000000000..dac451da17 --- /dev/null +++ b/addons/refuel/XEH_PREP.hpp @@ -0,0 +1,28 @@ + +PREP(canCheckFuel); +PREP(canConnectNozzle); +PREP(canDisconnect); +PREP(canReturnNozzle); +PREP(canTakeNozzle); +PREP(canTurnOff); +PREP(canTurnOn); +PREP(checkFuel); +PREP(connectNozzle); +PREP(connectNozzleAction); +PREP(disconnect); +PREP(dropNozzle); +PREP(getFuel); +PREP(handleDisconnect); +PREP(handleKilled); +PREP(handleUnconscious); +PREP(makeJerryCan); +PREP(moduleRefuelSettings); +PREP(readFuelCounter); +PREP(refuel); +PREP(reset); +PREP(resetLocal); +PREP(returnNozzle); +PREP(setFuel); +PREP(takeNozzle); +PREP(turnOff); +PREP(turnOn); diff --git a/addons/refuel/XEH_preInit.sqf b/addons/refuel/XEH_preInit.sqf index 2972ad57f7..a7feade1c3 100644 --- a/addons/refuel/XEH_preInit.sqf +++ b/addons/refuel/XEH_preInit.sqf @@ -2,32 +2,6 @@ ADDON = false; -PREP(canCheckFuel); -PREP(canConnectNozzle); -PREP(canDisconnect); -PREP(canReturnNozzle); -PREP(canTakeNozzle); -PREP(canTurnOff); -PREP(canTurnOn); -PREP(checkFuel); -PREP(connectNozzle); -PREP(connectNozzleAction); -PREP(disconnect); -PREP(dropNozzle); -PREP(getFuel); -PREP(handleDisconnect); -PREP(handleKilled); -PREP(handleUnconscious); -PREP(makeJerryCan); -PREP(moduleRefuelSettings); -PREP(readFuelCounter); -PREP(refuel); -PREP(reset); -PREP(resetLocal); -PREP(returnNozzle); -PREP(setFuel); -PREP(takeNozzle); -PREP(turnOff); -PREP(turnOn); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/refuel/XEH_preStart.sqf b/addons/refuel/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/refuel/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/reload/CfgEventHandlers.hpp b/addons/reload/CfgEventHandlers.hpp index 75c2280e24..a3dd6de29b 100644 --- a/addons/reload/CfgEventHandlers.hpp +++ b/addons/reload/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/reload/XEH_PREP.hpp b/addons/reload/XEH_PREP.hpp new file mode 100644 index 0000000000..bfd89b098e --- /dev/null +++ b/addons/reload/XEH_PREP.hpp @@ -0,0 +1,6 @@ + +PREP(canCheckAmmo); +PREP(canLinkBelt); +PREP(checkAmmo); +PREP(displayAmmo); +PREP(startLinkingBelt); diff --git a/addons/reload/XEH_preInit.sqf b/addons/reload/XEH_preInit.sqf index 278abf7bd2..a7feade1c3 100644 --- a/addons/reload/XEH_preInit.sqf +++ b/addons/reload/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP(canCheckAmmo); -PREP(canLinkBelt); -PREP(checkAmmo); -PREP(displayAmmo); -PREP(startLinkingBelt); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/reload/XEH_preStart.sqf b/addons/reload/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/reload/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/reloadlaunchers/CfgEventHandlers.hpp b/addons/reloadlaunchers/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/reloadlaunchers/CfgEventHandlers.hpp +++ b/addons/reloadlaunchers/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/reloadlaunchers/XEH_PREP.hpp b/addons/reloadlaunchers/XEH_PREP.hpp new file mode 100644 index 0000000000..b730d2780e --- /dev/null +++ b/addons/reloadlaunchers/XEH_PREP.hpp @@ -0,0 +1,6 @@ + +PREP(addMissileReloadActions); +PREP(canLoad); +PREP(getLoadableMissiles); +PREP(load); +PREP(reloadLauncher); diff --git a/addons/reloadlaunchers/XEH_preInit.sqf b/addons/reloadlaunchers/XEH_preInit.sqf index 3b60f99b8e..a7feade1c3 100644 --- a/addons/reloadlaunchers/XEH_preInit.sqf +++ b/addons/reloadlaunchers/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP(addMissileReloadActions); -PREP(canLoad); -PREP(getLoadableMissiles); -PREP(load); -PREP(reloadLauncher); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/reloadlaunchers/XEH_preStart.sqf b/addons/reloadlaunchers/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/reloadlaunchers/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index 798a10316a..882a542c7f 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/repair/XEH_PREP.hpp b/addons/repair/XEH_PREP.hpp new file mode 100644 index 0000000000..e3604c95a7 --- /dev/null +++ b/addons/repair/XEH_PREP.hpp @@ -0,0 +1,39 @@ + +PREP(addRepairActions); +PREP(addSpareParts); +PREP(canMiscRepair); +PREP(canRemove); +PREP(canRepair); +PREP(canRepairTrack); +PREP(canReplaceTrack); +PREP(canReplaceWheel); +PREP(doFullRepair); +PREP(doRemoveTrack); +PREP(doRemoveWheel); +PREP(doRepair); +PREP(doRepairTrack); +PREP(doReplaceTrack); +PREP(doReplaceWheel); +PREP(getClaimObjects); +PREP(getHitPointString); +PREP(getPostRepairDamage); +PREP(getWheelHitPointsWithSelections); +PREP(hasItems); +PREP(isEngineer); +PREP(isInRepairFacility); +PREP(isNearRepairVehicle); +PREP(isRepairVehicle); +PREP(moduleAddSpareParts); +PREP(moduleAssignEngineer); +PREP(moduleAssignRepairVehicle); +PREP(moduleAssignRepairFacility); +PREP(moduleRepairSettings); +PREP(normalizeHitPoints); +PREP(repair); +PREP(repair_failure); +PREP(repair_success); +PREP(setDamage); +PREP(setHitPointDamage); +PREP(spawnObject); +PREP(useItem); +PREP(useItems); diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf index 8efa47e7b3..a7feade1c3 100644 --- a/addons/repair/XEH_preInit.sqf +++ b/addons/repair/XEH_preInit.sqf @@ -2,43 +2,6 @@ ADDON = false; -PREP(addRepairActions); -PREP(addSpareParts); -PREP(canMiscRepair); -PREP(canRemove); -PREP(canRepair); -PREP(canRepairTrack); -PREP(canReplaceTrack); -PREP(canReplaceWheel); -PREP(doFullRepair); -PREP(doRemoveTrack); -PREP(doRemoveWheel); -PREP(doRepair); -PREP(doRepairTrack); -PREP(doReplaceTrack); -PREP(doReplaceWheel); -PREP(getClaimObjects); -PREP(getHitPointString); -PREP(getPostRepairDamage); -PREP(getWheelHitPointsWithSelections); -PREP(hasItems); -PREP(isEngineer); -PREP(isInRepairFacility); -PREP(isNearRepairVehicle); -PREP(isRepairVehicle); -PREP(moduleAddSpareParts); -PREP(moduleAssignEngineer); -PREP(moduleAssignRepairVehicle); -PREP(moduleAssignRepairFacility); -PREP(moduleRepairSettings); -PREP(normalizeHitPoints); -PREP(repair); -PREP(repair_failure); -PREP(repair_success); -PREP(setDamage); -PREP(setHitPointDamage); -PREP(spawnObject); -PREP(useItem); -PREP(useItems); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/repair/XEH_preStart.sqf b/addons/repair/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/repair/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/respawn/CfgEventHandlers.hpp b/addons/respawn/CfgEventHandlers.hpp index 00b6f01cea..69d602300e 100644 --- a/addons/respawn/CfgEventHandlers.hpp +++ b/addons/respawn/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/respawn/XEH_PREP.hpp b/addons/respawn/XEH_PREP.hpp new file mode 100644 index 0000000000..ab8a3c6a1f --- /dev/null +++ b/addons/respawn/XEH_PREP.hpp @@ -0,0 +1,16 @@ + +PREP(canMoveRallypoint); +PREP(handleKilled); +PREP(handlePlayerChanged); +PREP(handleRespawn); +PREP(handleInitPostServer); +PREP(initRallypoint); +PREP(module); +PREP(moduleFriendlyFire); +PREP(moduleRallypoint); +PREP(moveRallypoint); +PREP(removeBody); +PREP(restoreGear); +PREP(showFriendlyFireMessage); +PREP(teleportToRallypoint); +PREP(updateRallypoint); diff --git a/addons/respawn/XEH_preInit.sqf b/addons/respawn/XEH_preInit.sqf index eda5293876..a7feade1c3 100644 --- a/addons/respawn/XEH_preInit.sqf +++ b/addons/respawn/XEH_preInit.sqf @@ -2,20 +2,6 @@ ADDON = false; -PREP(canMoveRallypoint); -PREP(handleKilled); -PREP(handlePlayerChanged); -PREP(handleRespawn); -PREP(handleInitPostServer); -PREP(initRallypoint); -PREP(module); -PREP(moduleFriendlyFire); -PREP(moduleRallypoint); -PREP(moveRallypoint); -PREP(removeBody); -PREP(restoreGear); -PREP(showFriendlyFireMessage); -PREP(teleportToRallypoint); -PREP(updateRallypoint); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/respawn/XEH_preStart.sqf b/addons/respawn/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/respawn/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/safemode/CfgEventHandlers.hpp b/addons/safemode/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/safemode/CfgEventHandlers.hpp +++ b/addons/safemode/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/safemode/XEH_PREP.hpp b/addons/safemode/XEH_PREP.hpp new file mode 100644 index 0000000000..ab2a755a66 --- /dev/null +++ b/addons/safemode/XEH_PREP.hpp @@ -0,0 +1,5 @@ + +PREP(lockSafety); +PREP(playChangeFiremodeSound); +PREP(setSafeModeVisual); +PREP(unlockSafety); diff --git a/addons/safemode/XEH_preInit.sqf b/addons/safemode/XEH_preInit.sqf index e6eb91b8bd..a7feade1c3 100644 --- a/addons/safemode/XEH_preInit.sqf +++ b/addons/safemode/XEH_preInit.sqf @@ -2,9 +2,6 @@ ADDON = false; -PREP(lockSafety); -PREP(playChangeFiremodeSound); -PREP(setSafeModeVisual); -PREP(unlockSafety); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/safemode/XEH_preStart.sqf b/addons/safemode/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/safemode/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/sandbag/CfgEventHandlers.hpp b/addons/sandbag/CfgEventHandlers.hpp index da53514f3b..54701ffb3e 100644 --- a/addons/sandbag/CfgEventHandlers.hpp +++ b/addons/sandbag/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/sandbag/XEH_PREP.hpp b/addons/sandbag/XEH_PREP.hpp new file mode 100644 index 0000000000..399655a891 --- /dev/null +++ b/addons/sandbag/XEH_PREP.hpp @@ -0,0 +1,12 @@ + +PREP(canDeploy); +PREP(deploy); +PREP(deployCancel); +PREP(deployConfirm); +PREP(handleInteractMenuOpened); +PREP(handleKilled); +PREP(handlePlayerChanged); +PREP(handlePlayerInventoryChanged); +PREP(handleScrollWheel); +PREP(handleUnconscious); +PREP(pickup); diff --git a/addons/sandbag/XEH_preInit.sqf b/addons/sandbag/XEH_preInit.sqf index 444dca7ae0..a7feade1c3 100644 --- a/addons/sandbag/XEH_preInit.sqf +++ b/addons/sandbag/XEH_preInit.sqf @@ -2,16 +2,6 @@ ADDON = false; -PREP(canDeploy); -PREP(deploy); -PREP(deployCancel); -PREP(deployConfirm); -PREP(handleInteractMenuOpened); -PREP(handleKilled); -PREP(handlePlayerChanged); -PREP(handlePlayerInventoryChanged); -PREP(handleScrollWheel); -PREP(handleUnconscious); -PREP(pickup); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/sandbag/XEH_preStart.sqf b/addons/sandbag/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/sandbag/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/scopes/CfgEventHandlers.hpp b/addons/scopes/CfgEventHandlers.hpp index e75956f440..becf395052 100644 --- a/addons/scopes/CfgEventHandlers.hpp +++ b/addons/scopes/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/scopes/XEH_PREP.hpp b/addons/scopes/XEH_PREP.hpp new file mode 100644 index 0000000000..908d8064f0 --- /dev/null +++ b/addons/scopes/XEH_PREP.hpp @@ -0,0 +1,9 @@ + +PREP(adjustScope); +PREP(adjustZero); +PREP(applyScopeAdjustment); +PREP(canAdjustZero); +PREP(firedEH); +PREP(getOptics); +PREP(inventoryCheck); +PREP(showZeroing); diff --git a/addons/scopes/XEH_preInit.sqf b/addons/scopes/XEH_preInit.sqf index d45f50c1bb..e33c54337d 100644 --- a/addons/scopes/XEH_preInit.sqf +++ b/addons/scopes/XEH_preInit.sqf @@ -2,14 +2,7 @@ ADDON = false; -PREP(adjustScope); -PREP(adjustZero); -PREP(applyScopeAdjustment); -PREP(canAdjustZero); -PREP(firedEH); -PREP(getOptics); -PREP(inventoryCheck); -PREP(showZeroing); +#include "XEH_PREP.hpp" GVAR(fadeScript) = scriptNull; diff --git a/addons/scopes/XEH_preStart.sqf b/addons/scopes/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/scopes/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp index 3481fa1fb5..0d7f0a3f64 100644 --- a/addons/sitting/CfgEventHandlers.hpp +++ b/addons/sitting/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/sitting/XEH_PREP.hpp b/addons/sitting/XEH_PREP.hpp new file mode 100644 index 0000000000..cb7f51cfd5 --- /dev/null +++ b/addons/sitting/XEH_PREP.hpp @@ -0,0 +1,9 @@ + +PREP(addSitActions); +PREP(canSit); +PREP(canStand); +PREP(getRandomAnimation); +PREP(handleInterrupt); +PREP(moduleInit); +PREP(sit); +PREP(stand); diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf index 15ffe281c8..ea21067b30 100644 --- a/addons/sitting/XEH_preInit.sqf +++ b/addons/sitting/XEH_preInit.sqf @@ -2,14 +2,7 @@ ADDON = false; -PREP(addSitActions); -PREP(canSit); -PREP(canStand); -PREP(getRandomAnimation); -PREP(handleInterrupt); -PREP(moduleInit); -PREP(sit); -PREP(stand); +#include "XEH_PREP.hpp" GVAR(initializedClasses) = []; diff --git a/addons/sitting/XEH_preStart.sqf b/addons/sitting/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/sitting/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/slideshow/CfgEventHandlers.hpp b/addons/slideshow/CfgEventHandlers.hpp index b928bc2de6..be284a9d70 100644 --- a/addons/slideshow/CfgEventHandlers.hpp +++ b/addons/slideshow/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/slideshow/XEH_PREP.hpp b/addons/slideshow/XEH_PREP.hpp new file mode 100644 index 0000000000..ca31404b53 --- /dev/null +++ b/addons/slideshow/XEH_PREP.hpp @@ -0,0 +1,5 @@ + +PREP(addSlideActions); +PREP(autoTransition); +PREP(createSlideshow); +PREP(moduleInit); diff --git a/addons/slideshow/XEH_preInit.sqf b/addons/slideshow/XEH_preInit.sqf index 152c02ec77..8943a367f8 100644 --- a/addons/slideshow/XEH_preInit.sqf +++ b/addons/slideshow/XEH_preInit.sqf @@ -2,10 +2,7 @@ ADDON = false; -PREP(addSlideActions); -PREP(autoTransition); -PREP(createSlideshow); -PREP(moduleInit); +#include "XEH_PREP.hpp" GVAR(slideshows) = 0; diff --git a/addons/slideshow/XEH_preStart.sqf b/addons/slideshow/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/slideshow/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/spectator/CfgEventHandlers.hpp b/addons/spectator/CfgEventHandlers.hpp index e75956f440..becf395052 100644 --- a/addons/spectator/CfgEventHandlers.hpp +++ b/addons/spectator/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/spectator/XEH_PREP.hpp b/addons/spectator/XEH_PREP.hpp new file mode 100644 index 0000000000..cc29fde611 --- /dev/null +++ b/addons/spectator/XEH_PREP.hpp @@ -0,0 +1,23 @@ + +PREP(cacheUnitInfo); +PREP(cycleCamera); +PREP(handleCamera); +PREP(handleCompass); +PREP(handleIcons); +PREP(handleInterface); +PREP(handleMap); +PREP(handleMouse); +PREP(handleToolbar); +PREP(handleUnits); +PREP(interrupt); +PREP(moduleSpectatorSettings); +PREP(respawnTemplate); +PREP(setCameraAttributes); +PREP(setSpectator); +PREP(stageSpectator); +PREP(transitionCamera); +PREP(toggleInterface); +PREP(updateCameraModes); +PREP(updateSpectatableSides); +PREP(updateUnits); +PREP(updateVisionModes); diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 4b30edbadf..bdf0c72bd4 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -2,28 +2,7 @@ ADDON = false; -PREP(cacheUnitInfo); -PREP(cycleCamera); -PREP(handleCamera); -PREP(handleCompass); -PREP(handleIcons); -PREP(handleInterface); -PREP(handleMap); -PREP(handleMouse); -PREP(handleToolbar); -PREP(handleUnits); -PREP(interrupt); -PREP(moduleSpectatorSettings); -PREP(respawnTemplate); -PREP(setCameraAttributes); -PREP(setSpectator); -PREP(stageSpectator); -PREP(transitionCamera); -PREP(toggleInterface); -PREP(updateCameraModes); -PREP(updateSpectatableSides); -PREP(updateUnits); -PREP(updateVisionModes); +#include "XEH_PREP.hpp" // Reset the stored display SETUVAR(GVAR(interface),displayNull); diff --git a/addons/spectator/XEH_preStart.sqf b/addons/spectator/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/spectator/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/spottingscope/CfgEventHandlers.hpp b/addons/spottingscope/CfgEventHandlers.hpp index 81b3aef30e..13d369b097 100644 --- a/addons/spottingscope/CfgEventHandlers.hpp +++ b/addons/spottingscope/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/spottingscope/XEH_PREP.hpp b/addons/spottingscope/XEH_PREP.hpp new file mode 100644 index 0000000000..ebb99df96b --- /dev/null +++ b/addons/spottingscope/XEH_PREP.hpp @@ -0,0 +1,3 @@ + +PREP(pickup); +PREP(place); diff --git a/addons/spottingscope/XEH_preInit.sqf b/addons/spottingscope/XEH_preInit.sqf index 306884e595..a7feade1c3 100644 --- a/addons/spottingscope/XEH_preInit.sqf +++ b/addons/spottingscope/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(pickup); -PREP(place); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/spottingscope/XEH_preStart.sqf b/addons/spottingscope/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/spottingscope/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/switchunits/CfgEventHandlers.hpp b/addons/switchunits/CfgEventHandlers.hpp index 44b6e8e6ff..5da5fd0dc2 100644 --- a/addons/switchunits/CfgEventHandlers.hpp +++ b/addons/switchunits/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/switchunits/XEH_PREP.hpp b/addons/switchunits/XEH_PREP.hpp new file mode 100644 index 0000000000..d9151223c0 --- /dev/null +++ b/addons/switchunits/XEH_PREP.hpp @@ -0,0 +1,11 @@ + +PREP(addMapFunction); +PREP(handleMapClick); +PREP(initPlayer); +PREP(isValidAi); +PREP(markAiOnMap); +PREP(module); +PREP(nearestPlayers); +PREP(startSwitchUnits); +PREP(switchBack); +PREP(switchUnit); diff --git a/addons/switchunits/XEH_preInit.sqf b/addons/switchunits/XEH_preInit.sqf index c120608357..a7feade1c3 100644 --- a/addons/switchunits/XEH_preInit.sqf +++ b/addons/switchunits/XEH_preInit.sqf @@ -2,15 +2,6 @@ ADDON = false; -PREP(addMapFunction); -PREP(handleMapClick); -PREP(initPlayer); -PREP(isValidAi); -PREP(markAiOnMap); -PREP(module); -PREP(nearestPlayers); -PREP(startSwitchUnits); -PREP(switchBack); -PREP(switchUnit); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/switchunits/XEH_preStart.sqf b/addons/switchunits/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/switchunits/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp index f9ceb35aa5..ed44329687 100644 --- a/addons/tacticalladder/CfgEventHandlers.hpp +++ b/addons/tacticalladder/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/tacticalladder/XEH_PREP.hpp b/addons/tacticalladder/XEH_PREP.hpp new file mode 100644 index 0000000000..691e318a02 --- /dev/null +++ b/addons/tacticalladder/XEH_PREP.hpp @@ -0,0 +1,12 @@ + +PREP(cancelTLdeploy); +PREP(confirmTLdeploy); +PREP(deployTL); +PREP(handleKilled); +PREP(handleInteractMenuOpened); +PREP(handlePlayerChanged); +PREP(handleScrollWheel); +PREP(handleUnconscious); +PREP(isLadderEmpty); +PREP(pickupTL); +PREP(positionTL); diff --git a/addons/tacticalladder/XEH_preInit.sqf b/addons/tacticalladder/XEH_preInit.sqf index 3423e4d3b0..a7feade1c3 100644 --- a/addons/tacticalladder/XEH_preInit.sqf +++ b/addons/tacticalladder/XEH_preInit.sqf @@ -2,16 +2,6 @@ ADDON = false; -PREP(cancelTLdeploy); -PREP(confirmTLdeploy); -PREP(deployTL); -PREP(handleKilled); -PREP(handleInteractMenuOpened); -PREP(handlePlayerChanged); -PREP(handleScrollWheel); -PREP(handleUnconscious); -PREP(isLadderEmpty); -PREP(pickupTL); -PREP(positionTL); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/tacticalladder/XEH_preStart.sqf b/addons/tacticalladder/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/tacticalladder/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/tagging/CfgEventHandlers.hpp b/addons/tagging/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/tagging/CfgEventHandlers.hpp +++ b/addons/tagging/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/tagging/XEH_PREP.hpp b/addons/tagging/XEH_PREP.hpp new file mode 100644 index 0000000000..eb29d5a9e3 --- /dev/null +++ b/addons/tagging/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(checkTaggable); +PREP(createTag); +PREP(tagDirection); +PREP(tagGround); +PREP(tagWall); +PREP(tagTestingThread); diff --git a/addons/tagging/XEH_preInit.sqf b/addons/tagging/XEH_preInit.sqf index c3ceab4c03..a7feade1c3 100644 --- a/addons/tagging/XEH_preInit.sqf +++ b/addons/tagging/XEH_preInit.sqf @@ -2,11 +2,6 @@ ADDON = false; -PREP(checkTaggable); -PREP(createTag); -PREP(tagDirection); -PREP(tagGround); -PREP(tagWall); -PREP(tagTestingThread); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/tagging/XEH_preStart.sqf b/addons/tagging/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/tagging/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/trenches/CfgEventHandlers.hpp b/addons/trenches/CfgEventHandlers.hpp index dca07992b9..6db97e9c9d 100644 --- a/addons/trenches/CfgEventHandlers.hpp +++ b/addons/trenches/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/trenches/XEH_PREP.hpp b/addons/trenches/XEH_PREP.hpp new file mode 100644 index 0000000000..a9050b83bd --- /dev/null +++ b/addons/trenches/XEH_PREP.hpp @@ -0,0 +1,11 @@ + +PREP(canDigTrench); +PREP(handleInteractMenuOpened); +PREP(handleKilled); +PREP(handlePlayerChanged); +PREP(handlePlayerInventoryChanged); +PREP(handleScrollWheel); +PREP(handleUnconscious); +PREP(placeCancel); +PREP(placeConfirm); +PREP(placeTrench); diff --git a/addons/trenches/XEH_preInit.sqf b/addons/trenches/XEH_preInit.sqf index 55dc19e9b1..8b172b2b9e 100644 --- a/addons/trenches/XEH_preInit.sqf +++ b/addons/trenches/XEH_preInit.sqf @@ -2,16 +2,7 @@ ADDON = false; -PREP(canDigTrench); -PREP(handleInteractMenuOpened); -PREP(handleKilled); -PREP(handlePlayerChanged); -PREP(handlePlayerInventoryChanged); -PREP(handleScrollWheel); -PREP(handleUnconscious); -PREP(placeCancel); -PREP(placeConfirm); -PREP(placeTrench); +#include "XEH_PREP.hpp" // Trench types // Name of the object, name of th dummy no geo object, dx, dy diff --git a/addons/trenches/XEH_preStart.sqf b/addons/trenches/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/trenches/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp index ed59062ad5..6e31dde2cb 100644 --- a/addons/tripod/CfgEventHandlers.hpp +++ b/addons/tripod/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); diff --git a/addons/tripod/XEH_PREP.hpp b/addons/tripod/XEH_PREP.hpp new file mode 100644 index 0000000000..76b4f2bf1c --- /dev/null +++ b/addons/tripod/XEH_PREP.hpp @@ -0,0 +1,9 @@ + +PREP(adjust); +PREP(handleInteractMenuOpened); +PREP(handleKilled); +PREP(handlePlayerChanged); +PREP(handleScrollWheel); +PREP(handleUnconscious); +PREP(pickup); +PREP(place); diff --git a/addons/tripod/XEH_preInit.sqf b/addons/tripod/XEH_preInit.sqf index 1699258b47..a7feade1c3 100644 --- a/addons/tripod/XEH_preInit.sqf +++ b/addons/tripod/XEH_preInit.sqf @@ -2,13 +2,6 @@ ADDON = false; -PREP(adjust); -PREP(handleInteractMenuOpened); -PREP(handleKilled); -PREP(handlePlayerChanged); -PREP(handleScrollWheel); -PREP(handleUnconscious); -PREP(pickup); -PREP(place); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/tripod/XEH_preStart.sqf b/addons/tripod/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/tripod/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/vector/CfgEventHandlers.hpp b/addons/vector/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/vector/CfgEventHandlers.hpp +++ b/addons/vector/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/vector/XEH_PREP.hpp b/addons/vector/XEH_PREP.hpp new file mode 100644 index 0000000000..f03d99ed83 --- /dev/null +++ b/addons/vector/XEH_PREP.hpp @@ -0,0 +1,31 @@ + +PREP(clearDisplay); +PREP(convertToTexturesDegree); +PREP(convertToTexturesDistance); +PREP(convertToTexturesFOS); +PREP(dataTransfer); +PREP(showCenter); +PREP(showP1); +PREP(onKeyDown); +PREP(onKeyHold); +PREP(onKeyUp); +PREP(getDirection); +PREP(getDistance); +PREP(getHeightDistance); +PREP(getRelativeAzimuthDistance); +PREP(getRelativeDistance); +PREP(getRelativeHeightLength); +PREP(getFallOfShot); +PREP(showAzimuth); +PREP(showAzimuthInclination); +PREP(showHeightDistance); +PREP(showDistance); +PREP(showRelativeAzimuthDistance); +PREP(showRelativeDistance); +PREP(showRelativeHeightLength); +PREP(showFallOfShot); +PREP(showText); +PREP(nextMode); +PREP(adjustBrightness); +PREP(showReticle); +PREP(illuminate); diff --git a/addons/vector/XEH_preInit.sqf b/addons/vector/XEH_preInit.sqf index f170198a15..a7feade1c3 100644 --- a/addons/vector/XEH_preInit.sqf +++ b/addons/vector/XEH_preInit.sqf @@ -2,35 +2,6 @@ ADDON = false; -PREP(clearDisplay); -PREP(convertToTexturesDegree); -PREP(convertToTexturesDistance); -PREP(convertToTexturesFOS); -PREP(dataTransfer); -PREP(showCenter); -PREP(showP1); -PREP(onKeyDown); -PREP(onKeyHold); -PREP(onKeyUp); -PREP(getDirection); -PREP(getDistance); -PREP(getHeightDistance); -PREP(getRelativeAzimuthDistance); -PREP(getRelativeDistance); -PREP(getRelativeHeightLength); -PREP(getFallOfShot); -PREP(showAzimuth); -PREP(showAzimuthInclination); -PREP(showHeightDistance); -PREP(showDistance); -PREP(showRelativeAzimuthDistance); -PREP(showRelativeDistance); -PREP(showRelativeHeightLength); -PREP(showFallOfShot); -PREP(showText); -PREP(nextMode); -PREP(adjustBrightness); -PREP(showReticle); -PREP(illuminate); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/vector/XEH_preStart.sqf b/addons/vector/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/vector/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/vehiclelock/CfgEventHandlers.hpp b/addons/vehiclelock/CfgEventHandlers.hpp index 6fbbd5c243..705415e65d 100644 --- a/addons/vehiclelock/CfgEventHandlers.hpp +++ b/addons/vehiclelock/CfgEventHandlers.hpp @@ -1,13 +1,22 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + 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_InventoryOpened_EventHandlers { class CAManBase { class ADDON { @@ -15,6 +24,7 @@ class Extended_InventoryOpened_EventHandlers { }; }; }; + class Extended_InitPost_EventHandlers { class Car { class ADDON { diff --git a/addons/vehiclelock/XEH_PREP.hpp b/addons/vehiclelock/XEH_PREP.hpp new file mode 100644 index 0000000000..791936b36a --- /dev/null +++ b/addons/vehiclelock/XEH_PREP.hpp @@ -0,0 +1,11 @@ + +PREP(addKeyForVehicle); +PREP(getVehicleSideKey); +PREP(handleVehicleInitPost); +PREP(hasKeyForVehicle); +PREP(lockpick); +PREP(moduleInit); +PREP(moduleSync); +PREP(onOpenInventory); +PREP(serverSetupCustomKeyEH); +PREP(setVehicleLockEH); diff --git a/addons/vehiclelock/XEH_preInit.sqf b/addons/vehiclelock/XEH_preInit.sqf index 18a7062c24..a7feade1c3 100644 --- a/addons/vehiclelock/XEH_preInit.sqf +++ b/addons/vehiclelock/XEH_preInit.sqf @@ -2,15 +2,6 @@ ADDON = false; -PREP(addKeyForVehicle); -PREP(getVehicleSideKey); -PREP(handleVehicleInitPost); -PREP(hasKeyForVehicle); -PREP(lockpick); -PREP(moduleInit); -PREP(moduleSync); -PREP(onOpenInventory); -PREP(serverSetupCustomKeyEH); -PREP(setVehicleLockEH); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/vehiclelock/XEH_preStart.sqf b/addons/vehiclelock/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/vehiclelock/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/vehicles/CfgEventHandlers.hpp b/addons/vehicles/CfgEventHandlers.hpp index 2725e526bc..fb16727899 100644 --- a/addons/vehicles/CfgEventHandlers.hpp +++ b/addons/vehicles/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/vehicles/XEH_PREP.hpp b/addons/vehicles/XEH_PREP.hpp new file mode 100644 index 0000000000..ec2e27a94e --- /dev/null +++ b/addons/vehicles/XEH_PREP.hpp @@ -0,0 +1,3 @@ + +PREP(speedLimiter); +PREP(startEngine); diff --git a/addons/vehicles/XEH_preInit.sqf b/addons/vehicles/XEH_preInit.sqf index 7070aab075..a7feade1c3 100644 --- a/addons/vehicles/XEH_preInit.sqf +++ b/addons/vehicles/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(speedLimiter); -PREP(startEngine); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/vehicles/XEH_preStart.sqf b/addons/vehicles/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/vehicles/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/viewdistance/CfgEventHandlers.hpp b/addons/viewdistance/CfgEventHandlers.hpp index 423993f757..789cfeb05c 100644 --- a/addons/viewdistance/CfgEventHandlers.hpp +++ b/addons/viewdistance/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/viewdistance/XEH_PREP.hpp b/addons/viewdistance/XEH_PREP.hpp new file mode 100644 index 0000000000..fea5de5a4f --- /dev/null +++ b/addons/viewdistance/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(adaptViewDistance); +PREP(changeViewDistance); +PREP(initModule); +PREP(returnObjectCoeff); +PREP(returnValue); +PREP(setFovBasedOvdPFH); diff --git a/addons/viewdistance/XEH_preInit.sqf b/addons/viewdistance/XEH_preInit.sqf index 8237a97cb9..a7feade1c3 100644 --- a/addons/viewdistance/XEH_preInit.sqf +++ b/addons/viewdistance/XEH_preInit.sqf @@ -2,11 +2,6 @@ ADDON = false; -PREP(adaptViewDistance); -PREP(changeViewDistance); -PREP(initModule); -PREP(returnObjectCoeff); -PREP(returnValue); -PREP(setFovBasedOvdPFH); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/viewdistance/XEH_preStart.sqf b/addons/viewdistance/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/viewdistance/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/weaponselect/CfgEventHandlers.hpp b/addons/weaponselect/CfgEventHandlers.hpp index 0cd959a047..becf395052 100644 --- a/addons/weaponselect/CfgEventHandlers.hpp +++ b/addons/weaponselect/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/weaponselect/XEH_PREP.hpp b/addons/weaponselect/XEH_PREP.hpp new file mode 100644 index 0000000000..0847c40861 --- /dev/null +++ b/addons/weaponselect/XEH_PREP.hpp @@ -0,0 +1,10 @@ + +PREP(displayGrenadeTypeAndNumber); +PREP(fireSmokeLauncher); +PREP(playChangeFiremodeSound); +PREP(putWeaponAway); +PREP(selectNextGrenade); +PREP(selectWeaponMode); +PREP(selectWeaponMuzzle); +PREP(selectWeaponVehicle); +PREP(throwGrenade); diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index 26347fc279..b457e10cad 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -2,15 +2,7 @@ ADDON = false; -PREP(displayGrenadeTypeAndNumber); -PREP(fireSmokeLauncher); -PREP(playChangeFiremodeSound); -PREP(putWeaponAway); -PREP(selectNextGrenade); -PREP(selectWeaponMode); -PREP(selectWeaponMuzzle); -PREP(selectWeaponVehicle); -PREP(throwGrenade); +#include "XEH_PREP.hpp" // collect frag and other grenades separately GVAR(GrenadesAll) = []; diff --git a/addons/weaponselect/XEH_preStart.sqf b/addons/weaponselect/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/weaponselect/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/weather/CfgEventhandlers.hpp b/addons/weather/CfgEventhandlers.hpp index 842ad8e7bf..74dfaab913 100644 --- a/addons/weather/CfgEventhandlers.hpp +++ b/addons/weather/CfgEventhandlers.hpp @@ -1,8 +1,16 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; + class Extended_PostInit_EventHandlers { class ADDON { serverInit = QUOTE(call COMPILE_FILE(XEH_PostServerInit)); diff --git a/addons/weather/XEH_PREP.hpp b/addons/weather/XEH_PREP.hpp new file mode 100644 index 0000000000..b13b938892 --- /dev/null +++ b/addons/weather/XEH_PREP.hpp @@ -0,0 +1,23 @@ + +PREP(calculateAirDensity); +PREP(calculateBarometricPressure); +PREP(calculateDensityAltitude); +PREP(calculateDewPoint); +PREP(calculateHeatIndex); +PREP(calculateRoughnessLength); +PREP(calculateSpeedOfSound); +PREP(calculateTemperatureAtHeight); +PREP(calculateWetBulb); +PREP(calculateWindChill); +PREP(calculateWindSpeed); +PREP(displayWindInfo); +PREP(getMapData); +PREP(getWind); +PREP(initModuleSettings); +PREP(initWind); +PREP(serverController); +PREP(updateAceWeather); +PREP(updateHumidity); +PREP(updateRain); +PREP(updateTemperature); +PREP(updateWind); diff --git a/addons/weather/XEH_preInit.sqf b/addons/weather/XEH_preInit.sqf index eb5291334a..f0161c7173 100644 --- a/addons/weather/XEH_preInit.sqf +++ b/addons/weather/XEH_preInit.sqf @@ -3,28 +3,7 @@ ADDON = false; -PREP(calculateAirDensity); -PREP(calculateBarometricPressure); -PREP(calculateDensityAltitude); -PREP(calculateDewPoint); -PREP(calculateHeatIndex); -PREP(calculateRoughnessLength); -PREP(calculateSpeedOfSound); -PREP(calculateTemperatureAtHeight); -PREP(calculateWetBulb); -PREP(calculateWindChill); -PREP(calculateWindSpeed); -PREP(displayWindInfo); -PREP(getMapData); -PREP(getWind); -PREP(initModuleSettings); -PREP(initWind); -PREP(serverController); -PREP(updateAceWeather); -PREP(updateHumidity); -PREP(updateRain); -PREP(updateTemperature); -PREP(updateWind); +#include "XEH_PREP.hpp" // Make sure this data is read before client/server postInit call FUNC(getMapData); diff --git a/addons/weather/XEH_preStart.sqf b/addons/weather/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/weather/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/winddeflection/CfgEventHandlers.hpp b/addons/winddeflection/CfgEventHandlers.hpp index 917a0acbd7..becf395052 100644 --- a/addons/winddeflection/CfgEventHandlers.hpp +++ b/addons/winddeflection/CfgEventHandlers.hpp @@ -1,8 +1,16 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + 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)); diff --git a/addons/winddeflection/XEH_PREP.hpp b/addons/winddeflection/XEH_PREP.hpp new file mode 100644 index 0000000000..60c5b830a7 --- /dev/null +++ b/addons/winddeflection/XEH_PREP.hpp @@ -0,0 +1,4 @@ + +PREP(handleFired); +PREP(updateTrajectoryPFH); +PREP(initModuleSettings); diff --git a/addons/winddeflection/XEH_preInit.sqf b/addons/winddeflection/XEH_preInit.sqf index bac6a8323a..9104abccdb 100644 --- a/addons/winddeflection/XEH_preInit.sqf +++ b/addons/winddeflection/XEH_preInit.sqf @@ -12,8 +12,6 @@ ADDON = false; -PREP(handleFired); -PREP(updateTrajectoryPFH); -PREP(initModuleSettings); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/winddeflection/XEH_preStart.sqf b/addons/winddeflection/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/winddeflection/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/yardage450/CfgEventHandlers.hpp b/addons/yardage450/CfgEventHandlers.hpp index 2a05b72298..10dce0a9bf 100644 --- a/addons/yardage450/CfgEventHandlers.hpp +++ b/addons/yardage450/CfgEventHandlers.hpp @@ -1,3 +1,10 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_preInit) ); @@ -8,4 +15,4 @@ class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; -}; \ No newline at end of file +}; diff --git a/addons/yardage450/XEH_PREP.hpp b/addons/yardage450/XEH_PREP.hpp new file mode 100644 index 0000000000..ae6a9b255b --- /dev/null +++ b/addons/yardage450/XEH_PREP.hpp @@ -0,0 +1,3 @@ + +PREP(acquireTarget); +PREP(turnOn); diff --git a/addons/yardage450/XEH_preInit.sqf b/addons/yardage450/XEH_preInit.sqf index ad84432e0d..a7feade1c3 100644 --- a/addons/yardage450/XEH_preInit.sqf +++ b/addons/yardage450/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(acquireTarget); -PREP(turnOn); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/yardage450/XEH_preStart.sqf b/addons/yardage450/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/yardage450/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/zeus/CfgEventHandlers.hpp b/addons/zeus/CfgEventHandlers.hpp index 57d6a1afd0..89ab0bc900 100644 --- a/addons/zeus/CfgEventHandlers.hpp +++ b/addons/zeus/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp new file mode 100644 index 0000000000..423b7f2f27 --- /dev/null +++ b/addons/zeus/XEH_PREP.hpp @@ -0,0 +1,16 @@ + +PREP(addObjectToCurator); +PREP(bi_moduleCurator); +PREP(bi_moduleMine); +PREP(bi_moduleProjectile); +PREP(bi_moduleRemoteControl); +PREP(handleZeusUnitAssigned); +PREP(moduleAddSpareTrack); +PREP(moduleAddSpareWheel); +PREP(moduleCaptive); +PREP(moduleSetMedic); +PREP(moduleSetMedicalVehicle); +PREP(moduleSetMedicalFacility); +PREP(moduleSurrender); +PREP(moduleUnconscious); +PREP(moduleZeusSettings); diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf index 9837d7162b..0d03673e46 100644 --- a/addons/zeus/XEH_preInit.sqf +++ b/addons/zeus/XEH_preInit.sqf @@ -2,21 +2,7 @@ ADDON = false; -PREP(addObjectToCurator); -PREP(bi_moduleCurator); -PREP(bi_moduleMine); -PREP(bi_moduleProjectile); -PREP(bi_moduleRemoteControl); -PREP(handleZeusUnitAssigned); -PREP(moduleAddSpareTrack); -PREP(moduleAddSpareWheel); -PREP(moduleCaptive); -PREP(moduleSetMedic); -PREP(moduleSetMedicalVehicle); -PREP(moduleSetMedicalFacility); -PREP(moduleSurrender); -PREP(moduleUnconscious); -PREP(moduleZeusSettings); +#include "XEH_PREP.hpp" if (isServer) then { ["zeusUnitAssigned", FUNC(handleZeusUnitAssigned)] call EFUNC(common,addEventHandler); diff --git a/addons/zeus/XEH_preStart.sqf b/addons/zeus/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/zeus/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/extras/blank/CfgEventHandlers.hpp b/extras/blank/CfgEventHandlers.hpp index f0a9f14d91..be284a9d70 100644 --- a/extras/blank/CfgEventHandlers.hpp +++ b/extras/blank/CfgEventHandlers.hpp @@ -1,4 +1,10 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/extras/blank/XEH_PREP.hpp b/extras/blank/XEH_PREP.hpp new file mode 100644 index 0000000000..d089cdc8e4 --- /dev/null +++ b/extras/blank/XEH_PREP.hpp @@ -0,0 +1,2 @@ + +PREP(empty); diff --git a/extras/blank/XEH_preInit.sqf b/extras/blank/XEH_preInit.sqf index 69abb46fa9..a7feade1c3 100644 --- a/extras/blank/XEH_preInit.sqf +++ b/extras/blank/XEH_preInit.sqf @@ -2,6 +2,6 @@ ADDON = false; -PREP(empty); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/extras/blank/XEH_preStart.sqf b/extras/blank/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/extras/blank/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp"