From 67479b733e19fb6ecef60e342eee41451e44084d Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 29 Mar 2015 15:20:39 +0200 Subject: [PATCH] add PBO to load things into vehicles --- addons/cargo/$PBOPREFIX$ | 1 + addons/cargo/CfgEventHandlers.hpp | 6 ++++++ addons/cargo/XEH_preInit.sqf | 7 +++++++ addons/cargo/config.cpp | 15 +++++++++++++++ addons/cargo/functions/fnc_empty.sqf | 3 +++ addons/cargo/functions/script_component.hpp | 1 + addons/cargo/script_component.hpp | 12 ++++++++++++ 7 files changed, 45 insertions(+) create mode 100644 addons/cargo/$PBOPREFIX$ create mode 100644 addons/cargo/CfgEventHandlers.hpp create mode 100644 addons/cargo/XEH_preInit.sqf create mode 100644 addons/cargo/config.cpp create mode 100644 addons/cargo/functions/fnc_empty.sqf create mode 100644 addons/cargo/functions/script_component.hpp create mode 100644 addons/cargo/script_component.hpp diff --git a/addons/cargo/$PBOPREFIX$ b/addons/cargo/$PBOPREFIX$ new file mode 100644 index 0000000000..74e5e4186e --- /dev/null +++ b/addons/cargo/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\cargo \ No newline at end of file diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f0a9f14d91 --- /dev/null +++ b/addons/cargo/CfgEventHandlers.hpp @@ -0,0 +1,6 @@ + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; diff --git a/addons/cargo/XEH_preInit.sqf b/addons/cargo/XEH_preInit.sqf new file mode 100644 index 0000000000..69abb46fa9 --- /dev/null +++ b/addons/cargo/XEH_preInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(empty); + +ADDON = true; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp new file mode 100644 index 0000000000..7e6cb24ff2 --- /dev/null +++ b/addons/cargo/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common","ace_interaction","ace_interact_menu"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/cargo/functions/fnc_empty.sqf b/addons/cargo/functions/fnc_empty.sqf new file mode 100644 index 0000000000..c60a82b2d8 --- /dev/null +++ b/addons/cargo/functions/fnc_empty.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +diag_log text format["This is here as an example!!!"]; diff --git a/addons/cargo/functions/script_component.hpp b/addons/cargo/functions/script_component.hpp new file mode 100644 index 0000000000..bd91738fd3 --- /dev/null +++ b/addons/cargo/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\cargo\script_component.hpp" \ No newline at end of file diff --git a/addons/cargo/script_component.hpp b/addons/cargo/script_component.hpp new file mode 100644 index 0000000000..fea5a6601b --- /dev/null +++ b/addons/cargo/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT cargo +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_CARGO + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_CARGO + #define DEBUG_SETTINGS DEBUG_ENABLED_CARGO +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file