diff --git a/addons/winddeflection/CfgEventHandlers.hpp b/addons/winddeflection/CfgEventHandlers.hpp index 6cf7856ba5..4961d7dbc7 100644 --- a/addons/winddeflection/CfgEventHandlers.hpp +++ b/addons/winddeflection/CfgEventHandlers.hpp @@ -4,12 +4,6 @@ class Extended_PreInit_EventHandlers { }; }; -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_postInit.sqf) ); - }; -}; - class Extended_Fired_Eventhandlers { class CaManBase { fired = QUOTE( call FUNC(handleFired) ); diff --git a/addons/winddeflection/CfgVehicles.h b/addons/winddeflection/CfgVehicles.h index fe0e31bda5..e84727b94e 100644 --- a/addons/winddeflection/CfgVehicles.h +++ b/addons/winddeflection/CfgVehicles.h @@ -1,27 +1,20 @@ class CfgVehicles { - - // TODO Stringtable usage - class Logic; - class Module_F: Logic { - class ArgumentsBaseUnits { - }; - }; - class GVAR(Module): Module_F { - scope = 2; - displayName = "Wind Deflection [ACE]"; - icon = QUOTE(PATHTOF(data\module_icon.paa)); - category = "ACE"; - function = FUNC(enableModule); - functionPriority = 1; - isGlobal = 1; - isTriggerActivated = 0; - class Arguments { - class forAI { - displayName = "Enable for AI"; - description = "Should the module be enabled for AI"; - typeName = "BOOL"; - defaultValue = 0; - }; - }; - }; + class Module_F; + class GVAR(Module): Module_F { + author = "$STR_ACE_Common_ACETeam"; + category = "ACE"; + displayName = "Wind Deflection"; + function = FUNC(enableModule); + scope = 2; + isGlobal = 1; + icon = QUOTE(PATHTOF(data\module_icon.paa)); + class Arguments { + class EnableForAI { + displayName = "Enable for AI"; + description = "Should the module be enabled for AI"; + typeName = "BOOL"; + defaultValue = 0; + }; + }; + }; }; diff --git a/addons/winddeflection/XEH_postInit.sqf b/addons/winddeflection/XEH_postInit.sqf deleted file mode 100644 index 9c3a4bc41f..0000000000 --- a/addons/winddeflection/XEH_postInit.sqf +++ /dev/null @@ -1,15 +0,0 @@ -/** - * XEH_postInit.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -if (isnil QGVAR(EnableForAI)) then { - GVAR(EnableForAI) = false; -}; diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index 6e1bdbc379..f71ef251cd 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -1,16 +1,16 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_common", "ACE_weather"}; - versionDesc = "ACE Wind Deflection"; - version = VERSION; - author[] = {$STR_ACE_Core_ACETeam, "Glowbal", "Ruthberg"}; - authorUrl = "http://csemod.com"; - }; + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ACE_common", "ACE_weather"}; + versionDesc = "ACE Wind Deflection"; + version = VERSION; + author[] = {$STR_ACE_Core_ACETeam, "Glowbal", "Ruthberg"}; + authorUrl = "http://csemod.com"; + }; }; class CfgAddons { @@ -21,4 +21,11 @@ class CfgAddons { }; }; +class ACE_Settings { + class GVAR(EnableForAI) { + value = 0; + typeName = "BOOL"; + isClientSetable = 0; + }; +}; #include "CfgVehicles.h" \ No newline at end of file diff --git a/addons/winddeflection/functions/fnc_initalizeModule.sqf b/addons/winddeflection/functions/fnc_initalizeModule.sqf index 8bd2a2f1bc..2833ecc54c 100644 --- a/addons/winddeflection/functions/fnc_initalizeModule.sqf +++ b/addons/winddeflection/functions/fnc_initalizeModule.sqf @@ -15,5 +15,5 @@ if (!hasInterface) exitwith {}; // No need for this module on HC or dedicated se private ["_logic"]; _logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; if (!isNull _logic) then { - [_logic, QGVAR(EnableForAI), "forAI" ] call EFUNC(common,readSettingFromModule); + [_logic, QGVAR(EnableForAI), "EnableForAI" ] call EFUNC(common,readSettingFromModule); }; \ No newline at end of file