diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp new file mode 100644 index 0000000000..e635014c46 --- /dev/null +++ b/addons/interaction/CfgEventHandlers.hpp @@ -0,0 +1,27 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_clientInit.sqf) ); + }; +}; + +class Extended_GetIn_EventHandlers { + class All { + class ADDONnu { + clientGetIn = QUOTE( if (_this select 2 == AGM_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}); + }; + }; +}; + +class Extended_GetOut_EventHandlers { + class All { + class ADDONnu { + clientGetOut = QUOTE( if (_this select 2 == AGM_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}); + }; + }; +}; diff --git a/addons/interaction/clientInit.sqf b/addons/interaction/XEH_clientInit.sqf similarity index 100% rename from addons/interaction/clientInit.sqf rename to addons/interaction/XEH_clientInit.sqf diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf new file mode 100644 index 0000000000..7e2dd7223f --- /dev/null +++ b/addons/interaction/XEH_preInit.sqf @@ -0,0 +1,48 @@ +#include "script_component.hpp" + +PREPF(addInteraction); +PREPF(addInteractionSelf); +PREPF(AddSelectableItem); +PREPF(addToTooltip); +PREPF(applyButtons); +PREPF(canInteractWith); +PREPF(canLockDoor); +PREPF(canTapShoulder); +PREPF(getActions2); +PREPF(GetActions); +PREPF(getDoor); +PREPF(getDoorAnimations); +PREPF(getDown); +PREPF(getSelectedButton); +PREPF(hideMenu); +PREPF(hideMouseHint); +PREPF(initialiseInteraction); +PREPF(isInRange); +PREPF(joinTeam); +PREPF(lockDoor); +PREPF(menuKeyInput); +PREPF(moduleInteraction); +PREPF(moveDown); +PREPF(onButtonDown); +PREPF(onButtonDownSelf); +PREPF(onButtonUp); +PREPF(onClick); +PREPF(onSelectMenuDblClick); +PREPF(openDoor); +PREPF(openMenu); +PREPF(openMenuSelectUI); +PREPF(openMenuSelf); +PREPF(openSelectMenu); +PREPF(openSubMenu); +PREPF(openSubMenuSelf); +PREPF(prepareSelectMenu); +PREPF(push); +PREPF(removeInteraction); +PREPF(removeInteractionSelf); +PREPF(removeTag); +PREPF(sendAway); +PREPF(showMenu); +PREPF(showMouseHint); +PREPF(sortOptionsByPriority); +PREPF(tapShoulder); +PREPF(updateTooltipPosition); \ No newline at end of file diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index 961d644a0b..1ec93b12f2 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -1,5 +1,7 @@ +#include "script_component.hpp" + class CfgPatches { - class AGM_Interaction { + class ADDON { units[] = {}; weapons[] = {}; requiredVersion = 0.60; @@ -12,6 +14,9 @@ class CfgPatches { }; }; +#include "CfgEventHandlers.hpp" + +/* class CfgFunctions { class AGM_Interaction { class AGM_Interaction { @@ -69,28 +74,7 @@ class CfgFunctions { }; }; }; - -class Extended_PostInit_EventHandlers { - class AGM_Interaction { - clientInit = "call compile preprocessFileLineNumbers '\AGM_Interaction\clientInit.sqf'"; - }; -}; - -class Extended_GetIn_EventHandlers { - class All { - class AGM_AutoCloseMenu { - clientGetIn = "if (_this select 2 == AGM_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}"; - }; - }; -}; - -class Extended_GetOut_EventHandlers { - class All { - class AGM_AutoCloseMenu { - clientGetOut = "if (_this select 2 == AGM_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}"; - }; - }; -}; +*/ class AGM_Core_Default_Keys { class openInteractionMenuNew { diff --git a/addons/interaction/script_component.hpp b/addons/interaction/script_component.hpp new file mode 100644 index 0000000000..07fcac5740 --- /dev/null +++ b/addons/interaction/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT interaction +#include "\z\ace\Addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_INTERACTION + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_INTERACTION + #define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION +#endif + +#include "\z\ace\Addons\main\script_macros.hpp" \ No newline at end of file