From cb26e80a8180d4c6b74e4efca3d01fdd2022a1df Mon Sep 17 00:00:00 2001 From: He-Man Date: Wed, 20 Feb 2019 22:31:09 +0100 Subject: [PATCH] Selectable Plots- Fix #1 --- Sources/epoch_code/compile/EPOCH_CamUse.sqf | 4 ++-- .../epoch_code/compile/EPOCH_lootTrash.sqf | 2 +- .../epoch_code/compile/EPOCH_unitSpawn.sqf | 2 +- .../compile/building/EPOCH_isBuildAllowed.sqf | 12 ++++++------ .../compile/building/EPOCH_lockCheck.sqf | 2 +- .../compile/building/EPOCH_maintainIT.sqf | 2 +- .../compile/building/EPOCH_removeBUILD.sqf | 2 +- .../compile/building/EPOCH_upgradeBUILD.sqf | 8 ++++---- .../compile/setup/masterLoop/Event1.sqf | 2 +- .../compile/setup/masterLoop/init.sqf | 2 +- Sources/epoch_code/init/both_init.sqf | 13 ++++++------- .../CfgActionMenu/CfgActionMenu_core.hpp | 2 +- .../epoch_config/Configs/CfgBaseBuilding.hpp | 19 +++++++++++++++++++ .../epoch_config/Configs/CfgEpochClient.hpp | 6 +++--- .../epoch_bases/EPOCH_swapBuilding.sqf | 6 +++++- Sources/epoch_server/init/server_init.sqf | 2 +- 16 files changed, 54 insertions(+), 32 deletions(-) diff --git a/Sources/epoch_code/compile/EPOCH_CamUse.sqf b/Sources/epoch_code/compile/EPOCH_CamUse.sqf index 00c076ff..c9308cce 100644 --- a/Sources/epoch_code/compile/EPOCH_CamUse.sqf +++ b/Sources/epoch_code/compile/EPOCH_CamUse.sqf @@ -18,8 +18,8 @@ _mycams = EPOCH_BaseCams select {(_x getVariable["BUILD_OWNER", "-1"]) in [getPl if (["CfgEpochClient", "BaseCamOnlyHome",true] call EPOCH_fnc_returnConfigEntryV2) then { _mycams = _mycams select { _cam = _x; - _jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {_cam distance _x < (getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange")))}; - !(_jammer select {(_x getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID]}) isequalto []) && + _jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {_cam distance _x < (getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))}; + !((_jammer select {(_x getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID]}) isequalto []) }; }; if !(_mycams isequalto []) then { diff --git a/Sources/epoch_code/compile/EPOCH_lootTrash.sqf b/Sources/epoch_code/compile/EPOCH_lootTrash.sqf index 5c540bfc..88bf0af4 100644 --- a/Sources/epoch_code/compile/EPOCH_lootTrash.sqf +++ b/Sources/epoch_code/compile/EPOCH_lootTrash.sqf @@ -91,7 +91,7 @@ if (diag_tickTime - EPOCH_lastTrash > 2) then { }; if (!isNull _bankTerminal) then { _AtmBlockedAtPlot = ["CfgEpochClient", "AtmBlockedAtPlot", false] call EPOCH_fnc_returnConfigEntryV2; - _jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange")))}; + _jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))}; if (!(_jammer isequalto []) && _AtmBlockedAtPlot) exitwith { ["Bank Terminal blocked by Jammer Signal",5] call Epoch_Message; }; diff --git a/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf b/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf index 2e908a6f..97511695 100644 --- a/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf +++ b/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf @@ -41,7 +41,7 @@ _unit = objNull; _targetPos = getPosATL _trgt; _targetPos set [2,0]; -_jammers = (nearestObjects[_targetPos, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {_targetPos distance _x < (getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange")))}; +_jammers = (nearestObjects[_targetPos, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {_targetPos distance _x < (getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))}; if(!(_jammers isEqualTo []) && (_unitClass in _nonJammer))exitWith{}; _restricted = nearestObjects [_targetPos, ["ProtectionZone_Invisible_F"], _nonTraderAIRange]; diff --git a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf index 70c69963..c7351cae 100644 --- a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf @@ -67,7 +67,7 @@ _ghostClass = getText(_cfgBaseBuilding >> _objType >> "GhostPreview"); _bypassJammer = getNumber(_cfgBaseBuilding >> _staticClass >> "bypassJammer"); // Jammer -_jammer = (nearestObjects[player, _JammerCheckClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig (_JammerConfig >> (typeof _x) >> "buildingJammerRange")))}; +_jammer = (nearestObjects[player, _JammerCheckClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (_JammerConfig >> (typeof _x) >> "buildingJammerRange"))}; if !(_jammer isEqualTo []) then { if (_objType in _JammerCheckClasses) then { { @@ -99,10 +99,10 @@ if !(_jammer isEqualTo []) then { ["_memberArray",[]] ]; _membercount = count _modArray + count _memberArray; - _buildingJammerRange = getnumber (getmissionconfig (_JammerConfig >> "buildingJammerRange")); - _storageCountLimit = (getnumber (getmissionconfig (_JammerConfig >> "storageCountLimit"))) + ((getnumber (getmissionconfig (_JammerConfig >> "storageCountPerMember"))) * _membercount); - _buildingCountLimit = (getnumber (getmissionconfig (_JammerConfig >> "buildingCountLimit"))) + ((getnumber (getmissionconfig (_JammerConfig >> "buildingCountPerMember"))) * _membercount); - _CamCountLimit = getnumber (getmissionconfig (_JammerConfig >> "maxCams")); + _buildingJammerRange = getnumber (_JammerConfig >> "buildingJammerRange"); + _storageCountLimit = (getnumber (_JammerConfig >> "storageCountLimit")) + ((getnumber (_JammerConfig >> "storageCountPerMember")) * _membercount); + _buildingCountLimit = (getnumber (_JammerConfig >> "buildingCountLimit")) + ((getnumber (_JammerConfig >> "buildingCountPerMember")) * _membercount); + _CamCountLimit = getnumber (_JammerConfig >> "maxCams"); if (_useSplitCountLimits) then { if({_objType iskindof _x} count _StorageClasses > 0) then { @@ -148,7 +148,7 @@ else { if ((_x getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) then { _c = _c+1; }; - } foreach (missionnamespace getvariable ["Epoch_Plotpoles",_allplots = [];{_allplots pushback (allmissionobjects _x)} foreach (call EPOCH_JammerClasses);_allplots]); + } foreach (missionnamespace getvariable ["Epoch_Plotpoles",call {_allplots = [];{_allplots append (allmissionobjects _x)} foreach (call EPOCH_JammerClasses);_allplots}]); if (_c >= _jammerPerGroup) then { _buildingAllowed = false; [format["Building Disallowed: Max %1 Jammer per Group!", _jammerPerGroup], 5] call Epoch_message; diff --git a/Sources/epoch_code/compile/building/EPOCH_lockCheck.sqf b/Sources/epoch_code/compile/building/EPOCH_lockCheck.sqf index e59d06b5..354aea7a 100644 --- a/Sources/epoch_code/compile/building/EPOCH_lockCheck.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_lockCheck.sqf @@ -25,7 +25,7 @@ private ["_jammed","_jammer"]; //[[[end]]] -_jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange")))}; +_jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))}; _jammed = false; if !(_jammer isEqualTo[]) then { { diff --git a/Sources/epoch_code/compile/building/EPOCH_maintainIT.sqf b/Sources/epoch_code/compile/building/EPOCH_maintainIT.sqf index dd138ecd..149a7f0d 100644 --- a/Sources/epoch_code/compile/building/EPOCH_maintainIT.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_maintainIT.sqf @@ -27,7 +27,7 @@ private ["_buildingJammerRange","_maintainCount","_rnd"]; if !(isNil "EPOCH_maintainLockout") exitWith {["Already Maintaining a base.", 5] call Epoch_message;}; if (EPOCH_playerCrypto > 0) then { - _buildingJammerRange = getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _this) >> "buildingJammerRange"));; + _buildingJammerRange = getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _this) >> "buildingJammerRange");; if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; }; _maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Constructions_lockedstatic_F"], _buildingJammerRange]; diff --git a/Sources/epoch_code/compile/building/EPOCH_removeBUILD.sqf b/Sources/epoch_code/compile/building/EPOCH_removeBUILD.sqf index 2c5d5e64..377bb446 100644 --- a/Sources/epoch_code/compile/building/EPOCH_removeBUILD.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_removeBUILD.sqf @@ -57,7 +57,7 @@ if (_objType in (call EPOCH_JammerClasses)) then { }; } else { - _jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange")))}; + _jammer = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))}; if !(_jammer isEqualTo[]) then{ { if (alive _x) exitWith{ diff --git a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf index 2ae3d67e..0a3444a8 100644 --- a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf @@ -51,7 +51,7 @@ if (_stability > 0) exitWith{ }; }; -_jammer = (nearestObjects[_object, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {alive _x && {_object distance _x < (getnumber (getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange")))}}; +_jammer = (nearestObjects[_object, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {alive _x && {_object distance _x < (getnumber (getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))}}; if !(_jammer isEqualTo[]) then { _nearestJammer = _jammer select 0; @@ -65,11 +65,11 @@ if !(_jammer isEqualTo[]) then { }; if !(_buildingAllowed)exitWith{ false }; -if (_object isKindOf "Constructions_static_F") then { +if (_object isKindOf "Constructions_static_F" || {(typeof _object) in (call EPOCH_JammerClasses)}) then { // take upgrade item from player here _config = 'CfgBaseBuilding' call EPOCH_returnConfig; - _config2 = getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _object)); + _config2 = getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _object); _upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { @@ -99,7 +99,7 @@ if (_object isKindOf "Constructions_static_F") then { if (_canUpgrade) then { _doors = ["CfgEpochClient", "DoorClasses", ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH","CinderWallDoorwHatch_EPOCH","WoodStairs3_EPOCH","JailWallDoor_EPOCH"]] call EPOCH_fnc_returnConfigEntryV2; _gates = ["CfgEpochClient", "GateClasses", ["CinderWallGarage_EPOCH","WoodWallGarage_EPOCH","MetalWallGarage_EPOCH"]] call EPOCH_fnc_returnConfigEntryV2; - _JammerConfig = getmissionconfig ("CfgEpochClient" >> "CfgJammers" >> (typeof _nearestJammer); + _JammerConfig = getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _nearestJammer); _buildingJammerRange = getnumber (_JammerConfig >> "buildingJammerRange"); _maxdoors = getnumber (_JammerConfig >> "maxdoors"); _maxgates = getnumber (_JammerConfig >> "maxgates"); diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf index ac1619d4..a8693d8b 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -31,7 +31,7 @@ if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then { if (_cursorTarget isKindOf "AllVehicles") then { _currentTarget = _cursorTarget; } else { - if (_cursorTarget isKindOf "Constructions_modular_F" || _cursorTarget isKindOf "Constructions_static_F") then { + if (_cursorTarget isKindOf "Constructions_modular_F" || {_cursorTarget isKindOf "Constructions_static_F"} || {(typeof _cursorTarget) in (call Epoch_JammerClasses)}) then { _currentTargetMode = 1; _currentTarget = _cursorTarget; }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index cbc563f0..e22e036c 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -275,7 +275,7 @@ _lootBubble = { _objects resize 4; }; // diag_log format["DEBUG: loot objects %1",_objects]; - _jammer = ((_lootLoc nearObjects [call EPOCH_JammerClasses, (call EPOCH_MaxJammerRange) + 50]) select {_x distance _lootLoc < ((getnumber (getmissionconfig >> "cfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))+50)}) + (_lootLoc nearObjects ["ProtectionZone_Invisible_F", 25]); + _jammer = ((nearestObjects [_lootLoc, call EPOCH_JammerClasses, ((call EPOCH_MaxJammerRange) + 50)]) select {_x distance _lootLoc < ((getnumber (getmissionconfig "cfgEpochClient" >> "CfgJammers" >> (typeof _x) >> "buildingJammerRange"))+50)}) + (_lootLoc nearObjects ["ProtectionZone_Invisible_F", 25]); if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then { _building = selectRandom _objects; if (_building getvariable ["EPOCH_Skiploot",false]) exitwith {}; diff --git a/Sources/epoch_code/init/both_init.sqf b/Sources/epoch_code/init/both_init.sqf index aff29ffe..12e4d087 100644 --- a/Sources/epoch_code/init/both_init.sqf +++ b/Sources/epoch_code/init/both_init.sqf @@ -13,7 +13,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/both_init.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_communityStatsInit","_customVarsInit","_dynSimToggle","_JammerConfig","_cfgBaseBuilding","_JammerClass","_preview"]; +private ["_communityStatsInit","_customVarsInit","_dynSimToggle","_JammerConfig","_JammerClass","_preview"]; //[[[end]]] // Check if Advanced Vehicle Repair is enabled @@ -75,7 +75,7 @@ disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOC EPOCH_JammerClasses = []; EPOCH_JammerGhosts = []; EPOCH_MaxJammerRange = 75; -_JammerConfig = (getmissionconfig >> "CfgEpochClient" >> "CfgJammers"); +_JammerConfig = (getmissionconfig "CfgEpochClient" >> "CfgJammers"); if !(isclass _JammerConfig) exitwith { diag_log "EPOCH_debug: Error: No Jammerclasses defined in CfgEpochClient"; }; @@ -86,19 +86,18 @@ if !(isclass _JammerConfig) exitwith { if (_JammerRangeX > EPOCH_MaxJammerRange) then { EPOCH_MaxJammerRange = _JammerRangeX; }; -} foreach (configclasses _JammerConfig); +} foreach ("true" configClasses _JammerConfig); if (EPOCH_JammerClasses isEqualTo []) then { diag_log "EPOCH_debug: Error: Jammerconfig in CfgEpochClient seems to be wrong"; }; -_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; { _JammerClass = _x; { - _preview = gettext (_cfgBaseBuilding >> _JammerClass >> _x); - if !(_preview isEqualTo "" || _preview isEqualTo _x) then { + _preview = gettext (getmissionconfig "CfgBaseBuilding" >> _JammerClass >> _x); + if !(_preview isEqualTo "" || _preview isEqualTo _JammerClass) then { EPOCH_JammerGhosts pushBackUnique _preview; }; - } foreach ["GhostPreview","simClass"]; + } foreach ["GhostPreview","simulClass"]; } foreach EPOCH_JammerClasses; EPOCH_JammerClasses = compilefinal (str EPOCH_JammerClasses); EPOCH_MaxJammerRange = compilefinal (str EPOCH_MaxJammerRange); diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp index 0b14f4ff..464434dc 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp @@ -49,7 +49,7 @@ class CfgActionMenu dyna_deathMarkerAvail = "!(dyna_deathMarker isEqualTo [])"; dyna_mapDeathMarker = "(((getArray(('CfgMarkerSets' call EPOCH_returnConfig) >> 'DeathMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)"; - dyna_AtHome = "call {_nearjammers = (nearestObjects[player, _JammerCheckClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig (_JammerConfig >> (typeof _x) >> 'buildingJammerRange')))};if (_nearjammers isEqualTo []) exitwith {false};_nearestJammer = _nearjammers select 0;((_nearestJammer getVariable['BUILD_OWNER', '-1']) in[getPlayerUID player, Epoch_my_GroupUID])}"; + dyna_AtHome = "call {_nearjammers = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig 'cfgEpochClient' >> 'CfgJammers' >> (typeof _x) >> 'buildingJammerRange'))};if (_nearjammers isEqualTo []) exitwith {false};_nearestJammer = _nearjammers select 0;((_nearestJammer getVariable['BUILD_OWNER', '-1']) in[getPlayerUID player, Epoch_my_GroupUID])}"; dyna_Watersource = "call {_nearObjects = nearestObjects [player, [], 2];_check = 'water';_ok = false;{if (alive _x) then {_ok = [_x, _check] call EPOCH_worldObjectType;};if (_ok) exitWith {};} forEach _nearObjects;_ok}"; }; diff --git a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp index 5fb3287c..2bb03112 100644 --- a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp +++ b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp @@ -187,6 +187,7 @@ class CfgBaseBuilding }; class PlotPole_EPOCH : Default { + upgradeBuilding[] = {{"PlotPole_L_EPOCH",{{"ItemCorrugatedLg",5},{"EnergyPackLg",2},{"CircuitParts",3},{"ItemBattery",3},{"ItemPipe",1}}}}; removeParts[] = {{"KitPlotPole",1}}; GhostPreview = "PlotPole_EPOCH"; staticClass = "PlotPole_EPOCH"; @@ -197,6 +198,24 @@ class CfgBaseBuilding { removeParts[] = {}; }; + class PlotPole_L_EPOCH : Default + { + upgradeBuilding[] = {{"PlotPole_XL_EPOCH",{{"ItemCorrugatedLg",5},{"EnergyPackLg",2},{"CircuitParts",3},{"ItemBattery",3},{"ItemPipe",1}}}}; + removeParts[] = {{"KitPlotPole",1},{"ItemCorrugatedLg",5},{"EnergyPackLg",2},{"CircuitParts",3},{"ItemBattery",3},{"ItemPipe",1}}; + GhostPreview = "PlotPole_L_EPOCH"; + staticClass = "PlotPole_L_EPOCH"; + simulClass = "PlotPole_L_EPOCH"; + bypassJammer = 1; + }; + class PlotPole_XL_EPOCH : Default + { + upgradeBuilding[] = {}; + removeParts[] = {{"KitPlotPole",1},{"ItemCorrugatedLg",10},{"EnergyPackLg",4},{"CircuitParts",6},{"ItemBattery",6},{"ItemPipe",2}}; + GhostPreview = "PlotPole_XL_EPOCH"; + staticClass = "PlotPole_XL_EPOCH"; + simulClass = "PlotPole_XL_EPOCH"; + bypassJammer = 1; + }; class WoodRamp_EPOCH : Default { removeParts[] = {{"PartPlankPack",3}}; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index f763c87f..219282cb 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -62,13 +62,13 @@ class CfgEpochClient class PlotPole_L_EPOCH : PlotPole_EPOCH // inherits from "PlotPole_EPOCH" (not defined values will be taken from PlotPole_EPOCH) { buildingJammerRange = 100; // jammer range in meters - buildingCountLimit = 250; // Max Building Elements per Base + buildingCountLimit = 225; // Max Building Elements per Base storageCountLimit = 125; // Max Storage Elements per Base }; class PlotPole_XL_EPOCH : PlotPole_L_EPOCH { - buildingJammerRange = 150; // jammer range in meters - buildingCountLimit = 300; // Max Building Elements per Base + buildingJammerRange = 125; // jammer range in meters + buildingCountLimit = 250; // Max Building Elements per Base storageCountLimit = 150; // Max Storage Elements per Base }; }; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf index e1a5aeed..39a4aa11 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf @@ -1,6 +1,6 @@ // _newObj = [_class,_object] call EPOCH_swapBuilding; //[[[cog import generate_private_arrays ]]] -private ["_newObj","_objectPos"]; +private ["_newObj","_objectPos","_owner"]; //[[[end]]] params [["_class",""],["_object",objNull],["_method",0]]; _newObj = objNull; @@ -8,6 +8,10 @@ if (!isNull _object && !(_class isEqualTo "")) then { _objectPos = getPosWorld _object; _newObj = createVehicle [_class, ASLtoAGL _objectPos, [], 0, "CAN_COLLIDE"]; if (!isNull _newObj) then { + _owner = _object getvariable ["Build_Owner",""]; + if !(_owner isEqualTo "") then { + _newObj setVariable ["BUILD_OWNER", _owner, true]; + }; _object hideObjectGlobal true; switch (_method) do { case 0: { diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index 68510db2..949d98db 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -295,7 +295,7 @@ else { _staticFuelSources pushback _x; } foreach (((_x nearObjects ['Building',call EPOCH_MaxJammerRange]) select {getFuelCargo _x > 0})); - } foreach (missionnamespace getvariable ["Epoch_Plotpoles",_allplots = [];{_allplots pushback (allmissionobjects _x)} foreach (call EPOCH_JammerClasses);_allplots]); + } foreach (missionnamespace getvariable ["Epoch_Plotpoles",call {_allplots = [];{_allplots append (allmissionobjects _x)} foreach (call EPOCH_JammerClasses);_allplots}]); missionNamespace setVariable ["EPOCH_staticFuelSources", _staticFuelSources, true]; }; };