mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
more DZE_MissionLootTable fixes #1028
This commit is contained in:
@@ -7,7 +7,13 @@ _obj = _this select 0;
|
||||
_type = toLower(typeOf _obj);
|
||||
|
||||
//diag_log format["Spawning loot for: %1", _type];
|
||||
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _type;
|
||||
};
|
||||
|
||||
_positions = [] + getArray (_config >> "lootPos");
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_lootChance = getNumber (_config >> "lootChance");
|
||||
|
||||
@@ -8,6 +8,9 @@ if (dayz_spawnZombies > dayz_maxLocalZombies) exitwith {};
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _type;
|
||||
};
|
||||
_canLoot = isClass (_config);
|
||||
|
||||
if (_canLoot) then {
|
||||
|
||||
@@ -98,6 +98,9 @@ if (_nearbyCount < 1) exitwith
|
||||
{
|
||||
_type = typeOf _x;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _type;
|
||||
};
|
||||
_canLoot = isClass (_config);
|
||||
|
||||
if(_canLoot) then {
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
private ["_position","_doLoiter","_unitTypes","_loot","_array","_agent","_type","_radius","_method","_myDest","_newDest","_lootType","_player","_isAlive","_rnd","_id"];
|
||||
_player = _this select 0;
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
_unitTypes = [];
|
||||
if (DZE_MissionLootTable) then {
|
||||
_unitTypes = []+ getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
} else {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
_doLoiter = true;
|
||||
|
||||
_loot = "";
|
||||
|
||||
@@ -16,7 +16,12 @@ _agent = objNull;
|
||||
if (!_isNoone) exitWith {};
|
||||
|
||||
if (count _unitTypes == 0) then {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
if (DZE_MissionLootTable) then {
|
||||
_unitTypes = []+ getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
} else {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
};
|
||||
|
||||
_type = _unitTypes call BIS_fnc_selectRandom;
|
||||
|
||||
@@ -110,8 +110,16 @@ for "_i" from 0 to ((count (_config)) - 1) do {
|
||||
private["_i","_type","_config","_canZombie","_canLoot"];
|
||||
dayz_ZombieBuildings = [];
|
||||
dayz_LootBuildings = [];
|
||||
for "_i" from 0 to (count (configFile >> "CfgBuildingLoot") - 1) do {
|
||||
_type = (configFile >> "CfgBuildingLoot") select _i;
|
||||
|
||||
_config = [];
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot";
|
||||
} else {
|
||||
_config = configFile >> "CfgBuildingLoot";
|
||||
};
|
||||
|
||||
for "_i" from 0 to (count (_config) - 1) do {
|
||||
_type = _config select _i;
|
||||
_canZombie = getNumber (_type >> "zombieChance") > 0;
|
||||
_canLoot = getNumber (_type >> "lootChance") > 0;
|
||||
if(_canZombie) then {
|
||||
|
||||
@@ -593,7 +593,12 @@ if(!isDedicated) then {
|
||||
zeroPreviousWeather = [0,0,[0,0],0];
|
||||
zeroCurrentWeather = [0,0,[0,0],0];
|
||||
|
||||
dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
if (DZE_MissionLootTable) then {
|
||||
dayz_baseTypes = getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
} else {
|
||||
dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
|
||||
|
||||
//temperature variables
|
||||
dayz_temperatur = 36; //TeeChange
|
||||
|
||||
@@ -96,9 +96,11 @@ while {true} do {
|
||||
_crash setvariable ["fadeFire",_fadeFire,true];
|
||||
};
|
||||
|
||||
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> _lootTable;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _lootTable;
|
||||
};
|
||||
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_index = dayz_CBLBase find toLower(_lootTable);
|
||||
_weights = dayz_CBLChances select _index;
|
||||
|
||||
@@ -223,10 +223,19 @@ RoadList = MarkerPosition nearRoads DynamicVehicleArea;
|
||||
// Very taxing !!! but only on first startup
|
||||
BuildingList = [];
|
||||
{
|
||||
if (isClass (configFile >> "CfgBuildingLoot" >> (typeOf _x))) then
|
||||
{
|
||||
BuildingList set [count BuildingList,_x];
|
||||
if (DZE_MissionLootTable) then {
|
||||
if (isClass (missionConfigFile >> "CfgBuildingLoot" >> (typeOf _x))) then
|
||||
{
|
||||
BuildingList set [count BuildingList,_x];
|
||||
};
|
||||
} else {
|
||||
if (isClass (configFile >> "CfgBuildingLoot" >> (typeOf _x))) then
|
||||
{
|
||||
BuildingList set [count BuildingList,_x];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
} forEach (MarkerPosition nearObjects ["building",DynamicVehicleArea]);
|
||||
|
||||
spawn_vehicles = {
|
||||
|
||||
@@ -75,6 +75,9 @@ if (_spawnRoll <= _spawnChance) then {
|
||||
};
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> _lootTable;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _lootTable;;
|
||||
};
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_index = dayz_CBLBase find toLower(_lootTable);
|
||||
_weights = dayz_CBLChances select _index;
|
||||
|
||||
@@ -41,6 +41,9 @@ if (_spawnRoll <= _spawnChance) then {
|
||||
_num = (round(random _randomizedLoot)) + _guaranteedLoot;
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> _lootTable;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _lootTable;;
|
||||
};
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_index = dayz_CBLBase find toLower(_lootTable);
|
||||
_weights = dayz_CBLChances select _index;
|
||||
|
||||
Reference in New Issue
Block a user