diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo index 8da7409e..38e79b45 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index c68ccc0f..04c12386 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo index 7db6a4a1..be3ef3ff 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo index 3eca93d2..99724fb4 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo index 8ac9b80c..81e6e29e 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_vip_event.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_vip_event.pbo index f86e0cf2..062509b5 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_vip_event.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_vip_event.pbo differ diff --git a/Server_Install_Pack/@epochhive/epochconfig.hpp b/Server_Install_Pack/@epochhive/epochconfig.hpp index eaae3e0e..472d5050 100644 --- a/Server_Install_Pack/@epochhive/epochconfig.hpp +++ b/Server_Install_Pack/@epochhive/epochconfig.hpp @@ -27,6 +27,7 @@ forceRestartTime = 14400; // 4 hour restarts { 900, "ChangeWeather", 1 , 2, -1, {} ,{"VR"}}, { 1200, "ContainerSpawner", 0 , 2, -1, {} ,{"VR"}}, { 1440, "GardenManager", 0 , 2, -1, {} ,{"VR"}}, + { 1440, "SolarChargerManager", 0 , 2, -1, {} ,{"VR"}}, { 900, "MoneyDrop", 0 , 2 , -1, {} ,{"VR"}}, { 300, "PlantSpawner", 0 , 2 , -1, {} ,{"VR"}} //No comma on last Entry }; @@ -63,8 +64,10 @@ 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", @@ -89,6 +92,8 @@ forceRestartTime = 14400; // 4 hour restarts "Safe_EPOCH" }; ExceptedBaseObjects[] = { // Not Indestructible, also if in a Class of IndestructibleBaseObjects + "Spike_TRAP_EPOCH", + "Metal_TRAP_EPOCH", "CinderWallGarage_EPOCH", "WoodLargeWallDoorL_EPOCH", "WoodLargeWallDoor_EPOCH", diff --git a/Server_Install_Pack/INSTALL.txt b/Server_Install_Pack/INSTALL.txt index db7ee224..8e0de932 100644 --- a/Server_Install_Pack/INSTALL.txt +++ b/Server_Install_Pack/INSTALL.txt @@ -15,6 +15,8 @@ http://www.microsoft.com/en-us/download/details.aspx?id=40784 6. Open the SC/Battleye folder and rename example-BEServer.cfg to BEServer.cfg and change the RConPassword. 7. Look at the "start-A3-cmd-line-example.txt" file for an example command line for starting your server. +For more details in Server installation, visit: https://epochmod.com/forum/topic/44751-dec2017-arma-3-epochmod-server-installation-and-setup/ + == NOTES == * You should use a service restarter (like firedaemon) to keep the redis server and Arma 3 server running. diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index 3e2328a8..7e51b0a0 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Altis.pbo and b/Server_Install_Pack/mpmissions/epoch.Altis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Australia.pbo b/Server_Install_Pack/mpmissions/epoch.Australia.pbo index aee30454..e019fca2 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Australia.pbo and b/Server_Install_Pack/mpmissions/epoch.Australia.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo index c1f2f9b7..043720c1 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo index 073aeb59..971c9e15 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo and b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo index 1f24fb00..097935d1 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.ChernarusRedux.pbo b/Server_Install_Pack/mpmissions/epoch.ChernarusRedux.pbo index 0c31d821..854a8347 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.ChernarusRedux.pbo and b/Server_Install_Pack/mpmissions/epoch.ChernarusRedux.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo index 940752a7..cb60144f 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo index b385e8a7..1badc669 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo and b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo index 8e14a046..514af3f4 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo and b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.IslaDuala3.pbo b/Server_Install_Pack/mpmissions/epoch.IslaDuala3.pbo index e57d22c8..ee192358 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.IslaDuala3.pbo and b/Server_Install_Pack/mpmissions/epoch.IslaDuala3.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Kapaulio.pbo b/Server_Install_Pack/mpmissions/epoch.Kapaulio.pbo index a3c82a5e..36a81d89 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Kapaulio.pbo and b/Server_Install_Pack/mpmissions/epoch.Kapaulio.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Malden.pbo b/Server_Install_Pack/mpmissions/epoch.Malden.pbo index 7145bb7f..e07f90f4 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Malden.pbo and b/Server_Install_Pack/mpmissions/epoch.Malden.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo index cd461167..2384e29c 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Napf.pbo b/Server_Install_Pack/mpmissions/epoch.Napf.pbo index 9221ee78..258b31f7 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Napf.pbo and b/Server_Install_Pack/mpmissions/epoch.Napf.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Panthera3.pbo b/Server_Install_Pack/mpmissions/epoch.Panthera3.pbo index b4d4a87e..ed1efc95 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Panthera3.pbo and b/Server_Install_Pack/mpmissions/epoch.Panthera3.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index e67c44c8..9b68e127 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Porto.pbo and b/Server_Install_Pack/mpmissions/epoch.Porto.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo index 8fe93a7c..60271483 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo and b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara.pbo b/Server_Install_Pack/mpmissions/epoch.Sara.pbo index dbef7170..75aa23fd 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo index ac00769b..e5cb676f 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo and b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo index 35df8966..6e584991 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo index 2983c383..534f76f5 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo and b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo index b01cc9e8..cd9fe593 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo and b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo index f1a99269..5ceb24a6 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo and b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo index 2ec64053..27f1ac5a 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index 2a1a170a..4dd06f28 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.VR.pbo and b/Server_Install_Pack/mpmissions/epoch.VR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Winthera3.pbo b/Server_Install_Pack/mpmissions/epoch.Winthera3.pbo index c654264b..a7920f3f 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Winthera3.pbo and b/Server_Install_Pack/mpmissions/epoch.Winthera3.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo index c9635555..7861255c 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo index 31c67e40..2c3fd9bc 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo and b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.abramia.pbo b/Server_Install_Pack/mpmissions/epoch.abramia.pbo index fcc3bf5a..4db65521 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.abramia.pbo and b/Server_Install_Pack/mpmissions/epoch.abramia.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.dingor.pbo b/Server_Install_Pack/mpmissions/epoch.dingor.pbo index 5ce20193..3d01d0dd 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.dingor.pbo and b/Server_Install_Pack/mpmissions/epoch.dingor.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.lingor3.pbo b/Server_Install_Pack/mpmissions/epoch.lingor3.pbo index 989d0be6..1c686e32 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.lingor3.pbo and b/Server_Install_Pack/mpmissions/epoch.lingor3.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.utes.pbo b/Server_Install_Pack/mpmissions/epoch.utes.pbo index 90c6d659..4ebff77b 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.utes.pbo and b/Server_Install_Pack/mpmissions/epoch.utes.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo index be2c1a90..cf3881ce 100644 Binary files a/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo differ diff --git a/Server_Install_Pack/sc/battleye/addweaponcargo.txt b/Server_Install_Pack/sc/battleye/addweaponcargo.txt index a5e70eaa..87ebccdd 100644 --- a/Server_Install_Pack/sc/battleye/addweaponcargo.txt +++ b/Server_Install_Pack/sc/battleye/addweaponcargo.txt @@ -1 +1 @@ -5 "" !="H_MM_(Buzzard_Gasmask|Helmet)_01" !="V_MM_Vest_01" !="(V|H)_(F|)[0-9]{1,3}_EPOCH" !="(clown|pkin|wolf|radiation|hockey|plague|ghostface|skull|witch)_mask_epoch" !="Item(Map|GPS|Compass|Watch|GeigerCounter_EPOCH)|Power_Sword" !="EpochRadio[0-9]" !="B_UavTerminal" !="(U|G|bipod|acc|muzzle|optic)_[0-9A-Z_]{1,100}" !="(NVG|Defib|Heal|Repair|Elcan(_reflex|))_EPOCH" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul|Rod|Sword)|ChainSaw|MultiGun|Rollins_F|Plunger)" !="(ruger_pistol|speargun|1911_pistol|akm|m14|M14Grn|m16|m16Red|m107|m107Tan|m249|m249Tan|m4a3|sr25|l85a2|l85a2_(pink|ugl))_epoch" !="SMG_(01|02|05)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_(camo_|)F" !="arifle_(Katiba|Katiba_C|Katiba_GL|SDAR|TRG21|TRG20|TRG21_GL|Mk20|Mk20C|Mk20C_plain|Mk20_GL|Mk20_plain|Mk20_GL_plain)_F" !="arifle_(MXC|MX|MX_GL|MXM|MXM_Black|MX_GL_Black|MX_Black|MXC_Black|MX_SW|MX_SW_Black)_F" !="srifle_DMR_0[2-7](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F" !"CUP_((h|s)gun|(s|a)rifle|(l|s)mg)_" !"CUP_(optic|muzzle|acc|bipod)_" !"CUP_(Mxx|SVD)_camo" +5 "" !="H_MM_(Buzzard_Gasmask|Helmet)_01" !="V_MM_Vest_01" !="(V|H)_(F|)[0-9]{1,3}_EPOCH" !="(clown|pkin|wolf|radiation|hockey|plague|ghostface|skull|witch|thor|iron)_mask_epoch" !="Item(Map|GPS|Compass|Watch|GeigerCounter_EPOCH)|Power_Sword" !="EpochRadio[0-9]" !="B_UavTerminal" !="(U|G|bipod|acc|muzzle|optic)_[0-9A-Z_]{1,100}" !="(NVG|Defib|Heal|Repair|Elcan(_reflex|))_EPOCH" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul|Rod|Sword)|ChainSaw|MultiGun|Rollins_F|Plunger)" !="(ruger_pistol|speargun|1911_pistol|akm|m14|M14Grn|m16|m16Red|m107|m107Tan|m249|m249Tan|m4a3|sr25|l85a2|l85a2_(pink|ugl))_epoch" !="SMG_(01|02|05)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_(camo_|)F" !="arifle_(Katiba|Katiba_C|Katiba_GL|SDAR|TRG21|TRG20|TRG21_GL|Mk20|Mk20C|Mk20C_plain|Mk20_GL|Mk20_plain|Mk20_GL_plain)_F" !="arifle_(MXC|MX|MX_GL|MXM|MXM_Black|MX_GL_Black|MX_Black|MXC_Black|MX_SW|MX_SW_Black)_F" !="srifle_DMR_0[2-7](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F" !"CUP_((h|s)gun|(s|a)rifle|(l|s)mg)_" !"CUP_(optic|muzzle|acc|bipod)_" !"CUP_(Mxx|SVD)_camo" diff --git a/Server_Install_Pack/sc/battleye/remoteexec.txt b/Server_Install_Pack/sc/battleye/remoteexec.txt index 50fdb4c7..64744738 100644 --- a/Server_Install_Pack/sc/battleye/remoteexec.txt +++ b/Server_Install_Pack/sc/battleye/remoteexec.txt @@ -1 +1 @@ -5 "" !="bis_fnc_execvm \[\[.+\],\"initPlayerServer.sqf\"]" !="bis_fnc_effectkilled(airdestruction|secondaries) \[.+\]" !="epoch_server_(checkplayer|save(_vehicles|building)|(lock|pack)Storage|(upgrade|remove|paint|maint)build) \[.+\]" !="epoch_server_((load|respawn|dead|invite|revive|teleport)Player) \[.+\]" !="epoch_server_((upgrade|updateplayer|inviteplayer|create|delete)(Temp|)Group) \[.+\]" !="epoch_server_(deadplayerdetonate|triggerantagonist|playersetvariable|missioncomms|make(marker|SP)|removemarker) \[.+\]" !="epoch_server_(upgrade_vehicle|knockDownTree|mineRocks|lootAnimal|handle_(say3d|switchmove|sapperObjs)) \[.+\]" !="epoch_server_((repair|fill|lock)Vehicle|(loot|fill)Container|(store|take)Crypto|make(NPC|)Trade) \[.+\]" !="epoch_server_(paycrypto|tradeRequest|equippeditem|packJack|create(object|AirDrop)|airDropCrate|destroytrash|unpackBackpack) \[.+\]" !="epoch_(localcleanup|fnc_saveplayer|client_bitePlayer|serverlootobject|fnc_updateplayerstats) \[.+\]" !="cup_fnc_handletow \[.+\]" !="bis_fnc_reviveinitaddplayer \[.+\]" +5 "" !="bis_fnc_execvm \[\[.+\],\"initPlayerServer.sqf\"]" !="bis_fnc_effectkilled(airdestruction|secondaries) \[.+\]" !="epoch_server_(checkplayer|save(_vehicles|building)|(lock|pack)Storage|(upgrade|remove|paint|maint)build) \[.+\]" !="epoch_server_((load|respawn|dead|invite|revive|teleport)Player) \[.+\]" !="epoch_server_((upgrade|updateplayer|inviteplayer|create|delete)(Temp|)Group) \[.+\]" !="epoch_server_(deadplayerdetonate|triggerantagonist|playersetvariable|missioncomms|make(marker|SP)|removemarker) \[.+\]" !="epoch_server_(upgrade_vehicle|knockDownTree|mineRocks|lootAnimal|handle_(say3d|switchmove|sapperObjs)) \[.+\]" !="epoch_server_((repair|fill|lock)Vehicle|(loot|fill)Container|(store|take)Crypto|make(NPC|)Trade) \[.+\]" !="epoch_server_(paycrypto|tradeRequest|equippeditem|packJack|create(object|AirDrop)|airDropCrate|destroytrash|unpackBackpack) \[.+\]" !="epoch_(localcleanup|fnc_saveplayer|client_bitePlayer|serverlootobject|fnc_updateplayerstats|server_setfinalplayerpos) \[.+\]" !="cup_fnc_handletow \[.+\]" !="bis_fnc_reviveinitaddplayer \[.+\]" diff --git a/Server_Install_Pack/sc/battleye/scripts.txt b/Server_Install_Pack/sc/battleye/scripts.txt index 52d47902..e6bc37e9 100644 --- a/Server_Install_Pack/sc/battleye/scripts.txt +++ b/Server_Install_Pack/sc/battleye/scripts.txt @@ -33,7 +33,7 @@ 5 createUnit !="_driver = _grp createUnit[\"I_UAV_AI\", position _unit, [], 0, \"CAN_COLLIDE\"];" !="axeGeneral = grpVIPGeneral createUnit [\"I_officer_F\", axeGeneralPos, [], 1, \"CAN_COLLIDE\"];" !="bis_functions_mainscope = _grpLogic createunit [\"Logic\",[9,9,9],[],0,\"none\"];" !="_unit = _grp createUnit[selectRandom _arrUnits, _pos, [], 0, \"FORM\"];" !="_driver = (group player) createUnit[\"I_UAV_AI\", position axeUAV, [], 0, \"CAN_COLLIDE\"];" 5 createAgent !="bis_revive_ratioLethal = createAgent [\"Logic\", [10,10,0], [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent[_unitClass, _targetPos, [], 256, \"FORM\"];" !="_unit = createAgent [_unitClass, _targetPos, [], 120, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 5, \"NONE\"];" !="_unit = createAgent [\"Epoch_Cloak_F\", _pos, [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent [\"Epoch_Sapper_F\", _targetPos, [], 180, \"FORM\"];" !="_sapper = createAgent [\"Epoch_Sapper_F\", getPos _cage2, [], 0, \"FORM\"];" !="_unit = createAgent[_unitClass, position player, [], _zRange, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 0, \"CAN_COLLIDE\"];" !="_axeSapper = createAgent [\"Epoch_Sapper_F\", _pos, [], 12, \"FORM\"];" !="_nestMate = createAgent [\"Epoch_Sapper_F\", _garrPos, [], 0, \"FORM\"];" 5 createTeam -5 createDialog !="createDialog \"rmx_dynamenu\";" !="createDialog \"rmx_craftingUI\";" !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog _tapDiag;" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';" !="createDialog \"Epoch_myTempGroup\";" !="createDialog (if ((Epoch_my_tempGroupUID == \"\") && (Epoch_my_tempGroup isEqualTo [])) then {\"EPOCH_createTempGrp\"} else {\"Epoch_myTempGroup\"});" !="createDialog \"tempGroupRequests\";" +5 createDialog !="createdialog 'Epoch_CamDialog'" !="createDialog \"rmx_dynamenu\";" !="createDialog \"rmx_craftingUI\";" !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog _tapDiag;" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';" !="createDialog \"Epoch_myTempGroup\";" !="createDialog (if ((Epoch_my_tempGroupUID == \"\") && (Epoch_my_tempGroup isEqualTo [])) then {\"EPOCH_createTempGrp\"} else {\"Epoch_myTempGroup\"});" !="createDialog \"tempGroupRequests\";" 5 createDisplay !="createDisplay \"rmx_dynamenu\";" !="createDisplay \"rmx_moveDynamicHUD\";" !="_parent createdisplay _displayClass;" !="finddisplay 151 createdisplay 'RscDisplayOptionsLayout'" !="_display createdisplay \"RscDisplayDLCPreview\";" 5 deleteMarker !="deleteMarkerLocal _mName;" 5 setMarker !="CBA_fnc_setMarkerPersistent\"" !="\\fnc_setMarkerPersistent" !="\"setMarkerPersistent" !="_mName setMarkerShapeLocal _mShape;" !="_mName setMarkerTypeLocal _mType;" !="(_x select 0) setMarkerPosLocal (position player);" !="_zoomMarker setMarkerSizeLocal" diff --git a/Server_Install_Pack/sc/battleye/setpos.txt b/Server_Install_Pack/sc/battleye/setpos.txt index 16175819..7502f0bf 100644 --- a/Server_Install_Pack/sc/battleye/setpos.txt +++ b/Server_Install_Pack/sc/battleye/setpos.txt @@ -1 +1 @@ -5 "" !="Epoch_(Male|Female)_F" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf)_EPOCH" !="(ToolRack|Rabbit|Cabinet|toilet|KitchenSink)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !=".+_(SIM|Ghost)_EPOCH" !="(FirePlace|FirePlaceOn)_EPOCH" +5 "" !="Epoch_(Male|Female)_F" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf)_EPOCH" !="(ToolRack|Rabbit|Cabinet|toilet|KitchenSink)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !=".+_(SIM|Ghost)_EPOCH" !="(FirePlace|FirePlaceOn)_EPOCH" !"K(01|02|03|04)" !"ebike" !"Quadbike" !"hoverboard_epoch" !"C_Kart_" diff --git a/Sources/epoch_code/System/player_login.fsm b/Sources/epoch_code/System/player_login.fsm index ab8b8db5..f0a4d736 100644 --- a/Sources/epoch_code/System/player_login.fsm +++ b/Sources/epoch_code/System/player_login.fsm @@ -1,8 +1,8 @@ -/*%FSM*/ +/*%FSM*/ /*%FSM*/ /* item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; -item1[] = {"FINISH",1,250,-149.463196,1518.792480,-49.463196,1568.792480,0.000000,"FINISH"}; +item1[] = {"FINISH",1,250,-156.564148,1645.189819,-56.564148,1695.189819,0.000000,"FINISH"}; item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; @@ -17,23 +17,23 @@ item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000, item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; -item16[] = {"Response",4,4314,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; -item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-32.100952,1201.397339,67.899048,1251.397339,0.000000,"Setup Player" \n "Variables"}; item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; -item24[] = {"Player_In_Game",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"Player" \n "In Game"}; +item24[] = {"Player_In_Game",8,218,-157.100952,1251.397339,-57.100952,1301.397339,0.000000,"Player" \n "In Game"}; item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; -item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item27[] = {"Setup_Player_Obj",2,250,-32.100952,1101.397339,67.899048,1151.397339,0.000000,"Setup Player" \n "Object"}; item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; -item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item29[] = {"Preload_done",8,218,-157.100952,1551.397339,-57.100952,1601.397339,0.000000,"Preload" \n "done"}; item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; -item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item32[] = {"true",8,218,417.899048,1201.397339,517.899048,1251.397339,0.000000,"true"}; item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; @@ -50,26 +50,26 @@ item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0. item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; -item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; -item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; -item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; -item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; -item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; -item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; -item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; -item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; -item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; -item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; -item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; -item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; -item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item49[] = {"new_player_____p",4,218,-157.100952,1151.397339,-57.100952,1201.397339,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-32.100952,1301.397339,67.899048,1351.397339,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-32.100952,1401.397339,67.899048,1451.397339,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-32.100952,1501.397339,67.899048,1551.397339,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,92.899048,1301.397339,192.899048,1351.397339,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,217.899048,1301.397339,317.899048,1351.397339,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,142.899048,1351.397339,242.899048,1401.397339,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,292.899048,1351.397339,392.899048,1401.397339,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,142.899048,1426.397339,242.899048,1476.397339,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,217.899048,1501.397339,317.899048,1551.397339,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,292.899048,1426.397339,392.899048,1476.397339,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-20.739410,880.680786,79.260590,930.680786,0.000000,"Check" \n "New Player"}; +item61[] = {"check_1_new__pla",4,218,-147.159637,930.680786,-47.159637,980.680786,0.000000,"check 1 new " \n "player"}; item62[] = {"true",4,218,-150.000000,-325.000000,-60.000000,-275.000000,0.000000,"true"}; item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; -item66[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; -item67[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; -item68[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item66[] = {"Timeout_",4,218,117.899048,1101.397339,217.899048,1151.397339,0.000000,"" \n "Timeout" \n ""}; +item67[] = {"ERROR_Player_Setup",2,250,267.899048,1101.397339,367.899048,1151.397339,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item68[] = {"",7,210,463.899048,1122.397339,471.899048,1130.397339,0.000000,""}; item69[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; item70[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; item71[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; @@ -86,6 +86,11 @@ item81[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.0000 item82[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; item83[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; item84[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item85[] = {"Check_New_Player_1",2,250,-29.260529,995.716492,70.739471,1045.716309,0.000000,"Check" \n "New Player" \n "Setup"}; +item86[] = {"check_2_new__pla",4,4314,-154.260574,1044.296387,-54.260574,1094.296387,0.000000,"check 2 new " \n "player"}; +item87[] = {"Timeout_No_Respo",4,218,127.840363,997.136780,227.840363,1047.136475,0.000000,"Timeout" \n "No Response"}; +item88[] = {"ERROR_Server_not_5",2,250,266.478851,995.716614,366.478851,1045.716309,0.000000,"ERROR" \n "Server not" \n "Response"}; +item89[] = {"",7,210,466.446442,1000.643677,474.446442,1008.643677,0.000000,""}; link0[] = {0,62}; link1[] = {2,3}; link2[] = {3,7}; @@ -109,7 +114,7 @@ link19[] = {18,19}; link20[] = {18,75}; link21[] = {19,72}; link22[] = {20,21}; -link23[] = {21,68}; +link23[] = {21,89}; link24[] = {22,84}; link25[] = {23,25}; link26[] = {24,50}; @@ -154,7 +159,7 @@ link64[] = {58,52}; link65[] = {59,58}; link66[] = {60,15}; link67[] = {60,61}; -link68[] = {61,27}; +link68[] = {61,85}; link69[] = {62,63}; link70[] = {63,64}; link71[] = {64,65}; @@ -183,8 +188,14 @@ link93[] = {82,76}; link94[] = {83,16}; link95[] = {83,22}; link96[] = {84,31}; -globals[] = {0.000000,0,0,0,0,640,480,1,247,6316128,1,-279.414825,540.037537,1629.530029,374.077881,577,884,1}; -window[] = {2,-1,-1,-1,-1,819,52,1036,52,3,595}; +link97[] = {85,86}; +link98[] = {85,87}; +link99[] = {86,27}; +link100[] = {87,88}; +link101[] = {88,89}; +link102[] = {89,68}; +globals[] = {0.000000,0,0,0,0,640,480,1,258,6316128,1,-228.686249,247.871552,1378.466309,648.349915,577,884,1}; +window[] = {2,-1,-1,-1,-1,845,78,1062,78,3,595}; *//*%FSM*/ class FSM { @@ -517,7 +528,7 @@ class FSM priority = 0.000000; to="ERROR_Server_not_3"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 30"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ @@ -615,7 +626,7 @@ class FSM priority = 0.000000; to="ERROR_Player_Setup"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 30"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ @@ -1044,48 +1055,37 @@ class FSM name = "Check_New_Player"; itemno = 60; init = /*%FSM*/"_myTime = diag_tickTime;" \n - "" \n "player reveal _playerObject;" \n - "" \n - "_playerPos = getpos _playerObject;" \n - "" \n """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n "progressLoadingScreen 0.6;" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { - /*%FSM*/ - class check_new__player + /*%FSM*/ + class check_1_new__pla { itemno = 61; priority = 0.000000; - to="Setup_Player_Obj"; + to="Check_New_Player_1"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"" \n - "_state = false;" \n + condition=/*%FSM*/"_state = false;" \n "_playerCheck = !(isNull _playerObject);" \n - "_playerCheckSetup = false;" \n - "_playerCheckObjectsReady = false;" \n - "_playerCheckFinal = false;" \n + "_PlayerPosCheck = false;" \n + "_playerCheckMass = false;" \n "if (_playerCheck) then {" \n - " _playerCheckSetup = _playerObject getVariable [""SETUP"",false];" \n - " if (_playerCheckSetup) then {" \n - " _playerCheckObjectsReady = _playerPos nearObjectsReady 10;" \n - " if (_playerCheckObjectsReady) then {" \n - " _playerCheckFinal = (_mass isEqualTo (loadAbs _playerObject));" \n - " if (_playerCheckFinal) then {" \n - " _state = true;" \n - " };" \n + " _PlayerPosCheck = !((_playerObject getVariable [""FinalDest"",[]]) isequalto []);" \n + " if (_PlayerPosCheck) then {" \n + " _playerCheckMass = (_loadabs == (loadabs _playerObject));" \n + " if (_playerCheckMass) then {" \n + " _state = true;" \n " };" \n " };" \n "};" \n "if (_debug) then {" \n " diag_log format[""DEBUG: Checking Player Object: %1"", [""FAILED"",""OK""] select _playerCheck];" \n - " diag_log format[""DEBUG: Checking Player is setup: %1"", [""FAILED"",""OK""] select _playerCheckSetup];" \n - " diag_log format[""DEBUG: Checking world preloaded: %1"", [""FAILED"",""OK""] select _playerCheckObjectsReady];" \n - " diag_log format[""DEBUG: Final Player mass check: %1 (%2 != %3)"", [""FAILED"",""OK""] select _playerCheckFinal, _mass, (loadAbs _playerObject)];" \n - " diag_log format[""DEBUG: Pos check: %1 == %2"", getpos _playerObject, getpos player];" \n + " diag_log format[""DEBUG: Checking Player PosVar: %1"", [""FAILED"",""OK""] select _PlayerPosCheck];" \n + " diag_log format[""DEBUG: Final Player mass check: %1 (%2 != %3)"", [""FAILED"",""OK""] select _playerCheckMass, _loadabs, (loadabs _playerObject)];" \n "};" \n "_state"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; @@ -1098,7 +1098,7 @@ class FSM priority = 0.000000; to="ERROR_Server_not"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 30"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ @@ -1373,7 +1373,7 @@ class FSM priority = 0.000000; to="ERROR_Server_not_4"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 30"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ @@ -1388,7 +1388,7 @@ class FSM action=/*%FSM*/"_playerObject = _C_SET deleteAt 0;" \n "_playerVariables = _C_SET deleteAt 0;" \n "_currentWeapon = _C_SET deleteAt 0;" \n - "_mass = _C_SET deleteAt 0;" \n + "_loadabs = _C_SET deleteAt 0;" \n "" \n "Epoch_my_GroupUID = _C_SET deleteAt 0;" \n "Epoch_my_tempGroupUID = """";" \n @@ -1436,6 +1436,103 @@ class FSM }; }; /*%FSM*/ + /*%FSM*/ + class Check_New_Player_1 + { + name = "Check_New_Player_1"; + itemno = 85; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "_playerPos = (_playerObject getvariable [""FinalDest"",[[0,0,0],0]]) select 0;" \n + "[player,_playerobject] remoteexec [""EPOCH_server_SetFinalPlayerPos"",2];" \n + """Setting final Player Position... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.7;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + itemno = 87; + priority = 0.000000; + to="ERROR_Server_not_5"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 30"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class check_2_new__pla + { + itemno = 86; + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_state = false;" \n + "_playerCheck = !(isNull _playerObject);" \n + "_playerCheckSetup = false;" \n + "_playerCheckObjectsReady = false;" \n + "_playerPosCheck = false;" \n + "_HiddenCheck = false;" \n + "if (_playerCheck) then {" \n + " _playerCheckSetup = _playerObject getVariable [""SETUP"",false];" \n + " if (_playerCheckSetup) then {" \n + " _playerCheckObjectsReady = _playerPos nearObjectsReady 10;" \n + " if (_playerCheckObjectsReady) then {" \n + " _playerPosCheck = (getposatl _playerObject distance _playerPos < 100);" \n + " if (_playerPosCheck) then {" \n + " _HiddenCheck = !(isObjectHidden _playerObject);" \n + " if (_HiddenCheck) then {" \n + " _state = true;" \n + " };" \n + " };" \n + " };" \n + " };" \n + "};" \n + "if (_debug) then {" \n + " diag_log format[""DEBUG: Checking Player Object: %1"", [""FAILED"",""OK""] select _playerCheck];" \n + " diag_log format[""DEBUG: Checking Player is setup: %1"", [""FAILED"",""OK""] select _playerCheckSetup];" \n + " diag_log format[""DEBUG: Checking world preloaded: %1"", [""FAILED"",""OK""] select _playerCheckObjectsReady];" \n + " diag_log format[""DEBUG: Pos check: _playerObj: %1 - Player: %2 - dist: %3"", getposatl _playerObject, _playerPos, getposatl _playerObject distance _playerPos];" \n + " diag_log format[""DEBUG: Checking is Object is visible: %1"", [""FAILED"",""OK""] select _HiddenCheck];" \n + "};" \n + "_state"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_5 + { + name = "ERROR_Server_not_5"; + itemno = 88; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + itemno = 32; + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ }; initState="INIT"; finalStates[] = diff --git a/Sources/epoch_code/compile/EPOCH_CamUse.sqf b/Sources/epoch_code/compile/EPOCH_CamUse.sqf new file mode 100644 index 00000000..2d990108 --- /dev/null +++ b/Sources/epoch_code/compile/EPOCH_CamUse.sqf @@ -0,0 +1,130 @@ +/* + Author: He-Man + + Contributors: + + Description: BaseCam Script + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_CamUse.sqf +*/ + +private ["_mycams","_buildingJammerRange","_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 [])}; +}; +if !(_mycams isequalto []) then { + _curcam = _mycams find Epoch_ActiveCam; + if (_curcam > -1 && (count _mycams) > (_curcam + 1)) then { + Epoch_ActiveCam = _mycams select (_curcam + 1); + } + else { + Epoch_ActiveCam = _mycams select 0; + }; +} +else { + Epoch_ActiveCam = objnull; +}; + +if !(isnull (finddisplay -1200)) exitwith {}; +if (isnull Epoch_ActiveCam) exitwith { + ["No Camera found",5] call Epoch_Message; +}; + +_mycams spawn { + private ["_mycams","_display","_AutoCam","_ActiveCam","_campos","_CamFov","_CamDir","_CamDist","_EpochCam","_targetheight","_targetpos","_dirs","_intensity","_sharpness","_h","_oldalpha","_newalpha"]; + _mycams = _this; + createdialog 'Epoch_CamDialog'; + waituntil {!isnull finddisplay -1200}; + _display = finddisplay -1200; + (_display displayctrl 1000) ctrlsettext format ["Cam %1",(_mycams find Epoch_ActiveCam) + 1]; + (_display displayctrl 1001) ctrlsetstructuredtext parseText format [ + "Controls:

Cam Up: %1
Cam Down: %2
Cam Left: %3
Cam Right: %4
Zoom In: %5
Zoom Out: %6

AutoCam: %7
NextCam: %8", + keyName Epoch_KB_BaseCamUp,keyName Epoch_KB_BaseCamDown,keyName Epoch_KB_BaseCamLeft,keyName Epoch_KB_BaseCamRight,keyName Epoch_KB_BaseCamZoomIn,keyName Epoch_KB_BaseCamZoomOut,keyName Epoch_KB_BaseCamAutoCam,keyName Epoch_KB_BaseCamNextCam + ]; + Epoch_AutoCam = true; + _AutoCam = Epoch_AutoCam; + Epoch_CamAdjust = [0,0,0]; + _ActiveCam = Epoch_ActiveCam; + _campos = Epoch_ActiveCam getRelPos [0.2,180]; + _campos set [2,(getposatl Epoch_ActiveCam select 2)]; + if (isnil "Epoch_CamFilmGrain") then { + Epoch_CamFilmGrain = ppEffectCreate ["FilmGrain", 2000 + 25]; + }; + Epoch_CamFilmGrain ppEffectEnable true; + _intensity = ((player distance Epoch_ActiveCam) / 10000) min 1; + _sharpness = 1.25 - _intensity; + Epoch_CamFilmGrain ppEffectAdjust [_intensity,_sharpness,2.01,0.75,1.0,true]; + Epoch_CamFilmGrain ppEffectCommit 0; + _CamFov = 0.7; + _CamDir = 0; + _CamDist = 250; + _EpochCam = 'camera' camCreate _campos; + showCinemaBorder true; + _EpochCam cameraEffect ['internal', 'front']; + _EpochCam camCommit 0; + _targetheight = ((getposasl Epoch_ActiveCam) select 2)-50; + _targetpos = Epoch_ActiveCam getRelPos [_CamDist, 180+_CamDir]; + _targetpos set [2,_targetheight]; + if !(surfaceiswater _targetpos) then { + _targetpos = ASLtoATL _targetpos; + }; + _EpochCam camSetTarget _targetpos; + _EpochCam camCommit 0; + _dirs = [5,10,15,20,25,30,35,40,45,40,35,30,25,20,15,10,5,0,-5,-10,-15,-20,-25,-30,-35,-40,-45,-40,-35,-30,-25,-20,-15,-10,-5,0]; + while {!isnull _display} do { + Epoch_CamAdjust params ["_dir","_height","_zoom"]; + _AutoCam = Epoch_AutoCam; + if !(_ActiveCam isequalto Epoch_ActiveCam) then { + _ActiveCam = Epoch_ActiveCam; + camDestroy _EpochCam; + _campos = Epoch_ActiveCam getRelPos [0.2,180]; + _campos set [2,(getposatl Epoch_ActiveCam select 2)]; + _CamFov = 0.7; + _CamDir = 0; + _EpochCam = 'camera' camCreate _campos; + showCinemaBorder true; + _EpochCam cameraEffect ['internal', 'front']; + _EpochCam camCommit 0; + _targetheight = ((getposasl Epoch_ActiveCam) select 2)-50; + _intensity = ((player distance Epoch_ActiveCam) / 10000) min 1; + _sharpness = 1.25 - _intensity; + Epoch_CamFilmGrain ppEffectAdjust [_intensity,_sharpness,2.01,0.75,1.0,true]; + Epoch_CamFilmGrain ppEffectCommit 0; + (_display displayctrl 1000) ctrlsettext format ["Cam %1",(_mycams find Epoch_ActiveCam) + 1]; + }; + if !(Epoch_AutoCam) then { + _targetheight = ((_targetheight + _height) min 50) max -150; + _CamDir = ((_CamDir + _dir) max -45) min 45; + _CamFov = ((_CamFov + _zoom) min 1.25) max 0.35; + } + else { + _targetheight = ((getposasl Epoch_ActiveCam) select 2)-50; + _CamFov = 0.7; + _CamDir = _dirs deleteat 0; + _dirs pushback _CamDir; + }; + _targetpos = Epoch_ActiveCam getRelPos [_CamDist, 180+_CamDir]; + _targetpos set [2,_targetheight]; + if !(surfaceiswater _targetpos) then { + _targetpos = ASLtoATL _targetpos; + }; + _EpochCam camSetTarget _targetpos; + _EpochCam camSetFov _CamFov; + _EpochCam camCommit 0.75; + Epoch_CamAdjust = [0,0,0]; + waitUntil {camCommitted _EpochCam || isnull _display || isnull Epoch_ActiveCam || !(_ActiveCam isequalto Epoch_ActiveCam)}; + if (isnull Epoch_ActiveCam) exitwith {}; + }; + player cameraEffect ['Terminate', 'FRONT']; + camDestroy _EpochCam; + _display closedisplay 0; + Epoch_ActiveCam = objnull; + Epoch_CamFilmGrain ppEffectEnable false; +}; diff --git a/Sources/epoch_code/compile/EPOCH_DefibrillatorUse.sqf b/Sources/epoch_code/compile/EPOCH_DefibrillatorUse.sqf new file mode 100644 index 00000000..28660410 --- /dev/null +++ b/Sources/epoch_code/compile/EPOCH_DefibrillatorUse.sqf @@ -0,0 +1,57 @@ +/* + Author: He-Man - EpochMod.com + + Contributors: + + Description: + Epoch use Defibrillator function + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_DefibrillatorUse.sqf +*/ + +private ["_item","_energyneeded","_totalDefis","_CurDefiArr"]; + +params ["_unit"]; + +if (isplayer _unit) then { + _item = 'ItemDefibrillator'; + if (_item in magazines player) then { + _energyneeded = 3; + _totalDefis = (magazinesammo player) select {(_x select 0) isequalto _item}; + _CurDefiArr = []; + { + if ((_x select 1) >= _energyneeded) exitwith { + _CurDefiArr = _totalDefis deleteat _foreachindex; + }; + } foreach _totalDefis; + if (_CurDefiArr isequalto []) exitwith { + ["Defibrillator needs more Energy",5] call Epoch_Message; + }; + if ((_CurDefiArr select 1) - _energyneeded > 0) then { + _CurDefiArr set [1,(_CurDefiArr select 1) - _energyneeded]; + _totalDefis pushback _CurDefiArr; + }; + player removemagazines _item; + { + _x call EPOCH_fnc_addMagazineOverflow; + } foreach _totalDefis; + _unit spawn { + player playMove 'AinvPknlMstpSnonWrflDnon_medic0'; + player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd'; + uisleep 8; + if (alive player && isplayer _this) then { + [_this,player,Epoch_personalToken] remoteExec ['EPOCH_server_revivePlayer',2]; + }; + }; + } + else { + ['You need a Defibrillator to Revive',5] call Epoch_Message; + }; +} +else { + ['This Player can not be revived',5] call Epoch_Message; +}; \ No newline at end of file diff --git a/Sources/epoch_code/compile/EPOCH_PutHandler.sqf b/Sources/epoch_code/compile/EPOCH_PutHandler.sqf index 9756bdba..7839df46 100644 --- a/Sources/epoch_code/compile/EPOCH_PutHandler.sqf +++ b/Sources/epoch_code/compile/EPOCH_PutHandler.sqf @@ -12,10 +12,14 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_PutHandler.sqf */ -private _class = param [2]; +params ["_unit", "_container", "_class"]; //Radio Check if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _class)) == "ItemRadio") then { if !(_class in(assignedItems player)) then { EPOCH_equippedItem_PVS = [_class,false,player]; }; }; + +if (_class in ["EnergyPack","EnergyPackLg"] && (typeof _container) in ["SolarCharger_EPOCH","SolarChargerXL_EPOCH"]) then { + ["Charging ...",5,[[0,1,0,0.2],[1,1,1,1]]] call Epoch_Message; +}; diff --git a/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf b/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf index d4ce6e3b..e40a9b11 100644 --- a/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf +++ b/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf @@ -49,6 +49,10 @@ if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _item)) == "ItemRadio" }; }; +if (_item in ["EnergyPack","EnergyPackLg"] && (typeof _container) in ["SolarCharger_EPOCH","SolarChargerXL_EPOCH"]) then { + ["Stop Charging ...",5,[[1,0,0,0.2],[1,1,1,1]]] call Epoch_Message; +}; + // Unisex vest check _woman = getNumber(configFile >> "CfgVehicles" >> (typeOf player) >> "woman"); _config = configfile >> "cfgweapons" >> _item; diff --git a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf index 0bba493e..15952c7d 100644 --- a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf +++ b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf @@ -42,13 +42,32 @@ if (_inputCount >= 3) then { _removeItem = {([player,_this] call BIS_fnc_invRemove) == 1}; _unifiedInteract = { - private _removed = _item call _removeItem; + private ["_removed","_multi","_maxMagRnd","_totalMags","_remove"]; + _removed = false; + _multi = 1; + _maxMagRnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count"); + if (_maxMagRnd > 1) then { + _totalMags = (magazinesammo player) select {(_x select 0) isequalto _item}; + if !(_totalMags isequalto []) then { + _remove = _totalMags deleteat 0; + _removed = true; + _remove params ["_class","_rounds"]; + _multi = _rounds / _maxMagRnd; + player removemagazines _item; + { + _x call EPOCH_fnc_addMagazineOverflow; + } foreach _totalMags; + }; + } + else { + _removed = _item call _removeItem; + }; if (_removed) then { if (_interactReturnOnUse != "") then { _interactReturnOnUse call EPOCH_fnc_addItemOverflow; }; { - _output = _x call EPOCH_giveAttributes; + _output = [_x select 0, round ((_x select 1) * _multi)] call EPOCH_giveAttributes; if (_output != "") then { [_output, 5] call Epoch_message_stack; }; @@ -412,6 +431,47 @@ switch _interactOption do { [format["%1 is not needed at this time",_item call EPOCH_itemDisplayName], 5] call Epoch_message; }; }; + case 17: { // Defibrillator + _maxMagRnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count"); + _totalDefis = (magazinesammo player) select {(_x select 0) isequalto _item}; + _totalMags = (magazinesammo player) select {(_x select 0) in ["EnergyPackLg","EnergyPack"]}; + if (_totalDefis isequalto []) exitwith {}; + if !(_totalMags isequalto []) then { + _CurDefiArr = []; + { + if ((_x select 1) < _maxMagRnd) exitwith { + _CurDefiArr = _totalDefis deleteat _foreachindex; + }; + } foreach _totalDefis; + if (_CurDefiArr isequalto []) exitwith { + ["Defibrillator is already fully charged",5] call Epoch_Message; + }; + _remove = _totalMags deleteat 0; + _remove params ["_class","_rounds"]; + _charge = _rounds min (_maxMagRnd - (_CurDefiArr select 1)); + if (_rounds - _charge > 0) then { + _remove set [1,_rounds - _charge]; + _totalMags pushback _remove; + }; + if (_charge > 0) then { + _CurDefiArr set [1,(_CurDefiArr select 1) + _charge]; + _totalDefis pushback _CurDefiArr; + player removemagazines _item; + player removemagazines "EnergyPackLg"; + player removemagazines "EnergyPack"; + { + _x call EPOCH_fnc_addMagazineOverflow; + } foreach _totalMags; + { + _x call EPOCH_fnc_addMagazineOverflow; + } foreach _totalDefis; + [format ["Recharged Defibrillator with %1 Energy",_charge],5] call Epoch_Message; + }; + } + else { + ["You need an Energy Pack",5] call Epoch_Message; + }; + }; default { ["Found nothing", 5] call Epoch_message; diff --git a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf index a1df58cb..4c56d413 100644 --- a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf @@ -23,7 +23,7 @@ BOOL */ //[[[cog import generate_private_arrays ]]] -private ["_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 ["_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"]; //[[[end]]] _buildingAllowed = true; @@ -49,6 +49,7 @@ _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}; @@ -59,6 +60,7 @@ 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}; // input params ["_objType"]; @@ -133,6 +135,12 @@ if !(_jammer isEqualTo []) then { _buildingAllowed = false; ["Building Disallowed: Max building height reached",5] call Epoch_message; }; + if (_objType isequalto "BaseCam_EPOCH" && _buildingAllowed) then { + if ((count (nearestObjects[_nearestJammer,["BaseCam_EPOCH","BaseCam_SIM_EPOCH","BaseCam_Ghost_EPOCH"],_buildingJammerRange]-[_obj])) >= _CamCountLimit) then { + _buildingAllowed = false; + [format["Building Disallowed: Max %1 Cams per Base!", _CamCountLimit], 5] call Epoch_message; + }; + }; }; }; } diff --git a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf index 571df140..4f99717f 100644 --- a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf @@ -101,7 +101,7 @@ if (_object isKindOf "Constructions_static_F") then { _canUpgrade = true; _canUpgradePartCount = 0; - _missingParts = ""; + _missingParts = "Missing: "; { _part = _x select 0; _req = _x select 1; @@ -111,27 +111,27 @@ if (_object isKindOf "Constructions_static_F") then { _missingCount = _req - _partCheck; _canUpgrade = false; - _missingParts = _missingParts + format["Missing %1 %2, ", _missingCount, (_part call EPOCH_itemDisplayName)]; + _missingParts = _missingParts + format["%1 %2, ", _missingCount, (_part call EPOCH_itemDisplayName)]; }; _canUpgradePartCount = _canUpgradePartCount + _req; } forEach _upgradeParts; - _doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH","CinderWallDoorwHatch_EPOCH"]; - _gates = ["CinderWallGarage_EPOCH"]; + _doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH","CinderWallDoorwHatch_EPOCH","WoodStairs3_EPOCH"]; + _gates = ["CinderWallGarage_EPOCH","WoodWallGarage_EPOCH","MetalWallGarage_EPOCH"]; if (_canUpgrade) then { _upgradeto = _upgrade select 0; if (_upgradeto in _doors) then { _countdoors = count (nearestobjects [_nearestJammer,_doors,_buildingJammerRange]); if (_countdoors >= _maxdoors) then { _canUpgrade = false; - _missingParts = _missingParts + format["Can not upgrade to locked Door! Max %1 allowed per Base!", _maxdoors]; + _missingParts = format["Can not upgrade to locked Door / Stairs! Max %1 allowed per Base!", _maxdoors]; }; }; if (_upgradeto in _gates) then { _countgates = count (nearestobjects [_nearestJammer,_gates,_buildingJammerRange]); if (_countgates >= _maxgates) then { _canUpgrade = false; - _missingParts = _missingParts + format["Can not upgrade to Gate! Max %1 allowed per Base!", _maxgates]; + _missingParts = format["Can not upgrade to Gate! Max %1 allowed per Base!", _maxgates]; }; }; }; diff --git a/Sources/epoch_code/compile/functions/EPOCH_fn_returnConfigEntryV2.sqf b/Sources/epoch_code/compile/functions/EPOCH_fn_returnConfigEntryV2.sqf index d9766585..4f42b746 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_fn_returnConfigEntryV2.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_fn_returnConfigEntryV2.sqf @@ -13,7 +13,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/functions/EPOCH_fn_returnConfigEntryV2.sqf Example: - _sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; + _config = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; Parameter(s): _this select 0: STRING - Config Class @@ -24,7 +24,7 @@ MIXED */ //[[[cog import generate_private_arrays ]]] -private ["_config","_finalconfig","_missionconfig","_sapperRndChance","_varData"]; +private ["_config","_finalconfig","_missionconfig","_varData"]; //[[[end]]] params ["_configClass","_variableName","_defaultData"]; _varData = _defaultData; diff --git a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf index 9077cbe4..0dc80d0d 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf @@ -37,7 +37,7 @@ switch true do { if (!isNull cursorTarget) then { _cursorTarget = cursorTarget; _repaired = false; - if ((player distance _cursorTarget) <= 6) then { + if ((player distance _cursorTarget) <= (((SizeOf (TypeOf _cursorTarget))/2) max 6) min 12) then { _attachments = handgunItems player; _heal = false; if (_cursorTarget isKindOf "Man") then { @@ -97,12 +97,14 @@ switch true do { }; case (_ammo isKindOf "B_Swing" || _ammo isKindOf "B_Stick") : { player playActionNow "SledgeSwing"; - if (_weapon in ["MeleeSword","Power_Sword"]) then { - call EPOCH_mineRocks; - call EPOCH_chopWood; - }; if (_weapon isEqualTo "MeleeRod") then { call EPOCH_fish; + } + else { + call EPOCH_mineRocks; + if (_weapon in ["MeleeSword","Power_Sword"]) then { + call EPOCH_chopWood; + }; }; }; case (_ammo isKindOf "ChainSaw_Bullet"): { diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf index 4d32ad7a..10c40a59 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf @@ -161,10 +161,10 @@ if (vehicle player == player) then { }; if (Epoch_target iskindof 'Const_Ghost_EPOCH') then { switch (_dikCode) do { - case eXpoch_keysVectorTiltL: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionRoll = (EPOCH_buildDirectionRoll - _adj) max -180; EPOCH_doRotate = true; _handled = true }; - case eXpoch_keysVectorTiltR: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionRoll = (EPOCH_buildDirectionRoll + _adj) min 180; EPOCH_doRotate = true; _handled = true }; - case eXpoch_keysVectorTiltAwy: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionPitch = (EPOCH_buildDirectionPitch - _adj) max -180; EPOCH_doRotate = true; _handled = true }; - case eXpoch_keysVectorTiltTwd: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionPitch = (EPOCH_buildDirectionPitch + _adj) min 180; EPOCH_doRotate = true; _handled = true }; + case eXpoch_keysVectorTiltL: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionRoll = (EPOCH_buildDirectionRoll - _adj) max -EPOCH_MaxBuildingTilt; EPOCH_doRotate = true; _handled = true }; + case eXpoch_keysVectorTiltR: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionRoll = (EPOCH_buildDirectionRoll + _adj) min EPOCH_MaxBuildingTilt; EPOCH_doRotate = true; _handled = true }; + case eXpoch_keysVectorTiltAwy: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionPitch = (EPOCH_buildDirectionPitch - _adj) max -EPOCH_MaxBuildingTilt; EPOCH_doRotate = true; _handled = true }; + case eXpoch_keysVectorTiltTwd: {_adj = 1;if(_shift)then{_adj = 2.5};if(_alt)then{_adj = 0.5};EPOCH_buildDirectionPitch = (EPOCH_buildDirectionPitch + _adj) min EPOCH_MaxBuildingTilt; EPOCH_doRotate = true; _handled = true }; }; }; }; @@ -270,19 +270,22 @@ if (_dikCode in (actionKeys "NightVision")) then { }; if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{ + if (player == vehicle player) exitwith {}; _msg = ""; if(EPOCH_ArmaSlingLoad)then{ - if(driver vehicle player isEqualTo player)then{ - _slung = ropeAttachedObjects vehicle player; - if(_slung isEqualTo [])then{ - if!('ItemRope' in magazines player) then { - _msg = "You need rope to hook"; - _handled = true; + if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then { + if(driver vehicle player isEqualTo player)then{ + _slung = ropeAttachedObjects vehicle player; + if(_slung isEqualTo [])then{ + if!('ItemRope' in magazines player) then { + _msg = "You need rope to hook"; + _handled = true; + }else{ + player removeItem 'ItemRope'; + }; }else{ - player removeItem 'ItemRope'; + player addItem 'ItemRope'; }; - }else{ - player addItem 'ItemRope'; }; }; }else{ @@ -294,4 +297,47 @@ if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{ }; }; +if (!isnull (finddisplay -1200) && !isnull Epoch_ActiveCam) then { + _multi = 1; + if (isnil 'Epoch_CamTrigger') then { + Epoch_CamTrigger = diag_ticktime - 0.2; + }; + if (diag_ticktime - Epoch_CamTrigger < 0.1) then { + _multi = 3; + }; + Epoch_CamTrigger = diag_ticktime; + switch _dikCode do { + case Epoch_KB_BaseCamNextCam: { /* Num Enter */ + call Epoch_CamUse; + }; + case Epoch_KB_BaseCamLeft: { /* Num 4 */ + Epoch_AutoCam = false; + Epoch_CamAdjust = [-3*_multi,0,0]; + }; + case Epoch_KB_BaseCamRight: { /* Num 6 */ + Epoch_AutoCam = false; + Epoch_CamAdjust = [3*_multi,0,0]; + }; + case Epoch_KB_BaseCamUp: { /* Num 8 */ + Epoch_AutoCam = false; + Epoch_CamAdjust = [0,8*_multi,0]; + }; + case Epoch_KB_BaseCamDown: { /* Num 2 */ + Epoch_AutoCam = false; + Epoch_CamAdjust = [0,-8*_multi,0]; + }; + case Epoch_KB_BaseCamZoomOut: { /* Num - */ + Epoch_AutoCam = false; + Epoch_CamAdjust = [0,0,0.1*_multi]; + }; + case Epoch_KB_BaseCamZoomIn: { /* Num + */ + Epoch_AutoCam = false; + Epoch_CamAdjust = [0,0,-0.1*_multi]; + }; + case Epoch_KB_BaseCamAutoCam: { /* Num 0 */ + Epoch_AutoCam = true; + Epoch_CamAdjust = [0,0,0]; + }; + }; +}; _handled diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf index e8ed286b..65afef44 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf @@ -26,39 +26,46 @@ params [ _blocked = false; _msg = ''; _type = typeOf _actionObj; -switch(true)do{ - case (_actionName isEqualTo 'FireInflame'): { - if!('lighter_epoch' in magazines player) then { - _msg = 'You need a lighter'; - _blocked = true; - }else{ - [player,'lighter_epoch',-1] call EPOCH_usedItemRepack; - //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; - }; - }; - case (_actionName isEqualTo 'FirePutDown'): { - if(_type isEqualTo 'BurnBarrel_EPOCH')then{ - if!('ItemFireExtinguisher' in magazines player) then { - _msg = 'You need an extinguisher'; +_config = 'CfgEpochClient' call EPOCH_returnConfig; +switch(_actionName)do{ + case 'FireInflame': { + if (["CfgEpochClient", "ActionFireOnLighter", true] call EPOCH_fnc_returnConfigEntryV2) then { + if!('lighter_epoch' in magazines player) then { + _msg = 'You need a lighter'; _blocked = true; }else{ - [player,'ItemFireExtinguisher',-1] call EPOCH_usedItemRepack; + [player,'lighter_epoch',-5] call EPOCH_usedItemRepack; + //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; }; }; }; - case (_actionName isEqualTo 'HookCargo'): { - if(EPOCH_ArmaSlingLoad)then{ - if(driver vehicle player isEqualTo player)then{ - _slung = ropeAttachedObjects vehicle player; - if(_slung isEqualTo [])then{ - if!('ItemRope' in magazines player) then { - _msg = 'You need rope to hook'; - _blocked = true; - }else{ - player removeItem 'ItemRope'; - }; + case 'FirePutDown': { + if (["CfgEpochClient", "ActionBurnBarrelOffExtinguisher", true] call EPOCH_fnc_returnConfigEntryV2) then { + if(_type isEqualTo 'BurnBarrel_EPOCH')then{ + if!('ItemFireExtinguisher' in magazines player) then { + _msg = 'You need an extinguisher'; + _blocked = true; }else{ - player addItem 'ItemRope'; + [player,'ItemFireExtinguisher',-1] call EPOCH_usedItemRepack; + }; + }; + }; + }; + case 'HookCargo': { + if(EPOCH_ArmaSlingLoad)then{ + if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then { + if(driver vehicle player isEqualTo player)then{ + _slung = ropeAttachedObjects vehicle player; + if(_slung isEqualTo [])then{ + if!('ItemRope' in magazines player) then { + _msg = 'You need rope to hook'; + _blocked = true; + }else{ + player removeItem 'ItemRope'; + }; + }else{ + player addItem 'ItemRope'; + }; }; }; }else{ @@ -66,9 +73,11 @@ switch(true)do{ _blocked = true; }; }; - case (_actionName isEqualTo 'UnhookCargo'): { + case 'UnhookCargo': { if(EPOCH_ArmaSlingLoad)then{ - player addItem 'ItemRope'; + if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then { + player addItem 'ItemRope'; + }; }else{ _msg = 'Unhook Malfunction, overrode by R3F or AdvSlingLoad'; _blocked = true; diff --git a/Sources/epoch_code/compile/setup/EPOCH_clientInit.sqf b/Sources/epoch_code/compile/setup/EPOCH_clientInit.sqf index 5ca88d1a..fe8e0678 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_clientInit.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_clientInit.sqf @@ -44,6 +44,9 @@ EPOCH_arr_snapObjects = []; EPOCH_prevTarget = objNull; EPOCH_interactOption = 0; EPOCH_playerStaminaMax = 100; +Epoch_ActiveCam = objnull; +Epoch_AutoCam = true; +Epoch_CamAdjust = [0,0,0]; { missionNamespace setVariable [format ["EPOCH_player%1",_x],EPOCH_defaultVars select _forEachIndex]; diff --git a/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf b/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf index 0452d8fb..47c71afb 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf @@ -57,7 +57,16 @@ _keyMap = ["Build: Vector RIGHT", "eXpoch_keysVectorTiltR", 0xCD], ["Build: Vector AWAY", "eXpoch_keysVectorTiltAwy", 0xC8], ["Build: Vector TOWARD", "eXpoch_keysVectorTiltTwd", 0xD0], - ["Build: Reset Object", "eXpoch_keysVectorResetObject", 0x4C] + ["Build: Reset Object", "eXpoch_keysVectorResetObject", 0x4C], + + ["BaseCam: NextCam","Epoch_KB_BaseCamNextCam",0x9C], + ["BaseCam: Left","Epoch_KB_BaseCamLeft",0x4B], + ["BaseCam: Right","Epoch_KB_BaseCamRight",0x4D], + ["BaseCam: Up","Epoch_KB_BaseCamUp",0x48], + ["BaseCam: Down","Epoch_KB_BaseCamDown",0x50], + ["BaseCam: Zoom -","Epoch_KB_BaseCamZoomOut",74], + ["BaseCam: Zoom +","Epoch_KB_BaseCamZoomIn",78], + ["BaseCam: AutoCam","Epoch_KB_BaseCamAutoCam",0x52] ]; _keyMap call EPOCH_custom_KeyMap; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf index 65e89ec4..c73a7a1e 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event0.sqf @@ -8,4 +8,18 @@ if (EPOCH_IsAutoRunning) then { EPOCH_IsAutoRunning = false; player switchMove ""; }; +}; + +if (animationstate player in ['aadjpknlmstpsraswpstddown','aadjpknlmstpsraswrflddown'] && cameraview == 'GUNNER' && (player weapondirection (currentweapon player)) select 2 < -0.88) then { + _fadedblack = true; + TitleText ['Stop BugUsing!','BLACK FADED']; +} +else { + if(_fadedblack) then { + [] spawn { + uisleep 2; + TitleText ['','PLAIN DOWN']; + }; + _fadedblack = false; + }; }; \ No newline at end of file diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf index 750d4d9f..08279410 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf @@ -21,7 +21,7 @@ _energyValue = _chargeRate min _energyRegenMax; _vehicle = vehicle player; if (_vehicle != player && isEngineOn _vehicle) then { if !(_vehicle iskindof "Bicycle") then { - _energyValue = _energyValue + 5; + _energyValue = _energyValue + _energyRegenInVeh; }; }; if (currentVisionMode player == 1) then { //NV enabled @@ -36,8 +36,8 @@ if (currentVisionMode player == 1) then { //NV enabled // Sets visual effect _playerAlcohol = missionNamespace getVariable [_playerAlcoholKey, _playerAlcoholDefault]; if (_playerAlcohol > 20) then { - _drunkVal = linearConversion [0,100,_playerAlcohol,0.1,1,true]; - [_drunkVal, 2] call epoch_setDrunk; + _drunkVal = linearConversion [0,100,_playerAlcohol,0,10,true]; + [(ceil _drunkVal)/10, 2] call epoch_setDrunk; } else { [0, 2] call epoch_setDrunk; }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf index 4d25cee9..ef66bab5 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf @@ -2,7 +2,7 @@ _position = getPosATL player; _nearestLocations = nearestLocations[player, _radioactiveLocations, 300]; EPOCH_nearestLocations = _nearestLocations; -_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH","Land_Wreck_Satellite_EPOCH"], _energyRange]; +_powerSources = nearestObjects[player, _energyPowerSources, _energyRange]; // TODO: add more sources and config based check instead of global var // _nearestLocations removed as they don't support getVariable @@ -109,25 +109,26 @@ _chargeRate = 0; if !(_powerSources isEqualTo[]) then { _totalCapacity = 0; { - _powerClass = typeOf _x; - _powerCap = getNumber(_cfgBaseBuilding >> _powerClass >> "powerCapacity"); - _powerType = getNumber(_cfgBaseBuilding >> _powerClass >> "powerType"); - if (_powerCap == 0) then { - _powerCap = 100; - }; - if (_powerType == 1) then { - if (sunOrMoon < 1) then { - _powerCap = _powerCap/2; - }; - }; - _totalCapacity = _totalCapacity + _powerCap; + _powerClass = typeOf _x; + _powerCap = getNumber(_cfgBaseBuilding >> _powerClass >> "powerCapacity"); + _powerType = getNumber(_cfgBaseBuilding >> _powerClass >> "powerType"); + if (_powerCap == 0) then { + _powerCap = 100; + }; + _powerCap = switch _powerType do { + case 1: {if (sunOrMoon == 1) then {_powerCap * (1-overcast)} else {(_powerCap * (1 - overcast))/2}}; + case 2: {_powerCap * windstr}; + case 3: {_powerCap * (1 - ((player distance _x) / _energyRange))}; + default {_powerCap}; + }; + _totalCapacity = _totalCapacity + _powerCap; } forEach _powerSources; if (_totalCapacity > 0) then { _players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange]; if (_players isEqualTo []) then { - _chargeRate = ceil _totalCapacity; + _chargeRate = round _totalCapacity; } else { - _chargeRate = ceil (_totalCapacity / (count _players)); + _chargeRate = round (_totalCapacity / (count _players)); }; }; }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index d2819211..8a0d69ea 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -13,6 +13,9 @@ EPOCH_forceUpdateNow = false; // start alive timer _clientAliveTimer = diag_tickTime; +// Fade Black Screen +_fadedblack = false; + // init player stat vars _gmVarsInit = ["CfgEpochClient", "gmVars", [["Temp",98.6],["Hunger",500],["Thirst",500],["Toxicity",0],["Stamina",10],["BloodP",100],["Alcohol",0],["Radiation",0]]] call EPOCH_fnc_returnConfigEntryV2; _gModeVarNames = _gmVarsInit apply {_x param [0,""]}; @@ -122,6 +125,8 @@ _baseThirstLoss = ["CfgEpochClient", "baseThirstLoss", 2] call EPOCH_fnc_returnC _baseAlcoholLoss = ["CfgEpochClient", "baseAlcoholLoss", 0.17] call EPOCH_fnc_returnConfigEntryV2; _lossMultiplier = if (["CfgEpochClient", "accelerateHTALoss", true] call EPOCH_fnc_returnConfigEntryV2) then {timeMultiplier} else {1}; _energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2; +_energyPowerSources = ["CfgEpochClient", "energyPowerSources", ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH","Land_Wreck_Satellite_EPOCH"]] call EPOCH_fnc_returnConfigEntryV2; +_energyRegenInVeh = ["CfgEpochClient", "energyChargeInVeh", 5] call EPOCH_fnc_returnConfigEntryV2; _energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2; _energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2; _hudConfigs = ["CfgEpochClient", "hudConfigs", []] call EPOCH_fnc_returnConfigEntryV2; diff --git a/Sources/epoch_code/compile/traders/EPOCH_NPCTraderMenuFilter.sqf b/Sources/epoch_code/compile/traders/EPOCH_NPCTraderMenuFilter.sqf index 0b21ac5a..eb54023e 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_NPCTraderMenuFilter.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_NPCTraderMenuFilter.sqf @@ -51,9 +51,15 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { { _item = _x; _rounds = 1; + _onHand = false; if (_item isequaltype []) then { _item = _x select 0; - _rounds = _x select 1; + if ((_x select 1) isequalto "Hand") then { + _onHand = true; + } + else { + _rounds = _x select 1; + }; }; if !(_item isequalto "") then { _maxrnd = 1; @@ -66,7 +72,7 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { _tooltip = format ["%1 rounds left in Magazine",_rounds]; }; if (_index == 0 || (tolower _item) in _FilterArray) then { - _id = lbAdd [_PlayerItemsBox, _item call EPOCH_itemDisplayName]; + _id = lbAdd [_PlayerItemsBox, (_item call EPOCH_itemDisplayName) + (if (_onHand) then {" (in Hand)"} else {""})]; lbSetData [_PlayerItemsBox, _id, _item]; lbSetValue [_PlayerItemsBox, _id, _rounds]; lbSetPicture [_PlayerItemsBox, _id, _item call EPOCH_itemPicture]; @@ -74,6 +80,9 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { lbSetTooltip [_PlayerItemsBox, _id, _tooltip]; lbSetColor [_PlayerItemsBox,_id,[1,(_rounds/_maxrnd),0,1]]; }; + if (_onHand) then { + lbSetColor [_PlayerItemsBox,_id,[1,1,1,0.5]]; + }; }; }; } forEach EPOCH_NpcTradePlayerItems; diff --git a/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf b/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf index 79254c54..26242be3 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf @@ -13,8 +13,8 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf */ -private [ "_PlayerFilerDropDown","_PlayerItemsBox","_PlayerItemsOutBox","_TraderItemsOutBox","_CryptoInCtrl","_CryptoOutCtrl","_allowAdd","_uiItem","_rounds","_itemIcon","_itemColor","_errormsg","_stockLimit","_config", - "_itemClasses","_itemQtys","_qtyIndex","_limit","_sizeOut","_item","_vehicle","_itemName","_index","_maxrnd","_ItemIndex","_cryptoCount","_worth","_itemTax","_tax" +private [ "_PlayerFilerDropDown","_PlayerItemsBox","_PlayerItemsOutBox","_TraderItemsOutBox","_CryptoInCtrl","_CryptoOutCtrl","_allowAdd","_uiItem","_rounds","_itemIcon","_itemColor","_errormsg","_config", + "_sizeOut","_item","_vehicle","_itemName","_index","_maxrnd","_ItemIndex","_cryptoCount","_worth","_itemTax","_tax" ]; params ["_control","_selected"]; _selected params ["_CurControl","_id"]; @@ -33,36 +33,10 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { _itemIcon = _CurControl lbPicture _id; _itemColor = _CurControl lbColor _id; _errormsg = ""; - _stockLimit = false; _config = 'CfgPricing' call EPOCH_returnConfig; if (isClass (_config >> _uiItem)) then { if (_control == _PlayerItemsOutBox) then { - _itemClasses = EPOCH_NpcTradeTraderItems select 0; - _itemQtys = EPOCH_NpcTradeTraderItems select 1; - _qtyIndex = _itemClasses find _uiItem; - if (_qtyIndex != -1) then { - _itemQty = _itemQtys select _qtyIndex; - _maxrnd = 1; - if ([_uiItem,"cfgMagazines"] call Epoch_fnc_isAny) then { - _maxrnd = getnumber (configfile >> "cfgMagazines" >> _uiItem >> "count"); - }; - _itemQty = _itemQty / _maxrnd; - _sizeIn = lbSize _PlayerItemsOutBox; - if (_sizeIn > 0) then { - for "_i" from 0 to (_sizeIn - 1) do { - _InItem = lbData [_PlayerItemsOutBox, _i]; - if ((lbData [_PlayerItemsOutBox, _i]) == _uiItem) then { - _itemQty = _itemQty + ((lbValue [_PlayerItemsOutBox, _i])/_maxrnd); - }; - }; - }; - _limit = ["CfgTraderLimits", _uiItem, 100] call EPOCH_fnc_returnConfigEntryV2; - if (_itemQty >= _limit) then{ - _stockLimit = true; - _allowAdd = false; - }; - }; if (_uiItem isKindOf "Air" || _uiItem isKindOf "Ship" || _uiItem isKindOf "LandVehicle" || _uiItem isKindOf "Tank") then { _sizeOut = lbSize _PlayerItemsOutBox; if (_sizeOut > 0) then { @@ -114,7 +88,12 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { lbSetPicture [_control, _index, _itemIcon]; lbSetColor [_control,_index,_itemColor]; if (_control == _PlayerItemsBox && !(_uiItem iskindof "Landvehicle" || _uiItem iskindof "SHIP" || _uiItem iskindof "AIR" || _uiItem iskindof "TANK")) then { - EPOCH_NpcTradePlayerItems pushback [_uiItem,_rounds]; + if ((_itemName find " (in Hand)") > -1) then { + EPOCH_NpcTradePlayerItems pushback [_uiItem,"Hand"]; + } + else { + EPOCH_NpcTradePlayerItems pushback [_uiItem,_rounds]; + }; } else { if ([_uiItem,"cfgMagazines"] call Epoch_fnc_isAny) then { @@ -124,9 +103,15 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { lbSetTooltip [_control,_index,_tooltip]; }; }; - _ItemIndex = EPOCH_NpcTradePlayerItems find [_uiItem,_rounds]; + _ItemIndex = -1; + if ((_itemName find " (in Hand)") > -1) then { + _ItemIndex = EPOCH_NpcTradePlayerItems find [_uiItem,"Hand"]; + }; if (_ItemIndex < 0) then { _ItemIndex = EPOCH_NpcTradePlayerItems find _uiItem; + if (_ItemIndex < 0) then { + _ItemIndex = EPOCH_NpcTradePlayerItems find [_uiItem,_rounds]; + }; }; if (_ItemIndex > -1) then { EPOCH_NpcTradePlayerItems deleteat _ItemIndex; @@ -173,12 +158,7 @@ if !(isNull EPOCH_lastNPCtradeTarget) then { }; } else { - if (_stockLimit) then{ - ["Trader has the maximum amount of this item", 5] call Epoch_message; - } - else { - [_errormsg, 5] call Epoch_message; - }; + [_errormsg, 5] call Epoch_message; }; }; } diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf index a9b0d110..6fa3bdfe 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNPCTraderMenu.sqf @@ -23,7 +23,13 @@ if (alive _target) then { EPOCH_lastNPCtradeTarget = _target; EPOCH_NpcTradePlayerItems = (items player)+(magazinesammo player); if (primaryWeapon player != "") then { - EPOCH_NpcTradePlayerItems pushback primaryWeapon player; + EPOCH_NpcTradePlayerItems pushback [primaryWeapon player,"Hand"]; + }; + if (secondaryWeapon player != "") then { + EPOCH_NpcTradePlayerItems pushback [secondaryWeapon player,"Hand"]; + }; + if (handgunWeapon player != "") then { + EPOCH_NpcTradePlayerItems pushback [handgunWeapon player,"Hand"]; }; if (count backpackItems player == 0 && count backpackmagazines player == 0 && backpack player != "") then { EPOCH_NpcTradePlayerItems pushback backpack player; diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf index 60dda9cc..5bb68ac8 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf @@ -13,12 +13,13 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf */ -private ["_PlayerItemsOutBox","_TraderItemsOutBox","_config","_current_crypto","_sizeIn","_arrayIn","_item","_rounds","_mags","_itemMags","_index","_sizeOut","_arrayOut","_itemWorth","_itemTax","_tax","_maxrnd"]; +private ["_EnableTempVehTrade","_PlayerItemsOutBox","_TraderItemsOutBox","_config","_current_crypto","_sizeIn","_arrayIn","_item","_rounds","_mags","_itemMags","_index","_sizeOut","_arrayOut","_itemWorth","_itemTax","_tax","_maxrnd"]; if (!isNil "EPOCH_TRADE_STARTED") exitWith{}; if (isNull _this) exitWith{}; if (alive _this) then { + _EnableTempVehTrade = ["CfgEpochClient", "EnableTempVehTrade", false] call EPOCH_fnc_returnConfigEntryV2; _PlayerItemsOutBox = 41501; _TraderItemsOutBox = 41502; _config = 'CfgPricing' call EPOCH_returnConfig; @@ -27,6 +28,11 @@ if (alive _this) then { _arrayIn = []; if (_sizeIn > 0) then { for "_i" from 0 to (_sizeIn - 1) do { + _onHand = false; + _itemName = lbText [_PlayerItemsOutBox, _i]; + if ((_itemName find " (in hand)") > -1) then { + _onHand = true; + }; _item = lbData [_PlayerItemsOutBox, _i]; _rounds = lbValue [_PlayerItemsOutBox, _i]; if (isClass (_config >> _item)) then{ @@ -38,13 +44,36 @@ if (alive _this) then { _itemWorth = round (_itemWorth*(_rounds/_maxrnd)); _added = false; if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then { - if (_item in items player) then { + if (_item in items player && !_onHand) then { player removeItem _item; _arrayIn pushBack [_item,_rounds]; _added = true; } else { - if (_item == primaryweapon player) then { + if (_item in [primaryweapon player,secondaryweapon player, handgunweapon player]) then { + _index = if (_item == primaryweapon player) then {0} else {if (_item == secondaryweapon player) then {1} else {2}}; + { + if (_foreachindex > 0) then { + _weaponaddon = _x; + _count = 1; + if !(_weaponaddon isequalto [] || _weaponaddon isequalto "") then { + if (_weaponaddon isequaltype []) then { + if (count _weaponaddon > 1) then { + _weaponaddon = _x select 0; + _count = _x select 1; + }; + }; + if ([_weaponaddon, "CfgWeapons"] call EPOCH_fnc_isAny) then { + _weaponaddon call EPOCH_fnc_addItemOverflow; + } + else { + if ([_weaponaddon, "CfgMagazines"] call EPOCH_fnc_isAny) then { + [_weaponaddon,_count] call EPOCH_fnc_addMagazineOverflow; + }; + }; + }; + }; + } foreach ((getunitloadout player) select _index); player removeweapon _item; _arrayIn pushBack [_item,_rounds]; _added = true; @@ -65,7 +94,7 @@ if (alive _this) then { if (!isNull _vehicle) then { if (local _vehicle) then { _vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"]; - if (_vehSlot != "ABORT") then { + if (_vehSlot != "ABORT" || _EnableTempVehTrade) then { _arrayIn pushBack [_item,_rounds]; _added = true; }; diff --git a/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceCheck.sqf b/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceCheck.sqf index 3b40ec4a..f1630bc8 100644 --- a/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceCheck.sqf +++ b/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceCheck.sqf @@ -25,12 +25,13 @@ if (_veh iskindof "ebike_epoch") then { }; _wheelcounter = 0; { - _HitPointName = _x; - _Hit = (getAllHitPointsDamage _veh) select 2 select _foreachindex; + _x params ["_searchedhit","_limit1","_limit2"]; + _searchedhit = tolower _searchedhit; { - _x params ["_searchedhit","_limit1","_limit2"]; + _HitPointName = tolower _x; + _Hit = (getAllHitPointsDamage _veh) select 2 select _foreachindex; if (_searchedhit isequalto _HitPointName) then { - _wheel = ["wheel",tolower _searchedhit] call bis_fnc_instring; + _wheel = ["wheel",_searchedhit] call bis_fnc_instring; if (_wheel) then { _wheelcounter = _wheelcounter + 1; }; @@ -42,7 +43,7 @@ _wheelcounter = 0; _repairs pushback _searchedhit; }; if (!((_veh getvariable ["vehicle_slot","-1"]) isequalto "-1") && _EnableRemoveParts) then { - if (_searchedhit in ["HitLFWheel","HitLF2Wheel","HitLMWheel","HitLBWheel","HitRFWheel","HitRF2Wheel","HitRMWheel","HitRBWheel","HitEngine"]) then { + if (_searchedhit in ["hitlfwheel","hitlf2wheel","hitlmwheel","hitlbwheel","hitrfwheel","hitrf2wheel","hitrmwheel","hitrbwheel","hitengine"]) then { _removes pushback _searchedhit; }; }; @@ -50,7 +51,7 @@ _wheelcounter = 0; else { if (_searchedhit isequalto "glass") then { if ("glass" in _repairs) exitwith {}; - _glass = ["glass",tolower _HitPointName] call bis_fnc_instring; + _glass = ["glass",_HitPointName] call bis_fnc_instring; if (_glass) then { if (_Hit >= _limit1) exitwith { _repairs pushback _searchedhit; @@ -58,12 +59,13 @@ _wheelcounter = 0; }; }; }; - } foreach _VehicleRepairs; -} foreach ((getAllHitPointsDamage _veh) select 0); + } foreach ((getAllHitPointsDamage _veh) select 0); +} foreach _VehicleRepairs; _repairarrays = []; { - if (!(_x in _repairs || _x in _replaces || (["glass",tolower _x] call Bis_fnc_instring)) || _x isequalto "") then { + _HitPointName = tolower _x; + if (!(_HitPointName in _repairs || _HitPointName in _replaces || (["glass",_HitPointName] call Bis_fnc_instring)) || _x isequalto "") then { _repairarrays pushback [_foreachindex, 0]; }; } foreach ((getAllHitPointsDamage _veh) select 0); diff --git a/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceDo.sqf b/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceDo.sqf index ad796c51..193b658c 100644 --- a/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceDo.sqf +++ b/Sources/epoch_code/compile/vehicles/EPOCH_client_VehicleMaintananceDo.sqf @@ -14,6 +14,7 @@ */ private ["_secondlocalcheck","_repairarrays","_config","_VehicleRepairs","_reqiredMat","_searchname","_line","_returnmat"]; params ["_veh","_do","_hitpointname"]; +_hitpointname = tolower _hitpointname; _secondlocalcheck = false; _returnmat = ""; _repairarrays = []; @@ -31,25 +32,28 @@ EPOCH_Vehicle_MaintainLock = true; switch _do do { case 'repair': { - _reqiredMat = ""; + _reqiredMat = "NONE"; _searchname = _hitpointname; - if (["glass",tolower _hitpointname] call Bis_fnc_instring) then { + if (["glass",_hitpointname] call Bis_fnc_instring) then { _searchname = "glass"; }; { _x params ["_name","","","_repairmat"]; + _name = tolower _name; if (_searchname isequalto _name) exitwith { _reqiredMat = _repairmat; }; } foreach _VehicleRepairs; - if (_reqiredMat isequalto "") exitwith { + if (_reqiredMat isequalto "NONE") exitwith { ['Error - Can not find required Material',5] call Epoch_message; }; - if !(_reqiredMat in (magazines player)) exitwith { + if (!(_reqiredMat in (magazines player)) && !(_reqiredMat isequalto "")) exitwith { _line = format ['You need %1 to repair',_reqiredMat call EPOCH_itemDisplayName]; [_line,5] call Epoch_message; }; - player removemagazine _reqiredMat; + if !(_reqiredMat isequalto "") then { + player removemagazine _reqiredMat; + }; if (_hitpointname isequalto "glass") then { { if (["glass",tolower _x] call Bis_fnc_instring) then { @@ -62,25 +66,28 @@ switch _do do { }; }; case 'replace': { - _reqiredMat = ""; + _reqiredMat = "NONE"; _searchname = _hitpointname; - if (["glass",tolower _hitpointname] call Bis_fnc_instring) then { + if (["glass", _hitpointname] call Bis_fnc_instring) then { _searchname = "glass"; }; { _x params ["_name","","","","_replacemat"]; + _name = tolower _name; if (_searchname isequalto _name) exitwith { _reqiredMat = _replacemat; }; } foreach _VehicleRepairs; - if (_reqiredMat isequalto "") exitwith { + if (_reqiredMat isequalto "NONE") exitwith { ['Error - Can not find required Material',5] call Epoch_message; }; - if !(_reqiredMat in (magazines player)) exitwith { + if (!(_reqiredMat in (magazines player)) && !(_reqiredMat isequalto "")) exitwith { _line = format ['You need %1 to repair',_reqiredMat call EPOCH_itemDisplayName]; [_line,5] call Epoch_message; }; - player removemagazine _reqiredMat; + if !(_reqiredMat isequalto "") then { + player removemagazine _reqiredMat; + }; if (_hitpointname isequalto "glass") then { { if (["glass",tolower _x] call Bis_fnc_instring) then { @@ -100,6 +107,7 @@ switch _do do { _searchname = _hitpointname; { _x params ["_name","","","","_replacemat"]; + _name = tolower _name; if (_searchname isequalto _name) exitwith { _returnmat = _replacemat; }; diff --git a/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf b/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf index 1624afe9..9ae46277 100644 --- a/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf +++ b/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf @@ -68,13 +68,14 @@ _respawnButton ctrlEnable false; [_display] spawn { disableSerialization; params ["_display"]; - _startTime = diag_tickTime+5; + _startTime = diag_tickTime+4; waitUntil { uiSleep 0.2; (isNull _display) || ((_startTime - diag_tickTime) <= 0) }; if (!isNull _display) then { player setUnitLoadout (getUnitLoadout player); + uisleep 1; // give one second to broadcast clothing change missionnamespace setvariable ["EPOCH_forceUpdateNow",true]; }; }; diff --git a/Sources/epoch_code/gui/scripts/config/Epoch_config_keymap.sqf b/Sources/epoch_code/gui/scripts/config/Epoch_config_keymap.sqf index 82b5891e..972fef71 100644 --- a/Sources/epoch_code/gui/scripts/config/Epoch_config_keymap.sqf +++ b/Sources/epoch_code/gui/scripts/config/Epoch_config_keymap.sqf @@ -20,7 +20,7 @@ private ["_arr","_ctrl","_ctrlCurrent","_ctrlDefault","_ctrlEdit","_data","_defa //[[[end]]] params ["_ctrl"]; -_display = if (typeName _ctrl isEqualTo "CONTROL") then {ctrlParent _ctrl} else {displayNull}; +_display = if (_ctrl isEqualType controlNull) then {ctrlParent _ctrl} else {displayNull}; _input = if (_ctrl isEqualType "STRING") then {_ctrl} else {str _ctrl}; switch (_input) do { diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf index 1f96dc72..dd96e529 100644 --- a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf +++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf @@ -28,7 +28,7 @@ if !(false call EPOCH_crafting_checkResources) exitWith {}; //craft button [] spawn { - private ["_craftReturn","_needBench","_craftCount","_fnc_UILock","_itemCraftTime","_selection","_craftItem","_item","_itemName","_itemCraftTime","_itemRecipeItems","_itemType","_nearbyReq","_hasNearby","_canCraft","_wH","_nearByHolder","_wHPos"]; + private ["_GiveBackRounds","_TotalroundsIn","_TotalMaxRoundsIn","_roundsCheck","_maxMagrnd","_maxMagRndTmp","_roundsCheckTmp","_magsammosearched","_craftReturn","_needBench","_craftCount","_fnc_UILock","_itemCraftTime","_selection","_craftItem","_item","_itemName","_itemCraftTime","_itemRecipeItems","_itemType","_nearbyReq","_hasNearby","_canCraft","_wH","_nearByHolder","_wHPos"]; disableSerialization; _fnc_UILock = { @@ -53,6 +53,8 @@ if !(false call EPOCH_crafting_checkResources) exitWith {}; _needBench = {"WorkBench_EPOCH" in (_x select 3 select 1)} count _nearbyReq; _craftCount = _craftItem param [15,1]; _craftReturn = _craftItem param [16,[]]; + + _BulletCalculateOnCraft = ["CfgEpochClient", "BulletCalculateOnCraft", false] call EPOCH_fnc_returnConfigEntryV2; for "_c" from 1 to rmx_var_craftQTYOut do { false call _fnc_UILock; @@ -64,19 +66,63 @@ if !(false call EPOCH_crafting_checkResources) exitWith {}; if !(_canCraft && rmx_var_craftingLOOPS) exitWith {}; + _GiveBackRounds = 0; + _TotalroundsIn = 0; + _TotalMaxRoundsIn = 0; + _roundsCheck = false; + _maxMagrnd = (getnumber (configfile >> "cfgMagazines" >> _item >> "count")) max 1; { if !(_x isEqualType []) then {_x = [_x,1]}; - for "_r" from 1 to (_x select 1) do { - player removeItem (_x select 0); //removes any type of item, but only if not in special slots + _x params ["_recipetype","_recipetypecount"]; + _recipetype = tolower _recipetype; + _maxMagRndTmp = getnumber (configfile >> "cfgMagazines" >> _recipetype >> "count"); + _roundsCheckTmp = ([_recipetype,"cfgMagazines"] call Epoch_fnc_isAny && [_item,"cfgMagazines"] call Epoch_fnc_isAny && _maxMagrnd > 1 && _maxMagRndTmp > 1 && _BulletCalculateOnCraft); + for "_r" from 1 to _recipetypecount do { + if (_roundsCheckTmp) then { + _roundsCheck = true; + _magsammosearched = []; + { + _x params ["_type","_rounds"]; + if ((tolower _type) isequalto _recipetype) then { + _magsammosearched pushback _x; + }; + } foreach (magazinesammo player); + _TotalMaxRoundsIn = _TotalMaxRoundsIn + _maxMagRndTmp; + _TotalroundsIn = _TotalroundsIn + ((_magsammosearched deleteat 0) select 1); + player removemagazines _recipetype; + { + _x call EPOCH_fnc_addMagazineOverflow; + } foreach _magsammosearched; + } + else { + player removeItem _recipetype; //removes any type of item, but only if not in special slots + }; }; } forEach _itemRecipeItems; + + if (_roundsCheck) then { + _GiveBackRounds = (_maxMagrnd * (_TotalroundsIn / _TotalMaxRoundsIn)); + }; _nearByBench = nearestObjects [player,["WorkBench_EPOCH"],3]; if (!(_nearByBench isEqualTo []) && (_needBench > 0)) then { //adds item on top of bench if bench was required - (_nearByBench select 0) addItemCargoGlobal [_item,_craftCount]; - } else { - [_item,_craftCount] call EPOCH_fnc_addItemOverflow; + if (_roundsCheck) then { + (_nearByBench select 0) addMagazineAmmoCargo [_item, _craftCount, ((ceil (_GiveBackRounds / _craftCount)) min _maxMagrnd) max 1]; + } + else { + (_nearByBench select 0) addItemCargoGlobal [_item,_craftCount]; + }; + } + else { + if (_roundsCheck) then { + for "_i" from 1 to _craftCount do { + [_item,((ceil (_GiveBackRounds / _craftCount)) min _maxMagrnd) max 1] call EPOCH_fnc_addMagazineOverflow; + }; + } + else { + [_item,_craftCount] call EPOCH_fnc_addItemOverflow; + }; }; // return items diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf index fd3c9cd7..1a2e2f46 100644 --- a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf +++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf @@ -21,7 +21,7 @@ _arrIn = _this; _cfg = 'CfgEpochClient' call EPOCH_returnConfig; _Suppressed = getarray (_cfg >> "SuppressedCraftingItems"); -if !(typeName (_arrIn select 0) isEqualTo "CONFIG") exitWith {[]}; +if !((_arrIn select 0) isEqualType configNull) exitWith {[]}; _type0 = []; _type1 = []; _type2 = []; _type3 = []; _out = []; { diff --git a/Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf b/Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf index ff743f1b..8611dc4f 100644 --- a/Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf +++ b/Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf @@ -32,7 +32,7 @@ if(_customCol isEqualTo [])then{ _txtCol = if((_customCol select 1)isEqualTypeAll 0) then [{_customCol select 1},{_txtCol = [1,1,1,0.95]}]; }; -if !(typeName _msg isEqualTo "STRING") then { //Needed to remove quotations from strings +if !(_msg isEqualType "STRING") then { //Needed to remove quotations from strings _msg = str (parseText str _msg); //Parses and converts text back to small string }; diff --git a/Sources/epoch_code/gui/scripts/messaging/Epoch_message_stack.sqf b/Sources/epoch_code/gui/scripts/messaging/Epoch_message_stack.sqf index 646e4602..1e539e68 100644 --- a/Sources/epoch_code/gui/scripts/messaging/Epoch_message_stack.sqf +++ b/Sources/epoch_code/gui/scripts/messaging/Epoch_message_stack.sqf @@ -12,7 +12,7 @@ Usage: "TEST" call Epoch_message_stack - + ["===================================",5,[[0,0,0,0.2],[1,0.5,0,1]]] call Epoch_message_stack; ["World!",5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack; ["Hello",5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack; @@ -34,7 +34,7 @@ if(_customCol isEqualTo [])then{ _bgCol = if((_customCol select 0)isEqualTypeAll 0) then [{_customCol select 0},{_bgCol = [0,0,0,0.2]}]; _txtCol = if((_customCol select 1)isEqualTypeAll 0) then [{_customCol select 1},{_txtCol = [1,1,1,0.95]}]; }; -if !(typeName _msg isEqualTo "STRING") then { //Needed to remove quotations from strings +if !(_msg isEqualType "STRING") then { //Needed to remove quotations from strings _msg = str (parseText str _msg); //Parses and converts text back to small string }; @@ -53,7 +53,7 @@ rmx_var_msgStackQueue = [[_msg, _time, [_bgCol,_txtCol]] ]; _cStartPos = [safeZoneX,((_yPos - _ySize) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H]; _ctrlArr = [1]; - + _fnc_reorganizeCtrls = { if !(_ctrlArr isEqualTo []) then { { @@ -64,7 +64,7 @@ rmx_var_msgStackQueue = [[_msg, _time, [_bgCol,_txtCol]] ]; } forEach _ctrlArr; }; }; - + while {(count _ctrlArr) > 0} do { if ((_ctrlArr select 0) isEqualTo 1) then {_ctrlArr = [];}; if !(rmx_var_msgStackQueue isEqualTo []) then { @@ -72,19 +72,19 @@ rmx_var_msgStackQueue = [[_msg, _time, [_bgCol,_txtCol]] ]; _time = diag_tickTime + (rmx_var_msgStackQueue select 0 select 1); _col = (rmx_var_msgStackQueue select 0)select 2; rmx_var_msgStackQueue deleteAt 0; - + _c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC]; _c ctrlSetBackgroundColor (_col select 0); _c ctrlSetText _msg; _c ctrlSetTextColor (_col select 1); - + _c ctrlSetPosition _cStartPos; _c ctrlSetFade 1; _c ctrlCommit 0; - + _c ctrlSetFade 0; _c ctrlCommit 0.5; - + _ctrlArr pushBack [_c,_time]; call _fnc_reorganizeCtrls; }; diff --git a/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf b/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf index 23440039..86b3d223 100644 --- a/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf +++ b/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf @@ -24,19 +24,21 @@ private ["_priority","_wd","_db"]; params [["_level",0,[0]],["_speed",0,[0]]]; if (isNil "rmx_var_drunkHandles") then { - _priority = 15; _wd = ["wetdistortion",_priority] call epoch_postProcessCreate; _db = ["dynamicBlur",_priority] call epoch_postProcessCreate; - rmx_var_drunkHandles = [_wd,_db]; + + // Preload defaults + [(rmx_var_drunkHandles select 0), 0, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), 0, [0]] call epoch_postprocessAdjust; }; switch _level do { case 0: { - rmx_var_drunkHandles call epoch_postprocessDestroy; - rmx_var_drunkHandles = nil; + (rmx_var_drunkHandles select 0) ppEffectEnable false; + (rmx_var_drunkHandles select 1) ppEffectEnable false; }; case 0.1: { diff --git a/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf b/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf index ffb2777f..888bbe3c 100644 --- a/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf +++ b/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf @@ -25,25 +25,25 @@ private ["_cc","_ci","_fg","_priority"]; params [["_level",0,[0]],["_speed",0,[0]] ]; if (isNil "rmx_var_RadiationHandles") then { - _priority = 16; _fg = ["filmGrain",_priority] call epoch_postProcessCreate; _cc = ["colorCorrections",_priority] call epoch_postProcessCreate; _ci = ["colorInversion",_priority] call epoch_postProcessCreate; - rmx_var_RadiationHandles = [_fg,_cc,_ci]; + + // Preload defaults + [(rmx_var_RadiationHandles select 0), 0, [0.005,1.25,2.01,0.75,1.0,true]] call epoch_postprocessAdjust; + [(rmx_var_RadiationHandles select 1), 0, [1,1,0,[0,0,0,0],[1,1,1,1],[0.299,0.587,0.114,0],[-1,-1,0,0,0,0,0]]] call epoch_postprocessAdjust; + [(rmx_var_RadiationHandles select 2), 0, [0,0,0]] call epoch_postprocessAdjust; }; switch _level do { - case 0: - { - rmx_var_RadiationHandles call epoch_postprocessDestroy; - rmx_var_RadiationHandles = nil; - }; + case 0; case 0.1: { - rmx_var_RadiationHandles call epoch_postprocessDestroy; - rmx_var_RadiationHandles = nil; + (rmx_var_RadiationHandles select 0) ppEffectEnable false; + (rmx_var_RadiationHandles select 1) ppEffectEnable false; + (rmx_var_RadiationHandles select 2) ppEffectEnable false; }; case 0.2: { diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index 65a1686c..f0a23c03 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -83,6 +83,7 @@ EPOCH_keysActionPressed = false; //prevents EH spam // load some frequently used configs to variables EPOCH_maxBuildingHeight = ["CfgEpochClient", "maxBuildingHeight", 100] call EPOCH_fnc_returnConfigEntryV2; +EPOCH_MaxBuildingTilt = ["CfgEpochClient", "MaxBuildingTilt", 180] call EPOCH_fnc_returnConfigEntryV2; Epoch_NuisanceMulti = ["CfgEpochClient", "NuisanceMulti", 0.5] call EPOCH_fnc_returnConfigEntryV2; //ON INIT and RESPAWN diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp index 73bc960b..4082bb9e 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp @@ -29,7 +29,7 @@ class CfgActionMenu dyna_buildMode = "([10] call EPOCH_fnc_cursorTarget) call EPOCH_checkBuild;"; dyna_isVehicle = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'LandVehicle') || (dyna_cursorTarget isKindOf 'Air') || (dyna_cursorTarget isKindOf 'Ship') || (dyna_cursorTarget isKindOf 'Tank'))} else {false}"; - dyna_isTrader = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player) && (!isPlayer dyna_cursorTarget) && ((dyna_cursorTarget getVariable['AI_SLOT', -1]) != -1))} else {false}"; + dyna_isTrader = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget != player) && (!isPlayer dyna_cursorTarget) && ((dyna_cursorTarget getVariable['AI_SLOT', -1]) != -1))} else {false}"; dyna_isPlayer = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player) && (isPlayer dyna_cursorTarget))} else {false}"; dyna_isDeadPlayer = "if (!(isNull dyna_cursorTarget) && !(alive dyna_cursorTarget)) then {(dyna_cursorTargetType in ['Epoch_Male_F','Epoch_Female_F'])} else {false}"; dyna_canAcceptTrade = "if (!(isNull EPOCH_pendingP2ptradeTarget) && alive EPOCH_pendingP2ptradeTarget) then {((EPOCH_pendingP2ptradeTarget isKindOf 'Man') && (dyna_cursorTarget isEqualTo EPOCH_pendingP2ptradeTarget))} else {false}"; @@ -50,6 +50,7 @@ class CfgActionMenu 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_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}"; }; class self diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp index ddd62cd0..987836b7 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp @@ -95,7 +95,7 @@ class base_mode_snap_direction { condition = "EPOCH_buildMode == 1"; action = "EPOCH_snapDirection = EPOCH_snapDirection + 1; if (EPOCH_snapDirection > 3) then {EPOCH_snapDirection = 0};[format['SNAP DIRECTION: %1°', EPOCH_snapDirection*90], 5] call Epoch_message;"; - icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_rotate.paa"; tooltip = "Build Mode: Rotate 90°"; tooltipcode = "format ['Build Mode: Switch Snap Direction to %1° (current %2°)',if (EPOCH_snapDirection < 3) then {(EPOCH_snapDirection+1)*90} else {0},EPOCH_snapDirection*90]"; }; @@ -103,23 +103,30 @@ class base_mode_detach { condition = "EPOCH_buildMode > 0 && !isnull EPOCH_target && EPOCH_target_attachedTo isequalto player && Epoch_target iskindof 'Const_Ghost_EPOCH'"; action = "EPOCH_target_attachedTo = objnull; ['Object Detached', 5] call Epoch_message;"; - icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_detach.paa"; tooltip = "Build Mode: Detach Object"; }; class base_mode_attach { condition = "EPOCH_buildMode > 0 && !isnull EPOCH_target && !(EPOCH_target_attachedTo isequalto player) && Epoch_target iskindof 'Const_Ghost_EPOCH'"; action = "EPOCH_target_attachedTo = player; ['Object Attached', 5] call Epoch_message;"; - icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_move.paa"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_attach.paa"; tooltip = "Build Mode: Attach Object"; }; class Drink { - condition = "_nearObjects = nearestObjects [player, [], 2];_check = 'water';_ok = false;{if (alive _x) then {_ok = [_x, _check] call EPOCH_worldObjectType;};if (_ok) exitWith {};} forEach _nearObjects;_ok"; - action = "if (currentweapon player == '') then {player playmove 'AinvPknlMstpSnonWnonDnon_Putdown_AmovPknlMstpSnonWnonDnon';}else {if (currentweapon player == handgunweapon player) then {player playmove 'AinvPknlMstpSrasWpstDnon_Putdown_AmovPknlMstpSrasWpstDnon';}else { player playmove 'AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon';};};{_output = _x call EPOCH_giveAttributes;if (_output != '') then {[_output, 5] call Epoch_message_stack;};} foreach [['Toxicity',4,1],['Stamina',10],['Thirst',100]];"; + condition = "dyna_Watersource"; + action = "if (currentweapon player == '') then {player playmove 'AinvPknlMstpSnonWnonDnon_Putdown_AmovPknlMstpSnonWnonDnon';}else {if (currentweapon player == handgunweapon player) then {player playmove 'AinvPknlMstpSrasWpstDnon_Putdown_AmovPknlMstpSrasWpstDnon';}else { player playmove 'AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon';};};{_output = _x call EPOCH_giveAttributes;if (_output != '') then {[_output, 5] call Epoch_message_stack;};} foreach [['Thirst',100],['Toxicity',1,1],['Stamina',10]];"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Drink.paa"; tooltip = "Drink"; }; +class Wash +{ + condition = "dyna_Watersource"; + action = "if !('Soap_Epoch' in magazines player) exitwith {['You need a Soap to wash yourself',5] call Epoch_Message;};[] spawn {player playMove 'AinvPknlMstpSnonWrflDnon_medic0';player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd';['Washing ...',5] call Epoch_Message;player removeitem 'Soap_Epoch';uisleep 6;{_output = _x call EPOCH_giveAttributes; if (_output != '') then {[_output, 5] call Epoch_message_stack;};} foreach [['Soiled',-25]];};"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Washing.paa"; + tooltip = "Wash yourself"; +}; class ServicePoint { condition = "call EPOCH_SP_Check"; diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp index f9272048..cb6b0a37 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp @@ -13,7 +13,6 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp */ -//Build mode enabled class build_upgrade { condition = "dyna_buildMode select 0"; @@ -27,7 +26,7 @@ class build_remove { condition = "dyna_buildMode select 1"; action = "dyna_cursorTarget call EPOCH_removeBUILD;"; - icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_remove.paa"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_trash.paa"; tooltipcode = "format['Remove %1',getText(configFile >> 'CfgVehicles' >> (typeof dyna_cursorTarget) >> 'displayName')]"; }; class build_move @@ -111,7 +110,7 @@ class select_jammer { condition = "dyna_cursorTargetType isEqualTo 'PlotPole_EPOCH' && (damage dyna_cursorTarget < 1)"; action = "[dyna_cursorTarget,player,Epoch_personalToken] remoteExec [""EPOCH_server_makeSP"",2];"; - icon = "x\addons\a3_epoch_code\Data\UI\buttons\player_inspect.paa"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\spawnpoint.paa"; tooltip = "Make Spawnpoint"; }; @@ -175,29 +174,29 @@ class VehMaintanance tooltip = "Repair Vehicle"; class RepairHull { - condition = "'HitHull' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitHull'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hithull' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hithull'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_HullBody.paa"; tooltip = "Repair Hull"; }; class ReplaceHull { - condition = "'HitHull' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitHull'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hithull' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hithull'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_HullBody.paa"; tooltip = "Repair Hull"; }; class RepairEngine { - condition = "'HitEngine' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitEngine'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitengine' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitengine'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Engine.paa"; tooltip = "Repair Engine"; }; class ReplaceEngine { - condition = "'HitEngine' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitEngine'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitengine' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitengine'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Engine.paa"; tooltip = "Replace Engine"; }; @@ -210,183 +209,211 @@ class VehMaintanance }; class RepairBody { - condition = "'HitBody' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitBody'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitbody' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitbody'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_HullBody.paa"; tooltip = "Repair Body"; }; class ReplaceBody { - condition = "'HitBody' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitBody'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitbody' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitbody'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_HullBody.paa"; tooltip = "Repair Body"; }; class RepairFuel { - condition = "'HitFuel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitFuel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitfuel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitfuel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Fuel.paa"; tooltip = "Repair Fuel Hose"; }; class RepairMainRotor { - condition = "'HitHRotor' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitHRotor'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hithrotor' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hithrotor'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_MainRotor.paa"; tooltip = "Repair Main Rotor"; }; class ReplaceFuel { - condition = "'HitFuel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitFuel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitfuel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitfuel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Fuel.paa"; tooltip = "Replace Fuel Hose"; }; class ReplaceMainRotor { - condition = "'HitHRotor' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitHRotor'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hithrotor' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hithrotor'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_MainRotor.paa"; tooltip = "Replace Main Rotor"; }; class RepairTailRotor { - condition = "'HitVRotor' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitVRotor'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitvrotor' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitvrotor'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_TailRotor.paa"; tooltip = "Repair Tail Rotor"; }; class ReplaceTailRotor { - condition = "'HitVRotor' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitVRotor'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitvrotor' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitvrotor'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_TailRotor.paa"; tooltip = "Replace Tail Rotor"; }; class ReplaceWinch { - condition = "'HitWinch' in (EPOCH_VehicleRepairs select 0) || 'HitWinch' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitWinch'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitwinch' in (EPOCH_VehicleRepairs select 0) || 'hitwinch' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitwinch'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_SLG.paa"; tooltip = "Replace Winch"; }; + class RepairTireBike1 + { + condition = "'hitfwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; + tooltip = "Repair 1st Wheel"; + }; + class RepairTireBike2 + { + condition = "'hitbwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; + tooltip = "Repair 2nd Wheel"; + }; class RepairTire1 { - condition = "'HitLFWheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitLFWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlfwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitlfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 1st Left Wheel"; }; class RepairTire2 { - condition = "'HitLF2Wheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitLF2Wheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlf2wheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitlf2wheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 2nd Left Wheel"; }; class RepairTire3 { - condition = "'HitLMWheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitLMWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlmwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitlmwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 3rd Left Wheel"; }; class RepairTire4 { - condition = "'HitLBWheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitLBWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlbwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitlbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 4th Left Wheel"; }; class RepairTire5 { - condition = "'HitRFWheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitRFWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrfwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitrfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 1st Right Wheel"; }; class RepairTire6 { - condition = "'HitRF2Wheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitRF2Wheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrf2wheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitrf2wheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 2nd Right Wheel"; }; class RepairTire7 { - condition = "'HitRMWheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitRMWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrmwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitrmwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 3rd Right Wheel"; }; class RepairTire8 { - condition = "'HitRBWheel' in (EPOCH_VehicleRepairs select 0)"; - action = "[dyna_cursorTarget,'repair','HitRBWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrbwheel' in (EPOCH_VehicleRepairs select 0)"; + action = "[dyna_cursorTarget,'repair','hitrbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Wheel.paa"; tooltip = "Repair 4th Right Wheel"; }; + class ReplaceTireBike1 + { + condition = "'hitfwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; + tooltip = "Replace 1st Wheel"; + }; + class ReplaceTireBike2 + { + condition = "'hitbwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; + tooltip = "Replace 2nd Wheel"; + }; class ReplaceTire1 { - condition = "'HitLFWheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitLFWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlfwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitlfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 1st Left Wheel"; }; class ReplaceTire2 { - condition = "'HitLF2Wheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitLF2Wheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlf2wheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitlf2wheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 2nd Left Wheel"; }; class ReplaceTire3 { - condition = "'HitLMWheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitLMWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlmwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitlmwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 3rd Left Wheel"; }; class ReplaceTire4 { - condition = "'HitLBWheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitLBWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlbwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitlbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 4th Left Wheel"; }; class ReplaceTire5 { - condition = "'HitRFWheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitRFWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrfwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitrfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 1st Right Wheel"; }; class ReplaceTire6 { - condition = "'HitRF2Wheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitRF2Wheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrf2wheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitrf2wheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 2nd Right Wheel"; }; class ReplaceTire7 { - condition = "'HitRMWheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitRMWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrmwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitrmwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 3rd Right Wheel"; }; class ReplaceTire8 { - condition = "'HitRBWheel' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitRBWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrbwheel' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitrbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Replace_Wheel.paa"; tooltip = "Replace 4th Right Wheel"; }; class RepairAvionics { - condition = "'HitAvionics' in (EPOCH_VehicleRepairs select 0) || 'HitAvionics' in (EPOCH_VehicleRepairs select 2)"; - action = "[dyna_cursorTarget,'replace','HitAvionics'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitavionics' in (EPOCH_VehicleRepairs select 0) || 'hitavionics' in (EPOCH_VehicleRepairs select 2)"; + action = "[dyna_cursorTarget,'replace','hitavionics'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Repair_Avionics.paa"; tooltip = "Repair Avionics"; }; @@ -399,64 +426,64 @@ class VehMaintanance tooltip = "Remove Parts"; class RemoveEngine { - condition = "'HitEngine' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitEngine'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitengine' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitengine'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Engine.paa"; tooltip = "Remove Engine"; }; class RemoveTire1 { - condition = "'HitLFWheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitLFWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlfwheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitlfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 1st Left Wheel"; }; class RemoveTire2 { - condition = "'HitLF2Wheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitLF2Wheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlf2wheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitlf2wheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 2nd Left Wheel"; }; class RemoveTire3 { - condition = "'HitLMWheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitLMWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlmwheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitlmwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 3rd Left Wheel"; }; class RemoveTire4 { - condition = "'HitLBWheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitLBWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitlbwheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitlbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 4th Left Wheel"; }; class RemoveTire5 { - condition = "'HitRFWheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitRFWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrfwheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitrfwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 1st Right Wheel"; }; class RemoveTire6 { - condition = "'HitRF2Wheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitRF2Wheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrf2wheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitrf2wheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 2nd Right Wheel"; }; class RemoveTire7 { - condition = "'HitRMWheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitRMWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrmwheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitrmwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 3rd Right Wheel"; }; class RemoveTire8 { - condition = "'HitRBWheel' in (EPOCH_VehicleRepairs select 1)"; - action = "[dyna_cursorTarget,'remove','HitRBWheel'] spawn EPOCH_client_VehicleMaintananceDo"; + condition = "'hitrbwheel' in (EPOCH_VehicleRepairs select 1)"; + action = "[dyna_cursorTarget,'remove','hitrbwheel'] spawn EPOCH_client_VehicleMaintananceDo"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Remove_Wheel.paa"; tooltip = "Remove 4th Right Wheel"; }; @@ -546,8 +573,18 @@ class player_tempGroup_requests class player_revive { - condition = "dyna_isDeadPlayer && ('ItemDefibrillator' in dyna_magazinesPlayer)"; - action = "[dyna_cursorTarget, player, Epoch_personalToken] remoteExec ['EPOCH_server_revivePlayer',2];"; - icon = "x\addons\a3_epoch_code\Data\UI\buttons\group_requests_ca.paa"; - tooltip = "Revive Player"; + condition = "dyna_isDeadPlayer && isplayer dyna_cursorTarget"; + action = "dyna_cursorTarget call EPOCH_DefibrillatorUse;"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Revive.paa"; + tooltipcode = "format ['Revive %1',name dyna_cursorTarget]"; }; + +class BaseCam +{ + condition = "dyna_cursorTargetType isEqualTo 'BaseCamTerminal_EPOCH'"; + action = "call Epoch_CamUse;"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\Camera.paa"; + tooltip = "Watch BaseCam"; +}; + + diff --git a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp index 82439e33..83511d53 100644 --- a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp +++ b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp @@ -8,6 +8,25 @@ */ class CfgBaseBuilding { +// Power Sources (only for Energy Calculations) + class Land_spp_Tower_F + { + powerCapacity = 10; + powerType = 1; // Solar + }; + class Land_wpp_Turbine_V1_F + { + powerCapacity = 10; + powerType = 2; // Wind + }; + class Land_wpp_Turbine_V2_F : Land_wpp_Turbine_V1_F {}; + class Land_Wreck_Satellite_EPOCH + { + powerCapacity = 10; + powerType = 3; // Satellite + }; + +// BaseBuilding class Default { upgradeBuilding[] = {}; @@ -45,10 +64,10 @@ class CfgBaseBuilding maxSnapDistance = 4.5; // snap points for Foundation_EPOCH C[] = {0,0,0.806411}; - N[] = {0,10.463,0}; - E[] = {10.463,0,0}; - S[] = {0,-10.463,0}; - W[] = {-10.463,0,0}; + N[] = {0,10.474,0}; + E[] = {10.474,0,0}; + S[] = {0,-10.474,0}; + W[] = {-10.474,0,0}; NE[] = {2.47112,2.46379,0.269223}; NW[] = {-2.4783,2.46379,0.269223}; SE[] = {2.47112,-2.46097,0.269223}; @@ -76,10 +95,10 @@ class CfgBaseBuilding maxSnapDistance = 3; // snap points for Foundation_EPOCH C[] = {0,0,0.806411}; - N[] = {0,10.463,0}; - E[] = {10.463,0,0}; - S[] = {0,-10.463,0}; - W[] = {-10.463,0,0}; + N[] = {0,10.474,0}; + E[] = {10.474,0,0}; + S[] = {0,-10.474,0}; + W[] = {-10.474,0,0}; NE[] = {2.47112,2.46379,0.269223}; NW[] = {-2.4783,2.46379,0.269223}; SE[] = {2.47112,-2.46097,0.269223}; @@ -473,21 +492,22 @@ class CfgBaseBuilding energyCost = 0.5; // snap points for CinderWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.18644,0,0}; - W[] = {-5.19304,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; }; class CinderWall_window_EPOCH : Default { removeParts[] = {{"CinderBlocks",4},{"ItemCorrugatedLg",2},{"ItemGlass",1}}; staticClass = "CinderWall_window_EPOCH"; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.5; // snap points for CinderWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.18644,0,0}; - W[] = {-5.19304,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; // Kit_Garden class Garden_EPOCH : Default @@ -543,7 +563,7 @@ class CfgBaseBuilding class CinderWallGarage_SIM_EPOCH : CinderWallGarage_EPOCH { - allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F"}; + allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F","Const_WoodWalls_static_F"}; removeParts[] = {}; }; class CinderWallHalf_EPOCH : Default @@ -555,17 +575,17 @@ class CfgBaseBuilding GhostPreview = "CinderWallHalf_Ghost_EPOCH"; energyCost = 0.2; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; // snap points for CinderWallHalf_EPOCH N[] = {0,0,1.57378}; - E[] = {5.18644,0,0}; - W[] = {-5.19304,0,0}; - + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,1.4}; }; class CinderWallHalf_SIM_EPOCH : CinderWallHalf_EPOCH { - allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F"}; + allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F","Const_WoodWalls_static_F"}; removeParts[] = {}; upgradeBuilding[] = {}; }; @@ -578,18 +598,18 @@ class CfgBaseBuilding staticClass = "CinderWall_EPOCH"; GhostPreview = "CinderWall_EPOCH"; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.4; // snap points for CinderWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.18644,0,0}; - W[] = {-5.19304,0,0}; - + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; class CinderWall_SIM_EPOCH : CinderWall_EPOCH { - allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F"}; + allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F","Const_WoodWalls_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -598,12 +618,13 @@ class CfgBaseBuilding removeParts[] = {{"CinderBlocks",4},{"ItemCorrugatedLg",1},{"CircuitParts",1}}; staticClass = "CinderWallDoorwHatch_EPOCH"; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; // snap points for CinderWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.18644,0,0}; - W[] = {-5.19304,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; class WoodLargeWall_EPOCH : Default { @@ -617,35 +638,58 @@ class CfgBaseBuilding allowedSnapPoints[] = {"N","S","E","W"}; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; }; class WoodLargeWall_SIM_EPOCH : WoodLargeWall_EPOCH { upgradeBuilding[] = {}; removeParts[] = {}; - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; }; class WoodLargeWall_Ghost_EPOCH : WoodLargeWall_SIM_EPOCH {}; + class PlyThirdWall_EPOCH : Default + { + upgradeBuilding[] = {}; + removeParts[] = {{"PartPlankPack",1},{"ItemPlywoodPack",1}}; + simulClass = "PlyThirdWall_SIM_EPOCH"; + staticClass = "PlyThirdWall_EPOCH"; + GhostPreview = "PlyThirdWall_Ghost_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; + // snap points for WoodLargeWall_EPOCH + N[] = {0,0,1.02012}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + }; + class PlyThirdWall_SIM_EPOCH : PlyThirdWall_EPOCH + { + upgradeBuilding[] = {}; + removeParts[] = {}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; + }; + class PlyThirdWall_Ghost_EPOCH : PlyThirdWall_SIM_EPOCH {}; class WoodWall1_EPOCH : Default { - upgradeBuilding[] = {{"WoodWall2_EPOCH",{{"PartPlankPack",1}}},{"WoodLargeWallCor_EPOCH",{{"ItemCorrugated",1}}},{"WoodWallWindow_EPOCH",{{"ItemGlass",2}}}}; + upgradeBuilding[] = {{"WoodWall2_EPOCH",{{"PartPlankPack",1}}},{"WoodLargeWallCor_EPOCH",{{"ItemCorrugated",1}}},{"WoodWallWindow_EPOCH",{{"ItemGlass",2}}},{"WoodWallGarage_EPOCH",{{"ItemPlywoodPack",1},{"PartPlankPack",4},{"CircuitParts",1}}}}; removeParts[] = {{"PartPlankPack",2}}; simulClass = "WoodWall1_SIM_EPOCH"; staticClass = "WoodWall1_EPOCH"; GhostPreview = "WoodWall1_EPOCH"; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.2; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.4,2.8}; }; class WoodWall1_SIM_EPOCH : WoodWall1_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; energyCost = 0.2; upgradeBuilding[] = {}; removeParts[] = {}; @@ -655,36 +699,78 @@ class CfgBaseBuilding removeParts[] = {{"ItemGlass",2},{"PartPlankPack",2}}; staticClass = "WoodWallWindow_EPOCH"; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.5; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.4,2.8}; }; class WoodLargeWallCor_EPOCH : Default { - upgradeBuilding[] = {{"WoodLargeWallDoorway_EPOCH",{{"PartPlankPack",1}}}}; + upgradeBuilding[] = {{"WoodLargeWallDoorway_EPOCH",{{"PartPlankPack",1}}},{"MetalWallGarage_EPOCH",{{"ItemCorrugated",1},{"PartPlankPack",4},{"CircuitParts",1}}}}; removeParts[] = {{"PartPlankPack",2},{"ItemCorrugated",1}}; simulClass = "WoodLargeWallCor_SIM_EPOCH"; staticClass = "WoodLargeWallCor_EPOCH"; GhostPreview = "WoodLargeWallCor_EPOCH"; snapType = "snapPointsPara"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.2; availableTextures[] = {"\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa"}; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; class WoodLargeWallCor_SIM_EPOCH : WoodLargeWallCor_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; + }; + class MetalWallGarage_EPOCH : Default + { + removeParts[] = {{"PartPlankPack",2},{"ItemScraps",2},{"CircuitParts",1}}; + simulClass = "MetalWallGarage_SIM_EPOCH"; + staticClass = "MetalWallGarage_EPOCH"; + GhostPreview = "MetalWallGarage_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; + energyCost = 0.5; + // snap points for CinderWall_EPOCH + N[] = {0,0,3.06034}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + }; + class MetalWallGarage_SIM_EPOCH : MetalWallGarage_EPOCH + { + allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F","Const_WoodWalls_static_F"}; + removeParts[] = {}; + }; + class WoodWallGarage_EPOCH : Default + { + removeParts[] = {{"PartPlankPack",2},{"CircuitParts",1}}; + simulClass = "WoodWallGarage_SIM_EPOCH"; + staticClass = "WoodWallGarage_EPOCH"; + GhostPreview = "WoodWallGarage_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; + energyCost = 0.5; + // snap points for CinderWall_EPOCH + N[] = {0,0,3.06034}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + }; + class WoodWallGarage_SIM_EPOCH : MetalWallGarage_EPOCH + { + allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F","Const_WoodWalls_static_F"}; + removeParts[] = {}; }; class WoodWall2_EPOCH : Default { @@ -693,17 +779,18 @@ class CfgBaseBuilding simulClass = "WoodWall2_SIM_EPOCH"; staticClass = "WoodWall2_EPOCH"; GhostPreview = "WoodWall2_EPOCH"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.2; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.4,2.8}; }; class WoodWall2_SIM_EPOCH : WoodWall2_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -714,18 +801,19 @@ class CfgBaseBuilding simulClass = "WoodLargeWallDoorway_SIM_EPOCH"; staticClass = "WoodLargeWallDoorway_EPOCH"; GhostPreview = "WoodLargeWallDoorway_EPOCH"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.2; availableTextures[] = {"\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa"}; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; class WoodLargeWallDoorway_SIM_EPOCH : WoodLargeWallDoorway_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -736,17 +824,18 @@ class CfgBaseBuilding simulClass = "WoodWall3_SIM_EPOCH"; staticClass = "WoodWall3_EPOCH"; GhostPreview = "WoodWall3_EPOCH"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.2; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.4,2.8}; }; class WoodWall3_SIM_EPOCH : WoodWall3_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -757,18 +846,19 @@ class CfgBaseBuilding simulClass = "WoodLargeWallDoor_SIM_EPOCH"; staticClass = "WoodLargeWallDoor_EPOCH"; GhostPreview = "WoodLargeWallDoor_EPOCH"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; availableTextures[] = {"\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa"}; energyCost = 0.2; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; class WoodLargeWallDoor_SIM_EPOCH : WoodLargeWallDoor_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -778,17 +868,18 @@ class CfgBaseBuilding simulClass = "WoodWall4_SIM_EPOCH"; staticClass = "WoodWall4_EPOCH"; GhostPreview = "WoodWall4_EPOCH"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; energyCost = 0.2; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.4,2.8}; }; class WoodWall4_SIM_EPOCH : WoodWall4_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -798,18 +889,19 @@ class CfgBaseBuilding simulClass = "WoodLargeWallDoorL_SIM_EPOCH"; staticClass = "WoodLargeWallDoorL_EPOCH"; GhostPreview = "WoodLargeWallDoorL_EPOCH"; - snapPointsPara[] = {"N","E","W"}; + snapPointsPara[] = {"N","E","W","CAM"}; allowedSnapPoints[] = {"N","S","E","W"}; availableTextures[] = {"\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa","\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa"}; energyCost = 0.2; // snap points for WoodLargeWall_EPOCH N[] = {0,0,3.06034}; - E[] = {5.23785,0,0}; - W[] = {-5.26294,0,0}; + E[] = {5.237,0,0}; + W[] = {-5.237,0,0}; + CAM[] = {0,-0.47,2.8}; }; class WoodLargeWallDoorL_SIM_EPOCH : WoodLargeWallDoorL_EPOCH { - allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F","Const_Cinder_static_F"}; upgradeBuilding[] = {}; removeParts[] = {}; }; @@ -871,7 +963,7 @@ class CfgBaseBuilding }; class WoodStairs_SIM_EPOCH : WoodStairs_EPOCH { - allowedSnapPoints[] = {"NF","SF","EF","WF","CB"}; + allowedSnapPoints[] = {"NF","SF","EF","WF","CB","CS"}; allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"}; upgradeBuilding[] = {}; removeParts[] = {}; @@ -879,6 +971,7 @@ class CfgBaseBuilding class WoodStairs_Ghost_EPOCH : WoodStairs_SIM_EPOCH {}; class WoodStairs2_EPOCH : Default { + upgradeBuilding[] = {{"WoodStairs3_EPOCH",{{"ItemPipe",1},{"CircuitParts",1}}}}; removeParts[] = {{"PartPlankPack",4}}; simulClass = "WoodStairs2_SIM_EPOCH"; staticClass = "WoodStairs2_EPOCH"; @@ -893,6 +986,7 @@ class CfgBaseBuilding WF2[] = {-5.237,-0.003,0}; C[] = {-0.000251044,-0.00293543,6.37273}; CB[] = {-0.000299305,-0.000390954,3.32902}; + CS[] = {-0.000251044,-0.00293543,3.060298}; // 2x WoodStairs without Space for Floor CinN[] = {0.0214193,2.87136,3.05972}; CinE[] = {2.87868,-0.000390954,3.05972}; CinS[] = {0.0214193,-2.86826,3.05972}; @@ -938,6 +1032,68 @@ class CfgBaseBuilding allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"}; removeParts[] = {}; }; + class WoodStairs3_EPOCH : Default + { + removeParts[] = {{"PartPlankPack",4},{"ItemPipe",1},{"CircuitParts",1}}; + simulClass = "WoodStairs3_SIM_EPOCH"; + staticClass = "WoodStairs3_EPOCH"; + GhostPreview = "WoodStairs3_EPOCH"; + snapPointsPara[] = {"NF2","SF2","EF2","WF2","NF","SF","EF","WF","C","CB","NWQF","NQF","NEQF","SWQF","SQF","SEQF","ENQF","EQF","ESQF","WNQF","WQF","WSQF","NWHF","NEHF","SWHF","SEHF","WNHF","WSHF","ENHF","ESHF"}; + snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"}; + energyCost = 0.3; + // snap points for WoodStairs_EPOCH + NF2[] = {0,5.237,0}; + SF2[] = {0,-5.237,0}; + EF2[] = {5.237,0,0}; + WF2[] = {-5.237,-0.003,0}; + C[] = {-0.000251044,-0.00293543,6.37273}; + CB[] = {-0.000299305,-0.000390954,3.32902}; + CS[] = {-0.000251044,-0.00293543,3.060298}; // 2x WoodStairs without Space for Floor + CinN[] = {0.0214193,2.87136,3.05972}; + CinE[] = {2.87868,-0.000390954,3.05972}; + CinS[] = {0.0214193,-2.86826,3.05972}; + CinW[] = {-2.88969,-0.000390954,3.05972}; + N[] = {0.0195083,2.46379,3.32952}; + E[] = {2.47112,-0.000253316,3.32952}; + S[] = {0.0195083,-2.46097,3.32952}; + W[] = {-2.4783,-0.000253316,3.32952}; + NE[] = {2.47112,2.46379,3.32952}; + NW[] = {-2.4783,2.46379,3.32952}; + SE[] = {2.47112,-2.46097,3.32952}; + SW[] = {-2.4783,-2.46097,3.32952}; + NF[] = {0,5.237,3.06}; + SF[] = {0,-5.237,3.06}; + EF[] = {5.237,0,3.06}; + WF[] = {-5.237,0,3.06}; + NWQF[] = {-1.30925,3.92775,3.06}; + NQF[] = {0,3.92775,3.06}; + NEQF[] = {1.30925,3.92775,3.06}; + SWQF[] = {-1.30925,-3.92775,3.06}; + SQF[] = {0,-3.92775,3.06}; + SEQF[] = {1.30925,-3.92775,3.06}; + ENQF[] = {3.92775,1.30925,3.06}; + EQF[] = {3.92775,0,3.06}; + ESQF[] = {3.92775,-1.30925,3.06}; + WNQF[] = {-3.92775,1.30925,3.06}; + WQF[] = {-3.92775,0,3.06}; + WSQF[] = {-3.92775,-1.30925,3.06}; + + NWHF[] = {-1.30925,5.237,3.06}; + NEHF[] = {1.30925,5.237,3.06}; + SWHF[] = {-1.30925,-5.237,3.06}; + SEHF[] = {1.30925,-5.237,3.06}; + WNHF[] = {-5.237,1.30925,3.06}; + WSHF[] = {-5.237,-1.30925,3.06}; + ENHF[] = {5.237,1.30925,3.06}; + ESHF[] = {5.237,-1.30925,3.06}; + + }; + class WoodStairs3_SIM_EPOCH : WoodStairs3_EPOCH + { + allowedSnapPoints[] = {"NF","SF","EF","WF","CB"}; + allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"}; + removeParts[] = {}; + }; class WoodTower_EPOCH : Default { removeParts[] = {{"PartPlankPack",4}}; @@ -1111,6 +1267,30 @@ class CfgBaseBuilding removeParts[] = {}; }; class WorkBench_Ghost_EPOCH : WorkBench_SIM_EPOCH {}; + class SolarCharger_EPOCH : Default + { + removeParts[] = {{"KitSolarCharger",1}}; + GhostPreview = "SolarCharger_Ghost_EPOCH"; + staticClass = "SolarCharger_EPOCH"; + simulClass = "SolarCharger_SIM_EPOCH"; + }; + class SolarCharger_SIM_EPOCH : SolarCharger_EPOCH + { + removeParts[] = {}; + }; + class SolarCharger_Ghost_EPOCH : SolarCharger_SIM_EPOCH {}; + class SolarChargerXL_EPOCH : Default + { + removeParts[] = {{"KitSolarChargerXL",1}}; + GhostPreview = "SolarChargerXL_Ghost_EPOCH"; + staticClass = "SolarChargerXL_EPOCH"; + simulClass = "SolarChargerXL_SIM_EPOCH"; + }; + class SolarChargerXL_SIM_EPOCH : SolarChargerXL_EPOCH + { + removeParts[] = {}; + }; + class SolarChargerXL_Ghost_EPOCH : SolarChargerXL_SIM_EPOCH {}; class LockBox_EPOCH : Default { returnOnPack[] = {{"ItemLockbox",1}}; @@ -1391,6 +1571,44 @@ class CfgBaseBuilding removeParts[] = {}; }; class WaterPump_Ghost_EPOCH : WaterPump_SIM_EPOCH {}; + class BaseCam_EPOCH : Default + { + removeParts[] = {{"BaseCam",1}}; + GhostPreview = "BaseCam_Ghost_EPOCH"; + staticClass = "BaseCam_EPOCH"; + simulClass = "BaseCam_SIM_EPOCH"; + }; + class BaseCam_SIM_EPOCH : BaseCam_EPOCH + { + removeParts[] = {}; + allowedSnapPoints[] = {"CAM"}; + allowedSnapObjects[] = {"Const_WoodWalls_static_F","Const_Cinder_static_F"}; + }; + class BaseCam_Ghost_EPOCH : BaseCam_SIM_EPOCH {}; + class BaseCamTerminal_EPOCH : Default + { + removeParts[] = {{"BaseCamTerminal",1}}; + GhostPreview = "BaseCamTerminal_Ghost_EPOCH"; + staticClass = "BaseCamTerminal_EPOCH"; + simulClass = "BaseCamTerminal_SIM_EPOCH"; + }; + class BaseCamTerminal_SIM_EPOCH : BaseCamTerminal_EPOCH + { + removeParts[] = {}; + }; + class BaseCamTerminal_Ghost_EPOCH : BaseCamTerminal_SIM_EPOCH {}; + class snowman_EPOCH : Default + { + removeParts[] = {{1,"KitSnowman"}}; + GhostPreview = "snowman_Ghost_EPOCH"; + staticClass = "snowman_EPOCH"; + simulClass = "snowman_SIM_EPOCH"; + }; + class snowman_SIM_EPOCH : snowman_EPOCH + { + removeParts[] = {}; + }; + class snowman_Ghost_EPOCH : snowman_SIM_EPOCH {}; }; /*[[[end]]]*/ diff --git a/Sources/epoch_config/Configs/CfgClientFunctions.hpp b/Sources/epoch_config/Configs/CfgClientFunctions.hpp index 1cd7c5e0..581803bf 100644 --- a/Sources/epoch_config/Configs/CfgClientFunctions.hpp +++ b/Sources/epoch_config/Configs/CfgClientFunctions.hpp @@ -51,6 +51,8 @@ class CfgClientFunctions class unit_onKilledEH {}; class AutoRun_Check {}; class AutoRun {}; + class DefibrillatorUse {}; + class CamUse {}; }; class building { diff --git a/Sources/epoch_config/Configs/CfgCrafting.hpp b/Sources/epoch_config/Configs/CfgCrafting.hpp index db1cce0e..c0e98599 100644 --- a/Sources/epoch_config/Configs/CfgCrafting.hpp +++ b/Sources/epoch_config/Configs/CfgCrafting.hpp @@ -99,7 +99,7 @@ class CfgCrafting /** --------- RECIPES BELOW --------- **/ class ItemCoolerE : Part { - usedIn[] = {"ItemCooler0","ItemCooler1","ItemCooler2","ItemCooler3","ItemCooler4"}; + usedIn[] = {"ItemCooler0","ItemCooler1","ItemCooler2","ItemCooler3","ItemCooler4","KitSnowman"}; previewPosition[] = {0.795709,1,0.415296}; previewScale = 0.8; previewVector = 0; @@ -148,7 +148,7 @@ class CfgCrafting }; class CircuitParts : Part { - usedIn[] = {"EnergyPack","EnergyPackLg","KitPlotPole","ItemBattery","KitSolarGen","KitVehicleUpgradeI_200_EPOCH","KitVehicleUpgradeIV_200_EPOCH","BarrelBomb_EPOCH_Remote_Mag","BarrelBomb2_EPOCH_Remote_Mag","KitPortableLight_Single","KitPortableLight_Double"}; + usedIn[] = {"EnergyPack","EnergyPackLg","KitPlotPole","ItemBattery","KitSolarGen","KitSolarCharger","KitSolarChargerXL","KitVehicleUpgradeI_200_EPOCH","KitVehicleUpgradeIV_200_EPOCH","BarrelBomb_EPOCH_Remote_Mag","BarrelBomb2_EPOCH_Remote_Mag","KitPortableLight_Single","KitPortableLight_Double","BaseCam","BaseCamTerminal"}; previewPosition[] = {0.791044,1,0.256956}; previewScale = 2; previewVector = 2.3; @@ -415,7 +415,7 @@ class CfgCrafting }; class ItemScraps : Item { - usedIn[] = {"ItemCorrugated","KitMetalTrap","MeleeRod","KitVehicleUpgradeIV_200_EPOCH","KitBarbedWire"}; + usedIn[] = {"ItemCorrugated","KitMetalTrap","MeleeRod","KitVehicleUpgradeIV_200_EPOCH","KitBarbedWire","BaseCam","BaseCamTerminal"}; nearby[] = {{"Fire","","fire",{1,{"ALL"}},3,1,1,0}}; recipe[] = {{"PartOre",2}}; previewPosition[] = {0.797144,1,0.309158}; @@ -466,10 +466,17 @@ class CfgCrafting }; class ItemDuctTape : Part { - usedIn[] = {"SpareTire","EngineParts","ItemRotor"}; + usedIn[] = {"SpareTire","EngineParts","ItemRotor","BaseCam","BaseCamTerminal"}; previewPosition[] = {0.807346,1,0.27}; previewScale = 1.8; previewVector = -3.9; + }; + class ItemGlass : Part + { + usedIn[] = {"BaseCam", "BaseCamTerminal"}; + previewPosition[] = {0.807346,1,0.27}; + previewScale = 0.55; + previewVector = -3.9; }; class EngineParts : Item { @@ -786,6 +793,13 @@ class CfgCrafting previewScale = 0.4; previewVector = 2.1; }; + class icecream_epoch : Part + { + usedIn[] = {"KitSnowman"}; + previewPosition[] = {0.796141,1,0.27}; + previewScale = 0.7; + previewVector = 2.1; + }; class emptyjar_epoch : Part { usedIn[] = {"water_epoch"}; @@ -802,7 +816,7 @@ class CfgCrafting }; class clean_water_epoch : Item { - usedIn[] = {"EnergyPack"}; + usedIn[] = {"EnergyPack","KitSnowman"}; nearby[] = {{"Fire","","fire",{1,{"ALL"}},3,1,1,0}}; recipe[] = {"water_epoch"}; previewPosition[] = {0.807346,1,0.43035}; @@ -819,7 +833,7 @@ class CfgCrafting }; class ItemCorrugatedLg : Item { - usedIn[] = {"KitPlotPole","KitTankTrap","KitHesco3","KitSolarGen","ItemRotor","EngineBlock","KitMetalFloor","KitMetalHalfFloor","KitMetalQuarterFloor","KitMetalTower","KitFieldToilet","KitSink","KitPortableLight_Single","KitPortableLight_Double","KitBarbedWire"}; + usedIn[] = {"KitPlotPole","KitTankTrap","KitHesco3","KitSolarGen","KitSolarCharger","KitSolarChargerXL","ItemRotor","EngineBlock","KitMetalFloor","KitMetalHalfFloor","KitMetalQuarterFloor","KitMetalTower","KitFieldToilet","KitSink","KitPortableLight_Single","KitPortableLight_Double","KitBarbedWire"}; recipe[] = {{"ItemCorrugated",3}}; nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; previewPosition[] = {0.797491,1,0.32899}; @@ -828,7 +842,7 @@ class CfgCrafting }; class PartPlankPack : Item { - usedIn[] = {"KitStudWall","KitWoodFloor","KitWoodFoundation","KitWoodStairs","KitWoodRamp","KitWoodLadder","KitWoodTower","KitTiPi","KitWorkbench","KitSpikeTrap","KitMetalTrap","KitWoodQuarterFloor","KitWoodHalfFloor","KitBarGate","KitBagBunker","KitWatchTower","KitLightPole","KitScaffolding"}; + usedIn[] = {"KitStudWall","KitWoodFloor","KitWoodFoundation","KitWoodStairs","KitWoodRamp","KitWoodLadder","KitWoodTower","KitTiPi","KitWorkbench","KitSpikeTrap","KitMetalTrap","KitWoodQuarterFloor","KitWoodHalfFloor","KitBarGate","KitBagBunker","KitWatchTower","KitLightPole","KitScaffolding","KitPlyThirdWall_EPOCH"}; recipe[] = {{"WoodLog_EPOCH",2}}; previewPosition[] = {0.797837,1,0.288258}; previewScale = 0.2; @@ -837,7 +851,7 @@ class CfgCrafting }; class ItemPlywoodPack : Item { - usedIn[] = {}; + usedIn[] = {"KitPlyThirdWall_EPOCH"}; recipe[] = {{"WoodLog_EPOCH",3}}; previewPosition[] = {0.797837,1,0.288258}; previewScale = 0.2; @@ -879,6 +893,17 @@ class CfgCrafting previewScale = 0.07; previewVector = 0; }; + class KitPlyThirdWall_EPOCH : Kit + { + recipe[] = {{"PartPlankPack",2},{"ItemPlywoodPack",1}}; + model = "\x\addons\a3_epoch_community\models\third_ply_wall.p3d"; + nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; + previewPosition[] = {0.797675,1,0.398882}; + previewScale = 0.07; + previewVector = 0; + descriptionShort = "1/3 Plywood Wall"; + descriptionFull = "Base building material"; + }; class KitWoodFloor : Kit { usedIn[] = {"KitWoodTower","KitBagBunker"}; @@ -1117,9 +1142,20 @@ class CfgCrafting previewScale = 0.055; previewVector = 0; }; + class KitSnowman : Kit + { + recipe[] = {{"ItemCoolerE",1},{"icecream_epoch",1},{"clean_water_epoch",2}}; + model = "\x\addons\a3_epoch_community\models\hol_x\epoch_snowman.p3d"; + nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; + previewPosition[] = {0.801378,1,0.29}; + previewScale = 0.15; + previewVector = 0; + descriptionShort = "Snowman"; + descriptionFull = "Nice deco for Wintertime"; + }; class ItemSolar : Part { - usedIn[] = {"KitSolarGen"}; + usedIn[] = {"KitSolarGen","KitSolarCharger","KitSolarChargerXL"}; previewPosition[] = {0.802374,1,0.26}; previewScale = 0.19; previewVector = 3.3; @@ -1133,7 +1169,7 @@ class CfgCrafting }; class ItemCables : Item { - usedIn[] = {"KitSolarGen","KitPlotPole","ItemCopperBar","KitVehicleUpgradeI_200_EPOCH"}; + usedIn[] = {"KitSolarGen","KitSolarCharger","KitSolarChargerXL","KitPlotPole","ItemCopperBar","KitVehicleUpgradeI_200_EPOCH","BaseCam","BaseCamTerminal"}; nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; recipe[] = {{"ItemCopperBar",1}}; previewPosition[] = {0.802374,1,0.26}; @@ -1227,7 +1263,7 @@ class CfgCrafting }; class ItemBattery : Item { - usedIn[] = {"KitSolarGen","KitPlotPole","BarrelBomb_EPOCH_Remote_Mag","BarrelBomb2_EPOCH_Remote_Mag"}; + usedIn[] = {"KitSolarGen","KitSolarCharger","KitSolarChargerXL","KitPlotPole","BarrelBomb_EPOCH_Remote_Mag","BarrelBomb2_EPOCH_Remote_Mag"}; nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; recipe[] = {{"EnergyPackLg",3},{"CircuitParts",1}}; previewPosition[] = {0.802374,1,0.276733}; @@ -1241,6 +1277,50 @@ class CfgCrafting previewPosition[] = {0.804979,1,0.39189}; previewScale = 0.11; previewVector = 0; + }; + class KitSolarCharger : Kit + { + recipe[] = {{"ItemSolar",1},{"ItemCables",1},{"ItemBattery",1},{"ItemCorrugatedLg",2},{"CircuitParts",2}}; + nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; + model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Solar_Generator_Complete\Solar_generator.p3d"; + previewPosition[] = {0.804979,1,0.39189}; + previewScale = 0.11; + previewVector = 0; + descriptionShort = "Solar Charger Kit"; + descriptionFull = "Used to charge small Energy Packs"; + }; + class KitSolarChargerXL : Kit + { + recipe[] = {{"ItemSolar",2},{"ItemCables",2},{"ItemBattery",2},{"ItemCorrugatedLg",2},{"CircuitParts",2}}; + nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; + model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Solar_Generator_Complete\Solar_generator.p3d"; + previewPosition[] = {0.804979,1,0.39189}; + previewScale = 0.11; + previewVector = 0; + descriptionShort = "Solar Charger Kit XL"; + descriptionFull = "Used to charge large Energy Packs"; + }; + class BaseCam : Kit + { + recipe[] = {{"ItemCables",1},{"ItemGlass",1},{"ItemDuctTape",1},{"ItemScraps",2},{"CircuitParts",2}}; + nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; + model = "\x\addons\a3_epoch_community\models\base_cam.p3d"; + previewPosition[] = {0.804979,1,0.3}; + previewScale = 0.5; + previewVector = 0; + descriptionShort = "Base Camera"; + descriptionFull = "Protect your Base with a Camera.
A BaseCam Terminal is needed,
to check your Base Cameras"; + }; + class BaseCamTerminal : Kit + { + recipe[] = {{"ItemCables",1},{"ItemGlass",1},{"ItemDuctTape",1},{"ItemScraps",2},{"CircuitParts",2}}; + nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; + model = "\x\addons\a3_epoch_community\models\base_cam_terminal.p3d"; + previewPosition[] = {0.804979,1,0.3}; + previewScale = 0.5; + previewVector = 0; + descriptionShort = "Base Camera Terminal"; + descriptionFull = "Check your Base Cameras with this Terminal"; }; class MeleeRod : Kit { @@ -1395,7 +1475,7 @@ class CfgCrafting }; class ItemCanvas : Item { - usedIn[] = {"KitTentA","KitTentDome","KitSunShade","KitWatchTower","KitScaffolding"}; + usedIn[] = {"KitTentA","KitTentDome","KitSunShade","KitWatchTower","KitScaffolding","ItemSeedBag"}; nearby[] = {{"Workbench","","workbench",{1,{"WorkBench_EPOCH"}},3,1,0,1}}; recipe[] = {{"ItemKiloHemp",1}}; previewPosition[] = {0.802443,1,0.254301}; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index d7bad07e..9e1450a5 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -14,7 +14,7 @@ /*[[[cog from arma_config_tools import *; json_to_arma()]]]*/ class CfgEpochClient { - epochVersion = "1.1.0"; + epochVersion = "1.2.0"; ArmAVersion = 176; debug = "true"; // true = enable extra rpt debug lines, false to disable @@ -55,9 +55,16 @@ class CfgEpochClient 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 AtmBlockedAtPlot = "true"; // Block ATM's in Plotpole-Range disableRemoteSensors = "true"; // disableRemoteSensors true/false + + ActionFireOnLighter = "true"; // Lighter is needed to inflame fires + ActionBurnBarrelOffExtinguisher = "true"; // FireExtinguisher is needed to put off Burn Barrels + ActionHookRope = "true"; // Rope is needed to hook vehicles (get back on release) epochMessageBackgroundCol[] = {0,0,0,0.2}; //Epoch_message background color (format: {R,G,B,A}) epochMessageTextCol[] = {1,1,1,0.95}; //Epoch_message text color (format: {R,G,B,A}) @@ -189,6 +196,19 @@ class CfgEpochClient playerDeathMarkerGPSOnly = 1; // Map marker toggle in map dyna menu on death with assigned GPS only mapOnZoomSetMarkerSize = 1; // When in map markers will change to larger size as player zooms in bankTransferTime[] = {0.0006,1.2,0.06}; + + // Player (Building) Energy + energyPowerSources[] = { // Add PowerCapacity and PowerType in CfgBaseBuilding, if you add something here! + "Land_spp_Tower_F", + "Land_wpp_Turbine_V2_F", + "Land_wpp_Turbine_V1_F", + "SolarGen_EPOCH", + "Land_Wreck_Satellite_EPOCH" + }; + energyRange = 75; // Range to check for energy sources + energyRegenMax = 5; // Max energy increase value (every 10 seconds) + energyCostNV = 3; // Energy loss value by using nightvision (every 10 seconds) + energyRegenInVeh = 5; // Energy increase value in Vehicles with Engine On (every 10 seconds) // Favorite Bar Fav_enableFavoriteBar = "true"; // If disabled, players will not be able to use favorite bar @@ -196,6 +216,9 @@ class CfgEpochClient Fav_FastWeaponSwitching = "false"; // If enabled, same slot weapons from favorites bar are equipped instantly, otherwise reload action is played (recommended for immersion) Fav_BannedItems[] = {"FAK"}; // Items that users are not allowed to pin + EnableTempVehTrade = "false"; // Enable selling of temp Vehicles (not handled by Epoch). Temp Vehicles will not be stored in Traders, but can be sold + BulletCalculateOnCraft = "true"; // Enable Bullet Calculation on Crafting - Example: If you craft a large EnergyPack with 3 half full EnergyPacks, you will only get a half filled large EnergyPack back + // Advanced Vehicle Repair UseAdvancedVehicleRepair = "true"; // Switch On / Off Advanced Vehicle Repair (Does not effect SuppressedCraftingItems !) EnableRemoveParts = "true"; // Enable removing Tires / Engines from Vehicles @@ -214,21 +237,25 @@ class CfgEpochClient VehicleRepairs[] = { // {Hitpoint, dmg to repair, dmg to replace, mat to repair, mat to replace} {"HitHull",0.33,0.66,"ItemScraps","ItemCorrugated"}, {"HitBody",0.33,1,"ItemScraps","ItemCorrugated"}, - {"HitLFWheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitLF2Wheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitLMWheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitLBWheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitRFWheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitRF2Wheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitRMWheel",0.33,1,"VehicleRepair","SpareTire"}, - {"HitRBWheel",0.33,1,"VehicleRepair","SpareTire"}, {"HitEngine",0.33,0.91,"EngineParts","EngineBlock"}, {"glass",0.33,1,"ItemGlass","ItemGlass"}, {"HitFuel",0.1,0.66,"ItemDuctTape","FuelTank"}, {"HitHRotor",0.33,1,"ItemCorrugated","ItemRotor"}, {"HitVRotor",0.33,1,"ItemCorrugated","ItemRotor"}, {"HitWinch",0.33,0.91,"ItemCables","ItemCables"}, - {"HitAvionics",0.33,0.91,"CircuitParts","CircuitParts"} + {"HitAvionics",0.33,0.91,"CircuitParts","CircuitParts"}, + // Wheels - Do not change the order (front to back wheels) here! + {"HitLFWheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitRFWheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitLF2Wheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitRF2Wheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitLMWheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitRMWheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitLBWheel",0.33,1,"VehicleRepair","SpareTire"}, + {"HitRBWheel",0.33,1,"VehicleRepair","SpareTire"}, + // Mountainbike wheels + {"HitFWheel",0.33,0.91,"",""}, + {"HitBWheel",0.33,0.91,"",""} }; // include configs diff --git a/Sources/epoch_config/Configs/CfgItemInteractions.hpp b/Sources/epoch_config/Configs/CfgItemInteractions.hpp index 8526defd..4784b400 100644 --- a/Sources/epoch_config/Configs/CfgItemInteractions.hpp +++ b/Sources/epoch_config/Configs/CfgItemInteractions.hpp @@ -504,6 +504,16 @@ class CfgItemInteractions buildClass = "Garden_EPOCH"; isStorage = 1; }; + class KitSolarCharger : Item_Build_base + { + buildClass = "SolarCharger_EPOCH"; + isStorage = 1; + }; + class KitSolarChargerXL : Item_Build_base + { + buildClass = "SolarChargerXL_EPOCH"; + isStorage = 1; + }; class KitBurnBarrel : Item_Build_base { buildClass = "BurnBarrel_EPOCH"; @@ -588,6 +598,10 @@ class CfgItemInteractions { buildClass = "BarbedWire_EPOCH"; }; + class BaseCam : Item_Build_base + { + buildClass = "BaseCam_EPOCH"; + }; class PaintCanBase : Default { interactAction = 12; @@ -985,7 +999,7 @@ class CfgItemInteractions }; class ItemCanteen_Clean : Drink_base { - interactAttributes[] = {{"Thirst",1000},{"Stamina",50}}; + interactAttributes[] = {{"Thirst",1000},{"Stamina",100}}; interactReturnOnUse = "ItemCanteen_Empty"; }; class ItemBottlePlastic_Dirty: Drink_base @@ -996,7 +1010,7 @@ class CfgItemInteractions class ItemCanteen_Dirty : Drink_base { - interactAttributes[] = {{"Thirst",1000},{"Toxicity",5,1},{"Stamina",50},{"Radiation",2,1}}; + interactAttributes[] = {{"Thirst",1000},{"Toxicity",10,1},{"Stamina",100},{"Radiation",4,1}}; interactReturnOnUse = "ItemCanteen_Empty"; }; class adrenaline_epoch : Drink_base @@ -1045,5 +1059,23 @@ class CfgItemInteractions interactText = "USE"; interactAttributes[] = {{"Radiation",-15},{"Thirst",-50},{"Immunity",5}}; }; + class ItemDefibrillator : Default + { + interactAction = 17; + interactText = "ReCharge"; + }; + class BaseCamTerminal : Item_Build_base + { + buildClass = "BaseCamTerminal_EPOCH"; + interactActions[] = {{"Watch","call Epoch_CamUse;"}}; + }; + class KitSnowman : Item_Build_base + { + buildClass = "snowman_EPOCH"; + }; + class KitPlyThirdWall_EPOCH : Item_Build_base + { + buildClass = "PlyThirdWall_EPOCH"; + }; }; /*[[[end]]]*/ diff --git a/Sources/epoch_config/Configs/CfgItemSort.hpp b/Sources/epoch_config/Configs/CfgItemSort.hpp index 32c802fe..005e8cba 100644 --- a/Sources/epoch_config/Configs/CfgItemSort.hpp +++ b/Sources/epoch_config/Configs/CfgItemSort.hpp @@ -171,6 +171,10 @@ class CfgItemSort "U_O_FullGhillie_sard", "U_O_FullGhillie_ard", + // Radiation Suits + "U_RadiationSuit_M_uniform", + "U_RadiationSuit_F_uniform", + // CIV "U_I_OfficerUniform", "U_I_C_Soldier_Para_1_F", @@ -431,6 +435,8 @@ class CfgItemSort "H_F3_EPOCH", "H_F4_EPOCH", "H_F5_EPOCH", + "thor_mask_epoch", + "iron_mask_epoch", "wolf_mask_epoch", "pkin_mask_epoch", "clown_mask_epoch", @@ -948,6 +954,7 @@ class CfgItemSort Medical[] = { "FAK", + "Soap_Epoch", "Towelette", "HeatPack", "ColdPack", @@ -1051,11 +1058,13 @@ class CfgItemSort "ItemCorrugated", "ItemCorrugatedLg", "KitStudWall", + "KitPlyThirdWall_EPOCH", "KitWoodFloor", "KitWoodHalfFloor", "KitWoodQuarterFloor", "KitWoodStairs", "KitWoodRamp", + "KitSnowman", "KitFirePlace", "KitTiPi", "KitShelf", @@ -1064,6 +1073,10 @@ class CfgItemSort "KitPlotPole", "KitCinderWall", "KitSolarGen", + "KitSolarCharger", + "KitSolarChargerXL", + "BaseCam", + "BaseCamTerminal", "KitWorkbench", "KitWoodLadder", "KitWoodTower", @@ -1187,6 +1200,11 @@ class CfgItemSort "ItemFireExtinguisher" }; Vehicles_Land[] = { + "hoverboard_epoch_1", + "hoverboard_epoch_bttf", + "hoverboard_epoch_a3", + "hoverboard_epoch_cargo", + "MBK_01_EPOCH", "ebike_epoch", // Motorcycle "C_Offroad_01_EPOCH", // Offroader "C_Offroad_01_EPOCH1", @@ -1392,6 +1410,7 @@ class CfgItemSort "O_Heli_Transport_04_box_EPOCH", "O_Heli_Transport_04_covered_EPOCH", "B_Heli_Light_01_EPOCH", + "uh1h_Epoch", "B_Heli_Light_01_armed_F", "B_Heli_Transport_01_EPOCH", diff --git a/Sources/epoch_config/Configs/CfgObjectInteractions.hpp b/Sources/epoch_config/Configs/CfgObjectInteractions.hpp index a2b05c5b..e7832391 100644 --- a/Sources/epoch_config/Configs/CfgObjectInteractions.hpp +++ b/Sources/epoch_config/Configs/CfgObjectInteractions.hpp @@ -70,6 +70,14 @@ class CfgObjectInteractions { interactMode = 4; }; + class SolarCharger_EPOCH : Default + { + interactMode = 4; + }; + class SolarChargerXL_EPOCH : Default + { + interactMode = 4; + }; class FieldToilet_EPOCH : Default { interactMode = 4; @@ -231,6 +239,7 @@ class CfgObjectInteractions ppEffect[] = {}; }; class SmokeShellToxic_Ammo : SmokeShellCustom {}; + class SmokeShellToxicSapper : SmokeShellCustom {}; class Epoch_Cloak_F : Default { distance = 30; diff --git a/Sources/epoch_config/Configs/CfgPricing.hpp b/Sources/epoch_config/Configs/CfgPricing.hpp index f13fdb6a..00ec2f43 100644 --- a/Sources/epoch_config/Configs/CfgPricing.hpp +++ b/Sources/epoch_config/Configs/CfgPricing.hpp @@ -112,6 +112,10 @@ class CfgPricing { price = 25; }; + class ItemWaterPurificationTablets + { + price = 10; + }; class ItemBulb { price = 10; @@ -2096,6 +2100,10 @@ class CfgPricing { price = 3; }; + class Soap_Epoch + { + price = 4; + }; class Towelette { price = 1; @@ -3074,6 +3082,9 @@ class CfgPricing { price = 16; }; + class KitPlyThirdWall_EPOCH { + price = 18; + }; class KitWoodQuarterFloor { price = 8; // price of 2 planks @@ -3130,6 +3141,10 @@ class CfgPricing { price = 24; // price of 6 planks }; + class KitSnowman + { + price = 72; + }; class KitSpikeTrap { price = 42; @@ -3250,6 +3265,22 @@ class CfgPricing { price = 325; }; + class KitSolarCharger + { + price = 325; + }; + class KitSolarChargerXL + { + price = 325; + }; + class BaseCam + { + price = 250; + }; + class BaseCamTerminal + { + price = 250; + }; class KitCinderWall { price = 80; @@ -3514,6 +3545,14 @@ class CfgPricing { price = 22; }; + class U_RadiationSuit_M_uniform + { + price = 7; + }; + class U_RadiationSuit_F_uniform + { + price = 7; + }; class U_O_FullGhillie_lsh { price = 7; @@ -4352,20 +4391,40 @@ class CfgPricing }; class C_Offroad_01_EPOCH { - price = 750; + price = 7500; + tax = 0.9; }; class C_Offroad_01_EPOCH1: C_Offroad_01_EPOCH{}; class C_Offroad_01_EPOCH2: C_Offroad_01_EPOCH{}; class C_Offroad_01_EPOCH3: C_Offroad_01_EPOCH{}; class C_Offroad_01_EPOCH4: C_Offroad_01_EPOCH{}; class C_Offroad_01_EPOCH5: C_Offroad_01_EPOCH{}; + class hoverboard_epoch_1 + { + price = 1000; + tax = 0.9; + }; + class hoverboard_epoch_bttf: hoverboard_epoch_1{}; + class hoverboard_epoch_a3: hoverboard_epoch_1{}; + class hoverboard_epoch_cargo + { + price = 1200; + tax = 0.9; + }; + class MBK_01_EPOCH + { + price = 1250; + tax = 0.9; + }; class C_Quadbike_01_EPOCH { - price = 500; + price = 2500; + tax = 0.9; }; class C_Hatchback_01_EPOCH { - price = 750; + price = 7500; + tax = 0.9; }; class C_Hatchback_01_EPOCH1: C_Hatchback_01_EPOCH{}; class C_Hatchback_01_EPOCH2: C_Hatchback_01_EPOCH{}; @@ -4373,7 +4432,8 @@ class CfgPricing class C_Hatchback_01_EPOCH4: C_Hatchback_01_EPOCH{}; class C_Hatchback_02_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class C_Hatchback_02_EPOCH1: C_Hatchback_02_EPOCH{}; class C_Hatchback_02_EPOCH2: C_Hatchback_02_EPOCH{}; @@ -4381,7 +4441,8 @@ class CfgPricing class C_Hatchback_02_EPOCH4: C_Hatchback_02_EPOCH{}; class C_SUV_01_EPOCH { - price = 750; + price = 7500; + tax = 0.9; }; class C_SUV_01_EPOCH1: C_SUV_01_EPOCH{}; class C_SUV_01_EPOCH2: C_SUV_01_EPOCH{}; @@ -4390,22 +4451,27 @@ class CfgPricing class C_Rubberboat_EPOCH { price = 500; + tax = 0.9; }; class C_Rubberboat_02_EPOCH { price = 500; + tax = 0.9; }; class C_Rubberboat_03_EPOCH { price = 500; + tax = 0.9; }; class C_Rubberboat_04_EPOCH { price = 500; + tax = 0.9; }; class C_Van_01_box_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class C_Van_01_box_EPOCH1: C_Van_01_box_EPOCH{}; class C_Van_01_box_EPOCH2: C_Van_01_box_EPOCH{}; @@ -4413,7 +4479,8 @@ class CfgPricing class C_Van_01_box_EPOCH4: C_Van_01_box_EPOCH{}; class C_Van_01_transport_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class C_Van_01_transport_EPOCH1: C_Van_01_transport_EPOCH{}; class C_Van_01_transport_EPOCH2: C_Van_01_transport_EPOCH{}; @@ -4421,27 +4488,33 @@ class CfgPricing class C_Van_01_transport_EPOCH4: C_Van_01_transport_EPOCH{}; class C_Boat_Civil_01_EPOCH { - price = 750; + price = 7500; + tax = 0.9; }; class C_Boat_Civil_01_police_EPOCH { - price = 750; + price = 7500; + tax = 0.9; }; class C_Boat_Civil_01_rescue_EPOCH { - price = 750; + price = 7500; + tax = 0.9; }; class B_Heli_Light_01_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class B_SDV_01_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class B_MRAP_01_EPOCH { - price = 2500; + price = 45000; + tax = 0.9; }; class B_MRAP_01_EPOCH1: B_MRAP_01_EPOCH{}; class B_MRAP_01_EPOCH2: B_MRAP_01_EPOCH{}; @@ -4449,7 +4522,8 @@ class CfgPricing class B_MRAP_01_EPOCH4: B_MRAP_01_EPOCH{}; class O_MRAP_02_EPOCH { - price = 2500; + price = 45000; + tax = 0.9; }; class O_MRAP_02_EPOCH1: O_MRAP_02_EPOCH{}; class O_MRAP_02_EPOCH2: O_MRAP_02_EPOCH{}; @@ -4457,7 +4531,8 @@ class CfgPricing class O_MRAP_02_EPOCH4: O_MRAP_02_EPOCH{}; class I_MRAP_03_EPOCH { - price = 2500; + price = 45000; + tax = 0.9; }; class I_MRAP_03_EPOCH1: I_MRAP_03_EPOCH{}; class I_MRAP_03_EPOCH2: I_MRAP_03_EPOCH{}; @@ -4465,7 +4540,8 @@ class CfgPricing class I_MRAP_03_EPOCH4: I_MRAP_03_EPOCH{}; class B_G_Offroad_01_armed_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class B_G_Offroad_01_armed_EPOCH1: B_G_Offroad_01_armed_EPOCH{}; class B_G_Offroad_01_armed_EPOCH2: B_G_Offroad_01_armed_EPOCH{}; @@ -4473,7 +4549,8 @@ class CfgPricing class B_G_Offroad_01_armed_EPOCH4: B_G_Offroad_01_armed_EPOCH{}; class B_Truck_01_mover_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class B_Truck_01_mover_EPOCH1: B_Truck_01_mover_EPOCH {}; class B_Truck_01_mover_EPOCH2: B_Truck_01_mover_EPOCH {}; @@ -4481,7 +4558,8 @@ class CfgPricing class B_Truck_01_mover_EPOCH4: B_Truck_01_mover_EPOCH {}; class B_Truck_01_transport_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class B_Truck_01_transport_EPOCH1: B_Truck_01_transport_EPOCH {}; class B_Truck_01_transport_EPOCH2: B_Truck_01_transport_EPOCH {}; @@ -4489,7 +4567,8 @@ class CfgPricing class B_Truck_01_transport_EPOCH4: B_Truck_01_transport_EPOCH {}; class B_Truck_01_covered_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class B_Truck_01_covered_EPOCH1: B_Truck_01_covered_EPOCH {}; class B_Truck_01_covered_EPOCH2: B_Truck_01_covered_EPOCH {}; @@ -4497,7 +4576,8 @@ class CfgPricing class B_Truck_01_covered_EPOCH4: B_Truck_01_covered_EPOCH {}; class B_Truck_01_box_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class B_Truck_01_box_EPOCH1: B_Truck_01_box_EPOCH {}; class B_Truck_01_box_EPOCH2: B_Truck_01_box_EPOCH {}; @@ -4505,7 +4585,8 @@ class CfgPricing class B_Truck_01_box_EPOCH4: B_Truck_01_box_EPOCH {}; class O_Truck_02_transport_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class O_Truck_02_transport_EPOCH1: O_Truck_02_transport_EPOCH {}; class O_Truck_02_transport_EPOCH2: O_Truck_02_transport_EPOCH {}; @@ -4513,7 +4594,8 @@ class CfgPricing class O_Truck_02_transport_EPOCH4: O_Truck_02_transport_EPOCH {}; class O_Truck_02_covered_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class O_Truck_02_covered_EPOCH1: O_Truck_02_covered_EPOCH {}; class O_Truck_02_covered_EPOCH2: O_Truck_02_covered_EPOCH {}; @@ -4521,7 +4603,8 @@ class CfgPricing class O_Truck_02_covered_EPOCH4: O_Truck_02_covered_EPOCH {}; class O_Truck_02_box_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class O_Truck_02_box_EPOCH1: O_Truck_02_box_EPOCH {}; class O_Truck_02_box_EPOCH2: O_Truck_02_box_EPOCH {}; @@ -4529,7 +4612,8 @@ class CfgPricing class O_Truck_02_box_EPOCH4: O_Truck_02_box_EPOCH {}; class O_Truck_03_transport_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class O_Truck_03_transport_EPOCH1: O_Truck_03_transport_EPOCH {}; class O_Truck_03_transport_EPOCH2: O_Truck_03_transport_EPOCH {}; @@ -4537,49 +4621,64 @@ class CfgPricing class O_Truck_03_transport_EPOCH4: O_Truck_03_transport_EPOCH {}; class O_Truck_03_covered_EPOCH { - price = 1000; + price = 10000; + tax = 0.9; }; class O_Truck_03_covered_EPOCH1: O_Truck_03_covered_EPOCH {}; class O_Truck_03_covered_EPOCH2: O_Truck_03_covered_EPOCH {}; class O_Truck_03_covered_EPOCH3: O_Truck_03_covered_EPOCH {}; class O_Truck_03_covered_EPOCH4: O_Truck_03_covered_EPOCH {}; + class uh1h_Epoch + { + price = 22500; + tax = 0.9; + }; class O_Heli_Light_02_unarmed_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class I_Heli_Transport_02_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class I_Heli_light_03_unarmed_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class C_Heli_Light_01_civil_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class C_Heli_Light_01_civil_2seat_EPOCH: C_Heli_Light_01_civil_EPOCH {}; class C_Heli_Light_01_civil_4seat_EPOCH: C_Heli_Light_01_civil_EPOCH {}; class O_Heli_Transport_04_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class O_Heli_Transport_04_bench_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class O_Heli_Transport_04_box_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class O_Heli_Transport_04_covered_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class B_Heli_Transport_03_unarmed_EPOCH { - price = 2500; + price = 25000; + tax = 0.9; }; class I_UAV_01_F { @@ -4588,275 +4687,343 @@ class CfgPricing class jetski_epoch { price = 500; + tax = 0.9; }; class ebike_epoch { - price = 1500; + price = 3500; + tax = 0.9; }; class mosquito_epoch { price = 1500; + tax = 0.9; }; class K01 { price = 300; + tax = 0.9; }; class K02 { price = 300; + tax = 0.9; }; class K03 { price = 300; + tax = 0.9; }; class K04 { price = 300; + tax = 0.9; }; class CUP_C_Fishing_Boat_Chernarus { price = 800; + tax = 0.9; }; class CUP_C_LR_Transport_CTK { price = 800; + tax = 0.9; }; class CUP_B_Zodiac_USMC { price = 800; + tax = 0.9; }; class CUP_C_Skoda_Red_CIV { price = 800; + tax = 0.9; }; class CUP_C_Skoda_White_CIV { price = 800; + tax = 0.9; }; class CUP_C_Skoda_Blue_CIV { price = 800; + tax = 0.9; }; class CUP_C_Skoda_Green_CIV { price = 800; + tax = 0.9; }; class CUP_C_SUV_CIV { price = 1500; + tax = 0.9; }; class CUP_B_HMMWV_Transport_USA { price = 2500; + tax = 0.9; }; class CUP_B_HMMWV_Unarmed_USA { price = 2500; + tax = 0.9; }; class CUP_C_SUV_TK { price = 2000; + tax = 0.9; }; class CUP_B_LR_Transport_CZ_D { price = 1100; + tax = 0.9; }; class CUP_C_Datsun_Covered { price = 800; + tax = 0.9; }; class CUP_C_Datsun_Plain { price = 800; + tax = 0.9; }; class CUP_C_Datsun_Tubeframe { price = 800; + tax = 0.9; }; class CUP_C_Datsun_4seat { price = 800; + tax = 0.9; }; class CUP_C_Datsun { price = 800; + tax = 0.9; }; class CUP_C_Golf4_green_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_red_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_blue_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_black_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_kitty_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_reptile_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_camodigital_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_camodark_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_camo_Civ { price = 800; + tax = 0.9; }; class CUP_B_M1030 { price = 500; + tax = 0.9; }; class CUP_C_Ural_Civ_03 { price = 1200; + tax = 0.9; }; class CUP_C_Ural_Open_Civ_03 { price = 1200; + tax = 0.9; }; class CUP_C_Ural_Civ_02 { price = 1200; + tax = 0.9; }; class CUP_B_TowingTractor_USMC { price = 800; + tax = 0.9; }; class CUP_C_C47_CIV { price = 1600; + tax = 0.9; }; class CUP_B_LR_Transport_CZ_W { price = 800; + tax = 0.9; }; class CUP_C_Golf4_white_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_whiteblood_Civ { price = 800; + tax = 0.9; }; class CUP_C_Golf4_yellow_Civ { price = 800; + tax = 0.9; }; class CUP_C_Octavia_CIV { price = 1600; + tax = 0.9; }; class CUP_C_Ural_Civ_01 { price = 1000; + tax = 0.9; }; class CUP_C_Ural_Open_Civ_01 { price = 1000; + tax = 0.9; }; class CUP_B_Ural_CDF { price = 1000; + tax = 0.9; }; class CUP_B_Ural_Open_CDF { price = 1000; + tax = 0.9; }; class CUP_C_Ural_Open_Civ_02 { price = 1000; + tax = 0.9; }; class CUP_B_HMMWV_Ambulance_USA { price = 1500; + tax = 0.9; }; class CUP_C_UAZ_Unarmed_TK_CIV { price = 1000; + tax = 0.9; }; class CUP_C_UAZ_Open_TK_CIV { price = 1000; + tax = 0.9; }; class CUP_B_UAZ_Unarmed_CDF { price = 1000; + tax = 0.9; }; class CUP_B_Ural_Empty_CDF { price = 1000; + tax = 0.9; }; class CUP_C_DC3_CIV { price = 2400; + tax = 0.9; }; class C_Boat_Transport_02_F { price = 1200; + tax = 0.9; }; class C_Scooter_Transport_01_F { price = 1200; + tax = 0.9; }; class C_Offroad_02_unarmed_F { price = 3500; + tax = 0.9; }; class I_C_Offroad_02_unarmed_F { price = 3500; + tax = 0.9; }; class B_T_LSV_01_unarmed_F { price = 4400; + tax = 0.9; }; class O_LSV_02_unarmed_F { price = 4300; + tax = 0.9; }; class O_T_LSV_02_unarmed_F { price = 4600; + tax = 0.9; }; class C_Plane_Civil_01_F { price = 5000; + tax = 0.9; }; class C_Plane_Civil_01_racing_F { price = 5000; + tax = 0.9; }; class B_CTRG_LSV_01_light_F { price = 4400; + tax = 0.9; }; class B_LSV_01_unarmed_F { price = 4400; + tax = 0.9; }; class B_T_VTOL_01_vehicle_blue_EPOCH { price = 10000; + tax = 0.9; }; class B_T_VTOL_01_infantry_olive_EPOCH: B_T_VTOL_01_vehicle_blue_EPOCH {}; class O_T_VTOL_02_infantry_EPOCH { price = 10000; + tax = 0.9; }; class O_T_VTOL_02_vehicle_grey_EPOCH: O_T_VTOL_02_infantry_EPOCH {}; class B_UavTerminal @@ -5784,6 +5951,14 @@ class CfgPricing { price = 5; }; + class thor_mask_epoch + { + price = 30; + }; + class iron_mask_epoch + { + price = 30; + }; class hockey_mask_epoch { price = 30; diff --git a/Sources/epoch_config/Configs/CfgRemoteExec.hpp b/Sources/epoch_config/Configs/CfgRemoteExec.hpp index f3b66253..b626c1a7 100644 --- a/Sources/epoch_config/Configs/CfgRemoteExec.hpp +++ b/Sources/epoch_config/Configs/CfgRemoteExec.hpp @@ -26,6 +26,11 @@ class CfgRemoteExec { mode = 1; jip = 0; + class EPOCH_server_SetFinalPlayerPos + { + allowedTargets=2; + jip = 0; + }; class bis_fnc_reviveinitaddplayer { allowedTargets = 2; diff --git a/Sources/epoch_config/Configs/CfgSnapChecks.hpp b/Sources/epoch_config/Configs/CfgSnapChecks.hpp index 97ceafb6..86b600e5 100644 --- a/Sources/epoch_config/Configs/CfgSnapChecks.hpp +++ b/Sources/epoch_config/Configs/CfgSnapChecks.hpp @@ -28,6 +28,10 @@ class CfgSnapChecks class CinderWallDoorwHatch_EPOCH : WoodLargeWall_EPOCH {}; class CinderWall_EPOCH : WoodLargeWall_EPOCH {}; class CinderWallHalf_EPOCH : WoodLargeWall_EPOCH {}; + class PlyThirdWall_EPOCH : WoodLargeWall_EPOCH + { + nails[] = {{{2.46932,0,0.120775},{2.46932,0,-0.190775}},{{-2.46932,0,0.120775},{-2.46932,0,-0.190775}},{{0,0,1},{2.76932,0,1}},{{0,0,1},{-2.76932,0,1}}}; + }; class WoodFloor_Epoch { nails[] = {{{0,0,0.15},{2.8555,0,0.15}},{{0,0,0.15},{0,2.8555,0.15}},{{0,0,0.15},{-2.8555,0,0.15}},{{0,0,0.15},{0,-2.8555,0.15}},{{2.5555,0,0.15},{2.5555,0,-0.15}},{{-2.5555,0,0.15},{-2.5555,0,-0.15}},{{0,-2.5555,0.15},{0,-2.5555,-0.15}},{{0,2.5555,0.15},{0,2.5555,-0.15}}}; @@ -51,6 +55,15 @@ class CfgSnapChecks class MetalTower_EPOCH : WoodStairs_EPOCH {}; class CinderTower_EPOCH : WoodStairs_EPOCH {}; class WoodRamp_EPOCH : WoodStairs_EPOCH {}; + class BaseCam_EPOCH + { + nails[] = { + {{0,0.15,-0.06},{0,0.3,0.04}}, + {{0,0.15,-0.06},{0,0.3,-0.16}}, + {{0,0.15,-0.06},{-0.1,0.3,-0.06}}, + {{0,0.15,-0.06},{0.1,0.3,-0.06}} + }; + }; }; /*[[[end]]]*/ diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf index 6c24d02d..4cdc4f55 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf @@ -15,6 +15,7 @@ //[[[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"]; //[[[end]]] +EPOCH_BaseCams = []; _maxTTL = parseNumber EPOCH_expiresBuilding; _serverSettingsConfig = configFile >> "CfgEpochServer"; _baseDynamicSimulationSystem = [_serverSettingsConfig, "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry; @@ -142,8 +143,18 @@ for "_i" from 0 to _this do { }; // Handle Jammers and create marker if EPOCH_SHOW_JAMMERS set true. - if (_class isKindOf "PlotPole_EPOCH") then { - if (EPOCH_SHOW_JAMMERS) then { + if (_class in ["PlotPole_EPOCH","BaseCam_EPOCH"]) then { + if (_owner != "-1") then { + _baseObj setVariable ["BUILD_OWNER", _owner, true]; + }; + + // add BaseCam to public array + if (_class isequalto "BaseCam_EPOCH") then { + EPOCH_BaseCams pushBackUnique _baseObj; + // Set PubVar later after all Cams are loaded in + }; + + if (_class isequalto "PlotPole_EPOCH" && EPOCH_SHOW_JAMMERS) then { _marker = createMarker [str(_location), _location]; _marker setMarkerShape "ICON"; // TODO allow players to change this per base @@ -159,10 +170,6 @@ for "_i" from 0 to _this do { }; _baseObj setVariable ["BUILD_SLOT", _i, true]; - if (_owner != "-1") then { - _baseObj setVariable ["BUILD_OWNER", _owner, true]; - }; - if (_textureSlot != 0) then { // get texture path from index _color = getArray (_cfgBaseBuilding >> _class >> "availableTextures"); @@ -188,5 +195,6 @@ for "_i" from 0 to _this do { EPOCH_BuildingSlots set [_i,0]; }; }; +publicvariable "EPOCH_BaseCams"; missionNamespace setVariable ["EPOCH_BuildingSlotCount", {_x == 0} count EPOCH_BuildingSlots, true]; true diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf index 36d97aa4..9190a9ba 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf @@ -46,6 +46,10 @@ if (isText _staticClassConfig) then { if (_staticClass isEqualTo "Garden_EPOCH") then { EPOCH_activeGardens pushBackUnique _storageObj; }; + + if (_staticClass in ["SolarCharger_EPOCH","SolarChargerXL_EPOCH"]) then { + EPOCH_activeSolars pushBackUnique _storageObj; + }; if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{ _storageObj setVariable["EPOCH_Locked", false, true]; @@ -81,8 +85,21 @@ if (isText _staticClassConfig) then { if (_objSlot != -1) then { _newVehicle = [_vehicle, false] call EPOCH_server_simulSwap; - - _newVehicle setVariable["BUILD_OWNER", _playerUID, true]; + + // add BaseCam to public array + if (_newVehicle iskindof "BaseCam_EPOCH") then { + _playerGroup = _player getVariable["GROUP", ""]; + _Owner = _playerUID; + if (_playerGroup != "") then { + _Owner = _playerGroup; + }; + _newVehicle setVariable["BUILD_OWNER", _Owner, true]; + EPOCH_BaseCams pushBackUnique _newVehicle; + publicvariable "EPOCH_BaseCams"; + } + else { + _newVehicle setVariable["BUILD_OWNER", _playerUID, true]; + }; _newVehicle call EPOCH_saveBuilding; }; diff --git a/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf b/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf index 04d434b6..a8c6a91b 100644 --- a/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf +++ b/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf @@ -58,7 +58,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then { if (_selectedPlayerName == "Dead Player") then { _memberrange = ["PlayerData", _selectedPlayerUID] call EPOCH_fnc_server_hiveGETRANGE; if (count (_memberrange select 1) > 0) then { - if (typename (_memberrange select 1 select 0) == "STRING") then { + if ((_memberrange select 1 select 0) isEqualType "STRING") then { _selectedPlayerName = _memberrange select 1 select 0; }; }; diff --git a/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_updatePlayerTempGroup.sqf b/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_updatePlayerTempGroup.sqf index debd247b..1bb46a32 100644 --- a/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_updatePlayerTempGroup.sqf +++ b/Sources/epoch_server/compile/epoch_grouptemp/EPOCH_server_updatePlayerTempGroup.sqf @@ -31,7 +31,7 @@ _contentArray = []; } forEach (allPlayers select {getPlayerUID _x == _groupID}); if !(_contentArray isEqualTo []) then { - + _contentArray params ["_groupName","_leaderName","_groupSize","_modArray","_memberArray"]; _allPlayers = allPlayers select {alive _x}; @@ -54,13 +54,13 @@ if !(_contentArray isEqualTo []) then { [_x] joinSilent _group; }; } forEach (_allPlayers select {getPlayerUID _x == _selectedPlayerUID}); - + // find player name from DB if (_selectedPlayerName == "Dead Player") then { _memberrange = ["PlayerData", _selectedPlayerUID] call EPOCH_fnc_server_hiveGETRANGE; if (count (_memberrange select 1) > 0) then { - if (typename (_memberrange select 1 select 0) == "STRING") then { + if ((_memberrange select 1 select 0) isEqualType "STRING") then { _selectedPlayerName = _memberrange select 1 select 0; }; }; diff --git a/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf b/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf index 9a1cc3d1..7c0dc43d 100644 --- a/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf +++ b/Sources/epoch_server/compile/epoch_missions/EPOCH_Server_createObject.sqf @@ -18,7 +18,7 @@ private ["_allowedVehicleListName","_allowedVehiclesList","_backpacks","_cfgPric params ["_player",["_token","",[""]],["_objArr",[]],["_pos",[]],["_wepHolder",objNull],["_clearCargo",true],["_objSpc","CAN_COLLIDE"],["_driverType",""],["_gunnerType",""],["_commanderType",""],["_crewType",""],["_doDamage",false]]; if !([_player,_token]call EPOCH_server_getPToken) exitWith {}; -if (typeName _objArr != "ARRAY")then{_objArr = [_objArr];}; +if !(_objArr isEqualType [])then{_objArr = [_objArr];}; if (count _objArr < 1) exitWith {}; diag_log format["Epoch: Attempt Create Object: %1 for %2",_objArr, name _player]; diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetFinalPlayerPos.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetFinalPlayerPos.sqf new file mode 100644 index 00000000..ff14e0f5 --- /dev/null +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetFinalPlayerPos.sqf @@ -0,0 +1,43 @@ +/* + Author: He-Man - EpochMod.com + + Contributors: + + Description: + Set final Player position on login + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetFinalPlayerPos.sqf +*/ + +params ["_player","_newPlyr"]; +private ["_finalpos","_fallbackpos"]; +if (isnull _player || isnull _newPlyr) exitwith { + diag_log "DEBUG: SetFinalPlayerPos failed - Player or PlayerObj is Null"; +}; +if !(typeof _player isequalto "VirtualMan_EPOCH") exitwith { + diag_log "DEBUG: SetFinalPlayerPos failed - PlayerObj != VirtualMan_EPOCH"; +}; +_finalpos = _newPlyr getvariable ["FinalDest",[]]; +if (_finalpos isequalto []) exitwith { + diag_log "DEBUG: SetFinalPlayerPos failed - No FinalPos Variable set"; +}; +if !(_finalpos isequaltype []) exitwith { + diag_log "DEBUG: SetFinalPlayerPos failed - FinalPos is not an Array"; +}; +if (count _finalpos < 2) exitwith { + diag_log "DEBUG: SetFinalPlayerPos failed - count FinalPos < 2"; +}; +_fallbackpos = getmarkerpos "respawn_west"; +_fallbackpos set [2,0]; +_finalpos params [["_location",_fallbackpos],["_dir",0]]; +_newPlyr setDir _dir; +_newPlyr setPosATL _location; +_newPlyr setVariable["SETUP", true, true]; +_player setPosATL _location; +_newPlyr allowdamage true; +_newPlyr hideobjectglobal false; + diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetUnitLoadout.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetUnitLoadout.sqf index 6c281c01..5811ee87 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetUnitLoadout.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetUnitLoadout.sqf @@ -13,7 +13,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetUnitLoadout.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_type"]; +private ["_type","_loadabs"]; //[[[end]]] params ["_newPlyr","_loadout"]; @@ -83,6 +83,11 @@ if !(_bpack isequalto "") then { [Vestcontainer _newPlyr, _vestitems], [BackpackContainer _newPlyr, _bpackitems] ]; - -true +_loadabs = loadabs _newPlyr; +if !(uniform _newPlyr isequalto _uniform && vest _newPlyr isequalto _vest && backpack _newPlyr isequalto _bpack) then { + diag_log format ["EPOCH Debug: Setunitloadout failed - Unifmorm should: %1 is: %2 - Vest should: %3 is: %4 - Backpack should: %5 is: %6",_uniform,uniform _newPlyr,_vest,vest _newPlyr,_bpack,backpack _newPlyr]; + _loadabs = -1; +}; + +_loadabs diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_checkPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_checkPlayer.sqf index c609dcdc..89ecde47 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_checkPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_checkPlayer.sqf @@ -61,7 +61,7 @@ if (_playerObj isEqualType objNull) then { [_fsmHandle,['_checkPlayer_PVC', _dead]] remoteExecCall ['setFSMVariable', _playerObj]; if (!_dead) then { //Load old Char - [_playerObj, _isMale, _fsmHandle] call EPOCH_server_loadPlayer; + [_playerObj, _isMale, _fsmHandle, _arr] call EPOCH_server_loadPlayer; }; }; }; diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf index d1bf022c..4017fbe1 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf @@ -17,7 +17,7 @@ private ["_Primary","_CheckLocation","_allGroupMembers","_alreadyDead","_assigne //[[[end]]] _reject = true; -params [["_player",objNull,[objNull]],["_isMale",true],["_fsmHandle",0]]; +params [["_player",objNull,[objNull]],["_isMale",true],["_fsmHandle",0],["_playerData",[]]]; if (!isNull _player) then { @@ -30,16 +30,17 @@ if (!isNull _player) then { if (_playerUID != "") then { - // Make Hive call - _playerData = []; - (["Player", _playerUID] call EPOCH_fnc_server_hiveGETRANGE) params [ - ["_status", 0 ], - ["_playerDataTmp", [] ] - ]; - if (_status == 1 && _playerDataTmp isEqualType []) then { - _playerData = _playerDataTmp; + if (_playerdata isequalto []) then { + // Make Hive call + (["Player", _playerUID] call EPOCH_fnc_server_hiveGETRANGE) params [ + ["_status", 0 ], + ["_playerDataTmp", [] ] + ]; + if (_status == 1 && _playerDataTmp isEqualType []) then { + _playerData = _playerDataTmp; + }; }; - + // Apperance defaults _uniform = [_serverSettingsConfig, "defaultUniformFemale", "U_Test_uniform"] call EPOCH_fnc_returnConfigEntry; _class = "Epoch_Female_F"; @@ -177,9 +178,8 @@ if (!isNull _player) then { _group = createGroup [west, true]; }; - _player setPosATL _location; - - _newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"]; + _newPlyr = _group createUnit[_class, getMarkerPos "respawn_west", [], 0, "CAN_COLLIDE"]; + _newPlyr hideobjectglobal true; if !(isNull _newPlyr) then { // disable AI on temp unit @@ -199,126 +199,17 @@ if (!isNull _player) then { // disable further damage server side _newPlyr allowDamage false; - _newPlyr setDir _dir; - _newPlyr setPosATL _location; - // set player loadout - if (_schemaVersion >= 1.0) then { - _playerData params ["","","_appearance","","","_loadout"]; - // get current weapon to send to param for selectWeapon - _currentWeapon = _appearance param [4,""]; + _playerData params ["","","_appearance","","","_loadout"]; + // get current weapon to send to param for selectWeapon + _currentWeapon = _appearance param [4,""]; // _newPlyr setUnitLoadout [_loadout, false]; - // Workaround for Client / Server synchronizing issue in SetUnitLoadout - [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout; - - diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion]; - - } else { - // Legacy code start - // Apperance + Weapons - _playerData params ["","","_appearance","","","_weaponsAndItems","_linkedItems","_normalMagazines","_itemsInContainers","_weaponsInContainers"]; - // load Apperance - _appearance params ["_goggles","_headgear","_vest","_backpack","_uniform"]; - - // old data format for 0.5 and prior. - // Load Apperance START - if (_uniform != "") then { - _newPlyr addUniform _uniform; - }; - if (_backpack != "") then { - _newPlyr addBackpack _backpack; - }; - if (_goggles != "") then { - _newPlyr addGoggles _goggles; - }; - if (_headgear != "") then { - _newPlyr addHeadgear _headgear; - }; - if (_vest != "") then { - _newPlyr addVest _vest; - }; - // Load Apperance END - - // Load inventory + defaults START - if (count _weaponsAndItems >= 3) then { - _weaponsAndItems params ["_currentWeaponTmp","_weaponsAndItemsArray","_equipped"]; - _currentWeapon = _currentWeaponTmp; - { - _weapon = _x deleteAt 0; - _type = getNumber(configfile >> "cfgweapons" >> _weapon >> "type"); - _attachments = []; - _wMags = false; - _wMagsArray = []; - // suppressor, laser, optics, magazines(array), bipods - { - // magazines - if (_x isEqualType []) then{ - _wMags = true; - _wMagsArray pushback _x; - } else { - // attachments - if (_x != "") then{ - _attachments pushBack _x; - }; - }; - } forEach _x; - if (_wMags) then { - { - _newPlyr addMagazine _x; - } foreach _wMagsArray; - }; - // add weapon if equiped - if (_weapon in _equipped) then { - _equipped = _equipped - [_weapon]; - if (_weapon != "") then { - _newPlyr addWeapon _weapon; - }; - switch (_type) do { - case 1: { // primary - removeAllPrimaryWeaponItems _newPlyr; - { _newPlyr addPrimaryWeaponItem _x } forEach _attachments; - }; - case 2: { // handgun - removeAllHandgunItems _newPlyr; - { _newPlyr addHandgunItem _x } forEach _attachments; - }; - case 4: { // secondary - // removeAllSecondaryWeaponItems player; does not exist ? - { - _newPlyr removeSecondaryWeaponItem _x; - } forEach (secondaryWeaponItems _newPlyr); - { _newPlyr addSecondaryWeaponItem _x } forEach _attachments; - }; - }; - }else{ - { - _newPlyr addItem _x; - } forEach _attachments; - }; - } forEach _weaponsAndItemsArray; - }; - - // Linked items - { - if (_x in["Binocular", "Rangefinder","Laserdesignator","Laserdesignator_02","Laserdesignator_03","Laserdesignator_01_khk_F","Laserdesignator_02_ghex_F"]) then { - _newPlyr addWeapon _x; - } else { - _newPlyr linkItem _x; - }; - } forEach _linkedItems; - - // add items to containers - [_newPlyr, _itemsInContainers] call EPOCH_fnc_addItemToX; - - // add weapons to containers - [_newPlyr, _weaponsInContainers] call EPOCH_fnc_addItemToX; - - // Add magazines - {_newPlyr addMagazine _x} forEach _normalMagazines; - // Load inventory + defaults END - // Legacy code stop - }; + // Workaround for Client / Server synchronizing issue in SetUnitLoadout + _loadabs = [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout; + if (_loadabs isequalto -1) then { + deleteVehicle _newPlyr; + }; // Final Push if (isNull _player) then { @@ -354,15 +245,11 @@ if (!isNull _player) then { _communityStats = (_communityStatsArray param [1,[]]) param [0,[]]; _newPlyr setVariable["COMMUNITY_STATS", _communityStats]; - // re enable damage server side - _newPlyr allowDamage true; - // Flag new body as ready for use. - _newPlyr setVariable["SETUP", true, true]; + _newPlyr setVariable["FinalDest", [_location,_dir], true]; // Send message to player so they can take over the new body. - [_playerNetID, _playerUID, [_newPlyr, _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken,_playerGroupArray, _communityStats, _hitpoints], _fsmHandle, _player] call EPOCH_server_pushPlayer; - // diag_log str([_playerNetID, _playerUID, _player, [_newPlyr, (_player isEqualTo _newPlyr), _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, [],_playerGroupArray, _communityStats, _hitpoints], _fsmHandle]); + [_playerNetID, _playerUID, [_newPlyr, _vars, _currentWeapon, _loadabs, _playerGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken,_playerGroupArray, _communityStats, _hitpoints], _fsmHandle, _player] call EPOCH_server_pushPlayer; // revive test _newPlyr setVariable ['#rev_enabled', true, true]; diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf index f9baae80..54bf15ca 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf @@ -13,7 +13,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_loadout","_CorpseCrypto","_PlayerCrypto","_attachments","_cIndex","_class","_currwh","_deleteprimary","_deletesecondary","_dir","_droppedPrimary","_droppedSecondary","_droppedWeapons","_equipped","_group","_location","_newPlyr","_playerGroup","_playerUID","_token","_type","_vars","_wMags","_wMagsArray","_weapon","_wh","_kIndex","_reviver","_reviverCStats","_reviverKarma","_reviverKarmaAdj"]; +private ["_loadabs","_loadout","_CorpseCrypto","_PlayerCrypto","_attachments","_cIndex","_class","_currwh","_deleteprimary","_deletesecondary","_dir","_droppedPrimary","_droppedSecondary","_droppedWeapons","_equipped","_group","_garbage","_location","_newPlyr","_playerGroup","_playerUID","_token","_type","_vars","_wMags","_wMagsArray","_weapon","_wh","_kIndex","_reviver","_reviverCStats","_reviverKarma","_reviverKarmaAdj"]; //[[[end]]] params ["_player","_reviver",["_token","",[""]] ]; @@ -133,7 +133,16 @@ if (!local _player) then { // _newPlyr setUnitLoadout [_loadout, false]; // Workaround for Client / Server synchronizing issue in SetUnitLoadout - [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout; + _loadabs = [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout; + if (_loadabs isequalto -1) exitwith { + removeFromRemainsCollector [_newPlyr]; + deletevehicle _newPlyr; + _player setvariable ['Reviving',false]; + _player hideObjectGlobal false; + }; + + _garbage = createVehicle [selectrandom ["MedicalGarbage_01_1x1_v1_F","MedicalGarbage_01_1x1_v3_F","MedicalGarbage_01_1x1_v2_F"], _location, [], 0, "CAN_COLLIDE"]; + EPOCH_cleanupQueue pushBack _garbage; // Final Push _token = _newPlyr call EPOCH_server_setPToken; @@ -149,7 +158,7 @@ if (!local _player) then { }; // send to player - [_newPlyr, _token, loadAbs _newPlyr] remoteExec ['EPOCH_clientRevive',_player]; + [_newPlyr, _token, _loadabs] remoteExec ['EPOCH_clientRevive',_player]; // send stat to reviver [_reviver, "Revives", 1, true] call EPOCH_server_updatePlayerStats; diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf index 165db39a..d6c222df 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf @@ -95,9 +95,11 @@ if (_allowSave) then{ // change this if needed _schemaVersion = 1.0; - // save player - _return = ["Player", _playerUID, EPOCH_expiresPlayer, [[getDir _player, _pos, (call EPOCH_fn_InstanceID), _schemaVersion], _medical, _appearance, _server_vars, _vars, _loadout, [], [], [], [], _group, _revive]] call EPOCH_fnc_server_hiveSETEX; - + // Finally check, if Loadout is a valid Array (will never return an empty Array on units!) + if !(_loadout isequalto []) then { + // save player + _return = ["Player", _playerUID, EPOCH_expiresPlayer, [[getDir _player, _pos, (call EPOCH_fn_InstanceID), _schemaVersion], _medical, _appearance, _server_vars, _vars, _loadout, [], [], [], [], _group, _revive]] call EPOCH_fnc_server_hiveSETEX; + }; // save community stats _stats = _player getVariable["COMMUNITY_STATS", EPOCH_defaultStatVars]; _return2 = ["CommunityStats", _playerUID, EPOCH_expiresCommunityStats, [_stats]] call EPOCH_fnc_server_hiveSETEX; diff --git a/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf b/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf index 989d934f..6943b91c 100644 --- a/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf +++ b/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf @@ -14,8 +14,8 @@ */ //[[[cog import generate_private_arrays ]]] private [ "_TraderGodMode","_StaticTraderItemPurge","_DynamicTraderRespawnCount","_TraderItemsDeleteRestart","_TraderInit","_TraderItemsClean","_newstock","_agent","_aiTables", - "_arr","_config","_currentStock","_existingStock","_indexStock","_limit","_markers","_objHiveKey","_pos","_randomAIUniform","_response","_response2","_schedule", - "_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_traderSlotIndex","_work","_arrchanged","_deleteat" + "_arr","_config","_currentStock","_existingStock","_indexStock","_markers","_objHiveKey","_pos","_randomAIUniform","_response","_response2","_schedule", + "_serverSettingsConfig","_staticTrader","_staticTradersArrCount","_staticTradersArray","_storedVehicleLimit","_traderSlotIndex","_work","_arrchanged","_deleteat","_maxrnd" ]; //[[[end]]] params [["_maxTraderLimit",0]]; @@ -35,17 +35,19 @@ _TraderItemCountPerItem = [_serverSettingsConfig, "TraderItemCountPerItem", [100 _TraderItemsDeleteRestart = [_serverSettingsConfig, "TraderItemsDeleteRestart", []] call EPOCH_fnc_returnConfigEntry; _TraderInit = { - addToRemainsCollector[_this]; _this allowdamage !_TraderGodMode; - _this addUniform _randomAIUniform; _this setDir _dir; _this setVariable ["AI_SLOT", _i, true]; _this setVariable ["AI_ITEMS", _arr, true]; - _this disableAI "FSM"; - _this setBehaviour "CARELESS"; - _this setCombatMode "RED"; - _this setSkill 0; _this addEventHandler ["Killed", { _this call EPOCH_server_traderKilled; }]; + if (_this iskindof "MAN") then { + addToRemainsCollector[_this]; + _this addUniform _randomAIUniform; + _this disableAI "FSM"; + _this setBehaviour "CARELESS"; + _this setCombatMode "RED"; + _this setSkill 0; + }; }; _TraderItemsClean = { private ["_idx","_delete","_k"]; @@ -53,15 +55,18 @@ _TraderItemsClean = { for "_k" from 1 to (count (_arr select 0)) do { _delete = false; _item = _arr select 0 select _idx; - _limit = ["CfgTraderLimits", _item, 100] call EPOCH_fnc_returnConfigEntryV2; _currentStock = (_arr select 1) param[_idx, 0]; + _maxrnd = 1; + if ([_item,"cfgMagazines"] call Epoch_fnc_isAny) then { + _maxrnd = getnumber (configfile >> "cfgMagazines" >> _item >> "count"); + }; + _currentStock = _currentStock / _maxrnd; if (_currentStock >= (_TraderItemCountPerItem select 0)) then { _currentStock = _TraderItemCountPerItem select 1; - (_arr select 1) set [_idx,_currentStock]; + (_arr select 1) set [_idx,_currentStock*_maxrnd]; _arrchanged = true; }; - if (_limit == 0 || _currentStock == 0) then { -// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Removed %2 from Trader | _limit: %3 | _currentStock: %4",_i,str _item, _limit,_currentStock]; + if (_currentStock == 0) then { _arrchanged = true; _delete = true; } @@ -72,11 +77,6 @@ _TraderItemsClean = { _delete = true; } else { - if (_currentStock > _limit) then { - _arrchanged = true; - (_arr select 1) set [_idx,_limit]; - _currentStock = _limit; - }; if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle" || _item isKindOf "Tank") then { _newstock = 0; for "_k" from 1 to _currentStock do { @@ -155,7 +155,13 @@ for "_i" from 0 to (_maxTraderLimit-1) do { }; }; EPOCH_TraderSlots deleteAt _traderSlotIndex; - _agent = createAgent [_class, _pos, [], 0, "CAN_COLLIDE"]; + _agent = objnull; + if ((Epoch_ServerRealtime select 1) isequalto 12) then { + _agent = createvehicle ["snowmanDeco_EPOCH", _pos, [], 0, "NONE"]; + } + else { + _agent = createAgent [_class, _pos, [], 0, "CAN_COLLIDE"]; + }; _agent call _TraderInit; _agent setPosATL _pos; if (_arrchanged) then { @@ -187,16 +193,22 @@ for "_i" from 0 to (_maxTraderLimit-1) do { }; if !(count (_arr select 0) >= _DynamicTraderRespawnCount) then { EPOCH_TraderSlots deleteAt _traderSlotIndex; - _agent = createAgent [_class, _pos, [], 0, "NONE"]; + _agent = objnull; + if ((Epoch_ServerRealtime select 1) isequalto 12) then { + _agent = createvehicle ["snowmanDeco_EPOCH", _pos, [], 0, "NONE"]; + } + else { + _agent = createAgent [_class, _pos, [], 0, "NONE"]; + if !(EPOCH_forceStaticTraders) then { + [_agent, _home, _work] execFSM "\epoch_server\system\Trader_brain.fsm"; + }; + }; _dir = random 360; _agent call _TraderInit; if (_arrchanged) then { // diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Saved",_i]; ["AI_ITEMS", _objHiveKey, EPOCH_expiresAIdata, _arr] call EPOCH_fnc_server_hiveSETEX; }; - if !(EPOCH_forceStaticTraders) then { - [_agent, _home, _work] execFSM "\epoch_server\system\Trader_brain.fsm"; - }; if (EPOCH_SHOW_TRADERS) then { _markers = ["DynamicTrader",_pos] call EPOCH_server_createGlobalMarkerSet; _agent setVariable["MARKER_REF", _markers]; diff --git a/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf b/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf index bbfc45f6..0fcc1a7b 100644 --- a/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf +++ b/Sources/epoch_server/compile/epoch_traders/EPOCH_server_spawnTraders.sqf @@ -55,19 +55,25 @@ for "_i" from 1 to _spawnCount do { if (daytime > _startTime && daytime < _endTime) then { _pos = _work; }; - _agent = createAgent[_aiClass, _pos, [], 0, "CAN_COLLIDE"]; - addToRemainsCollector[_agent]; + _agent = objnull; + if ((Epoch_ServerRealtime select 1) isequalto 12) then { + _agent = createvehicle ["snowmanDeco_EPOCH", _pos, [], 0, "NONE"]; + } + else { + _agent = createAgent [_aiClass, _pos, [], 0, "CAN_COLLIDE"]; + addToRemainsCollector[_agent]; + _agent addUniform _randomAIUniform; + if !(EPOCH_forceStaticTraders) then { + [_agent, _home, [_work, _schedule]] execFSM "\epoch_server\system\Trader_brain.fsm"; + }; + }; _agent allowdamage !_TraderGodMode; - _agent addUniform _randomAIUniform; _slot = EPOCH_TraderSlots deleteAt 0; _agent setVariable["AI_SLOT", _slot, true]; _agent setVariable["AI_ITEMS", EPOCH_starterTraderItems, true]; _objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _slot]; ["AI_ITEMS", _objHiveKey, EPOCH_expiresAIdata, EPOCH_starterTraderItems] call EPOCH_fnc_server_hiveSETEX; _agent addEventHandler["Killed", { _this call EPOCH_server_traderKilled; }]; - if !(EPOCH_forceStaticTraders) then { - [_agent, _home, [_work, _schedule]] execFSM "\epoch_server\system\Trader_brain.fsm"; - }; ["AI", _objHiveKey, [_aiClass, _home, [_work, _schedule]] ] call EPOCH_fnc_server_hiveSET; if (EPOCH_SHOW_TRADERS) then { _markers = ["NewDynamicTrader",_pos] call EPOCH_server_createGlobalMarkerSet; diff --git a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf index d3e6b666..0253e2a6 100644 --- a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf +++ b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf @@ -17,12 +17,13 @@ private [ "_MaxBankDebit","_SkipOut","_VAL","_aiItems","_bankBalance","_bankData "_group","_helipad","_helipads","_item","_itemClasses","_itemQty","_itemQtys","_itemTax","_itemWorth","_itemsIn","_itemsOut","_lockOwner","_makeTradeIn","_message","_nearByHolder", "_objHiveKey","_objOwner","_playerCryptoLimit","_playerGroup","_playerNetID","_playerUID","_position","_qtyIndex","_response","_return","_returnIn","_returnOut","_road", "_serverSettingsConfig","_slot","_smoke","_tax","_tmpposition","_tradeIn","_tradeOut","_tradeQtyTotal","_tradeTotal","_vars","_vehHiveKey","_vehObj","_vehSlot","_vehicle","_vehicleBought", - "_vehicleSold","_vehicles","_vehslot","_wH","_wHPos","_wp","_kIndex","_playerCStats","_playerKarma","_playerKarmaAdj" + "_vehicleSold","_vehicles","_vehslot","_wH","_wHPos","_wp","_kIndex","_playerCStats","_playerKarma","_playerKarmaAdj","_EnableTempVehTrade" ]; params ["_trader","_itemsIn","_itemsOut","_player",["_token","",[""]] ]; _playerUID = getplayeruid _player; +_EnableTempVehTrade = ["CfgEpochClient", "EnableTempVehTrade", false] call EPOCH_fnc_returnConfigEntryV2; _serverSettingsConfig = configFile >> "CfgEpochServer"; _vehicleSold = false; _vehicleBought = false; @@ -75,7 +76,15 @@ if (_slot != -1) then { _playerNetID = owner _player; if (_playerNetID == (owner _vehicle)) then { _vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"]; - if (!_vehicleSold && _vehSlot != "ABORT") then { + if (!_vehicleSold && (_vehSlot != "ABORT" || _EnableTempVehTrade)) then { + _vehicleSold = true; + _makeTradeIn = true; + if (_vehSlot == "ABORT") exitwith { + _itemQty = 0; + _itemsIn set [_foreachindex,[_item,_itemQty]]; + removeFromRemainsCollector [_vehicle]; + deleteVehicle _vehicle; + }; _BaseClass = _vehicle getvariable ["VEHICLE_BaseClass",""]; if !(_BaseClass isequalto "") then { _item = _BaseClass; @@ -83,13 +92,11 @@ if (_slot != -1) then { }; removeFromRemainsCollector [_vehicle]; deleteVehicle _vehicle; - _vehicleSold = true; _vehHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _vehSlot]; _VAL = []; ["Vehicle", _vehHiveKey, _VAL] call EPOCH_fnc_server_hiveSET; EPOCH_VehicleSlots pushBack _vehSlot; missionNamespace setVariable ['EPOCH_VehicleSlotCount', count EPOCH_VehicleSlots, true]; - _makeTradeIn = true; }; }; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf index 8c93705d..1bf132a6 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf @@ -25,6 +25,7 @@ _ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call E _diag = diag_tickTime; EPOCH_StorageSlots = []; EPOCH_activeGardens = []; +EPOCH_activeSolars = []; for "_i" from 1 to _maxStorageLimit do { _storageSlotIndex = EPOCH_StorageSlots pushBack str(_i); _vehHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID), _i]; @@ -79,6 +80,10 @@ for "_i" from 1 to _maxStorageLimit do { if (_class isEqualTo "Garden_EPOCH") then { EPOCH_activeGardens pushBack _vehicle; }; + + if (_class in ["SolarCharger_EPOCH","SolarChargerXL_EPOCH"]) then { + EPOCH_activeSolars pushBack _vehicle; + }; if (_UseIndestructible) then { if ({_vehicle iskindof _x} count _ExceptedBaseObjects == 0) then { @@ -129,13 +134,12 @@ for "_i" from 1 to _maxStorageLimit do { }; if (count _arr >= 6) then { - _vehicle setVariable ["STORAGE_OWNERS", _arr select 5]; if (_class isKindOf 'Constructions_lockedstatic_F') then{ // set locked state of secure storage if ((_arr select 6) != -1) then { _vehicle setVariable["EPOCH_Locked", true, true]; - //_vehicle enableSimulationGlobal false; }; + _vehicle setVariable ["STORAGE_OWNERS", _arr select 5]; }; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf index 51b5c860..9e20959c 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf @@ -13,12 +13,12 @@ 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","_dmg","_found","_immuneIfStartInBase","_jammerOwner","_jammerRange","_jammers","_location","_lockedOwner","_marker","_nearestJammer","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_textureSelectionIndex","_textures","_vehHiveKey","_vehLockHiveKey","_vehicle","_vehicleSlotIndex"]; +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"]; //[[[end]]] params [["_maxVehicleLimit",0]]; _diag = diag_tickTime; -_dataFormat = ["", [], 0, [], 0, [], [], 0, ""]; +_dataFormat = ["", [], 0, [], 0, [], [], 0, "", ""]; _dataFormatCount = count _dataFormat; EPOCH_VehicleSlots = []; _allVehicles = []; @@ -64,14 +64,12 @@ for "_i" from 1 to _maxVehicleLimit do { if !((_arr select _forEachIndex) isEqualType _x) then {_arr set[_forEachIndex, _x]}; } forEach _dataFormat; - _arr params ["_class","_worldspace","_damage","_hitpoints","_fuel","_inventory","_ammo","_color","_baseClass"]; + _arr params ["_class","_worldspace","_damage","_hitpoints","_fuel","_inventory","_ammo","_color","_baseClass",["_plateNumber",""]]; if (_class != "" && _damage < 1) then { // remove location from worldspace and set to new var - _location = _worldspace deleteAt 0; - + _worldspace params [["_location",[]],["_VectorDir",[0,0,0]],["_VectorUp",[0,0,1]],["_useposworld",false]]; if !(_location isEqualTo []) then { - // increased position precision if (count _location == 2) then{ _location = (_location select 0) vectorAdd (_location select 1); @@ -117,9 +115,13 @@ for "_i" from 1 to _maxVehicleLimit do { _vehicle call EPOCH_server_setVToken; _vehicle call EPOCH_server_vehicleInit; // set final direction and postion of vehicle - _vehicle setVectorDirAndUp _worldspace; - _vehicle setposATL _location; - + _vehicle setVectorDirAndUp [_VectorDir,_VectorUp]; + if (_useposworld) then { + _vehicle setposWorld _location; + } + else { + _vehicle setposATL _location; + }; // set fuel level _vehicle setFuel _fuel; // apply persistent textures @@ -209,6 +211,11 @@ for "_i" from 1 to _maxVehicleLimit do { }; }; + // add previous license plate + if !(_plateNumber isEqualTo "") then { + _vehicle setPlateNumber _plateNumber; + }; + if (_allowDamage) then { _vehicle allowDamage true; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf index 3bfd7e75..984eaacf 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf @@ -51,7 +51,7 @@ for "_i" from 1 to _maxVehicleLimit do { _damage = _arr select 2; if (_class != "" && _damage < 1) then { - _location = _worldspace deleteAt 0; + _worldspace params [["_location",[]],["_VectorDir",[0,0,0]],["_VectorUp",[0,0,1]],["_useposworld",false]]; if !(_location isEqualTo []) then { @@ -68,11 +68,16 @@ for "_i" from 1 to _maxVehicleLimit do { _class = ["O_Heli_Transport_04_EPOCH","O_Heli_Transport_04_bench_EPOCH","O_Heli_Transport_04_box_EPOCH","O_Heli_Transport_04_covered_EPOCH","B_Heli_Transport_03_unarmed_EPOCH","O_Truck_03_covered_EPOCH"] select _found; }; - _vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"]; + _vehicle = createVehicle [_class, [random 500, random 500,500], [], 0, "CAN_COLLIDE"]; _allVehicles pushBack _vehicle; _vehicle call EPOCH_server_setVToken; - _vehicle setposATL _location; - _vehicle setVectorDirAndUp _worldspace; + if (_useposworld) then { + _vehicle setposWorld _location; + } + else { + _vehicle setposATL _location; + }; + _vehicle setVectorDirAndUp [_VectorDir,_VectorUp]; _vehicle setDamage _damage; _allHitpoints = getAllHitPointsDamage _vehicle; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf index 981b4bd0..055ca440 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf @@ -1,3 +1,29 @@ +/* + Author: He-Man - Ignatz-Gaming + + Contributors: + + Description: + Fill a Cargo Inventory (that is readed out with EPOCH_server_CargoSave before) + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf + + Example: + [_vehicle, _Inventory] call EPOCH_server_CargoFill; + + Parameter(s): + _this select 0: OBJ - Storage or Vehicle + _this select 1: ARRAY - Cargo Items + + Returns: + NOTHING +*/ + + params [["_vehicle",objnull],["_items",[]]]; { _objType = _forEachIndex; @@ -73,6 +99,16 @@ params [["_vehicle",objnull],["_items",[]]]; _vehicle addItemCargoGlobal [_x, _qty]; }; }; + // Sub-Containers + case 4: { + _type = _x select 0; + _subContainers = (everycontainer _vehicle) select {(_x select 0) isequalto _type && magazinesAmmoCargo (_x select 1) isequalto [] && weaponsItemsCargo (_x select 1) isequalto []}; + if !(_subContainers isequalto []) + then { + _subContainer = _subContainers select 0 select 1; + [_subContainer,_x select 1] call EPOCH_server_CargoFill; + }; + }; }; } forEach _objTypes; } forEach _items; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoSave.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoSave.sqf index eddce2ff..c371d716 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoSave.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoSave.sqf @@ -1,4 +1,33 @@ -params [["_vehicle",objnull]]; +/* + Author: He-Man - Ignatz-Gaming + + Contributors: + + Description: + Reads Cargo Inventory and push it back in a Variable + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoSave.sqf + + Example: + _Inventory = [_vehicle, _dominimize] call EPOCH_server_CargoSave; + + Parameter(s): + _this select 0: OBJ - Storage or Vehicle + _this select 1: BOOL - Minimize the Magazine Array + + Returns: + ARRAY +*/ + + +private [ + "_wepsItemsCargo","_magsAmmoCargo","_containers","_allContainers","_cargo","_magsAmmoCargox","_wepsItemsCargox","_magsAmmoCargoMinimized","_cargoIndex","_wepsItemsCargoNormalized","_selectedWeaponComponents","_selectedWeapon", + "_weaponComponents","_weapon","_newComponents","_inventory","_ItemCargo","_ItemCargox"]; +params [["_vehicle",objnull],["_unpack",true]]; // may not be needed but should prevent in DB. _wepsItemsCargo = weaponsItemsCargo _vehicle; if (isNil "_wepsItemsCargo") then { @@ -8,31 +37,48 @@ _magsAmmoCargo = magazinesAmmoCargo _vehicle; if (isNil "_magsAmmoCargo") then { _magsAmmoCargo = []; }; +_ItemCargo = getItemCargo _vehicle; +if (isNil "_ItemCargo") then { + _ItemCargo = [[],[]]; +}; +_containers = []; +_allContainers = (everycontainer _vehicle); { - _cargo = _x select 1; - _magsAmmoCargox = magazinesAmmoCargo _cargo; - { - _magsAmmoCargo pushback _x; - } foreach _magsAmmoCargox; - _wepsItemsCargox = weaponsItemsCargo _cargo; - { - _wepsItemsCargo pushback _x; - } foreach _wepsItemsCargox; -} foreach everycontainer _vehicle; + _x params ["_type","_cargo"]; + if (_unpack) then { + _magsAmmoCargox = magazinesAmmoCargo _cargo; + { + _magsAmmoCargo pushback _x; + } foreach _magsAmmoCargox; + _wepsItemsCargox = weaponsItemsCargo _cargo; + { + _wepsItemsCargo pushback _x; + } foreach _wepsItemsCargox; + _ItemCargox = getItemCargo _cargo; + _ItemCargox params ["_items","_itemcounts"]; + { + _cargoIndex = (_ItemCargo select 0) find _x; + if (_cargoIndex >= 0) then { + (_ItemCargo select 1) set [_cargoIndex,(_ItemCargo select 1 select _cargoIndex) + (_itemcounts select _foreachindex)]; + } + else { + (_ItemCargo select 0) pushback (_items select _foreachindex); + (_ItemCargo select 1) pushback (_itemcounts select _foreachindex); + }; + } foreach _items; + } + else { + _containerInventory = _cargo call EPOCH_server_CargoSave; + _containers pushback [_type , _containerInventory]; + }; +} foreach _allContainers; // minimize magazine ammo cargo _magsAmmoCargoMinimized = [[],[]]; { - // find cargo in temp var - _cargoIndex = _magsAmmoCargoMinimized find (_x select 0); - if (_cargoIndex >= 0) then { - (_magsAmmoCargoMinimized select 1) set [_cargoIndex, ((_magsAmmoCargoMinimized select 1) select _cargoIndex) + (_x select 1)]; // get count & add current - } - else { - (_magsAmmoCargoMinimized select 0) pushBack (_x select 0); // classname - (_magsAmmoCargoMinimized select 1) pushBack (_x select 1); // count - }; + (_magsAmmoCargoMinimized select 0) pushBack (_x select 0); + (_magsAmmoCargoMinimized select 1) pushBack (_x select 1); } forEach _magsAmmoCargo; // convert and normalize @@ -49,7 +95,6 @@ _wepsItemsCargoNormalized = []; // remove attachments that are already linked via config if (_x isEqualType "" && {(tolower _x) in _weaponComponents}) then { _newComponents pushBack ""; - //diag_log format ["DEBUG: suppressed saving of %1 for weapon %2 config %3", _x, [_selectedWeapon,_selectedWeaponComponents],[_weapon,_weaponComponents]]; } else { _newComponents pushBack _x; }; @@ -61,6 +106,7 @@ _inventory = [ _wepsItemsCargoNormalized, _magsAmmoCargoMinimized, getBackpackCargo _vehicle, - getItemCargo _vehicle + _ItemCargo, + _containers ]; _inventory diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_RemoveMagOrItemCargo.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_RemoveMagOrItemCargo.sqf new file mode 100644 index 00000000..4da7feaf --- /dev/null +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_RemoveMagOrItemCargo.sqf @@ -0,0 +1,70 @@ +/* + Author: He-Man - Ignatz-Gaming + + Contributors: + + Description: + Removes Items or Magazines from any Cargo + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/Epoch_Server_RemoveMagOrItemCargo.sqf + + Example: + _done = [_vehicle,[_itemtype,_itemcount,_rounds]] call Epoch_Server_RemoveMagOrItemCargo; + + Parameter(s): + _this select 0: OBJ - Storage or Vehicle + _this select 1: STRING - ItemType to remove + _this select 2: SCALAR - ItemQuantity to remove (optional) + _this select 2: SCALAR - Magazine Rounds to find and remove (optional) + Returns: + BOOL - If the Magazine(s) / Item(s) are successfully removed then "true", else "false" +*/ +private ["_return","_removed","_items","_objType","_arr","_size"]; +params ["_cargo","_class",["_count",1],["_bulletfind",0]]; +_return = false; +_removed = 0; +_items = [_cargo,false] call Epoch_Server_CargoSave; +_objType = -1; +if ([_class,"cfgMagazines"] call Epoch_fnc_isAny) then { + _objType = 1; +} +else { + if ([_class, "CfgWeapons"] call EPOCH_fnc_isAny) then { + _objType = 3; + }; +}; +if (_objType > -1) then { + _arr = _items select _objType; + _arr params ["_objTypes","_objQty"]; + { + _size = _objQty select _forEachIndex; + switch _objType do { + case 1: { + if ((_x isEqualTo _class) && ((_size isEqualTo _bulletfind) || _bulletfind == 0)) then { + _objQty set [_foreachindex,0]; + _removed = _removed + 1; + }; + }; + case 3: { + if (_x isEqualTo _class && _size >= _count) then { + _objQty set [_foreachindex,_size - _count]; + _removed = _removed + _count; + }; + }; + }; + if (_removed >= _count) exitwith {_return = true;}; + } forEach _objTypes; +}; +if (_return) then { + clearWeaponCargoGlobal _cargo; + clearMagazineCargoGlobal _cargo; + clearBackpackCargoGlobal _cargo; + clearItemCargoGlobal _cargo; + [_cargo,_items] call Epoch_Server_CargoFill; +}; + +_return diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf index 3b3bfea2..71015670 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf @@ -29,6 +29,12 @@ if (!isNull _building) then { EPOCH_BuildingSlots set [_vehSlot, 0]; missionNamespace setVariable ['EPOCH_BuildingSlotCount', { _x == 0 } count EPOCH_BuildingSlots, true]; + // If is BaseCam, remove from Array + if (_building iskindof "BaseCam_EPOCH") then { + EPOCH_BaseCams = EPOCH_BaseCams - [_building]; + publicvariable "EPOCH_BaseCams"; + }; + ['BuildingKilled', format["%1 was killed by %2 at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog; }; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf index 9f00da39..34f2f825 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf @@ -13,7 +13,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_VAL","_cargo","_cargoIndex","_colorSlot","_hitpoints","_inventory","_magsAmmoCargo","_magsAmmoCargoMinimized","_magsAmmoCargox","_newComponents","_selectedWeapon","_selectedWeaponComponents","_startTime","_vehHiveKey","_vehSlot","_weapon","_weaponComponents","_wepsItemsCargo","_wepsItemsCargoNormalized","_wepsItemsCargox"]; +private ["_VAL","_baseType","_colorSlot","_hitpoints","_inventory","_vehHiveKey","_vehSlot"]; //[[[end]]] params [["_vehicle",objNull]]; @@ -28,10 +28,10 @@ if (!isNull _vehicle) then { _hitpoints = (getAllHitPointsDamage _vehicle) param [2,[]]; _inventory = _vehicle call EPOCH_server_CargoSave; - + _colorSlot = _vehicle getVariable ["VEHICLE_TEXTURE",0]; _baseType = _vehicle getVariable ["VEHICLE_BASECLASS",""]; - _VAL = [typeOf _vehicle,[(getposATL _vehicle call EPOCH_precisionPos),vectordir _vehicle,vectorup _vehicle],damage _vehicle,_hitpoints,fuel _vehicle,_inventory,[true,magazinesAllTurrets _vehicle],_colorSlot,_baseType]; + _VAL = [typeOf _vehicle,[getposworld _vehicle,vectordir _vehicle,vectorup _vehicle,true],damage _vehicle,_hitpoints,fuel _vehicle,_inventory,[true,magazinesAllTurrets _vehicle],_colorSlot,_baseType, getPlateNumber _vehicle]; ["Vehicle", _vehHiveKey, EPOCH_expiresVehicle, _VAL] call EPOCH_fnc_server_hiveSETEX; }; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_upgrade_vehicle.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_upgrade_vehicle.sqf index 6dcaedcf..30c86bd0 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_upgrade_vehicle.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_upgrade_vehicle.sqf @@ -10,7 +10,7 @@ Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike */ -private ["_slot","_pos","_dir","_cargo","_damage","_OldHitPoints","_typeVeh","_baseVeh","_color","_fuel","_newVeh","_checkclass","_cfgEpochVehicles","_availableColorsConfig","_colors","_textureSelectionIndex","_selections","_textures","_count","_newHitpoints","_idx","_dmg"]; +private ["_slot","_pos","_dir","_cargo","_damage","_OldHitPoints","_typeVeh","_baseVeh","_color","_fuel","_newVeh","_checkclass","_cfgEpochVehicles","_availableColorsConfig","_colors","_textureSelectionIndex","_selections","_textures","_count","_newHitpoints","_idx","_dmg","_lock"]; params [["_array",[]],["_player",objnull],["_token","",[""]]]; if (_array isequalto []) exitwith { diag_log "Array is empty"; @@ -42,6 +42,7 @@ _typeVeh = typeOf _veh; _baseVeh = _veh getVariable ["VEHICLE_BASECLASS",_typeVeh]; _color = _veh getVariable ["VEHICLE_TEXTURE",""]; _fuel = fuel _veh; +_lock = locked _veh; deletevehicle _veh; waituntil {isnull _veh}; _pos set [2,(_pos select 2)+0.5]; @@ -52,7 +53,7 @@ _newVeh call EPOCH_server_setVToken; _newVeh call EPOCH_server_vehicleInit; // set fuel level _newVeh setFuel _fuel; - +_newVeh lock _lock; // apply persistent textures _checkclass = _typeVeh; if !(_newVeh iskindof _typeVeh) then { diff --git a/Sources/epoch_server/config.cpp b/Sources/epoch_server/config.cpp index 8632f8a5..2e3750e1 100644 --- a/Sources/epoch_server/config.cpp +++ b/Sources/epoch_server/config.cpp @@ -74,6 +74,7 @@ class CfgServerFunctions class server_PayCrypto{}; class fnc_updatePlayerStats{}; class server_updatePlayerStats{}; + class server_SetFinalPlayerPos{}; }; class epoch_traders { class server_loadTraders {}; @@ -107,6 +108,7 @@ class CfgServerFunctions class server_upgrade_vehicle {}; class server_CargoSave {}; class server_CargoFill {}; + class server_removemagoritemcargo {}; }; class epoch_server { class precisionPos {}; @@ -145,7 +147,7 @@ class CfgServerFunctions }; class CfgServerVersion { - client = "1.1.0"; - config = "1.1.0"; + client = "1.2.0"; + config = "1.2.0"; hive = "0.6.0.0"; }; diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index d7bd35c6..d5ca4fee 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -91,6 +91,16 @@ diag_log "Epoch: Init Variables"; call compile preprocessFileLineNumbers "\epoch_server\init\server_variables.sqf"; call compile preprocessFileLineNumbers "\epoch_server\init\server_securityfunctions.sqf"; +// Set Server RealTime +Epoch_ServerRealtime = date; +_response = "epochserver" callExtension "510"; +if (_response != "") then { + diag_log format ["Epoch: Set Real Time: %1", _response]; + _date = parseSimpleArray _response; + _date resize 5; + Epoch_ServerRealtime = _date; +}; + // Enable Dynamic simulation _dynSimToggle = [_serverSettingsConfig, "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntry; enableDynamicSimulationSystem _dynSimToggle; @@ -226,15 +236,10 @@ _staticDateTime = [_serverSettingsConfig, "StaticDateTime", []] call EPOCH_fnc_r _timeDifference = [_serverSettingsConfig, "timeDifference", 0] call EPOCH_fnc_returnConfigEntry; if (_staticDateTime isEqualto []) then { - _response = "epochserver" callExtension "510"; - if (_response != "") then { - diag_log format ["Epoch: Set Real Time: %1", _response]; - _date = parseSimpleArray _response; - _date resize 5; - _date set[0, (_date select 0) + 21]; - _date set[3, (_date select 3) + _timeDifference]; - _dateChanged = true; - }; + _date = Epoch_ServerRealtime; + _date set[0, (_date select 0) + 21]; + _date set[3, (_date select 3) + _timeDifference]; + _dateChanged = true; } else { { if (_x != 0) then { @@ -273,14 +278,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 diff --git a/Sources/epoch_server/init/server_securityfunctions.sqf b/Sources/epoch_server/init/server_securityfunctions.sqf index d7fec214..f5f03437 100644 --- a/Sources/epoch_server/init/server_securityfunctions.sqf +++ b/Sources/epoch_server/init/server_securityfunctions.sqf @@ -49,7 +49,7 @@ _skn_badAnimations = [_cfg_blacklistConfig, "animations", ['AmovPercMstpSnonWnon _cfg_variablesConfig = (_config >> "variables"); _skn_badVarCheckArray = [_cfg_variablesConfig, "badVars", ['EPOCH_GMODE','ESP_map','ESP_mainMap','ESP_adminMap','AntiAntiAntiAntiHax','fnc_usec_damageHandler','fnc_usec_unconscious','VAGINA_secret','yolo','VERSION','life_fnc_handleDamage','EPOCH_spawnVehicle_PVS','CLASS911_Menu','nuke_vars','JJMMEE_INIT_MENU','PLAYERON','PLAYERNEXT2','ALTISLIFEON','LY_Menu','PLAY','LY_SwaggerLikeUs','BIS_fnc_dbg_reminder_value','BIS_fnc_dbg_reminder']] call EPOCH_fnc_returnConfigEntry; _skn_nilVarCheckArray = [_cfg_variablesConfig, "nilVars", ['EPOCH_antiWallCount','EPOCH_playerEnergy','EPOCH_playerHunger','EPOCH_playerStamina','EPOCH_playerCrypto','EPOCH_target','EPOCH_ESP_TARGETS','EPOCH_ESPMAP_TARGETS','EPOCH_taxRate','EPOCH_ESP_VEHICLEPLAYER','EPOCH_ESP_PLAYER','EPOCH_ESP_VEHICLES']] call EPOCH_fnc_returnConfigEntry; -_skn_commandMenuArray = [(_config >> "commandMenu"), "menus",['','RscSelectTeam','RscTeam','RscMoveHigh','#GETIN','#RscStatus','#WATCH0','RscCombatMode','RscMenuReply','RscCallSupport','#CUSTOM_RADIO','#User:BIS_fnc_addCommMenuItem_menu','RscRadio','RscReply','#ACTION','RscMenuFormations','#WATCH','RscGroupRootMenu','RscMainMenu','RscMenuMove','RscWatchDir','RscWatchMoveDir','#User:BIS_Menu_GroupCommunication','RscMenuStatus','RscFormations']] call EPOCH_fnc_returnConfigEntry; +_skn_commandMenuArray = [(_config >> "commandMenu"), "menus",['','RscSelectTeam','RscTeam','RscMenuTeam','RscMoveHigh','#GETIN','#RscStatus','#WATCH0','RscCombatMode','RscMenuReply','RscCallSupport','#CUSTOM_RADIO','#User:BIS_fnc_addCommMenuItem_menu','RscRadio','RscReply','#ACTION','RscMenuFormations','#WATCH','RscGroupRootMenu','RscMainMenu','RscMenuMove','RscWatchDir','RscWatchMoveDir','#User:BIS_Menu_GroupCommunication','RscMenuStatus','RscFormations']] call EPOCH_fnc_returnConfigEntry; _skn_addEHConfig = (_config >> "addEventHandler"); _skn_displayAddEHChecks = [_skn_addEHConfig, "checks",[]] call EPOCH_fnc_returnConfigEntry; @@ -456,7 +456,7 @@ for "_i" from 1 to 3 do { _temp = _temp + ",[' Godmode', [], "+_skn_godMode+", '2', []]"; }; if ("HEAL" in _case) then { - _temp = _temp + ",[' Heal',[],{[103,netId player] call "+_skn_adminRequest_PVC+"},'4',[0.016,0.702,0.078,1]]"; + _temp = _temp + ",[' Heal self',[],{[103,netId player] call "+_skn_adminRequest_PVC+"},'-1',[0.016,0.702,0.078,1]]"; }; if ("VEHICLEREPAIR" in _case) then { _temp = _temp + ",[' Repair Vehicle', [], "+_skn_repairVehicle+", '0', []]"; @@ -1426,7 +1426,7 @@ _skn_admincode = compileFinal (" _minutes = round((serverTime/60)-(_hours*60)); if (!dialog) then {createDialog 'Skaronator_AdminMenu'; - {(_x call "+_skn_getCtrl+") ctrlShow false}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71] }; + {(_x call "+_skn_getCtrl+") ctrlShow false}forEach[40,41,4101,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71] }; if (getPlayerUID player in "+str _skn_blockedSpawnMenuUID+") then {ctrlEnable [21,false]}; ctrlEnable [22,false]; (1 call "+_skn_getCtrl+") ctrlSetText format['Players %1 of %2',count allPlayers,playersNumber civilian]; @@ -1734,6 +1734,7 @@ _skn_admincode = compileFinal (" "+_skn_tg_spawnTyp+" = _idc; _idc call "+_skn_fillSpawnMenu+"; }; + if (_idc == 4101) then {_idc call "+_skn_fillSpawnMenu+"}; '); "+_skn_spawnSpawnMenu+" = { _target = objNull; @@ -1796,30 +1797,34 @@ _skn_admincode = compileFinal (" _ctrl lbDelete _currentSelect; ']; - {_i = _x call "+_skn_getCtrl+";_i ctrlShow true;_i ctrlSetFade 1;_i ctrlcommit 0;_i ctrlSetFade 0;_i ctrlcommit 0.8}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71]; + {_i = _x call "+_skn_getCtrl+";_i ctrlShow true;_i ctrlSetFade 1;_i ctrlcommit 0;_i ctrlSetFade 0;_i ctrlcommit 0.8}forEach[40,41,4101,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71]; "+_skn_tg_spawnTyp+" call "+_skn_fillSpawnMenu+"; }; "+_skn_removespawnMenu+" = { if (ctrlShown (40 call "+_skn_getCtrl+")) then { - {_i = _x call "+_skn_getCtrl+";_i ctrlShow true;_i ctrlSetFade 1;_i ctrlcommit 0.8}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71]; - [] spawn {uiSleep 0.8;{_x call "+_skn_getCtrl+" ctrlShow false}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71]}; + {_i = _x call "+_skn_getCtrl+";_i ctrlShow true;_i ctrlSetFade 1;_i ctrlcommit 0.8}forEach[40,41,4101,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71]; + [] spawn {uiSleep 0.8;{_x call "+_skn_getCtrl+" ctrlShow false}forEach[40,41,4101,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71]}; true } else {false}; }; "+_skn_fillSpawnMenu+" = { _ctrl = 41 call "+_skn_getCtrl+"; lbclear _ctrl; - _button = _this call "+_skn_getCtrl+"; - _button ctrlSetTextColor [1, 0, 0, 1]; - {_x call "+_skn_getCtrl+" ctrlSetTextColor [1, 1, 1, 1]}forEach([61,62,63,64,65,66,67,68,69,70,71]-[_this]); + if !(_this isequalto 4101) then { + _button = _this call "+_skn_getCtrl+"; + _button ctrlSetTextColor [1, 0, 0, 1]; + {_x call "+_skn_getCtrl+" ctrlSetTextColor [1, 1, 1, 1]}forEach([61,62,63,64,65,66,67,68,69,70,71]-[_this]); + }; + _searchtxt = tolower (ctrlText((findDisplay -1337) displayCtrl 4101)); _cfgPricing = 'CfgPricing' call EPOCH_returnConfig; - if (_this == 61) then { + if ("+_skn_tg_spawnTyp+" == 61) then { _airVehicles = "" (configName _x) iskindof 'AIR' && getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'type') != 0 && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses (configFile >> 'CfgVehicles'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1827,13 +1832,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _airVehicles; }; - if (_this == 62) then { + if ("+_skn_tg_spawnTyp+" == 62) then { _landVehicles = "" (configName _x) iskindof 'LandVehicle' && getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && configName _x != 'PaperCar' && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses (configFile >> 'CfgVehicles'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1841,13 +1847,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _landVehicles; }; - if (_this == 63) then { + if ("+_skn_tg_spawnTyp+" == 63) then { _shipVehicles = "" (configName _x) iskindof 'SHIP' && getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'type') in [1,2,3,4] && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses (configFile >> 'CfgVehicles'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1855,13 +1862,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _shipVehicles; }; - if (_this == 64) then { + if ("+_skn_tg_spawnTyp+" == 64) then { _weapons = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && getNumber(_x >> 'type') in [1,2,4] && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses (configFile >> 'CfgWeapons'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1871,13 +1879,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _weapons; }; - if (_this == 65) then { + if ("+_skn_tg_spawnTyp+" == 65) then { _magazines = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && getText(_x >> 'ammo') != '' && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses (configFile >> 'CfgMagazines'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1885,13 +1894,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _magazines; }; - if (_this == 66) then { + if ("+_skn_tg_spawnTyp+" == 66) then { _magazines = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && getText(_x >> 'ammo') == '' && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses(configFile >> 'CfgMagazines'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1899,12 +1909,13 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _magazines; }; - if (_this == 67) then { + if ("+_skn_tg_spawnTyp+" == 67) then { _backpack = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'isbackpack') == 1 && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses(configFile >> 'CfgVehicles'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1912,13 +1923,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _backpack; }; - if (_this == 68) then { + if ("+_skn_tg_spawnTyp+" == 68) then { _uniforms = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && getNumber(_x >> 'ItemInfo' >> 'type') in [801] && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses(configFile >> 'CfgWeapons'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1926,13 +1938,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _uniforms; }; - if (_this == 69) then { + if ("+_skn_tg_spawnTyp+" == 69) then { _attachments = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && ((configName _x) call BIS_fnc_itemType) select 0 in ['Item'] && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses(configFile >> 'CfgWeapons'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1940,13 +1953,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _attachments; }; - if (_this == 70) then { + if ("+_skn_tg_spawnTyp+" == 70) then { _headgear = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && ((configName _x) call BIS_fnc_itemType) select 1 in ['Headgear'] && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses(configFile >> 'CfgWeapons'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; @@ -1954,13 +1968,14 @@ _skn_admincode = compileFinal (" _ctrl lbSetPicture[_index, getText(_x >> 'picture')]; }forEach _headgear; }; - if (_this == 71) then { + if ("+_skn_tg_spawnTyp+" == 71) then { _vests = "" getText(_x >> 'displayName') != '' && getText(_x >> 'picture') != '' && getNumber(_x >> 'scope') in [1,2] && ((configName _x) call BIS_fnc_itemType) select 1 in ['Vest'] && - isClass(_cfgPricing >> configName _x) + isClass(_cfgPricing >> configName _x) && + ((tolower (configName _x)) find (tolower _searchtxt) > -1 || tolower (getText(_x >> 'displayName')) find (tolower _searchtxt) > -1) ""configClasses(configFile >> 'CfgWeapons'); { _index = _ctrl lbAdd format['%1', getText(_x >> 'displayName')]; diff --git a/Sources/epoch_server/init/server_variables.sqf b/Sources/epoch_server/init/server_variables.sqf index 2bd58d8a..79a3886f 100644 --- a/Sources/epoch_server/init/server_variables.sqf +++ b/Sources/epoch_server/init/server_variables.sqf @@ -88,3 +88,15 @@ private _serverSettingsConfig = configFile >> "CfgEpochServer"; private _varData = [_serverSettingsConfig,_x select 0,_x select 1] call EPOCH_fnc_returnConfigEntry; missionNamespace setVariable[format["EPOCH_%1", _x select 0], _varData]; }forEach _configArray; + +// Convert Starter Trader Magazines from mags to rounds +{ + _maxrnd = 1; + if ([_x,"cfgMagazines"] call Epoch_fnc_isAny) then { + _maxrnd = getnumber (configfile >> "cfgMagazines" >> _x >> "count"); + }; + if (_maxrnd > 1) then { + _currentStock = (EPOCH_starterTraderItems select 1 select _foreachindex)*_maxrnd; + (EPOCH_starterTraderItems select 1) set [_foreachindex, _currentStock]; + }; +} foreach (EPOCH_starterTraderItems select 0); diff --git a/Sources/epoch_server/system/server_monitor.fsm b/Sources/epoch_server/system/server_monitor.fsm index aeecc828..09e2abbc 100644 --- a/Sources/epoch_server/system/server_monitor.fsm +++ b/Sources/epoch_server/system/server_monitor.fsm @@ -326,7 +326,7 @@ class FSM " // if player is inside a vehicle check vehicle is in allowed safe vehicles list." \n " if (_vehicle != _x && {!(typeOf _vehicle in _safeVehicles)}) then {" \n " // check if vehicle has token set server side and ignore vehicle if was spawned by a Curator (zeus)" \n - " if ((objectCurators _vehicle) isEqualTo [] && {!(_vehicle call EPOCH_server_getVToken)}) then {" \n + " if ((objectCurators _vehicle) isEqualTo [] && {!(_vehicle call EPOCH_server_getVToken)} && !(_vehicle iskindof ""Ejection_Seat_Base_F"")) then {" \n " diag_log format[""ADMIN: Invalid Vehicle detected and deleted %1 with %2 driving"",_vehicle,_x];" \n " deleteVehicle _vehicle;" \n " };" \n @@ -544,11 +544,7 @@ class FSM " missionNamespace setVariable[_eventKey, diag_tickTime];" \n " _preFix = """";" \n " _postFix = """";" \n - " if (_usePrePostfix == 1) then {" \n - " _preFix = ""\epoch_server_settings\EpochEvents\"";" \n - " _postFix = "".sqf"";" \n - " };" \n - " if (_usePrePostfix == 2) then {" \n + " if (_usePrePostfix in [1,2]) then {" \n " _preFix = ""\epoch_server_events\EpochEvents\"";" \n " _postFix = "".sqf"";" \n " };" \n @@ -585,4 +581,4 @@ class FSM { }; }; -/*%FSM
*/ \ No newline at end of file +/*%FSM
*/ diff --git a/Sources/epoch_server_events/EpochEvents/GardenManager.sqf b/Sources/epoch_server_events/EpochEvents/GardenManager.sqf index a9dbd071..3ff48c1d 100644 --- a/Sources/epoch_server_events/EpochEvents/GardenManager.sqf +++ b/Sources/epoch_server_events/EpochEvents/GardenManager.sqf @@ -12,7 +12,7 @@ private ["_babies","_babyClasses","_cargo","_garden","_mature","_matureClasses", _seedClasses = ["SeedPacket_GoldenSeal","SeedPacket_Hemp","SeedPacket_Poppy","SeedPacket_Pumpkin","SeedPacket_Sunflower"]; _babyClasses = ["Sapling_GoldenSeal","Sapling_Hemp","Sapling_Poppy","Sapling_Pumpkin","Sapling_Sunflower"]; _teenClasses = ["SaplingTeen_GoldenSeal","SaplingTeen_Hemp","SaplingTeen_Poppy","SaplingTeen_Pumpkin","SaplingTeen_Sunflower"]; -_matureClasses = ["GoldenSeal","Hemp","Poppy","Pumpkin","Sunflower"]; +_matureClasses = ["Goldenseal","Hemp","Poppy","Pumpkin","Sunflower"]; _spoil = false; // init var if not set diff --git a/Sources/epoch_server_events/EpochEvents/SolarChargerManager.sqf b/Sources/epoch_server_events/EpochEvents/SolarChargerManager.sqf new file mode 100644 index 00000000..97f009fe --- /dev/null +++ b/Sources/epoch_server_events/EpochEvents/SolarChargerManager.sqf @@ -0,0 +1,56 @@ +/* + Garden Manager + by Aaron Clark - EpochMod.com + + Improvements and or bugfixes and other contributions are welcome via the github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/GardenManager.sqf +*/ +//[[[cog import generate_private_arrays ]]] +private ["_ChargeClasses","_MaxRounds","_ChargeValue","_modifiedSolars","_changed","_solar","_chargeables","_idx","_MaxRoundsTmp"]; +//[[[end]]] + +_ChargeClasses = ["EnergyPack","EnergyPackLg"]; +_MaxRounds = []; +{ + _MaxRounds pushback (getnumber (configfile >> "cfgMagazines" >> _x >> "count")); +} foreach _ChargeClasses; + +_ChargeValue = 1; + +if (isNil "EPOCH_activeSolars") then {EPOCH_activeSolars = []}; +EPOCH_activeSolars = EPOCH_activeSolars - [objNull]; + +_modifiedSolars = []; +{ + _changed = false; + _solar = _x; + _chargeables = (magazinesAmmoCargo _solar) select {(_x select 0) in _ChargeClasses}; + if !(_chargeables isequalto []) then { + _return = []; + { + _x params ["_type","_rounds"]; + _idx = _ChargeClasses find _type; + if (_idx > -1) then { + _MaxRoundsTmp = _MaxRounds select _idx; + if (_MaxRoundsTmp > _rounds) then { + _changed = true; + _x set [1, (_rounds + _ChargeValue) min _MaxRoundsTmp]; + }; + }; + } foreach _chargeables; + if (_changed) then { + clearWeaponCargoGlobal _solar; + clearMagazineCargoGlobal _solar; + clearBackpackCargoGlobal _solar; + clearItemCargoGlobal _solar; + { + _solar addmagazineammocargo [_x select 0,1,_x select 1]; + } foreach _chargeables; + _modifiedSolars pushBack _solar; + }; + }; +} forEach EPOCH_activeSolars; + +if !(_modifiedSolars isEqualTo []) then { + [_modifiedSolars] call EPOCH_server_save_vehicles; +}; diff --git a/Sources/epoch_server_settings/config.cpp b/Sources/epoch_server_settings/config.cpp index e1100b1d..2d55bfae 100644 --- a/Sources/epoch_server_settings/config.cpp +++ b/Sources/epoch_server_settings/config.cpp @@ -20,7 +20,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = 0.1; - epochVersion = "1.1.0"; + epochVersion = "1.2.0"; requiredAddons[] = {}; #include "build.hpp" }; @@ -229,7 +229,13 @@ class CfgEpoch {"O_Heli_Transport_04_box_EPOCH",1}, {"O_Heli_Transport_04_covered_EPOCH",1}, {"B_Heli_Transport_03_unarmed_EPOCH",1}, + {"uh1h_Epoch",1}, {"jetski_epoch",7}, + {"MBK_01_EPOCH",2}, + {"hoverboard_epoch_1",1}, + {"hoverboard_epoch_cargo",1}, + {"hoverboard_epoch_bttf",1}, + {"hoverboard_epoch_a3",1}, {"K01",2}, {"K02",2}, {"K03",2}, diff --git a/Sources/epoch_server_settings/configs/CfgLootTable.h b/Sources/epoch_server_settings/configs/CfgLootTable.h index 6c158ba3..1ed06ced 100644 --- a/Sources/epoch_server_settings/configs/CfgLootTable.h +++ b/Sources/epoch_server_settings/configs/CfgLootTable.h @@ -212,8 +212,8 @@ class CfgLootTable { { "ItemCanteen_Dirty", "magazine" }, 5 }, { { "ItemCanteen_Clean", "magazine" }, 1 }, { { "ItemBottlePlastic_Dirty", "magazine" }, 5 }, - { { "ItemBottlePlastic_Clean", "magazine" }, 1 } - + { { "ItemBottlePlastic_Clean", "magazine" }, 1 }, + { { "ItemFireExtinguisher", "magazine" }, 1 } }; }; @@ -326,6 +326,7 @@ class CfgLootTable { { "Repairs", "CfgLootTable" }, 16 }, { { "CircuitParts", "magazine" }, 17 }, { { "ItemCorrugated", "magazine" }, 17 }, + { { "ItemBulb", "magazine" }, 2 }, { { "ItemSolar", "magazine" }, 5 }, { { "ItemBattery", "magazine" }, 5 }, { { "ItemCables", "magazine" }, 5 }, @@ -348,6 +349,7 @@ class CfgLootTable { { "MortarBucket", "magazine" }, 9 }, { { "Repairs", "CfgLootTable" }, 10 }, { { "ItemCorrugated", "magazine" }, 11 }, + { { "ItemBulb", "magazine" }, 2 }, { { "CinderBlocks", "magazine" }, 12 }, { { "JackKit", "magazine" }, 8 }, { { "ItemCoolerE", "magazine" }, 13 }, @@ -906,6 +908,7 @@ class CfgLootTable { items[] = { { { "FAK", "magazine" }, 50 }, + { { "Soap_Epoch", "magazine" }, 3 }, { { "Heal_EPOCH", "item" }, 2 }, { { "Defib_EPOCH", "item" }, 1 }, { {"atropine_epoch", "magazine" }, 6 }, @@ -1215,6 +1218,7 @@ class CfgLootTable { { "U_OrestesBody", "item" }, 1 }, { { "DLCUniforms", "CfgLootTable" }, 1 }, { { "MaleUniforms_FullGhillieMarkDLC", "CfgLootTable" }, 1 }, + { { "U_RadiationSuit_M_uniform", "item" }, 1 }, // new uniforms { { "U_C_Commoner1_1", "item" }, 1 }, @@ -1358,6 +1362,7 @@ class CfgLootTable { { "U_ghillie1_uniform", "item" }, 1 }, { { "U_ghillie2_uniform", "item" }, 1 }, { { "U_ghillie3_uniform", "item" }, 1 }, + { { "U_RadiationSuit_F_uniform", "item" }, 1 }, { { "U_JeansPatched1_uniform", "item" }, 1 }, { { "U_JeansPatched2_uniform", "item" }, 1 }, @@ -1624,6 +1629,8 @@ class CfgLootTable { { "H_92_EPOCH", "item" }, 1 }, { { "H_104_EPOCH", "item" }, 1 }, { { "H_105_EPOCH", "item" }, 1 }, + { { "thor_mask_epoch", "item" }, 1, }, + { { "iron_mask_epoch", "item" }, 1, }, { { "wolf_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "pkin_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "clown_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october diff --git a/Sources/epoch_server_settings/configs/CfgLootTable_CUP.h b/Sources/epoch_server_settings/configs/CfgLootTable_CUP.h index 206932a3..d583c834 100644 --- a/Sources/epoch_server_settings/configs/CfgLootTable_CUP.h +++ b/Sources/epoch_server_settings/configs/CfgLootTable_CUP.h @@ -308,8 +308,8 @@ class CfgLootTable_CUP { { "ItemCanteen_Dirty", "magazine" }, 5 }, { { "ItemCanteen_Clean", "magazine" }, 1 }, { { "ItemBottlePlastic_Dirty", "magazine" }, 5 }, - { { "ItemBottlePlastic_Clean", "magazine" }, 1 } - + { { "ItemBottlePlastic_Clean", "magazine" }, 1 }, + { { "ItemFireExtinguisher", "magazine" }, 1 } }; }; class Seeds @@ -419,6 +419,7 @@ class CfgLootTable_CUP { { "Repairs", "CfgLootTable" }, 16 }, { { "CircuitParts", "magazine" }, 17 }, { { "ItemCorrugated", "magazine" }, 17 }, + { { "ItemBulb", "magazine" }, 2 }, { { "ItemSolar", "magazine" }, 5 }, { { "ItemBattery", "magazine" }, 5 }, { { "ItemCables", "magazine" }, 5 }, @@ -439,6 +440,7 @@ class CfgLootTable_CUP { { "MortarBucket", "magazine" }, 9 }, { { "Repairs", "CfgLootTable" }, 10 }, { { "ItemCorrugated", "magazine" }, 11 }, + { { "ItemBulb", "magazine" }, 2 }, { { "CinderBlocks", "magazine" }, 12 }, { { "JackKit", "magazine" }, 8 }, { { "ItemCoolerE", "magazine" }, 13 }, @@ -1455,6 +1457,7 @@ class CfgLootTable_CUP { items[] = { { { "FAK", "magazine" }, 50 }, + { { "Soap_Epoch", "magazine" }, 3 }, { { "Heal_EPOCH", "item" }, 2 }, { { "Defib_EPOCH", "item" }, 1 }, { {"atropine_epoch", "magazine" }, 6 }, @@ -1764,6 +1767,7 @@ class CfgLootTable_CUP { { "U_OrestesBody", "item" }, 1 }, { { "DLCUniforms", "CfgLootTable" }, 1 }, { { "MaleUniforms_FullGhillieMarkDLC", "CfgLootTable" }, 1 }, + { { "Epoch_RadiationSuit_M", "item" }, 1 }, // new uniforms { { "U_C_Commoner1_1", "item" }, 1 }, @@ -1905,6 +1909,7 @@ class CfgLootTable_CUP { { "U_ghillie1_uniform", "item" }, 1 }, { { "U_ghillie2_uniform", "item" }, 1 }, { { "U_ghillie3_uniform", "item" }, 1 }, + { { "Epoch_RadiationSuit_F", "item" }, 1 }, { { "U_JeansPatched1_uniform", "item" }, 1 }, { { "U_JeansPatched2_uniform", "item" }, 1 }, @@ -2171,6 +2176,8 @@ class CfgLootTable_CUP { { "H_92_EPOCH", "item" }, 1 }, { { "H_104_EPOCH", "item" }, 1 }, { { "H_105_EPOCH", "item" }, 1 }, + { { "thor_mask_epoch", "item" }, 1, }, + { { "iron_mask_epoch", "item" }, 1, }, { { "wolf_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "pkin_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "clown_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october diff --git a/Sources/epoch_server_settings/configs/CfgLootTable_MAD.h b/Sources/epoch_server_settings/configs/CfgLootTable_MAD.h index dd4775ea..c570c8f8 100644 --- a/Sources/epoch_server_settings/configs/CfgLootTable_MAD.h +++ b/Sources/epoch_server_settings/configs/CfgLootTable_MAD.h @@ -212,8 +212,8 @@ class CfgLootTable_MAD { { "ItemCanteen_Dirty", "magazine" }, 5 }, { { "ItemCanteen_Clean", "magazine" }, 1 }, { { "ItemBottlePlastic_Dirty", "magazine" }, 5 }, - { { "ItemBottlePlastic_Clean", "magazine" }, 1 } - + { { "ItemBottlePlastic_Clean", "magazine" }, 1 }, + { { "ItemFireExtinguisher", "magazine" }, 1 } }; }; class Seeds @@ -324,6 +324,7 @@ class CfgLootTable_MAD { { "Repairs", "CfgLootTable" }, 16 }, { { "CircuitParts", "magazine" }, 17 }, { { "ItemCorrugated", "magazine" }, 17 }, + { { "ItemBulb", "magazine" }, 2 }, { { "ItemSolar", "magazine" }, 5 }, { { "ItemBattery", "magazine" }, 5 }, { { "ItemCables", "magazine" }, 5 }, @@ -346,6 +347,7 @@ class CfgLootTable_MAD { { "MortarBucket", "magazine" }, 9 }, { { "Repairs", "CfgLootTable" }, 10 }, { { "ItemCorrugated", "magazine" }, 11 }, + { { "ItemBulb", "magazine" }, 2 }, { { "CinderBlocks", "magazine" }, 12 }, { { "JackKit", "magazine" }, 8 }, { { "ItemCoolerE", "magazine" }, 13 }, @@ -895,6 +897,7 @@ class CfgLootTable_MAD { items[] = { { { "FAK", "magazine" }, 50 }, + { { "Soap_Epoch", "magazine" }, 3 }, { { "Heal_EPOCH", "item" }, 2 }, { { "Defib_EPOCH", "item" }, 1 }, { {"atropine_epoch", "magazine" }, 6 }, @@ -1204,6 +1207,7 @@ class CfgLootTable_MAD { { "U_OrestesBody", "item" }, 1 }, { { "DLCUniforms", "CfgLootTable" }, 1 }, { { "MaleUniforms_FullGhillieMarkDLC", "CfgLootTable" }, 1 }, + { { "Epoch_RadiationSuit_M", "item" }, 1 }, // new uniforms { { "U_C_Commoner1_1", "item" }, 1 }, @@ -1345,6 +1349,7 @@ class CfgLootTable_MAD { { "U_ghillie1_uniform", "item" }, 1 }, { { "U_ghillie2_uniform", "item" }, 1 }, { { "U_ghillie3_uniform", "item" }, 1 }, + { { "Epoch_RadiationSuit_F", "item" }, 1 }, { { "U_JeansPatched1_uniform", "item" }, 1 }, { { "U_JeansPatched2_uniform", "item" }, 1 }, @@ -1614,6 +1619,8 @@ class CfgLootTable_MAD { { "H_92_EPOCH", "item" }, 1 }, { { "H_104_EPOCH", "item" }, 1 }, { { "H_105_EPOCH", "item" }, 1 }, + { { "thor_mask_epoch", "item" }, 1, }, + { { "iron_mask_epoch", "item" }, 1, }, { { "wolf_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "pkin_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "clown_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october diff --git a/Sources/epoch_server_settings/configs/CfgLootTable_MADCUP.h b/Sources/epoch_server_settings/configs/CfgLootTable_MADCUP.h index b42bd675..21488664 100644 --- a/Sources/epoch_server_settings/configs/CfgLootTable_MADCUP.h +++ b/Sources/epoch_server_settings/configs/CfgLootTable_MADCUP.h @@ -308,8 +308,8 @@ class CfgLootTable_MADCUP { { "ItemCanteen_Dirty", "magazine" }, 5 }, { { "ItemCanteen_Clean", "magazine" }, 1 }, { { "ItemBottlePlastic_Dirty", "magazine" }, 5 }, - { { "ItemBottlePlastic_Clean", "magazine" }, 1 } - + { { "ItemBottlePlastic_Clean", "magazine" }, 1 }, + { { "ItemFireExtinguisher", "magazine" }, 1 } }; }; class Seeds @@ -419,6 +419,7 @@ class CfgLootTable_MADCUP { { "Repairs", "CfgLootTable" }, 16 }, { { "CircuitParts", "magazine" }, 17 }, { { "ItemCorrugated", "magazine" }, 17 }, + { { "ItemBulb", "magazine" }, 2 }, { { "ItemSolar", "magazine" }, 5 }, { { "ItemBattery", "magazine" }, 5 }, { { "ItemCables", "magazine" }, 5 }, @@ -439,6 +440,7 @@ class CfgLootTable_MADCUP { { "MortarBucket", "magazine" }, 9 }, { { "Repairs", "CfgLootTable" }, 10 }, { { "ItemCorrugated", "magazine" }, 11 }, + { { "ItemBulb", "magazine" }, 2 }, { { "CinderBlocks", "magazine" }, 12 }, { { "JackKit", "magazine" }, 8 }, { { "ItemCoolerE", "magazine" }, 13 }, @@ -1460,6 +1462,7 @@ class CfgLootTable_MADCUP { items[] = { { { "FAK", "magazine" }, 50 }, + { { "Soap_Epoch", "magazine" }, 3 }, { { "Heal_EPOCH", "item" }, 2 }, { { "Defib_EPOCH", "item" }, 1 }, { {"atropine_epoch", "magazine" }, 6 }, @@ -1769,6 +1772,7 @@ class CfgLootTable_MADCUP { { "U_OrestesBody", "item" }, 1 }, { { "DLCUniforms", "CfgLootTable" }, 1 }, { { "MaleUniforms_FullGhillieMarkDLC", "CfgLootTable" }, 1 }, + { { "Epoch_RadiationSuit_M", "item" }, 1 }, // new uniforms { { "U_C_Commoner1_1", "item" }, 1 }, @@ -1910,6 +1914,7 @@ class CfgLootTable_MADCUP { { "U_ghillie1_uniform", "item" }, 1 }, { { "U_ghillie2_uniform", "item" }, 1 }, { { "U_ghillie3_uniform", "item" }, 1 }, + { { "Epoch_RadiationSuit_F", "item" }, 1 }, { { "U_JeansPatched1_uniform", "item" }, 1 }, { { "U_JeansPatched2_uniform", "item" }, 1 }, @@ -2179,6 +2184,8 @@ class CfgLootTable_MADCUP { { "H_92_EPOCH", "item" }, 1 }, { { "H_104_EPOCH", "item" }, 1 }, { { "H_105_EPOCH", "item" }, 1 }, + { { "thor_mask_epoch", "item" }, 1, }, + { { "iron_mask_epoch", "item" }, 1, }, { { "wolf_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "pkin_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october { { "clown_mask_epoch", "item" }, 1, {"getDate", 1, "==", 10} }, // only available in october diff --git a/Sources/epoch_server_settings/configs/security/security_checks.h b/Sources/epoch_server_settings/configs/security/security_checks.h index 80f41604..56cabdf2 100644 --- a/Sources/epoch_server_settings/configs/security/security_checks.h +++ b/Sources/epoch_server_settings/configs/security/security_checks.h @@ -92,7 +92,7 @@ class CfgSecConf }; class commandMenu { - menus[] = {"","RscSelectTeam","RscTeam","RscMoveHigh","#GETIN","#RscStatus","#WATCH0","RscCombatMode","RscMenuReply","RscCallSupport","#CUSTOM_RADIO","#User:BIS_fnc_addCommMenuItem_menu","RscRadio","RscReply","#ACTION","RscMenuFormations","#WATCH","RscGroupRootMenu","RscMainMenu","RscMenuMove","RscWatchDir","RscWatchMoveDir","#User:BIS_Menu_GroupCommunication","RscMenuStatus","RscFormations"}; + menus[] = {"","RscSelectTeam","RscTeam","RscMenuTeam","RscMoveHigh","#GETIN","#RscStatus","#WATCH0","RscCombatMode","RscMenuReply","RscCallSupport","#CUSTOM_RADIO","#User:BIS_fnc_addCommMenuItem_menu","RscRadio","RscReply","#ACTION","RscMenuFormations","#WATCH","RscGroupRootMenu","RscMainMenu","RscMenuMove","RscWatchDir","RscWatchMoveDir","#User:BIS_Menu_GroupCommunication","RscMenuStatus","RscFormations"}; }; // RscDisplay (onload, unload) scanning is automatic and will ensure data matches the server. diff --git a/changelog.md b/changelog.md index ca1cae9b..11b2ad21 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,67 @@ # Change Log All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) are listed in this changelog. +## [1.2.0.0] - Unreleased +### Added +- Config in cfgepochclient.hpp to disable needed items for FireOn / BurnBarrelOff / Hook @He-Man +- Missing Config entry "immuneIfStartInBase" in epochconfig.hpp @G-Dog +- Radiation Suits to Loot, Pricing and Itemsort @He-Man +- Config to restrict tilting angle for Vectorbuilding to cfgEpochClient.hpp @He-Man +- Config to disable Fuelsources in PlotPole Range to epochconfig.hpp @He-Man +- Reworked Trader Menu @He-Man + - Secondary Weapon can now be sold directly from hand + - Attachments from sold weapons from hand will be put back into your Inventory + - Weapons in hand are now marked in menu as "in Hand" +- Solar Charger for EnergyPacks - Put an EnergyPack into the Charger and wait... @Helion4, @He-Man +- 4 Hoverboard Vehicles: @Helion4 + - "hoverboard_epoch_1" + - "hoverboard_epoch_bttf" + - "hoverboard_epoch_a3" + - "hoverboard_epoch_cargo" +- Mountainbike "MBK_01_EPOCH" @Helion4 +- Helicopter UH1H "uh1h_Epoch" @Helion4 +- BaseCam + BaseCam Terminal @Helion4, @He-Man + - Build Cams at your Base and watch them through the Terminal +- Wooden Stairs with lockable Bars on the top (upgradeable from Wooden Stairs) @Helion4 +- Wood and Metal Garage Doors as upgradeable Baseparts @Helion4, @He-Man +- 1/3 Plywood wall directly craftable @Helion4, @He-Man +- You can now wash yourself with a soap in your inventory at water sources (reduce Soiled) @Helion4, @He-Man +- 2 new masks (Thor Helmet "thor_mask_epoch" and Iron Man Mask "iron_mask_epoch") @Helion4 +- Search field in Admin spawn window (Admintool) @He-Man +### Fixed +- Mine Rocks / Chop Wood was only possible with Swords after 1.1.0 update. @He-Man +- Alive Toxic Sapper was not toxic @He-Man +- Binocular with "B" was not working, if you are using R3F or AdvSlingLoad @He-Man +- Models for Radiation Suits @Helion4 +- Traps were Indestructible by using indestructible "Constructions_static_F" @He-Man +- Hopefully less login issues on BaseSpawn @He-Man +- Kick by using Jet ejector seats @He-Man +- Wrong calculated Bullets in Traders @He-Man +- Locked Vehicles were unlocked after upgrade @He-Man +- Everybody was able to open Hatch on Windows / Doors on foreign Bases @He-Man +- Ban for "RscMenuTeam" commandmenu @He-Man +- Adjusted some SnapPoints for Basebuilding to be more accurate @He-Man +- Advanced Vehicle Repair was broken after last Arma Update (Tank DLC) @He-Man +- Added missing ItemWaterPurificationTablets to pricing @G-Dog +- MultiGun was not working on very large Vehicles (VTOL) @He-Man +- GoldenSeal will no longer disappear when fully grown in a Garden @He-Man +- Items in Subcontainers (Items in BackPacks in Containers) were not saved @He-Man +- Drunk effects were not working correctly @He-Man +- Model / Graphics fix for Cinder Floors @Helion4 +- Snapped Walls on Stairs sometimes were not fixed correctly @Helion4 +- Quadbike handling was a bit too slippery @Helion4 +### Changed +- Reworked Vehicle Load / Save commands for more precise Vehicle Spawn @He-Man +- Made Temp-Vehicles tradable (will not be stored in Trader after selling them) @He-Man +- Wood / Cinder Walls can now snap to each other @He-Man +- Energy from windsources / solarsources is now calculated by wind / overcast @He-Man +- Ammo of crafted Mags are calculated by the left ammo of used Mags (example: EnergyPacks) @He-Man +- Consumed EnergyPacks give only energy calculated by left ammo in the Pack @He-Man +- Moved server "EpochEvents" folder from epoch_server_settings.pbo to epoch_server_events.pbo @DirtySanchez, @vbawol +- Some script optimizations @vbawol +- Vehicle pricing adjustments "import tariffs" @vbawol +- Some now Icons for Dynamenu @Forelle Vierkant + ## [1.1.0.0] - 2018-03-15 ### Added - Plant Spawner: vehicle object for sunflower. @Helion4 @@ -9,15 +70,15 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a - Make Lighter refillable at Fuel-Sources (Gasstations / Vehicles) @He-Man - Make Trader more configurable in epochconfig.hpp @He-Man - Added Examples for Batchfiles to control Server Restarts @DirtySanchez -- default pops for "center" marker @AWOL -- More map supports @AWOL -- Lighter is needed to imflame fires @DirtySanchez +- default pops for "center" marker @vbawol +- More map supports @vbawol +- Lighter is needed to inflame fires @DirtySanchez - FireExtinguisher is needed to "put our fire" on Burn Barrel @DirtySanchez - Rope is needed for SlingLoad (get back on release) @DirtySanchez - R3F compatibility for SlingLoad @DirtySanchez - Hints while using Vehicle Repair (MultiGun) @He-Man - Config to completely disable Simulation for BaseParts (if not needed) @He-Man -- Made Radiation configureable by cfgepochclient.hpp @Raymix +- Made Radiation configurable by cfgepochclient.hpp @Raymix - Hints for lock / unlock Vehicles / Storages @He-Man - Nuisance multiplicator in cfgepochclient.hpp @He-Man - Reduce rads over time at cost of immunity @Raymix @@ -45,10 +106,10 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a - Garden Plot had no physical ground @Helion4 - Some Vehicles were missing in EPOCH Admin Spawn Menu @He-Man ### Changed -- RCon Port is now set to 2307 by default since changes in A3 1.78 prevent use of 2306. @AWOL +- RCon Port is now set to 2307 by default since changes in A3 1.78 prevent use of 2306. @vbawol - SnapPoints for Building objects (especially full / half / quarter Floors) @He-Man - Some performance tweaks -- Inventory will be opened automatically, if "you found something" @AWOL +- Inventory will be opened automatically, if "you found something" @vbawol - EPOCH Events reworked (Markers will change if players near / event looted) @DirtySanchez - Traders will no longer refill sold magazines @He-Man - Magazines will automatic be repacked in Trader