Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Module Filter #372

Merged
merged 10 commits into from
Sep 26, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,14 @@

params [["_tree_ctrl", controlNull, [controlNull]]];

private _display_reload = false;

// broadcast safe spawn
publicVariable "Achilles_fnc_spawn";
publicVariable "Achilles_fnc_spawn_remote";

// trick to unlock ares/achilles modules for Zeus if mission was not set up properly
if (!("achilles_modules_f_achilles" in (curatorAddons getAssignedCuratorLogic player))) then
{
private _logic = (createGroup sideLogic) createUnit ["Achilles_Module_Base", [0,0,0], [], 0, "NONE"];
_logic = (createGroup sideLogic) createUnit ["Ares_Module_Base", [0,0,0], [], 0, "NONE"];

// wait until zeus has truly entered the interface
waitUntil {sleep 1; !isNull (findDisplay 312)};

// Wait until Zeus modules are avaiable (e.g. respawns have to be placed before)
if (count allMissionObjects "ModuleMPTypeGameMaster_F" > 0) then
{
waitUntil {sleep 1; missionnamespace getvariable ["BIS_moduleMPTypeGameMaster_init", false]};
};

[[getAssignedCuratorLogic player],
{
private _curatorModule = _this select 0;
_curatorModule addCuratorAddons ["achilles_modules_f_achilles","achilles_modules_f_ares"];
}, 2] call Achilles_fnc_spawn;

// reload interface
waitUntil {sleep 1; "achilles_modules_f_achilles" in (curatorAddons getAssignedCuratorLogic player)};
cutText ["","BLACK OUT", 0.1,true];
uiSleep 0.1;
(findDisplay 312) closeDisplay 0;
uiSleep 0.1;
openCuratorInterface;
cutText ["","BLACK IN", 0.1, true];
_display_reload = true;
};

//prevent drawing mines
if (!(missionnamespace getvariable ["bis_fnc_drawMinefields_active",false])) then
{
missionnamespace setvariable ["bis_fnc_drawMinefields_active",true,true];
missionnamespace setvariable ["bis_fnc_drawMinefields_active", true, true];
};

// Initialize settings variables
Expand Down Expand Up @@ -101,5 +67,3 @@ _curatorModule setVariable ["BIS_fnc_curatorAttributesobject",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributesgroup",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributeswaypoint",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributesmarker",["%ALL"]];

_display_reload;
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ if (!_replacedExistingEntry) then

// Add module to module tree
private _ctrl = _display displayCtrl IDC_RSCDISPLAYCURATOR_CREATE_MODULES;
private _category_list = [_ctrl,Ares_category_list,_categoryName,_moduleDisplayName,_moduleClassName,_index] call Achilles_fnc_AppendToModuleTree;
private _categoryList = missionNamespace getVariable ["Ares_category_list", []];
_categoryList = [_ctrl, _categoryList, _categoryName, _moduleDisplayName, _moduleClassName] call Achilles_fnc_appendToModuleTree;

//Sort category and module list
_ctrl tvSort [[], false];
for "_i" from 0 to ((_ctrl tvCount []) - 1) do {_ctrl tvSort [[_i], false];};

//get module list
_category_list sort true;
Ares_category_list = _category_list;
_categoryList sort true;
Ares_category_list = _categoryList;
};
6 changes: 6 additions & 0 deletions @AresModAchillesExpansion/addons/language_f/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6339,6 +6339,12 @@
</Key>
</Container>
<Container name="Settings">
<Key ID="STR_AMAE_AVAILABLE_MODULES">
<Original>Achilles - Available Modules</Original>
<English>Achilles - Available Modules</English>
<French>Achilles - Modules disponibles</French>
<German>Achilles - Verfügbare Module</German>
</Key>
<Key ID="STR_AMAE_AVAILABLE_FACTIONS">
<Original>Achilles - Available Factions</Original>
<English>Achilles - Available Factions</English>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ class Achilles_ACE_Module_Base : Achilles_Module_Base

class Achilles_ACE_Injury_Module : Achilles_ACE_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_ACE_Injury_Module";
displayName = "$STR_AMAE_INJURY";
function = "Achilles_fnc_ModuleACEInjury";
};

class Achilles_ACE_Heal_Module : Achilles_ACE_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_ACE_Heal_Module";
displayName = "$STR_AMAE_HEAL";
function = "Achilles_fnc_ModuleACEHeal";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ class Achilles_Arsenal_Module_Base : Achilles_Module_Base

class Achilles_Module_Arsenal_AddFull : Achilles_Arsenal_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_ADD_FULL";
function = "Achilles_fnc_ArsenalAddFull";
};

class Achilles_Module_Arsenal_CreateCustom : Achilles_Arsenal_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_ARSENAL_CREATE_CUSTOM";
function = "Achilles_fnc_ArsenalCreateCustom";
icon = "\achilles\data_f_ares\icons\icon_default.paa";
Expand All @@ -23,7 +23,7 @@ class Achilles_Module_Arsenal_CreateCustom : Achilles_Arsenal_Module_Base

class Achilles_Module_Arsenal_CopyToClipboard : Achilles_Arsenal_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_COPY_TO_CLIPBOARD";
function = "Achilles_fnc_ArsenalCopyToClipboard";
icon = "\achilles\data_f_achilles\icons\icon_object.paa";
Expand All @@ -32,7 +32,7 @@ class Achilles_Module_Arsenal_CopyToClipboard : Achilles_Arsenal_Module_Base

class Achilles_Module_Arsenal_Paste : Achilles_Arsenal_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_ARSENAL_PASTE";
function = "Achilles_fnc_ArsenalPaste";
icon = "\achilles\data_f_achilles\icons\icon_object.paa";
Expand All @@ -41,7 +41,7 @@ class Achilles_Module_Arsenal_Paste : Achilles_Arsenal_Module_Base

class Achilles_Module_Arsenal_Remove : Achilles_Arsenal_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_ARSENAL_REMOVE";
function = "Achilles_fnc_ArsenalRemove";
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Enyo_Behaviours_Module_Base : Enyo_Module_Base

class Achilles_Animation_Module : Achilles_Behaviours_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
curatorCanAttach = 1;
_generalMacro = "Achilles_Animation_Module";
displayName = "$STR_AMAE_AMBIENT_ANIMATION";
Expand All @@ -24,7 +24,7 @@ class Achilles_Animation_Module : Achilles_Behaviours_Module_Base

class Achilles_Chatter_Module : Achilles_Behaviours_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
curatorCanAttach = 1;
_generalMacro = "Achilles_Chatter_Module";
displayName = "$STR_AMAE_CHATTER";
Expand All @@ -33,7 +33,7 @@ class Achilles_Chatter_Module : Achilles_Behaviours_Module_Base

class Achilles_Sit_On_Chair_Module : Achilles_Behaviours_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
curatorCanAttach = 1;
_generalMacro = "Achilles_Sit_On_Chair_Module";
displayName = "$STR_AMAE_SIT_ON_CHAIR";
Expand All @@ -44,7 +44,7 @@ class Achilles_Sit_On_Chair_Module : Achilles_Behaviours_Module_Base

class Achilles_Change_Ability_Module : Achilles_Behaviours_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
curatorCanAttach = 1;
_generalMacro = "Achilles_Change_Ability_Module";
displayName = "$STR_AMAE_CHANGE_ABILITIES";
Expand All @@ -53,7 +53,7 @@ class Achilles_Change_Ability_Module : Achilles_Behaviours_Module_Base

class Achilles_Change_Altitude_Module : Achilles_Behaviours_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
curatorCanAttach = 1;
_generalMacro = "Achilles_Change_Altitude_Module";
displayName = "$STR_AMAE_CHANGE_ALTITUDE";
Expand All @@ -62,7 +62,7 @@ class Achilles_Change_Altitude_Module : Achilles_Behaviours_Module_Base

class Achilles_SuicideBomber_Module : Enyo_Behaviours_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
curatorCanAttach = 1;
_generalMacro = "Enyo_SuicideBomber_Module";
displayName = "$STR_AMAE_ENYO_SET_SUICIDE_BOMBER";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ class Achilles_Buildings_Module_Base : Achilles_Module_Base

class Achilles_Buildings_Destroy_Module : Achilles_Buildings_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Buildings_Destroy_Module";
displayName = "$STR_AMAE_DAMAGE_BUILDINGS";
function = "Achilles_fnc_BuildingsDestroy";
};

class Achilles_Buildings_LockDoors_Module : Achilles_Buildings_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Buildings_LockDoors_Module";
displayName = "$STR_AMAE_LOCK_DOORS";
function = "Achilles_fnc_LockDoors";
Expand All @@ -28,7 +28,7 @@ class Achilles_Buildings_LockDoors_Module : Achilles_Buildings_Module_Base

class Achilles_Buildings_ToggleLight_Module : Achilles_Buildings_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Buildings_ToggleLight_Module";
displayName = "$STR_AMAE_TOGGLE_LAMPS";
function = "Achilles_fnc_ToggleLamps";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Achilles_Dev_Tools_Module_Base : Achilles_Module_Base

class Achilles_Bind_Variable_Module : Achilles_Dev_Tools_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Bind_Variable_Module";
displayName = "$STR_AMAE_BIND_VAR";
function = "Achilles_fnc_DevToolsBindVariable";
Expand All @@ -16,14 +16,14 @@ class Achilles_Bind_Variable_Module : Achilles_Dev_Tools_Module_Base

class Achilles_Module_Manage_Advanced_Compositions : Achilles_Dev_Tools_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_ADVANCED_COMPOSITION";
function = "Achilles_fnc_DevTools_manageAdvancedCompositions";
};

class Achilles_DevTools_ShowInAnimViewer : Achilles_Dev_Tools_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_DevTools_ShowInAnimViewer";
displayName = "$STR_AMAE_SHOW_IN_ANIM_VIEWER";
function = "Achilles_fnc_DevToolsShowInAnimViewer";
Expand All @@ -33,7 +33,7 @@ class Achilles_DevTools_ShowInAnimViewer : Achilles_Dev_Tools_Module_Base

class Achilles_DevTools_ShowInConfig : Achilles_Dev_Tools_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_DevTools_ShowInConfig";
displayName = "$STR_AMAE_SHOW_IN_CONFIG";
function = "Achilles_fnc_DevToolsShowInConfig";
Expand All @@ -43,7 +43,7 @@ class Achilles_DevTools_ShowInConfig : Achilles_Dev_Tools_Module_Base

class Achilles_DevTools_FunctionViewer : Achilles_Dev_Tools_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_DevTools_ShowInConfig";
displayName = "$STR_AMAE_FUNCTION_VIEWER";
function = "Achilles_fnc_DevToolsFunctionViewer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Achilles_Environment_Module_Base : Achilles_Module_Base

class Achilles_Set_Weather_Module : Achilles_Environment_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Set_Weather_Module";
displayName = "$STR_AMAE_ADVANCED_WEATHER_CHANGE";
function = "Achilles_fnc_EnvironmentSetWeatherModule";
Expand All @@ -16,7 +16,7 @@ class Achilles_Set_Weather_Module : Achilles_Environment_Module_Base

class Achilles_Set_Date_Module : Achilles_Environment_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Set_Date_Module";
displayName = "$STR_AMAE_SET_DATE";
function = "Achilles_fnc_EnvironmentSetDate";
Expand All @@ -26,7 +26,7 @@ class Achilles_Set_Date_Module : Achilles_Environment_Module_Base

class Achilles_Earthquake_Module : Achilles_Environment_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Earthquake_Module";
displayName = "$STR_AMAE_EARTHQUAKE";
function = "Achilles_fnc_EnvironmentEarthquake";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Achilles_Equipment_Module_Base : Achilles_Module_Base

class Achilles_Module_Equipment_Attach_Dettach_Effect : Achilles_Equipment_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_ATTACH_DETACH_EFFECT";
function = "Achilles_fnc_attachDetachEffect";
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Achilles_FireSupport_ModuleBase : Achilles_Module_Base

class Achilles_Suppressive_Fire_Module : Achilles_FireSupport_ModuleBase
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Suppressive_Fire_Module";
displayName = "$STR_AMAE_SUPPRESIVE_FIRE";
function = "Achilles_fnc_ModuleFireSupportSuppressiveFire";
Expand All @@ -17,7 +17,7 @@ class Achilles_Suppressive_Fire_Module : Achilles_FireSupport_ModuleBase

class Achilles_CAS_Module : Achilles_FireSupport_ModuleBase
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_CAS_Module";
displayName = "$STR_AMAE_ADVANCED_CAS";
function = "Achilles_fnc_ModuleFireSupportCAS";
Expand All @@ -28,7 +28,7 @@ class Achilles_CAS_Module : Achilles_FireSupport_ModuleBase

class Achilles_Create_Universal_Target_Module : Achilles_FireSupport_ModuleBase
{
scopeCurator = 2;
scopeCurator = 1;
_generalMacro = "Achilles_Create_Universal_Target_Module";
displayName = "$STR_AMAE_CREATE_TARGET";
function = "Achilles_fnc_ModuleFireSupportCreateUniversalTarget";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Achilles_Mission_Flow_Module_Base : Achilles_Module_Base

class Achilles_Module_Spawn_Intel : Achilles_Mission_Flow_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_CREATE_EDIT_INTEL";
function = "Achilles_fnc_SpawnCreateEditIntel";
icon = "\achilles\data_f_achilles\icons\icon_default_object.paa";
Expand All @@ -15,7 +15,7 @@ class Achilles_Module_Spawn_Intel : Achilles_Mission_Flow_Module_Base

class Achilles_Module_Change_Side_Relations : Achilles_Mission_Flow_Module_Base
{
scopeCurator = 2;
scopeCurator = 1;
displayName = "$STR_AMAE_CHANGE_SIDE_RELATIONS";
function = "Achilles_fnc_changeSideRelations";
icon = "\achilles\data_f_ares\icons\icon_default.paa";
Expand Down
Loading