-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work on getting config override module in place
- Loading branch information
zeiktuvai
committed
Jan 9, 2025
1 parent
da9060b
commit 7cb0ff0
Showing
11 changed files
with
256 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//Returns empy array if no override; returns empty array for each type not overrided. | ||
params [["_side", 0, [0]]]; | ||
|
||
private _cfgMods = allMissionObjects "MSF_Module_ClassOverride"; | ||
private _modules = _cfgMods select {_x getVariable "Side" == _side}; | ||
private _return = []; | ||
|
||
if (count _modules > 0) then { | ||
private _mod = _modules select 0; | ||
private _errMessage = format ["Parsing MSF Class Override Module for side: %1", [_side] call BIS_fnc_sideType]; | ||
|
||
_return pushBack ([_mod, "Groups", _errMessage] call MSF_fnc_ParseValidArray); | ||
_return pushBack ([_mod, "Vehicles", _errMessage] call MSF_fnc_ParseValidArray); | ||
_return pushBack ([_mod, "ArmoredC", _errMessage] call MSF_fnc_ParseValidArray); | ||
_return pushBack ([_mod, "Air", _errMessage] call MSF_fnc_ParseValidArray); | ||
_return pushBack ([_mod, "Turrets", _errMessage] call MSF_fnc_ParseValidArray); | ||
_return pushBack ([_mod, "Units", _errMessage] call MSF_fnc_ParseValidArray); | ||
_return pushBack ([_mod, "VicPatrols", _errMessage] call MSF_fnc_ParseValidArray); | ||
}; | ||
|
||
_return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
params [["_object", objNull, [objNull]], ["_varName", "", [""]], ["_errDetail", "", [""]]]; | ||
|
||
try | ||
{ | ||
private _var = _object getVariable _varName; | ||
if (_var == "") exitWith {[]}; | ||
|
||
private _val = parseSimpleArray _var; | ||
if (count _val == 0) then { throw "Invalid Value" }; | ||
_val; | ||
} | ||
catch | ||
{ | ||
["Invalid array when parsing ""%1"" in ""%2"". Additional Details: ""%2"".", _varName, typeOf _object, _errDetail] call BIS_fnc_error; | ||
[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
class MSF_Module_ClassOverride : Module_F | ||
{ | ||
scope = 2; | ||
displayName = "Config - Override Classes"; | ||
icon = "z\msf\addons\main\ui\msf_icon.paa"; | ||
category = "MSF_Module"; | ||
function = ""; | ||
functionPriority = 1; | ||
isGlobal = 0; | ||
isTriggerActivated = 0; | ||
isDisposable = 1; | ||
is3DEN = 0; | ||
curatorCanAttach = 0; | ||
canSetArea = 0; | ||
canSetAreaShape = 0; | ||
canSetAreaHeight = 0; | ||
|
||
class AttributeValues | ||
{ | ||
size3[] = { 0, 0, -1 }; | ||
isRectangle = 0; | ||
}; | ||
|
||
class Attributes : AttributesBase | ||
{ | ||
class Side | ||
{ | ||
displayName = "Side"; | ||
tooltip = "Faction to override spawn classes."; | ||
control = "Combo"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
property = "MSF_Mod_CO_Side"; | ||
defaultValue = 0; | ||
typeName = "Number"; | ||
class Values | ||
{ | ||
class East | ||
{ | ||
name = "East"; | ||
tooltip = "OPFOR"; | ||
value = 0; | ||
}; | ||
class Independant | ||
{ | ||
name = "Independant"; | ||
tooltip = "Independant"; | ||
value = 2; | ||
}; | ||
class West | ||
{ | ||
name = "West"; | ||
tooltip = "BLUFOR"; | ||
value = 1; | ||
}; | ||
}; | ||
}; | ||
class Groups | ||
{ | ||
displayName = "Group Classes"; | ||
tooltip = "Array of group classes for spawning."; | ||
property = "MSF_Mod_CO_Groups"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class Vehicles | ||
{ | ||
displayName = "Vehicle Classes"; | ||
tooltip = "Array of vehicle classes for spawning."; | ||
property = "MSF_Mod_CO_Vehicle"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class ArmoredC | ||
{ | ||
displayName = "Aromored Classes"; | ||
tooltip = "Array of armor classes for spawning."; | ||
property = "MSF_Mod_CO_Armored"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class Turrets | ||
{ | ||
displayName = "Turret Classes"; | ||
tooltip = "Array of turret classes for spawning."; | ||
property = "MSF_Mod_CO_Turret"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class Air | ||
{ | ||
displayName = "Air Classes"; | ||
tooltip = "Array of air classes for spawning."; | ||
property = "MSF_Mod_CO_Air"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class Units | ||
{ | ||
displayName = "Unit Classes"; | ||
tooltip = "Array of individual unit classes for spawning."; | ||
property = "MSF_Mod_CO_Units"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class VicPatrols | ||
{ | ||
displayName = "Patrol Vehicle Classes"; | ||
tooltip = "Array of individual vehicle classes for spawning in vehicle patrols."; | ||
property = "MSF_Mod_CO_VicPatrols"; | ||
control = "EditCodeMulti3"; | ||
expression = "_this setVariable ['%s',_value];"; | ||
defaultValue = "''"; | ||
}; | ||
class ModuleDescription : ModuleDescription {}; | ||
}; | ||
|
||
class ModuleDescription : ModuleDescription | ||
{ | ||
description = "Use this module to override the classes MSF uses to spawn units. One of this module per side can be used."; | ||
sync[] = { "LocationArea_F" }; | ||
|
||
class LocationArea_F | ||
{ | ||
description[] = {}; | ||
position = 0; | ||
direction = 0; | ||
optional = 0; | ||
duplicate = 0; | ||
synced[] = { }; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#define MAJOR 2 | ||
#define MINOR 5 | ||
#define PATCH 2 | ||
#define BUILD 840 | ||
#define BUILD 854 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters