rad zone blacklist obj and distance

This commit is contained in:
DESKTOP-UH65DCE\MusTanG 2017-10-22 18:55:12 -05:00
parent b113bd5209
commit 431e10ee58
2 changed files with 15 additions and 7 deletions

View File

@ -259,6 +259,8 @@ missionNamespace setVariable ["EPOCH_taxRate", [_serverSettingsConfig, "taxRate"
// pick random radioactive locations // pick random radioactive locations
_radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations"); _radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations");
_blacklist = getArray(_epochConfig >> worldName >> "radioactiveLocBLObjects");
_distance = getNumber(_epochConfig >> worldName >> "radioactiveLocBLDistance");
_radioactiveLocationsTmp = []; _radioactiveLocationsTmp = [];
if !(_radioactiveLocations isEqualTo []) then { if !(_radioactiveLocations isEqualTo []) then {
private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea]; private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea];
@ -267,6 +269,8 @@ if !(_radioactiveLocations isEqualTo []) then {
for "_i" from 0 to ((getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount"))-1) do for "_i" from 0 to ((getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount"))-1) do
{ {
if (_locations isEqualTo []) exitWith {}; if (_locations isEqualTo []) exitWith {};
_nearBLObj = nearestObjects [_position, _blacklist, _distance];
if(_nearBLObj isEqualTo [])then{
private _selectedLoc = selectRandom _locations; private _selectedLoc = selectRandom _locations;
_locations = _locations - [_selectedLoc]; _locations = _locations - [_selectedLoc];
_locSize = size _selectedLoc; _locSize = size _selectedLoc;
@ -276,6 +280,7 @@ if !(_radioactiveLocations isEqualTo []) then {
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet; _markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
}; };
}; };
};
}; };
missionNamespace setVariable ["EPOCH_radioactiveLocations", _radioactiveLocationsTmp, true]; missionNamespace setVariable ["EPOCH_radioactiveLocations", _radioactiveLocationsTmp, true];

View File

@ -63,6 +63,9 @@ class CfgEpoch
}; };
radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"};
radioactiveLocationsCount = 3; radioactiveLocationsCount = 3;
// Block radioactive locations spawn
radioactiveLocBLObjects = ["PlotPole_EPOCH"];
radioactiveLocBLDistance = 500;
traderBlds[] = {"House", "Building"}; traderBlds[] = {"House", "Building"};
traderHomes[] = {"House", "Building"}; traderHomes[] = {"House", "Building"};
traderUniforms[] = {"U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue", "U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody"}; traderUniforms[] = {"U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue", "U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody"};