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"