From bcd4a720139470403c6781fab7daf7fd2bc202f9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 13 Jan 2015 21:04:25 -0600 Subject: [PATCH] Base No Radio --- TO_MERGE/agm/NoRadio/config.cpp | 20 ------------------- addons/laser/XEH_post_init.sqf | 1 - addons/noradio/$PBOPREFIX$ | 1 + addons/noradio/CfgEventhandlers.hpp | 6 ++++++ .../noradio/XEH_post_initClient.sqf | 2 ++ .../noradio/XEH_post_initServer.sqf | 2 ++ addons/noradio/config.cpp | 17 ++++++++++++++++ addons/noradio/script_component.hpp | 14 +++++++++++++ 8 files changed, 42 insertions(+), 21 deletions(-) delete mode 100644 TO_MERGE/agm/NoRadio/config.cpp create mode 100644 addons/noradio/$PBOPREFIX$ create mode 100644 addons/noradio/CfgEventhandlers.hpp rename TO_MERGE/agm/NoRadio/clientInit.sqf => addons/noradio/XEH_post_initClient.sqf (94%) rename TO_MERGE/agm/NoRadio/serverInit.sqf => addons/noradio/XEH_post_initServer.sqf (88%) create mode 100644 addons/noradio/config.cpp create mode 100644 addons/noradio/script_component.hpp diff --git a/TO_MERGE/agm/NoRadio/config.cpp b/TO_MERGE/agm/NoRadio/config.cpp deleted file mode 100644 index cc10d76e34..0000000000 --- a/TO_MERGE/agm/NoRadio/config.cpp +++ /dev/null @@ -1,20 +0,0 @@ -class CfgPatches { - class AGM_NoRadio { - units[] = {}; - weapons[] = {}; - requiredVersion = 0.60; - requiredAddons[] = {AGM_Core}; - version = "0.95"; - versionStr = "0.95"; - versionAr[] = {0,95,0}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; - }; -}; - -class Extended_PostInit_EventHandlers { - class AGM_NoRadio { - clientInit = "call compile preprocessFileLineNumbers '\AGM_NoRadio\clientInit.sqf'"; - serverInit = "call compile preprocessFileLineNumbers '\AGM_NoRadio\serverInit.sqf'"; - }; -}; diff --git a/addons/laser/XEH_post_init.sqf b/addons/laser/XEH_post_init.sqf index 6904ee6c47..dc30361926 100644 --- a/addons/laser/XEH_post_init.sqf +++ b/addons/laser/XEH_post_init.sqf @@ -1,3 +1,2 @@ #include "script_component.hpp" -NO_DEDICATED; diff --git a/addons/noradio/$PBOPREFIX$ b/addons/noradio/$PBOPREFIX$ new file mode 100644 index 0000000000..4841a62df0 --- /dev/null +++ b/addons/noradio/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\noradio \ No newline at end of file diff --git a/addons/noradio/CfgEventhandlers.hpp b/addons/noradio/CfgEventhandlers.hpp new file mode 100644 index 0000000000..ef3aa7ad62 --- /dev/null +++ b/addons/noradio/CfgEventhandlers.hpp @@ -0,0 +1,6 @@ +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = "call compile preprocessFileLineNumbers '\AGM_NoRadio\clientInit.sqf'"; + serverInit = "call compile preprocessFileLineNumbers '\AGM_NoRadio\serverInit.sqf'"; + }; +}; \ No newline at end of file diff --git a/TO_MERGE/agm/NoRadio/clientInit.sqf b/addons/noradio/XEH_post_initClient.sqf similarity index 94% rename from TO_MERGE/agm/NoRadio/clientInit.sqf rename to addons/noradio/XEH_post_initClient.sqf index 8e9e2d7001..66bb17d500 100644 --- a/TO_MERGE/agm/NoRadio/clientInit.sqf +++ b/addons/noradio/XEH_post_initClient.sqf @@ -1,5 +1,7 @@ // by commy2 +#include "script_component.hpp" + 0 spawn { waitUntil {!isNull AGM_player}; diff --git a/TO_MERGE/agm/NoRadio/serverInit.sqf b/addons/noradio/XEH_post_initServer.sqf similarity index 88% rename from TO_MERGE/agm/NoRadio/serverInit.sqf rename to addons/noradio/XEH_post_initServer.sqf index bab527319c..4c6077f25f 100644 --- a/TO_MERGE/agm/NoRadio/serverInit.sqf +++ b/addons/noradio/XEH_post_initServer.sqf @@ -1,5 +1,7 @@ // by commy2 +#include "script_component.hpp" + addMissionEventHandler ["HandleDisconnect", { if !((_this select 0) getVariable ["AGM_isUnconscious", false]) then { _this call AGM_Core_fnc_unmuteUnit; diff --git a/addons/noradio/config.cpp b/addons/noradio/config.cpp new file mode 100644 index 0000000000..e3b50fff62 --- /dev/null +++ b/addons/noradio/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {AGM_Core}; + version = "0.95"; + versionStr = "0.95"; + versionAr[] = {0,95,0}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2/"; + }; +}; + +#include "CfgEventhandlers.hpp" diff --git a/addons/noradio/script_component.hpp b/addons/noradio/script_component.hpp new file mode 100644 index 0000000000..f425a5934a --- /dev/null +++ b/addons/noradio/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT noradio +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL + +#ifdef DEBUG_ENABLED_COMMON + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_COMMON + #define DEBUG_SETTINGS DEBUG_ENABLED_COMMON +#endif + +#include "\z\ace\addons\main\script_macros.hpp"