mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-17 13:42:57 +03:00
Disable TownGenerator and plant spawner by default
Junk and plant spawning is disabled by default. It can be enabled via dayz_townGenerator config variable and positions blacklist (for trader cities, etc.). The trader objects spawn code was consolidated to functions.
This commit is contained in:
@@ -62,6 +62,7 @@ _insideloop = {
|
||||
};
|
||||
|
||||
for "_i" from 1 to 2048 do {
|
||||
if (!dayz_townGenerator or {toLower worldName != "chernarus"}) exitWith {};
|
||||
_pos = _a call psrnd;
|
||||
_pos call _insideloop;
|
||||
if (_plantcount >= dayz_maxGlobalPlants) exitWith {};
|
||||
|
||||
25
SQF/dayz_code/compile/local_spawnTraderCities.sqf
Normal file
25
SQF/dayz_code/compile/local_spawnTraderCities.sqf
Normal file
@@ -0,0 +1,25 @@
|
||||
private ["_fires","_object","_type"];
|
||||
|
||||
_fires = [
|
||||
"Base_Fire_DZ",
|
||||
"flamable_DZ",
|
||||
"Land_Camp_Fire_DZ",
|
||||
"Land_Campfire",
|
||||
"Land_Campfire_burning",
|
||||
"Land_Fire",
|
||||
"Land_Fire_burning",
|
||||
"Land_Fire_DZ",
|
||||
"Land_Fire_barrel",
|
||||
"Land_Fire_barrel_burning",
|
||||
"Misc_TyreHeap"
|
||||
];
|
||||
|
||||
{
|
||||
_type = _x select 0;
|
||||
_object = _type createVehicleLocal (_x select 1);
|
||||
_object setDir (_x select 2);
|
||||
_object setPos (_x select 1);
|
||||
_object allowDamage false;
|
||||
if !(_type in _fires) then {_object enableSimulation false;};
|
||||
_object setVariable ["", true]; // stops global setVariable by sched_townGenerator
|
||||
} count _this;
|
||||
Reference in New Issue
Block a user