diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 4fc122c4..8af29a83 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -125,6 +125,7 @@ _energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfi _energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2; _energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2; _hudConfigs = ["CfgEpochClient", "hudConfigs", []] call EPOCH_fnc_returnConfigEntryV2; +_radioactiveLocations = ["CfgEpochClient", "radioactiveLocations", ["NameCityCapital", "NameCity", "Airport"]] call EPOCH_fnc_returnConfigEntryV2; _chargeRate = 0; EPOCH_playerIsSwimming = false; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index d2268457..cb897f4c 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -20,6 +20,8 @@ class CfgEpochClient antagonistRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 outOfBoundsRadiation = 10; // how much rads per tick (10sec), when outside play area. + radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; // used for random radioactive locations and to suppress animal spawns within cities. + baseHungerLoss = 2; // increase number to speed up rate of Hunger loss baseThirstLoss = 2; // increase number to speed up rate of Thirst loss diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index b9e17f72..a6f44239 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -276,6 +276,28 @@ setTimeMultiplier ([_serverSettingsConfig, "timeMultiplier", 1] call EPOCH_fnc_r // globalize tax rate missionNamespace setVariable ["EPOCH_taxRate", [_serverSettingsConfig, "taxRate", 0.1] call EPOCH_fnc_returnConfigEntry, true]; +// pick random radioactive locations +_radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations"); +if !(_radioactiveLocations isEqualTo []) then { + private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea]; + if !(_locations isEqualTo []) then { + for "_i" from 0 to (getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount")) do + { + if (_locations isEqualTo []) exitWith {}; + private _selectedLoc = selectRandom _locations; + _locations = _locations - [_selectedLoc]; + _selectedLoc setVariable ["EPOCH_Rads", random 666, true]; + private _position = locationPosition _selectedLoc; + _marker = name _selectedLoc; + _marker = createMarker[_marker, _position]; + _marker setMarkerShape "ICON"; + _marker setMarkerType "hd_warning"; + _marker setMarkerColor "ColorRed"; + // _marker setMarkerText "Radioactive"; + }; + }; +}; + // start accepting logins missionNamespace setVariable ["EPOCH_SERVER_READY", true, true]; diff --git a/Sources/epoch_server_settings/config.cpp b/Sources/epoch_server_settings/config.cpp index fcaf4a8f..547bde47 100644 --- a/Sources/epoch_server_settings/config.cpp +++ b/Sources/epoch_server_settings/config.cpp @@ -61,6 +61,8 @@ class CfgEpoch {"NameCityCapital",4}, {"Airport",5} }; + radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; + radioactiveLocationsCount = 3; 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"}; diff --git a/Sources/epoch_server_settings/configs/maps/vr.h b/Sources/epoch_server_settings/configs/maps/vr.h index 26597efe..9681d02b 100644 --- a/Sources/epoch_server_settings/configs/maps/vr.h +++ b/Sources/epoch_server_settings/configs/maps/vr.h @@ -17,6 +17,8 @@ class VR : Default worldSize = 10000; plantLimit = 0; vehicleSpawnTypes[] = {}; + radioactiveLocations[] = {}; + radioactiveLocationsCount = 0; allowedVehiclesList[] = {}; traderBlds[] = { "Land_Kiosk_blueking_F", "Land_FuelStation_Build_F", "Land_CarService_F", "Land_i_Garage_V1_F", "Land_i_Shed_Ind_F", "Land_i_Shop_01_V1_F" }; containerPos[] = {};