mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
rad zone blacklist obj and distance
This commit is contained in:
parent
b113bd5209
commit
431e10ee58
@ -259,6 +259,8 @@ missionNamespace setVariable ["EPOCH_taxRate", [_serverSettingsConfig, "taxRate"
|
||||
|
||||
// pick random radioactive locations
|
||||
_radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations");
|
||||
_blacklist = getArray(_epochConfig >> worldName >> "radioactiveLocBLObjects");
|
||||
_distance = getNumber(_epochConfig >> worldName >> "radioactiveLocBLDistance");
|
||||
_radioactiveLocationsTmp = [];
|
||||
if !(_radioactiveLocations isEqualTo []) then {
|
||||
private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea];
|
||||
@ -267,13 +269,16 @@ if !(_radioactiveLocations isEqualTo []) then {
|
||||
for "_i" from 0 to ((getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount"))-1) do
|
||||
{
|
||||
if (_locations isEqualTo []) exitWith {};
|
||||
private _selectedLoc = selectRandom _locations;
|
||||
_locations = _locations - [_selectedLoc];
|
||||
_locSize = size _selectedLoc;
|
||||
_radius = sqrt((_locSize select 0)^2 + (_locSize select 1)^2);
|
||||
_radioactiveLocationsTmp pushBack [_selectedLoc,[random 666,_radius]];
|
||||
private _position = locationPosition _selectedLoc;
|
||||
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
|
||||
_nearBLObj = nearestObjects [_position, _blacklist, _distance];
|
||||
if(_nearBLObj isEqualTo [])then{
|
||||
private _selectedLoc = selectRandom _locations;
|
||||
_locations = _locations - [_selectedLoc];
|
||||
_locSize = size _selectedLoc;
|
||||
_radius = sqrt((_locSize select 0)^2 + (_locSize select 1)^2);
|
||||
_radioactiveLocationsTmp pushBack [_selectedLoc,[random 666,_radius]];
|
||||
private _position = locationPosition _selectedLoc;
|
||||
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -63,6 +63,9 @@ class CfgEpoch
|
||||
};
|
||||
radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"};
|
||||
radioactiveLocationsCount = 3;
|
||||
// Block radioactive locations spawn
|
||||
radioactiveLocBLObjects = ["PlotPole_EPOCH"];
|
||||
radioactiveLocBLDistance = 500;
|
||||
traderBlds[] = {"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"};
|
||||
|
Loading…
Reference in New Issue
Block a user