mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Merge pull request #998 from Ignatz-HeMan/experimental
Selectable Plotpoles + PlotPole Upgrades - Maybe with issues (WIP)
This commit is contained in:
commit
9311876b3c
@ -107,6 +107,8 @@ forceRestartTime = 14400; // 4 hour restarts
|
||||
UseDeSimulateObjects = "true"; // Disable Simulation for specifed Base Objects
|
||||
DeSimulateObjects[] = { // Base Objects to disable Simulation. Can be Names or Classes
|
||||
"PlotPole_EPOCH",
|
||||
"PlotPole_L_EPOCH",
|
||||
"PlotPole_XL_EPOCH",
|
||||
"WoodFoundation_EPOCH","Foundation_EPOCH",
|
||||
"WoodQuarterFloor_EPOCH","WoodHalfFloor_EPOCH","WoodFloor_EPOCH",
|
||||
"MetalQuarterFloor_EPOCH","MetalHalfFloor_EPOCH","MetalFloor_EPOCH",
|
||||
|
@ -2,7 +2,7 @@
|
||||
5 "BIS_fnc_dynamictext" !="\"BIS_fnc_dynamictext\"" !="'BIS_fnc_dynamictext'"
|
||||
5 forceRespawn !="ForceRespawnDuration" !="reviveHandleForceRespawnAction" !="forcerespawn player;"
|
||||
5 setWeaponReloadingTime !="_unit setWeaponReloadingTime [_unit,_weapon,1];" !="_unit setWeaponReloadingTime [_unit,_weapon,1];" !="player fire [_muzzle, _muzzle, _item];\nplayer setWeaponReloadingTime [player, _muzzle, 0];"
|
||||
5 allMissionObjects !="[\"Epoch_Plotpoles\",allmissionobjects 'PlotPole_EPOCH']" !="allMissionObjects \"Timeline_F\""
|
||||
5 allMissionObjects !="[\"Epoch_Plotpoles\",allmissionobjects 'PlotPole_EPOCH']" !="allMissionObjects \"Timeline_F\"" !="_allplots append (allmissionobjects _x)"
|
||||
5 showCommandingMenu !="showCommandingMenu '';" !="showCommandingMenu '#USER:"
|
||||
5 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];" !="_bobber setVelocity [0,-1,-10];" !="_x setvelocity [0,0,0.1];" !="_veh setVelocity [0,0,0];" !="_this select 0 setvelocity (_this select 1)" !="_zombie setVelocityTransformation [_aslPos,_aslPos,_unitV,_unitV,_unitvDir,_vDir,_unitvUp,_unitvUp,2];" !="_smokeg setVelocity _Gvel;"
|
||||
5 assignAs !"assignAsCargo" !="_unit assignAsGunner _axeCopter;" !="_driver assignAsDriver _axeCopter;" !="axeVIP assignAsDriver vehicle axeVIP;"
|
||||
|
@ -109,7 +109,6 @@ class FSM
|
||||
"_checkFreq = getNumber (getMissionConfig ""CfgEpochRyanZombie"" >> ""reflexSpeed"");" \n
|
||||
"_welcomeWait = random 4;" \n
|
||||
"_config = 'CfgEpochClient' call EPOCH_returnConfig;" \n
|
||||
"_jammerRange = getNumber(_config >> ""buildingJammerRange"");" \n
|
||||
"_zSmell = getArray (getMissionConfig ""CfgEpochRyanZombie"" >> ""smell"");" \n
|
||||
"_zSight = getArray (getMissionConfig ""CfgEpochRyanZombie"" >> ""sight"");" \n
|
||||
"_zHear = getArray (getMissionConfig ""CfgEpochRyanZombie"" >> ""hearing"");" \n
|
||||
@ -251,7 +250,6 @@ class FSM
|
||||
"axeDebug = _doDebug ;" \n
|
||||
"if(_doDebug)then{" \n
|
||||
"axeDebug = true;" \n
|
||||
"_jammerRange = 75;" \n
|
||||
"axeZed = _zombie;" \n
|
||||
"_debugDo = ""START"";" \n
|
||||
"_mkrName = """";" \n
|
||||
|
@ -12,12 +12,15 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_CamUse.sqf
|
||||
*/
|
||||
|
||||
private ["_mycams","_buildingJammerRange","_curcam"];
|
||||
private ["_mycams","_curcam"];
|
||||
|
||||
_mycams = EPOCH_BaseCams select {(_x getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID]};
|
||||
if (["CfgEpochClient", "BaseCamOnlyHome",true] call EPOCH_fnc_returnConfigEntryV2) then {
|
||||
_buildingJammerRange = ["CfgEpochClient", "buildingJammerRange",75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_mycams = _mycams select {!(((nearestobjects [_x,["Plotpole_EPOCH"],_buildingJammerRange]) select {(_x getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID player, Epoch_my_GroupUID]}) isequalto [])};
|
||||
_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 [])
|
||||
};
|
||||
};
|
||||
if !(_mycams isequalto []) then {
|
||||
_curcam = _mycams find Epoch_ActiveCam;
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_consumeItem.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_buildClass","_buildingCountLimit","_buildingJammerRange","_canCapacity","_cfgBaseBuilding","_cfgItemInteractions","_color","_currentDMG","_currentFuel","_currentHIT","_fuelCapacity","_ghostClass","_highestDMG","_inputCount","_interactAttributes","_interactOption","_interactReturnOnUse","_isOk","_isStorage","_magazineSize","_magazineSizeMax","_magazinesAmmoFull","_msg","_newDMG","_newFuel","_object","_otherObjects","_output","_paintCanColor","_paintCanIndex","_partCheck","_pos","_removeItem","_transportFuel","_unifiedInteract","_vehicle","_vehicles"];
|
||||
private ["_buildClass","_buildingCountLimit","_canCapacity","_cfgBaseBuilding","_cfgItemInteractions","_color","_currentDMG","_currentFuel","_currentHIT","_fuelCapacity","_ghostClass","_highestDMG","_inputCount","_interactAttributes","_interactOption","_interactReturnOnUse","_isOk","_isStorage","_magazineSize","_magazineSizeMax","_magazinesAmmoFull","_msg","_newDMG","_newFuel","_object","_otherObjects","_output","_paintCanColor","_paintCanIndex","_partCheck","_pos","_removeItem","_transportFuel","_unifiedInteract","_vehicle","_vehicles"];
|
||||
//[[[end]]]
|
||||
|
||||
EPOCH_InteractedItem params ["_text","_item","_pic"];
|
||||
@ -114,8 +114,6 @@ switch _interactOption do {
|
||||
case 2: _unifiedInteract; //Drink 2
|
||||
case 3: { // Build 3
|
||||
closeDialog 0;
|
||||
_buildingJammerRange = ["CfgEpochClient", "buildingJammerRange", 75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_buildingCountLimit = ["CfgEpochClient", "buildingCountLimit", 200] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_partCheck = _item in (magazines player);
|
||||
|
||||
_buildClass = getText(_cfgItemInteractions >> "buildClass");
|
||||
@ -141,7 +139,7 @@ switch _interactOption do {
|
||||
|
||||
if (_buildClass isKindOf "ThingX") then {
|
||||
// prevent spawning if another simulated object exists still
|
||||
_otherObjects = nearestObjects[player, [_buildClass], _buildingJammerRange];
|
||||
_otherObjects = nearestObjects[player, [_buildClass], 100];
|
||||
if (_otherObjects isEqualTo []) then {
|
||||
_object=createVehicle[_buildClass,_pos,[],0,"CAN_COLLIDE"];
|
||||
_object setDir ((getDir player) - 180);
|
||||
|
@ -91,8 +91,7 @@ if (diag_tickTime - EPOCH_lastTrash > 2) then {
|
||||
};
|
||||
if (!isNull _bankTerminal) then {
|
||||
_AtmBlockedAtPlot = ["CfgEpochClient", "AtmBlockedAtPlot", false] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _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;
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_aiskill","_arrSkills","_arrUnits","_arrVals","_bomb","_config","_currentLimit","_disableAI","_driver","_grp","_index","_jammerRange","_jammers","_loop","_minAISkill","_missionConfig","_nonJammer","_nonTrader","_nonTraderAIRange","_playerSpawnArray","_playerSpawnArrayKeyFinal","_pos","_restricted","_sapperHndl","_sapperNum","_spawnLimit","_targetPos","_unit","_units"];
|
||||
private ["_aiskill","_arrSkills","_arrUnits","_arrVals","_bomb","_config","_currentLimit","_disableAI","_driver","_grp","_index","_jammers","_loop","_minAISkill","_missionConfig","_nonJammer","_nonTrader","_nonTraderAIRange","_playerSpawnArray","_playerSpawnArrayKeyFinal","_pos","_restricted","_sapperHndl","_sapperNum","_spawnLimit","_targetPos","_unit","_units"];
|
||||
//[[[end]]]
|
||||
params ["_unitClass",["_trgt",player],["_doVariable",false],["_unitCount",1],["_extraData",[]] ];
|
||||
|
||||
@ -41,9 +41,7 @@ _unit = objNull;
|
||||
_targetPos = getPosATL _trgt;
|
||||
_targetPos set [2,0];
|
||||
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_jammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_jammers = nearestObjects[_targetPos, ["PlotPole_EPOCH"], _jammerRange];
|
||||
_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];
|
||||
|
@ -23,7 +23,7 @@
|
||||
BOOL
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_StorageClasses","_BuildingClasses","_CamCountLimit","_alljammer","_buildingAllowed","_buildingCountLeader","_buildingCountLimit","_buildingCountPerMember","_buildingJammerRange","_bypassJammer","_c","_cfgBaseBuilding","_config","_ghostClass","_isAllowed","_jammer","_jammerGLOnly","_jammerPerGroup","_limitNearby","_maxBuildingHeight","_membercount","_minJammerDistance","_myPosATL","_nearestJammer","_obj","_objType","_objectscount","_ownedJammerExists","_range","_restricted","_restrictedArray","_restrictedLocations","_restrictedLocationsArray","_restrictedLocationsRange","_simulClass","_staticClass","_storageCountLeader","_storageCountLimit","_storageCountPerMember","_useGroupCountLimits","_useSplitCountLimits"];
|
||||
private ["_StorageClasses","_BuildingClasses","_CamCountLimit","_alljammer","_buildingAllowed","_buildingCountLeader","_buildingCountLimit","_buildingCountPerMember","_buildingJammerRange","_bypassJammer","_c","_cfgBaseBuilding","_config","_ghostClass","_isAllowed","_jammer","_jammerGLOnly","_jammerPerGroup","_limitNearby","_maxBuildingHeight","_membercount","_myPosATL","_nearestJammer","_obj","_objType","_objectscount","_ownedJammerExists","_range","_restricted","_restrictedArray","_restrictedLocations","_restrictedLocationsArray","_restrictedLocationsRange","_simulClass","_staticClass","_storageCountLeader","_storageCountLimit","_storageCountPerMember","_useGroupCountLimits","_useSplitCountLimits"];
|
||||
//[[[end]]]
|
||||
|
||||
_buildingAllowed = true;
|
||||
@ -38,32 +38,20 @@ if (vehicle player != player)exitWith{["Building Disallowed: Inside Vehicle", 5]
|
||||
|
||||
// defaults
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_JammerConfig = (_config >> "CfgJammers");
|
||||
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_buildingCountLimit = getNumber(_config >> "buildingCountLimit");
|
||||
_storageCountLimit = getNumber(_config >> "storageCountLimit");
|
||||
_buildingCountLeader = getNumber(_config >> "buildingCountLeader");
|
||||
_buildingCountPerMember = getNumber(_config >> "buildingCountPerMember");
|
||||
_storageCountLeader = getNumber(_config >> "storageCountLeader");
|
||||
_storageCountPerMember = getNumber(_config >> "storageCountPerMember");
|
||||
_minJammerDistance = getNumber(_config >> "minJammerDistance");
|
||||
_maxBuildingHeight = getNumber(_config >> "maxBuildingHeight");
|
||||
_jammerPerGroup = getNumber(_config >> "jammerPerGroup");
|
||||
_CamCountLimit = getNumber(_config >> "maxCams");
|
||||
if(getNumber(_config >> "useGroupCountLimits") == 0)then{_useGroupCountLimits=false};
|
||||
if(getNumber(_config >> "splitCountLimits") == 1)then{_useSplitCountLimits=true};
|
||||
if(getNumber(_config >> "jammerGLOnly") == 0)then{_jammerGLOnly=false};
|
||||
if(_buildingJammerRange == 0)then{_buildingJammerRange = 75};
|
||||
if(_buildingCountLimit == 0)then{_buildingCountLimit = 200};
|
||||
if(_buildingCountLeader == 0)then{_buildingCountLeader = _buildingCountLimit};
|
||||
if(_storageCountLeader == 0)then{_storageCountLeader = 100};
|
||||
if(_minJammerDistance == 0)then{_minJammerDistance = _buildingJammerRange*3};
|
||||
if(_maxBuildingHeight == 0)then{_maxBuildingHeight = 100};
|
||||
if(_jammerPerGroup == 0)then{_jammerPerGroup = 2};
|
||||
if(_CamCountLimit == 0)then{_CamCountLimit = 2};
|
||||
|
||||
_StorageClasses = ["Buildable_Storage","Buildable_Storage_SIM","Buildable_Storage_Ghost","Constructions_lockedstatic_F","Secure_Storage_Temp"];
|
||||
_BuildingClasses = ["Constructions_static_F","Constructions_foundation_F","Const_Ghost_EPOCH"];
|
||||
_StorageClasses = ["CfgEpochClient", "StorageClasses", ["Buildable_Storage","Buildable_Storage_SIM","Buildable_Storage_Ghost","Constructions_lockedstatic_F","Secure_Storage_Temp"]] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_BuildingClasses = ["CfgEpochClient", "BuildingClasses", ["Constructions_static_F","Constructions_foundation_F","Const_Ghost_EPOCH"]] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_maxBuildingHeight = ["CfgEpochClient", "maxBuildingHeight", 100] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_jammerPerGroup = ["CfgEpochClient", "jammerPerGroup", 1] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
_JammerClasses = call EPOCH_JammerClasses;
|
||||
_JammerGhosts = call EPOCH_JammerGhosts;
|
||||
_JammerCheckClasses = _JammerClasses + _JammerGhosts;
|
||||
|
||||
// input
|
||||
params ["_objType"];
|
||||
@ -79,9 +67,9 @@ _ghostClass = getText(_cfgBaseBuilding >> _objType >> "GhostPreview");
|
||||
_bypassJammer = getNumber(_cfgBaseBuilding >> _staticClass >> "bypassJammer");
|
||||
|
||||
// Jammer
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _minjammerdistance];
|
||||
_jammer = (nearestObjects[player, _JammerCheckClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (_JammerConfig >> (typeof _x) >> "buildingJammerRange"))};
|
||||
if !(_jammer isEqualTo []) then {
|
||||
if (_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
if (_objType in _JammerCheckClasses) then {
|
||||
{
|
||||
if (alive _x) exitWith{
|
||||
_buildingAllowed = false;
|
||||
@ -91,8 +79,9 @@ if !(_jammer isEqualTo []) then {
|
||||
}
|
||||
else {
|
||||
{
|
||||
if (alive _x && (_x distance player) <= _buildingJammerRange) exitWith{
|
||||
if (alive _x) exitWith{
|
||||
_nearestJammer = _x;
|
||||
_JammerConfig = (_JammerConfig >> (typeof _nearestJammer));
|
||||
};
|
||||
} foreach _jammer;
|
||||
if !(isNull _nearestJammer) then {
|
||||
@ -101,19 +90,20 @@ if !(_jammer isEqualTo []) then {
|
||||
["Building Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
_ownedJammerExists = true;
|
||||
if(_useGroupCountLimits)then{
|
||||
_membercount = 0;
|
||||
Epoch_my_Group params [
|
||||
["_groupName",""],
|
||||
["_leaderName",""],
|
||||
["_groupSize",0],
|
||||
["_modArray",[]],
|
||||
["_memberArray",[]]
|
||||
];
|
||||
_membercount = count _modArray + count _memberArray;
|
||||
_storageCountLimit = _storageCountLeader + (_storageCountPerMember * _membercount);
|
||||
_buildingCountLimit = _buildingCountLeader + (_buildingCountPerMember * _membercount);
|
||||
};
|
||||
_membercount = 0;
|
||||
Epoch_my_Group params [
|
||||
["_groupName",""],
|
||||
["_leaderName",""],
|
||||
["_groupSize",0],
|
||||
["_modArray",[]],
|
||||
["_memberArray",[]]
|
||||
];
|
||||
_membercount = count _modArray + count _memberArray;
|
||||
_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 {
|
||||
if ((count (nearestObjects[_nearestJammer,_StorageClasses,_buildingJammerRange]-[_obj])) >= _storageCountLimit) exitwith {
|
||||
@ -148,7 +138,7 @@ if !(_jammer isEqualTo []) then {
|
||||
};
|
||||
}
|
||||
else {
|
||||
if (_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
if (_objType in _JammerCheckClasses) then {
|
||||
if (!(EPOCH_my_groupUID isequalto "") && !((getplayeruid player) isequalto EPOCH_my_groupUID) && _jammerGLOnly) exitwith {
|
||||
_buildingAllowed = false;
|
||||
["The Group Leader must place the Jammer!", 5] call Epoch_message;
|
||||
@ -158,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",allmissionobjects 'PlotPole_EPOCH']);
|
||||
} 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;
|
||||
@ -173,7 +163,7 @@ if (!_ownedJammerExists) then{
|
||||
|
||||
if (_limitNearby > 0) then{
|
||||
// remove current target from objects
|
||||
_objectscount = count (nearestObjects[player, [_staticClass, _simulClass], _buildingJammerRange]-[_obj]);
|
||||
_objectscount = count (nearestObjects[player, [_staticClass, _simulClass], 100]-[_obj]);
|
||||
if (_objectscount >= _limitNearby) then{
|
||||
_buildingAllowed = false;
|
||||
[format["Building Disallowed: Limit %1", _limitNearby], 5] call Epoch_message;
|
||||
@ -184,7 +174,7 @@ if !(_buildingAllowed)exitWith{ false };
|
||||
|
||||
// require jammer check if not found as owner of jammer
|
||||
if (getNumber(_config >> "buildingRequireJammer") == 1 && _bypassJammer == 0) then{
|
||||
if !(_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
if !(_objType in _JammerCheckClasses) then {
|
||||
_buildingAllowed = _ownedJammerExists;
|
||||
if !(_buildingAllowed) then {
|
||||
["Building Disallowed: Frequency Jammer Needed", 5] call Epoch_message;
|
||||
|
@ -22,14 +22,10 @@
|
||||
BOOL
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_buildingJammerRange","_config","_jammed","_jammer"];
|
||||
private ["_jammed","_jammer"];
|
||||
//[[[end]]]
|
||||
|
||||
_config = "CfgEpochClient" call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
||||
_jammer = nearestObjects[cameraon, ["PlotPole_EPOCH"], _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 {
|
||||
{
|
||||
|
@ -22,13 +22,12 @@
|
||||
NOTHING
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_buildingJammerRange","_config","_maintainCount","_rnd"];
|
||||
private ["_buildingJammerRange","_maintainCount","_rnd"];
|
||||
//[[[end]]]
|
||||
|
||||
if !(isNil "EPOCH_maintainLockout") exitWith {["Already Maintaining a base.", 5] call Epoch_message;};
|
||||
if (EPOCH_playerCrypto > 0) then {
|
||||
_config = "CfgEpochClient" call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "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];
|
||||
|
@ -22,19 +22,12 @@
|
||||
BOOL - true if removed
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_buildingAllowed","_buildingCountLimit","_buildingJammerRange","_config","_jammer","_nearestJammer","_objType","_ownedJammerExists","_removeParts","_return","_stability","_targeter"];
|
||||
private ["_buildingAllowed","_jammer","_nearestJammer","_objType","_ownedJammerExists","_removeParts","_return","_stability","_targeter"];
|
||||
//[[[end]]]
|
||||
|
||||
_buildingAllowed = true;
|
||||
_ownedJammerExists = false;
|
||||
_nearestJammer = objNull;
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_buildingCountLimit = getNumber(_config >> "buildingCountLimit");
|
||||
|
||||
// defaults
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
|
||||
|
||||
EPOCH_buildOption = 0;
|
||||
|
||||
@ -57,14 +50,14 @@ if (_stability > 0) exitWith{
|
||||
};
|
||||
};
|
||||
|
||||
if (_objType == "PlotPole_EPOCH") then {
|
||||
if (_objType in (call EPOCH_JammerClasses)) then {
|
||||
if ((_object getVariable["BUILD_OWNER", "-1"]) != getPlayerUID player) then{
|
||||
_buildingAllowed = false;
|
||||
["Remove Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
}
|
||||
else {
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _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{
|
||||
|
@ -23,7 +23,7 @@
|
||||
NOTHING
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_buildingAllowed","_buildingCountLimit","_buildingJammerRange","_canUpgrade","_canUpgradePartCount","_config","_config2","_countdoors","_countgates","_doors","_gates","_jammer","_maxdoors","_maxgates","_missingCount","_missingParts","_nearestJammer","_ownedJammerExists","_part","_partCheck","_removedPartCount","_req","_return","_stability","_targeter","_upgrade","_upgradeParts","_upgrades","_upgradeto"];
|
||||
private ["_buildingAllowed","_canUpgrade","_canUpgradePartCount","_config","_config2","_countdoors","_countgates","_doors","_gates","_jammer","_maxdoors","_maxgates","_missingCount","_missingParts","_nearestJammer","_ownedJammerExists","_part","_partCheck","_removedPartCount","_req","_return","_stability","_targeter","_upgrade","_upgradeParts","_upgrades","_upgradeto","_buildingJammerRange","_JammerConfig"];
|
||||
//[[[end]]]
|
||||
params [
|
||||
["_object",objNull,[objNull]],
|
||||
@ -37,13 +37,6 @@ if (isNull _object) exitWith {false};
|
||||
_buildingAllowed = true;
|
||||
_ownedJammerExists = false;
|
||||
_nearestJammer = objNull;
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_buildingCountLimit = getNumber(_config >> "buildingCountLimit");
|
||||
|
||||
// defaults
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
|
||||
|
||||
EPOCH_buildOption = 1;
|
||||
|
||||
@ -58,38 +51,25 @@ if (_stability > 0) exitWith{
|
||||
};
|
||||
};
|
||||
|
||||
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _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 {
|
||||
{
|
||||
if (alive _x) exitWith{
|
||||
_nearestJammer = _x;
|
||||
};
|
||||
} foreach _jammer;
|
||||
|
||||
if !(isNull _nearestJammer) then {
|
||||
if ((_nearestJammer getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) then {
|
||||
_ownedJammerExists = true;
|
||||
}
|
||||
else {
|
||||
_buildingAllowed = false;
|
||||
["Upgrade Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
_nearestJammer = _jammer select 0;
|
||||
if ((_nearestJammer getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) then {
|
||||
_ownedJammerExists = true;
|
||||
}
|
||||
else {
|
||||
_buildingAllowed = false;
|
||||
["Upgrade Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
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 = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config2 >> "buildingJammerRange");
|
||||
_maxdoors = getNumber(_config2 >> "maxdoors");
|
||||
_maxgates = getNumber(_config2 >> "maxgates");
|
||||
if (_buildingJammerRange == 0) then {_buildingJammerRange = 150};
|
||||
if (_maxdoors == 0) then {_maxdoors = 12};
|
||||
if (_maxgates == 0) then {_maxgates = 10};
|
||||
_config2 = getmissionconfig "CfgEpochClient" >> "CfgJammers" >> (typeof _object);
|
||||
|
||||
_upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding");
|
||||
if !(_upgrades isEqualTo []) then {
|
||||
@ -116,9 +96,16 @@ if (_object isKindOf "Constructions_static_F") then {
|
||||
_canUpgradePartCount = _canUpgradePartCount + _req;
|
||||
} forEach _upgradeParts;
|
||||
|
||||
_doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH","CinderWallDoorwHatch_EPOCH","WoodStairs3_EPOCH","JailWallDoor_EPOCH"];
|
||||
_gates = ["CinderWallGarage_EPOCH","WoodWallGarage_EPOCH","MetalWallGarage_EPOCH"];
|
||||
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);
|
||||
_buildingJammerRange = getnumber (_JammerConfig >> "buildingJammerRange");
|
||||
_maxdoors = getnumber (_JammerConfig >> "maxdoors");
|
||||
_maxgates = getnumber (_JammerConfig >> "maxgates");
|
||||
if (_maxdoors == 0) then {_maxdoors = 12};
|
||||
if (_maxgates == 0) then {_maxgates = 10};
|
||||
|
||||
_upgradeto = _upgrade select 0;
|
||||
if (_upgradeto in _doors) then {
|
||||
_countdoors = count (nearestobjects [_nearestJammer,_doors,_buildingJammerRange]);
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -206,7 +206,6 @@ missionNamespace setVariable [_playerSpawnArrayKey, _playerSpawnArray];
|
||||
} forEach assignedItems player;
|
||||
|
||||
// lootBubble Init
|
||||
_buildingJammerRange = ["CfgEpochClient", "buildingJammerRange", 75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
_masterConfig = 'CfgBuildingLootPos' call EPOCH_returnConfig;
|
||||
|
||||
_lootClasses = [];
|
||||
@ -276,7 +275,7 @@ _lootBubble = {
|
||||
_objects resize 4;
|
||||
};
|
||||
// diag_log format["DEBUG: loot objects %1",_objects];
|
||||
_jammer = (_lootLoc nearObjects ["PlotPole_EPOCH", _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 {};
|
||||
|
@ -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"];
|
||||
private ["_communityStatsInit","_customVarsInit","_dynSimToggle","_JammerConfig","_JammerClass","_preview"];
|
||||
//[[[end]]]
|
||||
|
||||
// Check if Advanced Vehicle Repair is enabled
|
||||
@ -71,3 +71,34 @@ EPOCH_group_upgrade_lvl = ["CfgEpochClient", "group_upgrade_lvl", [4,"100",6,"30
|
||||
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
|
||||
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
|
||||
|
||||
// preload multiple used Jammer Configs
|
||||
EPOCH_JammerClasses = [];
|
||||
EPOCH_JammerGhosts = [];
|
||||
EPOCH_MaxJammerRange = 75;
|
||||
_JammerConfig = (getmissionconfig "CfgEpochClient" >> "CfgJammers");
|
||||
if !(isclass _JammerConfig) exitwith {
|
||||
diag_log "EPOCH_debug: Error: No Jammerclasses defined in CfgEpochClient";
|
||||
};
|
||||
{
|
||||
private ["_JammerRangeX"];
|
||||
EPOCH_JammerClasses pushback (configname _x);
|
||||
_JammerRangeX = getnumber (_x >> "buildingJammerRange");
|
||||
if (_JammerRangeX > EPOCH_MaxJammerRange) then {
|
||||
EPOCH_MaxJammerRange = _JammerRangeX;
|
||||
};
|
||||
} foreach ("true" configClasses _JammerConfig);
|
||||
if (EPOCH_JammerClasses isEqualTo []) then {
|
||||
diag_log "EPOCH_debug: Error: Jammerconfig in CfgEpochClient seems to be wrong";
|
||||
};
|
||||
{
|
||||
_JammerClass = _x;
|
||||
{
|
||||
_preview = gettext (getmissionconfig "CfgBaseBuilding" >> _JammerClass >> _x);
|
||||
if !(_preview isEqualTo "" || _preview isEqualTo _JammerClass) then {
|
||||
EPOCH_JammerGhosts pushBackUnique _preview;
|
||||
};
|
||||
} foreach ["GhostPreview","simulClass"];
|
||||
} foreach EPOCH_JammerClasses;
|
||||
EPOCH_JammerClasses = compilefinal (str EPOCH_JammerClasses);
|
||||
EPOCH_MaxJammerRange = compilefinal (str EPOCH_MaxJammerRange);
|
||||
EPOCH_JammerGhosts = compilefinal (str EPOCH_JammerGhosts)
|
@ -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 {_config = 'CfgEpochClient' call EPOCH_returnConfig;_buildingJammerRange = getNumber(_config >> 'buildingJammerRange');_nearjammers = nearestobjects [player,['Plotpole_EPOCH'],_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}";
|
||||
};
|
||||
|
||||
|
@ -101,14 +101,14 @@ class player_trade_accept
|
||||
//User action replacement
|
||||
class maintain_jammer
|
||||
{
|
||||
condition = "dyna_cursorTargetType isEqualTo 'PlotPole_EPOCH' && (damage dyna_cursorTarget < 1)";
|
||||
condition = "dyna_cursorTargetType in (call EPOCH_JammerClasses) && (damage dyna_cursorTarget < 1)";
|
||||
action = "dyna_cursorTarget call EPOCH_maintainIT;";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_maintain.paa";
|
||||
tooltip = "Maintain";
|
||||
};
|
||||
class select_jammer
|
||||
{
|
||||
condition = "dyna_cursorTargetType isEqualTo 'PlotPole_EPOCH' && (damage dyna_cursorTarget < 1)";
|
||||
condition = "dyna_cursorTargetType in (call EPOCH_JammerClasses) && (damage dyna_cursorTarget < 1)";
|
||||
action = "[dyna_cursorTarget,player,Epoch_personalToken] remoteExec [""EPOCH_server_makeSP"",2];";
|
||||
icon = "x\addons\a3_epoch_code\Data\UI\buttons\spawnpoint.paa";
|
||||
tooltip = "Make Spawnpoint";
|
||||
|
@ -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}};
|
||||
|
@ -40,24 +40,42 @@ class CfgEpochClient
|
||||
restrictedLocations[] = {"NameCityCapital"};
|
||||
restrictedLocationsRange = 300;
|
||||
buildingRequireJammer = 1; //1 = require jammer to build
|
||||
buildingJammerRange = 75; // jammer range in meters
|
||||
jammerPerGroup = 1; // allowed number of jammers per group.
|
||||
jammerGLOnly = 1; // allow only group leader to place Jammer
|
||||
minJammerDistance = 650; // min distance to next Jammer
|
||||
maxBuildingHeight = 100; // Max Height, building is allowed.
|
||||
buildingCountLimit = 200; //overall building limit in range of jammer (overridden if "useGroupCountLimits=1")
|
||||
storageCountLimit = 100; //overall storage limit in range of jammer (triggers only if "splitCountLimits=1" & "useGroupCountLimits=0")
|
||||
splitCountLimits = 0; //1 = distinguish buildingCountLimit from storageCountLimit (ex.: buildingCountLimit=100, storageCountLimit=100 >> you can build 100 baseparts AND additional 100 storage objects like safes, lockboxes...)
|
||||
useGroupCountLimits = 1; //1 = enable leader and member counts (doesn´t affect "splitCountLimits")
|
||||
buildingCountLeader = 250; //ignore if "useGroupCountLimits=0"
|
||||
buildingCountPerMember = 5; //ignore if "useGroupCountLimits=0"
|
||||
storageCountLeader = 10; //ignore if "splitCountLimits=0" & "useGroupCountLimits=0"
|
||||
storageCountPerMember = 5; //ignore if "splitCountLimits=0" & "useGroupCountLimits=0"
|
||||
maxdoors = 10; // Max allowed doors per Group
|
||||
maxgates = 5; // Max allowed Gates per Group
|
||||
maxCams = 2; // Max allowed BaseCams per Group
|
||||
|
||||
MaxBuildingTilt = 180; // Max degrees players can tilt building elements
|
||||
|
||||
class CfgJammers {
|
||||
class PlotPole_EPOCH // Jammer Classname
|
||||
{
|
||||
buildingJammerRange = 75; // jammer range in meters
|
||||
buildingCountLimit = 200; // Max Building Elements per Base
|
||||
storageCountLimit = 100; // Max Storage Elements per Base
|
||||
buildingCountPerMember = 5; // Additional Building elements per Member
|
||||
storageCountPerMember = 5; // Additional Storage elements per Member
|
||||
maxdoors = 10; // Max Doors per Base
|
||||
maxgates = 5; // Max Gates per Base
|
||||
maxCams = 2; // Max Cams per Base
|
||||
};
|
||||
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 = 225; // Max Building Elements per Base
|
||||
storageCountLimit = 125; // Max Storage Elements per Base
|
||||
};
|
||||
class PlotPole_XL_EPOCH : PlotPole_L_EPOCH
|
||||
{
|
||||
buildingJammerRange = 125; // jammer range in meters
|
||||
buildingCountLimit = 250; // Max Building Elements per Base
|
||||
storageCountLimit = 150; // Max Storage Elements per Base
|
||||
};
|
||||
};
|
||||
StorageClasses[] = {"Buildable_Storage","Buildable_Storage_SIM","Buildable_Storage_Ghost","Constructions_lockedstatic_F","Secure_Storage_Temp"};
|
||||
BuildingClasses[] = {"Constructions_static_F","Constructions_foundation_F","Const_Ghost_EPOCH"};
|
||||
DoorClasses[] = {"WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH","CinderWallDoorwHatch_EPOCH","WoodStairs3_EPOCH","JailWallDoor_EPOCH"};
|
||||
GateClasses[] = {"CinderWallGarage_EPOCH","WoodWallGarage_EPOCH","MetalWallGarage_EPOCH"};
|
||||
|
||||
AtmBlockedAtPlot = "true"; // Block ATM's in Plotpole-Range
|
||||
disableRemoteSensors = "true"; // disableRemoteSensors true/false
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_Simulated","_DamageAllowed","_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_VAL","_ammoClass","_ammoObj","_anims","_animsData","_arr","_arrCount","_baseObj","_buildingJammerRange","_cfgBaseBuilding","_cfgEpochClient","_class","_color","_damage","_location","_marker","_maxTTL","_owner","_response","_serverSettingsConfig","_storageSlot","_textureSlot","_ttl","_vehHiveKey","_worldspace"];
|
||||
private ["_Simulated","_DamageAllowed","_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_VAL","_ammoClass","_ammoObj","_anims","_animsData","_arr","_arrCount","_baseObj","_cfgBaseBuilding","_class","_color","_damage","_location","_marker","_maxTTL","_owner","_response","_serverSettingsConfig","_storageSlot","_textureSlot","_ttl","_vehHiveKey","_worldspace"];
|
||||
//[[[end]]]
|
||||
EPOCH_BaseCams = [];
|
||||
EPOCH_Plotpoles = [];
|
||||
@ -27,10 +27,7 @@ _UseDeSimulateObjects = [_serverSettingsConfig, "UseDeSimulateObjects", true] ca
|
||||
_DeSimulateObjects = [_serverSettingsConfig, "DeSimulateObjects", []] call EPOCH_fnc_returnConfigEntry;
|
||||
_ExceptedDeSymObjects = [_serverSettingsConfig, "ExceptedDeSymObjects", []] call EPOCH_fnc_returnConfigEntry;
|
||||
_DisableDoorsOnObj = [_serverSettingsConfig, "DisableDoorsOnObj", []] call EPOCH_fnc_returnConfigEntry;
|
||||
_cfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_cfgEpochClient >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
||||
_VAL = ["", [], "", "", 0, []];
|
||||
|
||||
@ -154,7 +151,7 @@ for "_i" from 0 to _this do {
|
||||
};
|
||||
|
||||
// Handle Jammers and create marker if EPOCH_SHOW_JAMMERS set true.
|
||||
if (_class in ["PlotPole_EPOCH","BaseCam_EPOCH"]) then {
|
||||
if (_class in ((call EPOCH_JammerClasses) + ["BaseCam_EPOCH"])) then {
|
||||
if (_owner != "-1") then {
|
||||
_baseObj setVariable ["BUILD_OWNER", _owner, true];
|
||||
};
|
||||
@ -165,7 +162,7 @@ for "_i" from 0 to _this do {
|
||||
// Set PubVar later after all Cams are loaded in
|
||||
};
|
||||
|
||||
if (_class isequalto "PlotPole_EPOCH") then {
|
||||
if (_class in (call EPOCH_JammerClasses)) then {
|
||||
EPOCH_Plotpoles pushbackunique _baseObj;
|
||||
if (EPOCH_SHOW_JAMMERS) then {
|
||||
_marker = createMarker [str(_location), _location];
|
||||
|
@ -26,7 +26,7 @@
|
||||
NOTHING
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_buildingJammerRange","_cIndex","_cfgEpochClient","_counter","_current_crypto","_objSlot","_playerCryptoLimit","_playerUID","_storSlot","_vars"];
|
||||
private ["_cIndex","_counter","_current_crypto","_objSlot","_playerCryptoLimit","_playerUID","_storSlot","_vars"];
|
||||
//[[[end]]]
|
||||
params [["_object",objNull],"_player","_maintCount",["_token","",[""]] ];
|
||||
|
||||
@ -34,14 +34,10 @@ if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
|
||||
if (isNull _object) exitWith{};
|
||||
if (_player distance _object > 20) exitWith{};
|
||||
|
||||
_cfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_cfgEpochClient >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
||||
_playerUID = getPlayerUID _player;
|
||||
_counter = 0;
|
||||
|
||||
if (typeOf _object == "PlotPole_EPOCH") then {
|
||||
if (typeOf _object in (call EPOCH_JammerClasses)) then {
|
||||
|
||||
_objSlot = _object getVariable["BUILD_SLOT", -1];
|
||||
if (_objSlot != -1) then {
|
||||
@ -76,7 +72,7 @@ if (typeOf _object == "PlotPole_EPOCH") then {
|
||||
};
|
||||
};
|
||||
if (_counter > _maintCount) exitWith{};
|
||||
} forEach nearestObjects[_object, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Constructions_lockedstatic_F"], _buildingJammerRange];
|
||||
} forEach nearestObjects[_object, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Constructions_lockedstatic_F"], call EPOCH_MaxJammerRange];
|
||||
|
||||
// effect crypto
|
||||
_playerCryptoLimit = EPOCH_customVarLimits select _cIndex;
|
||||
|
@ -69,7 +69,7 @@ if (isText _staticClassConfig) then {
|
||||
} else {
|
||||
|
||||
// TODO: optimize by using config var
|
||||
if (_vehicle isKindOf "ThingX" || _vehicle isKindOf "Const_Ghost_EPOCH" || _vehicle isKindOf "PlotPole_EPOCH") then {
|
||||
if (_vehicle isKindOf "ThingX" || _vehicle isKindOf "Const_Ghost_EPOCH" || ({_vehicle isKindOf _x} count (call EPOCH_JammerClasses) > -1)) then {
|
||||
|
||||
_objSlot = _vehicle getVariable["BUILD_SLOT", -1];
|
||||
if (_objSlot == -1) then{
|
||||
@ -100,7 +100,7 @@ if (isText _staticClassConfig) then {
|
||||
else {
|
||||
_newVehicle setVariable["BUILD_OWNER", _playerUID, true];
|
||||
};
|
||||
if (_newVehicle isKindOf "PlotPole_EPOCH") then {
|
||||
if ({_newVehicle isKindOf _x} count (call EPOCH_JammerClasses) > -1) then {
|
||||
EPOCH_Plotpoles pushBackUnique _newVehicle;
|
||||
publicvariable "EPOCH_Plotpoles";
|
||||
};
|
||||
|
@ -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: {
|
||||
|
@ -143,7 +143,7 @@ if (!isNull _player) then {
|
||||
if (surfaceiswater _newLocation) then {
|
||||
_CheckLocation = ATLToASL _newLocation;
|
||||
};
|
||||
_jammers = nearestObjects[_CheckLocation, ["PlotPole_EPOCH"], 6];
|
||||
_jammers = nearestObjects[_CheckLocation, call EPOCH_JammerClasses, 6];
|
||||
if !(_jammers isEqualTo[]) then {
|
||||
// get nearby object
|
||||
_jammer = _jammers param [0,objNull];
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
_position - position on map
|
||||
_traderCheck - BOOL - check _position distance near ProtectionZone_Invisible_F
|
||||
_jammerCheck - BOOL - check _position distance near PlotPole_EPOCH
|
||||
_jammerCheck - BOOL - check _position distance near PlotPoles
|
||||
_playerCheck - BOOL - check _position distance near other Players
|
||||
_others - ARRAY - positions to check with _distFromOthers
|
||||
_distFromOthers - NUMBER - How far away from _others array in meters
|
||||
@ -30,7 +30,7 @@ if(_traderCheck)then{
|
||||
|
||||
//CHECK FOR JAMMERS IN THE AREA WITHIN CONFIG RANGE
|
||||
if(_jammerCheck)then{
|
||||
_jammers = nearestObjects[_position, ["PlotPole_EPOCH"], _distFromJammers];
|
||||
_jammers = nearestObjects[_position, call EPOCH_JammerClasses, _distFromJammers];
|
||||
if(count _jammers > 0) then {
|
||||
_return = false;
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
private [ "_TraderGodMode","_StaticTraderItemPurge","_DynamicTraderRespawnCount","_TraderItemsDeleteRestart","_TraderInit","_TraderItemsClean","_newstock","_agent","_aiTables",
|
||||
"_arr","_config","_currentStock","_existingStock","_indexStock","_markers","_objHiveKey","_pos","_randomAIUniform","_response","_response2","_schedule",
|
||||
"_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_traderSlotIndex","_work","_arrchanged","_deleteat","_maxrnd",
|
||||
"_WinterDeco","_HelloweenDeco","_buildingJammerRange","_TraderDeco"
|
||||
"_WinterDeco","_HelloweenDeco","_TraderDeco"
|
||||
];
|
||||
//[[[end]]]
|
||||
params [["_maxTraderLimit",0]];
|
||||
@ -35,7 +35,6 @@ _DynamicTraderRespawnCount = [_serverSettingsConfig, "DynamicTraderRespawnCount"
|
||||
_TraderItemCountPerItem = [_serverSettingsConfig, "TraderItemCountPerItem", [100,100]] call EPOCH_fnc_returnConfigEntry;
|
||||
_TraderItemsDeleteRestart = [_serverSettingsConfig, "TraderItemsDeleteRestart", []] call EPOCH_fnc_returnConfigEntry;
|
||||
_TraderDeco = [_serverSettingsConfig, "TraderDeco", true] call EPOCH_fnc_returnConfigEntry;
|
||||
_buildingJammerRange = ["CfgEpochClient", "buildingJammerRange", 75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
_WinterDeco = (Epoch_ServerRealtime select 1) == 12 && (Epoch_ServerRealtime select 2) > 20 && _TraderDeco;
|
||||
_HelloweenDeco = (((Epoch_ServerRealtime select 1) == 10 && (Epoch_ServerRealtime select 2) >= 24) || ((Epoch_ServerRealtime select 1) == 11 && (Epoch_ServerRealtime select 2) <= 3)) && _TraderDeco;
|
||||
@ -200,7 +199,7 @@ for "_i" from 0 to (_maxTraderLimit-1) do {
|
||||
if (daytime > (_schedule select 0) && daytime < (_schedule select 1)) then {
|
||||
_pos = (_work select 0);
|
||||
};
|
||||
if (!(count (_arr select 0) >= _DynamicTraderRespawnCount) && (nearestobjects [_pos,["Plotpole_EPOCH"],_buildingJammerRange]) isequalto []) then {
|
||||
if (!(count (_arr select 0) >= _DynamicTraderRespawnCount) && (nearestobjects [_pos,call EPOCH_JammerClasses,call EPOCH_MaxJammerRange]) isequalto []) then {
|
||||
EPOCH_TraderSlots deleteAt _traderSlotIndex;
|
||||
_agent = createAgent [_class, _pos, [], 0, "NONE"];
|
||||
if !(EPOCH_forceStaticTraders) then {
|
||||
|
@ -15,7 +15,7 @@
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private [ "_serverSettingsConfig","_acceptableBlds","_agent","_aiClass","_aiTables","_buildingHome","_buildingWork","_buildings","_checkBuilding","_config","_endTime","_home",
|
||||
"_homes","_markers","_objHiveKey","_pos","_position","_randomAIUniform","_return","_schedule","_slot","_spawnCount","_startTime","_traderHomes","_usedBuildings","_work",
|
||||
"_WinterDeco","_HelloweenDeco","_buildingJammerRange","_TraderDeco","_TraderMinDistance","_traderblockblds","_Traderblocks"
|
||||
"_WinterDeco","_HelloweenDeco","_TraderDeco","_TraderMinDistance","_traderblockblds","_Traderblocks"
|
||||
];
|
||||
//[[[end]]]
|
||||
_serverSettingsConfig = configFile >> "CfgEpochServer";
|
||||
@ -34,7 +34,6 @@ if (_traderblockblds isEqualto []) then {
|
||||
};
|
||||
_traderHomes = getArray(_config >> "traderHomes");
|
||||
_TraderDeco = [_serverSettingsConfig, "TraderDeco", true] call EPOCH_fnc_returnConfigEntry;
|
||||
_buildingJammerRange = ["CfgEpochClient", "buildingJammerRange", 75] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
_WinterDeco = (Epoch_ServerRealtime select 1) == 12 && (Epoch_ServerRealtime select 2) > 20 && _TraderDeco;
|
||||
_HelloweenDeco = (((Epoch_ServerRealtime select 1) == 10 && (Epoch_ServerRealtime select 2) >= 24) || ((Epoch_ServerRealtime select 1) == 11 && (Epoch_ServerRealtime select 2) <= 3)) && _TraderDeco;
|
||||
@ -74,7 +73,7 @@ for "_i" from 1 to _spawnCount do {
|
||||
_usedBuildings pushBack _buildingWork;
|
||||
_home = selectRandom (_buildingHome buildingPos -1);
|
||||
_work = selectRandom (_buildingWork buildingPos -1);
|
||||
if ((nearestobjects [_home,["Plotpole_EPOCH"],_buildingJammerRange]) isequalto [] && (nearestobjects [_work,["Plotpole_EPOCH"],_buildingJammerRange]) isequalto []) then {
|
||||
if ((nearestobjects [_home,call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) isequalto [] && (nearestobjects [_work,call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) isequalto []) then {
|
||||
_startTime = floor(random 16);
|
||||
_endTime = _startTime + 8;
|
||||
_schedule = [_startTime, _endTime];
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_actualHitpoints","_allHitpoints","_allVehicles","_allowDamage","_arr","_arrNum","_availableColorsConfig","_cfgEpochVehicles","_check","_class","_colors","_config","_count","_dataFormat","_dataFormatCount","_diag","_disableVehicleTIE","_dmg","_found","_immuneIfStartInBase","_jammerOwner","_jammerRange","_jammers","_location","_lockedOwner","_marker","_nearestJammer","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_textureSelectionIndex","_textures","_vehHiveKey","_vehLockHiveKey","_vehicle","_vehicleDynamicSimulationSystem","_vehicleSlotIndex"];
|
||||
private ["_actualHitpoints","_allHitpoints","_allVehicles","_allowDamage","_arr","_arrNum","_availableColorsConfig","_cfgEpochVehicles","_check","_class","_colors","_count","_dataFormat","_dataFormatCount","_diag","_disableVehicleTIE","_dmg","_found","_immuneIfStartInBase","_jammerOwner","_jammers","_location","_lockedOwner","_marker","_nearestJammer","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_textureSelectionIndex","_textures","_vehHiveKey","_vehLockHiveKey","_vehicle","_vehicleDynamicSimulationSystem","_vehicleSlotIndex"];
|
||||
//[[[end]]]
|
||||
params [["_maxVehicleLimit",0]];
|
||||
|
||||
@ -23,10 +23,6 @@ _dataFormatCount = count _dataFormat;
|
||||
EPOCH_VehicleSlots = [];
|
||||
_allVehicles = [];
|
||||
|
||||
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_jammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
|
||||
_serverSettingsConfig = configFile >> "CfgEpochServer";
|
||||
_immuneIfStartInBase = [_serverSettingsConfig, "immuneIfStartInBase", true] call EPOCH_fnc_returnConfigEntry;
|
||||
_vehicleDynamicSimulationSystem = [_serverSettingsConfig, "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry;
|
||||
@ -191,7 +187,7 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
// allow damage
|
||||
_allowDamage = true;
|
||||
if (_immuneIfStartInBase) then {
|
||||
_jammers = nearestObjects[_vehicle, ["PlotPole_EPOCH"], _jammerRange];
|
||||
_jammers = nearestObjects[_vehicle, call EPOCH_JammerClasses,call EPOCH_MaxJammerRange];
|
||||
if!(_jammers isEqualTo [])then {
|
||||
// get jammer owner
|
||||
_nearestJammer = _jammers select 0;
|
||||
|
@ -34,7 +34,7 @@ if (!isNull _building) then {
|
||||
EPOCH_BaseCams = EPOCH_BaseCams - [_building];
|
||||
publicvariable "EPOCH_BaseCams";
|
||||
};
|
||||
if (_building iskindof "PlotPole_EPOCH") then {
|
||||
if (_building in (call EPOCH_JammerClasses)) then {
|
||||
EPOCH_Plotpoles = EPOCH_Plotpoles - [_building];
|
||||
publicvariable "EPOCH_Plotpoles";
|
||||
};
|
||||
|
@ -289,14 +289,13 @@ if ([_serverSettingsConfig, "disableAutoRefuel", false] call EPOCH_fnc_returnCon
|
||||
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 (((_x nearObjects ['Building',call EPOCH_MaxJammerRange]) select {getFuelCargo _x > 0}));
|
||||
|
||||
} foreach (missionnamespace getvariable ["Epoch_Plotpoles",allmissionobjects 'PlotPole_EPOCH']);
|
||||
} foreach (missionnamespace getvariable ["Epoch_Plotpoles",call {_allplots = [];{_allplots append (allmissionobjects _x)} foreach (call EPOCH_JammerClasses);_allplots}]);
|
||||
missionNamespace setVariable ["EPOCH_staticFuelSources", _staticFuelSources, true];
|
||||
};
|
||||
};
|
||||
@ -309,7 +308,7 @@ missionNamespace setVariable ["EPOCH_taxRate", [_serverSettingsConfig, "taxRate"
|
||||
|
||||
// pick random radioactive locations
|
||||
_radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations");
|
||||
_blacklist = getArray(_epochConfig >> worldName >> "radioactiveLocBLObjects");
|
||||
_blacklist = (call EPOCH_JammerClasses) + (getArray(_epochConfig >> worldName >> "radioactiveLocBLObjects"));
|
||||
_distance = getNumber(_epochConfig >> worldName >> "radioactiveLocBLDistance");
|
||||
_radioactiveLocationsTmp = [];
|
||||
if !(_radioactiveLocations isEqualTo []) then {
|
||||
|
@ -66,7 +66,7 @@ class CfgEpoch
|
||||
radioactiveLocationsCount = 3;
|
||||
|
||||
// BlackList radioactive locations spawn by object and distance
|
||||
radioactiveLocBLObjects[] = {"PlotPole_EPOCH"};
|
||||
radioactiveLocBLObjects[] = {}; // PlotPoles are already blacklisted by script
|
||||
radioactiveLocBLDistance = 500;
|
||||
|
||||
// Custom Locations for Radiation
|
||||
|
Loading…
Reference in New Issue
Block a user