mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 18:36:29 +03:00
Retire DZE_MissionLootTable variable
AFAIK there is no performance difference between configFile and missionConfigFile. Using missionConfigFile by default simplifies loot scripts and makes the extra config variable unnecessary. It's one less step for admins to customize their tables.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
To use DZE_MissionLootTable = true; copy this CfgLoot folder to your mission.
|
||||
To customize the loot tables copy this CfgLoot folder to your mission.
|
||||
|
||||
Then in description.ext add at the top:
|
||||
Then in description.ext replace this line:
|
||||
#include "\z\addons\dayz_code\Configs\CfgLoot\CfgLoot.hpp"
|
||||
with this:
|
||||
#include "CfgLoot\CfgLoot.hpp"
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ _vectorUp = vectorUp _this;
|
||||
if (Vector_Angle(Vector_UP,_vectorUp) > 20) exitWith { 0 };
|
||||
|
||||
_type = typeOf _this;
|
||||
_config = if (DZE_MissionLootTable) then {missionConfigFile >> "CfgLoot" >> "Buildings" >> _type} else {configFile >> "CfgLoot" >> "Buildings" >> _type};
|
||||
_config = missionConfigFile >> "CfgLoot" >> "Buildings" >> _type;
|
||||
|
||||
if (!isClass _config) exitWith {};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ if (count _this > 1) then {
|
||||
};
|
||||
|
||||
_type = typeOf _obj;
|
||||
_config = if (DZE_MissionLootTable) then {missionConfigFile >> "CfgLoot" >> "Buildings" >> _type} else {configFile >> "CfgLoot" >> "Buildings" >> _type};
|
||||
_config = missionConfigFile >> "CfgLoot" >> "Buildings" >> _type;
|
||||
_canLoot = isClass (_config);
|
||||
_originalPos = getPosATL _obj;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ if (_maxlocalspawned > 0) then { _spawnZedRadius = _spawnZedRadius * 3; };
|
||||
//Spawn Zeds & loot in buildings
|
||||
{
|
||||
_type = typeOf _x;
|
||||
_config = if (DZE_MissionLootTable) then {missionConfigFile >> "CfgLoot" >> "Buildings" >> _type} else {configFile >> "CfgLoot" >> "Buildings" >> _type};
|
||||
_config = missionConfigFile >> "CfgLoot" >> "Buildings" >> _type;
|
||||
_canSpawn = isClass (_config);
|
||||
|
||||
if (_canSpawn) then {
|
||||
|
||||
@@ -78,7 +78,7 @@ if ((_maxlocalspawned < _maxControlledZombies) && (dayz_CurrentNearByZombies < d
|
||||
if (_tooClose) exitwith { diag_log "Zombie_Generate: was too close to player."; };
|
||||
|
||||
if (count _unitTypes == 0) then {
|
||||
_unitTypes = if (DZE_MissionLootTable) then {getArray (missionConfigFile >> "CfgLoot" >> "Buildings" >> "Default" >> "zombieClass")} else {getArray (configFile >> "CfgLoot" >> "Buildings" >> "Default" >> "zombieClass")};
|
||||
_unitTypes = getArray (missionConfigFile >> "CfgLoot" >> "Buildings" >> "Default" >> "zombieClass");
|
||||
};
|
||||
|
||||
// lets create an agent
|
||||
|
||||
@@ -539,7 +539,6 @@ if (isNil "dayz_paraSpawn") then {dayz_paraSpawn = false;};
|
||||
if (isNil "DZE_BuildingLimit") then {DZE_BuildingLimit = 150;};
|
||||
if (isNil "DZE_BuildOnRoads") then {DZE_BuildOnRoads = false;};
|
||||
if (isNil "DZE_ConfigTrader") then {DZE_ConfigTrader = true;};
|
||||
if (isNil "DZE_MissionLootTable") then {DZE_MissionLootTable = false;};
|
||||
if (isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
|
||||
if (isNil "DZE_selfTransfuse_Values") then {DZE_selfTransfuse_Values = [12000,15,120];};
|
||||
if (isNil "DZE_PlotPole") then {DZE_PlotPole = [30,45];};
|
||||
@@ -587,7 +586,7 @@ if (isServer) then {
|
||||
|
||||
if (!isDedicated) then {
|
||||
dayz_buildingBubbleMonitor = [];
|
||||
dayz_baseTypes = if (DZE_MissionLootTable) then {getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass")} else {getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass")};
|
||||
dayz_baseTypes = getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
//temperature variables
|
||||
dayz_temperatur = 36; //TeeChange
|
||||
|
||||
@@ -54,7 +54,7 @@ dz_loot_groups = [];
|
||||
dz_loot_weighted = [];
|
||||
dz_loot_definitions = [];
|
||||
|
||||
_cfgGroups = if (DZE_MissionLootTable) then {missionConfigFile >> "CfgLoot" >> "Groups"} else {configFile >> "CfgLoot" >> "Groups"};
|
||||
_cfgGroups = missionConfigFile >> "CfgLoot" >> "Groups";
|
||||
|
||||
for "_i" from 0 to (count _cfgGroups) - 1 do
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ sched_buriedZeds = {
|
||||
//_a = _a + 1;
|
||||
_b = nearestBuilding _z;
|
||||
if (!isNull _b) then {
|
||||
_config = if (DZE_MissionLootTable) then {missionConfigFile >> "CfgLoot" >> "Buildings" >> (typeOf _b) >> "zedPos"} else {configFile >> "CfgLoot" >> "Buildings" >> (typeOf _b) >> "zedPos"};
|
||||
_config = missionConfigFile >> "CfgLoot" >> "Buildings" >> (typeOf _b) >> "zedPos";
|
||||
_zedPos = [] + getArray _config;
|
||||
if ((count _zedPos > 0) and {([_b, _pos] call _checkInsideBuilding)}) then {
|
||||
_elevation = (_b modelToWorld (_zedPos select 0)) select 2; // ATL
|
||||
|
||||
Reference in New Issue
Block a user