-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* do not completely reset civ layout if uniform & headgear are set * but remove watch in 50%, map in 95% and compass in 99% of all cases * uniform and headgear are now settable independently * fix loadout setter functions NOTE: had to add a delay when setting face. no idea why.
- Loading branch information
1 parent
d16d261
commit 9674f73
Showing
10 changed files
with
104 additions
and
40 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PREP(applyRandomConfigArrayValue); | ||
PREP(civAddLoadout); | ||
PREP(initConfig); | ||
PREP(setBackpacks); | ||
|
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
30 changes: 30 additions & 0 deletions
30
addons/loadout/functions/fnc_applyRandomConfigArrayValue.sqf
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,30 @@ | ||
#include "..\script_component.hpp" | ||
|
||
params [ | ||
["_configVarname", "", [""]], | ||
["_args", objNull, [objNull, [], 0, "", false]], | ||
["_callback", {}, [{}]] | ||
]; | ||
|
||
scopeName "main"; | ||
private _rawValue = [_configVarname] call cba_settings_fnc_get; | ||
private _arrValue = []; | ||
switch (typeName _rawValue) do { | ||
case ("STRING"): { | ||
if (_rawValue == "") then { | ||
breakOut "main"; | ||
}; | ||
_arrValue = parseSimpleArray _rawValue; | ||
}; | ||
case ("ARRAY"): { | ||
_arrValue = _rawValue; | ||
}; | ||
default { | ||
ERROR_2("unexpected type %1 for config %2", typeName _rawValue, _configVarname); | ||
breakOut "main"; | ||
}; | ||
}; | ||
|
||
if (count _arrValue == 0) exitWith {}; | ||
|
||
[_args, (selectRandom _arrValue)] call _callback |
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
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