mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
configize isBuildAllowed
This commit is contained in:
parent
dd54f07534
commit
1688486cd1
@ -165,10 +165,9 @@ if !(_buildingAllowed)exitWith{ false };
|
||||
if (getNumber(_config >> "buildingNearbyMilitary") == 0) then{
|
||||
_range = getNumber(_config >> "buildingNearbyMilitaryRange");
|
||||
if (_range > 0) then {
|
||||
_restricted = nearestObjects [player, ["ProtectionZone_Invisible_F","Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], 300];
|
||||
} else {
|
||||
_restricted = nearestObjects [player, ["Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], _range];
|
||||
_restricted append (nearestObjects [player, ["ProtectionZone_Invisible_F","Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], 300]);
|
||||
_restrictedArray = ["ProtectionZone_Invisible_F"];
|
||||
_restrictedArray append getArray(_config >> "buildingNearbyMilitaryClasses");
|
||||
_restricted = nearestObjects [player, _restrictedArray, _range];
|
||||
};
|
||||
} else {
|
||||
_restricted = nearestObjects [player, ["ProtectionZone_Invisible_F"], 300];
|
||||
@ -178,10 +177,14 @@ if !(_restricted isEqualTo []) then {
|
||||
["Building Disallowed: Area Blocked", 5] call Epoch_message;
|
||||
};
|
||||
|
||||
_restrictedLocations = nearestLocations [player, ["NameCityCapital"], 300];
|
||||
if !(_restrictedLocations isEqualTo []) then {
|
||||
_buildingAllowed = false;
|
||||
["Building Disallowed: Area Blocked", 5] call Epoch_message;
|
||||
_restrictedLocationsArray = getArray(_config >> "restrictedLocations");
|
||||
_restrictedLocationsRange = getNumber(_config >> "restrictedLocationsRange");
|
||||
if !(_restrictedLocationsArray isEqualTo []) then {
|
||||
_restrictedLocations = nearestLocations [player, _restrictedLocationsArray, _restrictedLocationsRange];
|
||||
if !(_restrictedLocations isEqualTo []) then {
|
||||
_buildingAllowed = false;
|
||||
["Building Disallowed: Area Blocked", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
||||
_myPosATL = getPosATL player;
|
||||
|
@ -18,6 +18,9 @@ class CfgEpochClient
|
||||
droneRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = // 2% chance (+ 4% chance if in city) (1% - 2% Half if using silencer) to spawn drone if shot fired
|
||||
buildingNearbyMilitary = 0; //1 to allow building nearby
|
||||
buildingNearbyMilitaryRange = 300; //Define radius of blocked area
|
||||
buildingNearbyMilitaryClasses[] = {"Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"};
|
||||
restrictedLocations[] = {"NameCityCapital"};
|
||||
restrictedLocationsRange = 300;
|
||||
buildingRequireJammer = 0; // 1 = to allow building without a jammer
|
||||
buildingCountLimit = 200; // how many objects can be built within range of a jammer
|
||||
buildingJammerRange = 75; // jammer range in meters
|
||||
|
Loading…
Reference in New Issue
Block a user