mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
Consolidate ItemKeyXXX/Colors to arrays.
Tidies up scripts inside epoch and for script creators. Moved z_at_buyItems to epoch_generateKey.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
private ["_isKeyOK","_keyColor","_keyNumber","_keySelected"];
|
||||
|
||||
// First select key color
|
||||
_keyColor = ["Green","Red","Blue","Yellow","Black"] call BIS_fnc_selectRandom;
|
||||
_keyColor = DZE_keyColors call BIS_fnc_selectRandom;
|
||||
|
||||
// then select number from 1 - 2500
|
||||
_keyNumber = (floor(random 2500)) + 1;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Returns array: [["11148","1457"],["Black Key (2eb5)","Green Key (9c30)"],["ItemKeyBlack1148","ItemKeyGreen1457"]]
|
||||
*/
|
||||
|
||||
private ["_temp_keys","_temp_keys_names","_key_colors","_ownerKeyId","_ownerKeyName","_items","_temp_keys_class"];
|
||||
private ["_temp_keys","_temp_keys_names","_ownerKeyId","_ownerKeyName","_items","_temp_keys_class"];
|
||||
|
||||
_temp_keys = [];
|
||||
_temp_keys_names = [];
|
||||
@@ -16,10 +16,8 @@ if (!isNull dayz_myBackpack) then {
|
||||
_items = _items + ((getWeaponCargo dayz_myBackpack) select 0);
|
||||
};
|
||||
|
||||
_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
|
||||
|
||||
{
|
||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then {
|
||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in DZE_itemKeys) then {
|
||||
_ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid");
|
||||
_ownerKeyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
|
||||
_temp_keys_names set [count _temp_keys_names,_ownerKeyName];
|
||||
|
||||
Reference in New Issue
Block a user