Config to disable fuelsources in PlotRange

This commit is contained in:
He-Man 2018-04-08 01:02:54 +02:00
parent 39098fc579
commit 8796a2de89
2 changed files with 17 additions and 5 deletions

View File

@ -65,7 +65,8 @@ forceRestartTime = 14400; // 4 hour restarts
// vehicles - Max vehicle slots is calculated from per vehicle limits below. Warning! Higher the number lower the performance.
immuneIfStartInBase = "true"; // Protect vehicles from damage in bases until first unlocked after restart
ReservedVehSlots = 50; // Reserved Vehicle Slots (only needed, if you manually spawn in additional Vehicles - AdminTool / Blackmarket...)
disableAutoRefuel = "true"; // Removes auto refuel from all buildings at server startup.
disableAutoRefuel = "false"; // Removes auto refuel from all buildings at server startup.
disableFuelNearPlots = "false"; // Removes auto refuel in PlotPole-Ranges at server startup.
VehLockMessages = "true"; // Give players a hint, that the Vehicle is locked / unlocked
removevehweapons[] = { // remove these Weapons from spawned Vehicles
"missiles_DAR","gatling_30mm","gatling_20mm","missiles_DAGR","cannon_30mm_Plane_CAS_02_F","Missile_AA_03_Plane_CAS_02_F","Missile_AGM_01_Plane_CAS_02_F","Rocket_03_HE_Plane_CAS_02_F",

View File

@ -273,14 +273,25 @@ _servicepoints = getArray (_config >> worldname >> 'ServicePoints');
} forEach _ServicePoints;
// Remove Auto-Refuel from all maps
if ([_serverSettingsConfig, "disableAutoRefuel", true] call EPOCH_fnc_returnConfigEntry) then {
if ([_serverSettingsConfig, "disableAutoRefuel", false] call EPOCH_fnc_returnConfigEntry) then {
// get all fuel source objects on the map (Note: this maybe slow consider refactor with another command)
_staticFuelSources = ((epoch_centerMarkerPosition nearObjects ['Building',EPOCH_dynamicVehicleArea]) select {getFuelCargo _x > 0});
// globalize all fuel sources
missionNamespace setVariable ["EPOCH_staticFuelSources", _staticFuelSources, true];
// disable fuel sources server side. (Note: might not be needed since we also need to do this client side)
{_x setFuelCargo 0;} foreach _staticFuelSources;
}
else {
// Remove Auto-Refuel in PlotPole-Range
if ([_serverSettingsConfig, "disableFuelNearPlots", true] call EPOCH_fnc_returnConfigEntry) then {
_buildingJammerRange = ["CfgEpochClient", "buildingJammerRange", 75] call EPOCH_fnc_returnConfigEntryV2;
_staticFuelSources = [];
{
{
_staticFuelSources pushback _x;
} foreach (((_x nearObjects ['Building',_buildingJammerRange]) select {getFuelCargo _x > 0}));
} foreach (allmissionobjects "Plotpole_EPOCH");
missionNamespace setVariable ["EPOCH_staticFuelSources", _staticFuelSources, true];
};
};
// set time multiplier