diff --git a/Changelogs/0.3.4.0.txt b/Changelogs/0.3.4.0.txt index d3996eb6..9715c158 100644 --- a/Changelogs/0.3.4.0.txt +++ b/Changelogs/0.3.4.0.txt @@ -1,5 +1,12 @@ Client: -[Fixed] Client fps lag when first joining the server. +[Added] New secure storage device: Safe +[Added] New crafting UI and system by Raymix. +[Added] Epoch variant of the unarmed Strider vehicle. (I_MRAP_03_EPOCH) +[Added] Melee weapons: a Broad Sword and Fishing Pole. +[Added] Halloween Clown mask. +[Fixed] Reduce client fps lag when first joining the server. +[Changed] Wolf/Pumpkin masks and Meeps Candy re-added to loot tables for Halloween. + Server: [Fixed] Error Generic error in expression in EPOCH_server_repairVehicle. diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index df38238c..964a36f6 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo index 7177a178..8aca1d44 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/@epochhive/epochconfig.hpp b/Server_Install_Pack/@epochhive/epochconfig.hpp index d29eff2a..833c433c 100644 --- a/Server_Install_Pack/@epochhive/epochconfig.hpp +++ b/Server_Install_Pack/@epochhive/epochconfig.hpp @@ -49,6 +49,7 @@ allowedVehiclesList[] = { {"B_Heli_Light_01_EPOCH",2}, {"B_SDV_01_EPOCH",2}, {"B_MRAP_01_EPOCH",3}, + {"I_MRAP_03_EPOCH", 3}, {"B_Truck_01_transport_EPOCH",1}, {"B_Truck_01_covered_EPOCH",2}, {"B_Truck_01_mover_EPOCH",1}, diff --git a/Server_Install_Pack/sc/battleye/addweaponcargo.txt b/Server_Install_Pack/sc/battleye/addweaponcargo.txt index 28e289e2..42f220e9 100644 --- a/Server_Install_Pack/sc/battleye/addweaponcargo.txt +++ b/Server_Install_Pack/sc/battleye/addweaponcargo.txt @@ -1 +1 @@ -5 "" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul)|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)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_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-6](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F" \ No newline at end of file +5 "" !="(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)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_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-6](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F" \ No newline at end of file diff --git a/Server_Install_Pack/sc/battleye/attachto.txt b/Server_Install_Pack/sc/battleye/attachto.txt index 7b8a46fd..bf710bae 100644 --- a/Server_Install_Pack/sc/battleye/attachto.txt +++ b/Server_Install_Pack/sc/battleye/attachto.txt @@ -1 +1 @@ -5 "" !WeaponHolderSimulated !Shot !"(LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F" +5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F" diff --git a/Server_Install_Pack/sc/battleye/createvehicle.txt b/Server_Install_Pack/sc/battleye/createvehicle.txt index 1c24404f..14f3f9cc 100644 --- a/Server_Install_Pack/sc/battleye/createvehicle.txt +++ b/Server_Install_Pack/sc/battleye/createvehicle.txt @@ -1,3 +1,3 @@ 5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F" -5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" +5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" 5 SeaGull diff --git a/Server_Install_Pack/sc/battleye/deleteVehicle.txt b/Server_Install_Pack/sc/battleye/deleteVehicle.txt index 7cbb5f5e..21e6ec2f 100644 --- a/Server_Install_Pack/sc/battleye/deleteVehicle.txt +++ b/Server_Install_Pack/sc/battleye/deleteVehicle.txt @@ -1 +1 @@ -1 "" !="Land_MPS_EPOCH" !="SapperHead_SIM_EPOCH" !="Epoch_Sapper_F" !="Epoch_Cloak_F" !="LockBox_EPOCH" !="Rabbit_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock)_random_EPOCH" !="LockBox_(Ghost|SIM)_EPOCH" !="CinderWallHalf_(Ghost|SIM)_EPOCH" !="CinderWall_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_(Ghost|SIM)_EPOCH" !="Foundation_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" +1 "" !="Land_MPS_EPOCH" !="SapperHead_SIM_EPOCH" !="Epoch_Sapper_F" !="Epoch_Cloak_F" !="(Safe|LockBox)_EPOCH" !="Rabbit_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock)_random_EPOCH" !="LockBox_(Ghost|SIM)_EPOCH" !="CinderWallHalf_(Ghost|SIM)_EPOCH" !="CinderWall_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_(Ghost|SIM)_EPOCH" !="Foundation_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" diff --git a/Server_Install_Pack/sc/battleye/setpos.txt b/Server_Install_Pack/sc/battleye/setpos.txt index 4e17bd97..25578000 100644 --- a/Server_Install_Pack/sc/battleye/setpos.txt +++ b/Server_Install_Pack/sc/battleye/setpos.txt @@ -1 +1 @@ -5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|StorageShelf|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" +5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" diff --git a/Sources/epoch_code/System/Construct_Brain.fsm b/Sources/epoch_code/System/Construct_Brain.fsm new file mode 100644 index 00000000..bfd54aca --- /dev/null +++ b/Sources/epoch_code/System/Construct_Brain.fsm @@ -0,0 +1,702 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"construct",0,250,-316.429199,-195.383255,-226.429291,-145.383362,0.000000,"construct"}; +item1[] = {"_",8,218,62.332706,-185.990021,114.284866,-157.584717,0.000000,""}; +item2[] = {"instinct",2,250,165.295456,-196.723892,255.295410,-146.723892,0.000000,"instinct"}; +item3[] = {"no_decision",4,218,366.525970,-123.699348,456.525940,-73.699387,10.000000,"no decision"}; +item4[] = {"action",2,250,164.446381,121.731827,254.446365,171.731903,0.000000,"action"}; +item5[] = {"dispose",4,218,37.004036,-291.823761,127.004257,-241.823792,90.000000,"dispose"}; +item6[] = {"_",8,218,182.964218,311.201538,234.916306,339.606750,0.000000,""}; +item7[] = {"reset_vars",2,250,-57.248745,-196.860123,32.751255,-146.860138,0.000000,"reset vars"}; +item8[] = {"_",8,218,-150.031967,-184.788101,-98.079796,-156.382797,0.000000,""}; +item9[] = {"complete",4,218,-57.972878,-94.263466,32.027390,-44.263451,100.000000,"complete"}; +item10[] = {"move",4,218,286.028778,192.150543,376.028778,242.150604,20.000000,"move"}; +item11[] = {"end",1,250,-241.719803,14.907898,-151.719772,64.907913,0.000000,"end"}; +item12[] = {"dispose",4,218,-59.072083,14.028580,30.927921,64.028580,95.000000,"dispose"}; +item13[] = {"do_move",2,250,286.331848,300.982452,376.331848,350.982452,0.000000,"do move"}; +item14[] = {"near_building",4,218,674.880554,-143.328430,764.880676,-93.328377,80.000000,"near building"}; +item15[] = {"instinct_done",4,218,165.528030,-96.910675,255.527969,-46.910683,100.000000,"instinct done"}; +item16[] = {"move",4,218,266.138367,-295.030945,356.138367,-245.030884,50.000000,"move"}; +item17[] = {"wait_action",4,218,373.527924,50.001488,463.527740,100.001457,110.000000,"wait action"}; +item18[] = {"checking_status",2,250,611.751343,-31.961807,701.751221,18.038223,0.000000,"checking status"}; +item19[] = {"see_target",4,4314,553.701416,-144.674866,643.701538,-94.674820,90.000000,"see target"}; +item20[] = {"checked",4,218,612.020508,61.020790,702.020386,111.020844,10.000000,"checked"}; +item21[] = {"done",4,218,476.283447,-31.286667,566.283386,18.713348,100.000000,"done"}; +item22[] = {"construct_smash",4,218,165.596268,-331.217682,255.596191,-281.217590,60.000000,"construct smash"}; +item23[] = {"return",2,250,360.850586,-30.593140,450.850647,19.406860,0.000000,"return"}; +item24[] = {"to_action",4,218,277.703308,21.529037,367.703308,71.529037,10.000000,"to action"}; +item25[] = {"to_instinct",4,218,287.631317,-100.089363,377.631317,-50.089355,5.000000,"to instinct"}; +item26[] = {"smash",4,218,-81.683311,146.820755,8.316697,196.820755,30.000000,"smash"}; +item27[] = {"interrupt",4,218,58.118843,-94.064064,148.118866,-44.064060,90.000000,"interrupt"}; +item28[] = {"construct_smash",2,250,-82.893753,370.386627,7.106274,420.386658,0.000000,"construct smash"}; +item29[] = {"wander",4,218,320.950836,-243.494019,410.950836,-193.494019,40.000000,"wander"}; +item30[] = {"wander",4,218,370.444092,167.573929,460.444061,217.573975,30.000000,"wander"}; +item31[] = {"do_wander",2,250,370.747131,376.849396,460.747131,426.849396,0.000000,"do wander"}; +item32[] = {"health_check",4,218,726.020203,-74.284813,816.020264,-24.284767,70.000000,"health check"}; +item33[] = {"____FAKE____",9,1320,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"}; +link0[] = {0,8}; +link1[] = {1,2}; +link2[] = {2,3}; +link3[] = {2,5}; +link4[] = {2,15}; +link5[] = {2,16}; +link6[] = {2,29}; +link7[] = {3,18}; +link8[] = {4,9}; +link9[] = {4,10}; +link10[] = {4,12}; +link11[] = {4,17}; +link12[] = {4,26}; +link13[] = {4,27}; +link14[] = {4,30}; +link15[] = {5,2}; +link16[] = {6,4}; +link17[] = {7,1}; +link18[] = {8,7}; +link19[] = {9,7}; +link20[] = {10,13}; +link21[] = {12,11}; +link22[] = {13,6}; +link23[] = {14,18}; +link24[] = {15,4}; +link25[] = {16,2}; +link26[] = {17,18}; +link27[] = {18,14}; +link28[] = {18,19}; +link29[] = {18,20}; +link30[] = {18,21}; +link31[] = {18,32}; +link32[] = {19,18}; +link33[] = {20,18}; +link34[] = {21,23}; +link35[] = {22,2}; +link36[] = {23,24}; +link37[] = {23,25}; +link38[] = {24,4}; +link39[] = {25,2}; +link40[] = {26,28}; +link41[] = {27,7}; +link42[] = {28,6}; +link43[] = {29,2}; +link44[] = {30,31}; +link45[] = {31,6}; +link46[] = {32,18}; +link47[] = {33,22}; +globals[] = {0.000000,0,0,0,16777215,640,480,1,169,6316128,1,73.118919,857.202637,468.231750,-240.399475,1008,911,1}; +window[] = {2,-1,-1,-1,-1,725,200,1225,200,3,1026}; +*//*%FSM*/ +class FSM +{ + fsmName = "construct"; + class States + { + /*%FSM*/ + class construct + { + name = "construct"; + init = /*%FSM*/"_construct = _this select 0;" \n + "_trgt = player;" \n + "" \n + "//_construct setBehaviour ""COMBAT"";" \n + "" \n + "_constructNames=[""Rocky"",""Miner"",""Plate""];" \n + "_constructName = _constructNames select (floor(random count _constructNames));" \n + "" \n + "_entsArr = [""Epoch_Male_F"",""Epoch_Female_F"",""Epoch_Sapper_F"",""Fin_random_EPOCH"",""Alsatian_Random_EPOCH"",""Epoch_cloak_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n + "_plyArr = [""Epoch_Male_F"",""Epoch_Female_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n + "_trgtArr = [""Epoch_Male_F"",""Epoch_Female_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n + "_vehArray = [""Car""];" \n + "_tRange = 20;" \n + "_sRange = 150;" \n + "_vRange = 50;" \n + "_maxTravelTime = 480;" \n + "_trgtZ = 0;" \n + "_t = diag_tickTime;" \n + "_u = _t;" \n + "" \n + "_dirTo = 0;" \n + "_lDist = 0;" \n + "_checkEntry = """";" \n + "" \n + "_constructPos=[0,0,0];" \n + "_trgtPos=[0,0,0];" \n + "_hidePos = [0,0,0];" \n + "_nrPlyrs = [];" \n + "" \n + "_nrBuild = nearestBuilding _construct;" \n + "_buildBash = false;" \n + "_doSmash = false;" \n + "_doWander = false;" \n + "" \n + "//Behaviour" \n + "_fearTrigger = 12;" \n + "_angerTrigger = 24;" \n + "_lAnger = 0;" \n + "_lFear = 0;" \n + "_lBrave = 0;" \n + "" \n + "//construct Vars" \n + "" \n + "_doMove = false;" \n + "_sanityCheckDone = false;" \n + "_canSee = false;" \n + "_nrTrgts = [];" \n + "" \n + "_sanityCheck = 0;" \n + "" \n + "" \n + "_doHide = false;" \n + "_doAttack = false;" \n + "_firedNear = 0;" \n + "" \n + "_lootVar = 0;" \n + "" \n + "" \n + "//DEBUG" \n + "_doDebug = false;" \n + "_count = 0;" \n + "_debugDo = ""INIT"";" \n + "_mkrName = """";" \n + "_dWait = 0;" \n + "_strDebug = """";" \n + "_constructFeels = ""STARTING"";" \n + "axeCount = 0;" \n + "_strMoveTo = """";" \n + "" \n + "" \n + "" \n + "" \n + "" \n + "" \n + "" \n + "" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class _ + { + priority = 0.000000; + to="reset_vars"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class instinct + { + name = "instinct"; + init = /*%FSM*/"_t = diag_tickTime;" \n + "" \n + "if(_doDebug)then{" \n + "systemChat format [""Instinct:%1 | D:%2 | M:%3 | S:%4"",diag_tickTime,_decisionMade,_doMove,_canSee];" \n + "};" \n + "" \n + "" \n + "" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class instinct_done + { + priority = 100.000000; + to="action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_decisionMade;"/*%FSM*/; + action=/*%FSM*/"_t = diag_tickTime;" \n + ""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class dispose + { + priority = 90.000000; + to="instinct"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((_trgt distance _construct) > (_sRange * 4)) || !(alive _construct);"/*%FSM*/; + action=/*%FSM*/"_doDispose = true;" \n + "_decisionMade = true;" \n + "_actionDone = false;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class move + { + priority = 50.000000; + to="instinct"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_canSee"/*%FSM*/; + action=/*%FSM*/"_doMove = true;" \n + "_decisionMade = true;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class wander + { + priority = 40.000000; + to="instinct"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!_canSee"/*%FSM*/; + action=/*%FSM*/"_doWander = true;" \n + "_decisionMade = true;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_decision + { + priority = 10.000000; + to="checking_status"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!_decisionMade && diag_tickTime - _t > 3;"/*%FSM*/; + action=/*%FSM*/"_checkEntry = ""instinct"";" \n + "_sanityCheck = 100;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class action + { + name = "action"; + init = /*%FSM*/"" \n + "" \n + "if(_doDebug)then{" \n + "systemChat format [""Action:%1 | %2"",diag_tickTime,_debugDo];" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class wait_action + { + priority = 110.000000; + to="checking_status"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"diag_tickTime > _u + 4;"/*%FSM*/; + action=/*%FSM*/"_checkEntry = ""action"";" \n + "_sanityCheck = 100;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class complete + { + priority = 100.000000; + to="reset_vars"; + precondition = /*%FSM*/"if(_doDebug)then{" \n + "" \n + "hint format [""CONSTRUCT\n%1\nMove:%2\nSmash:%3\nWait:%4"",_debugDo,_doMove,_doSmash,_sWait];" \n + "};"/*%FSM*/; + condition=/*%FSM*/"_actionDone && ((call compile _criteria) || (diag_tickTime > (_t + _sWait)));"/*%FSM*/; + action=/*%FSM*/"" \n + "if(!isNil ""_criteriaMetAction"")then{" \n + "call _criteriaMetAction;" \n + "};" \n + "" \n + "if(_doDebug)then{" \n + "hint format [""CONSTRUCT\n%1\nMove:%2\nSmash:%3\nWait:%4"",_debugDo,_doMove,_doSmash,_sWait];" \n + "systemChat format [""Complete:%1"",diag_tickTime];" \n + "};" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class dispose + { + priority = 95.000000; + to="end"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(_doDispose || !(alive _construct)) && (diag_tickTime - _t) > 120;"/*%FSM*/; + action=/*%FSM*/"if(_doDebug)then{" \n + "_debugDo = ""Dispose"";" \n + "hint format [""CONSTRUCT\n%1\nAlive: %2"",_debugDo, alive _construct];" \n + "};"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class interrupt + { + priority = 90.000000; + to="reset_vars"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(_allowInterrupt && (call compile _interruptReason));"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class smash + { + priority = 30.000000; + to="construct_smash"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_doSmash;"/*%FSM*/; + action=/*%FSM*/"_doSmash = false;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class wander + { + priority = 30.000000; + to="do_wander"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_doWander;"/*%FSM*/; + action=/*%FSM*/"_doWander = false;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class move + { + priority = 20.000000; + to="do_move"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_doMove;"/*%FSM*/; + action=/*%FSM*/"_doMove = false;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class reset_vars + { + name = "reset_vars"; + init = /*%FSM*/"//Default Vars" \n + "_rnd = 0;" \n + "_actionDone = false;" \n + "_decisionMade = false;" \n + "_sWait = 0;" \n + "_doDispose = false;" \n + "_chooseTarget = false;" \n + "_criteria = Nil;" \n + "_criteriaMet = false;" \n + "_allowInterrupt = false;" \n + "_interruptReason = ""(false)"";" \n + "" \n + "_moveTo = [0,0,0];" \n + "" \n + "//Brain Vars" \n + "_override = false;" \n + "_criteria =""(false)"";" \n + "_criteriaMetAction = nil;" \n + "" \n + "//Feeling Vars" \n + "_nrTrgts = [];" \n + "_isThreatened = false;" \n + "_isSafe = false;" \n + "_feelingDone = false;" \n + "" \n + "" \n + "//construct Vars" \n + "" \n + "" \n + "" \n + "" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class _ + { + priority = 0.000000; + to="instinct"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class end + { + name = "end"; + init = /*%FSM*/"deleteVehicle _construct;" \n + "" \n + "if(_doDebug)then{" \n + "axeDo = Format[""Dispose | Alive:%1 | Distance: %2"",alive _construct,player distance _construct];" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class do_move + { + name = "do_move"; + init = /*%FSM*/"_construct forceSpeed 5;" \n + "_constructPos = getPos _construct;" \n + "" \n + "_moveTo = getPos _trgt;" \n + "_construct doMove _moveTo;" \n + "" \n + "_sWait = ((_construct distance _moveTo) / 2) min 18;" \n + "_actionDone = true;" \n + "_t = diag_tickTime;" \n + "_criteria = ""((_construct distance _moveTo)< 6)"";" \n + "" \n + "" \n + "//Session Vars" \n + "" \n + "" \n + "if(_doDebug)then{" \n + "_debugDo = ""Move"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class _ + { + priority = 0.000000; + to="action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class checking_status + { + name = "checking_status"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class done + { + priority = 100.000000; + to="return"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_sanityCheck < 1;"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class see_target + { + priority = 90.000000; + to="checking_status"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_sanityCheck > 90;"/*%FSM*/; + action=/*%FSM*/"_canSee = false;" \n + "_nrTrgts = (getPosATL _construct) nearEntities [_trgtArr, _sRange];" \n + "if(count _nrTrgts >0)then{" \n + "{" \n + "if(alive _x)then{" \n + "if(!lineIntersects [aimPos _construct, aimPos _x, _construct, _x]) exitWith {_canSee = true;_trgt = _x};" \n + "};" \n + "}forEach _nrTrgts;" \n + "};" \n + "if(_doDebug)then{" \n + "systemChat format [""SEE:%1 | %2"",_canSee,_trgt];" \n + "};" \n + "_sanityCheck = 90;" \n + ""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class near_building + { + priority = 80.000000; + to="checking_status"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_sanityCheck > 80;"/*%FSM*/; + action=/*%FSM*/"_buildBash = false;" \n + "_nrBuild = nearestBuilding _construct;" \n + "" \n + "if((_nrBuild distance _construct)< 16)then{" \n + "_buildBash = true;" \n + "_nrBuild setdamage 1;" \n + "};" \n + "" \n + "" \n + "_sanityCheck = 80;" \n + ""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class health_check + { + priority = 70.000000; + to="checking_status"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_sanityCheck > 70;"/*%FSM*/; + action=/*%FSM*/"if(damage _construct > 0.4)then{" \n + "_construct setDamage 0;" \n + "};" \n + "" \n + "" \n + "_sanityCheck = 70;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class checked + { + priority = 10.000000; + to="checking_status"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_sanityCheck > 10;"/*%FSM*/; + action=/*%FSM*/"_sanityCheck = 0 ;" \n + "" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class return + { + name = "return"; + init = /*%FSM*/"" \n + "_u = diag_tickTime;" \n + "" \n + "if(_doDebug)then{" \n + "systemChat format [""RETURN:%1 | %2"",diag_tickTime,_checkEntry];" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class to_action + { + priority = 10.000000; + to="action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_checkEntry == ""action"";"/*%FSM*/; + action=/*%FSM*/"_checkEntry = """";" \n + ""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class to_instinct + { + priority = 5.000000; + to="instinct"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_checkEntry == ""instinct"";"/*%FSM*/; + action=/*%FSM*/"_checkEntry = """";" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class construct_smash + { + name = "construct_smash"; + init = /*%FSM*/"_nrBuild setdamage 1;" \n + "" \n + "" \n + "" \n + "_sWait = 1.5;" \n + "_actionDone = true;" \n + "_t = diag_tickTime;" \n + "_criteria = ""(false)"";" \n + "" \n + "" \n + "if(_doDebug)then{" \n + "_debugDo = format[""Smash | Dir:%1"",_nrBuild];" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class _ + { + priority = 0.000000; + to="action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class do_wander + { + name = "do_wander"; + init = /*%FSM*/"_constructPos = getPos _construct;" \n + "_constructMoveTo = [_constructPos,18,80,5,0,5,0] call BIS_fnc_findSafePos;" \n + "_construct doMove _constructMoveTo;" \n + "_construct forceSpeed 3;" \n + "" \n + "_sWait = ((_construct distance _moveTo) / 2) min 18;" \n + "_actionDone = true;" \n + "_t = diag_tickTime;" \n + "_criteria = ""((_construct distance _moveTo)< 6)"";" \n + "" \n + "" \n + "//Session Vars" \n + "" \n + "" \n + "if(_doDebug)then{" \n + "_debugDo = ""Wander"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class _ + { + priority = 0.000000; + to="action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ____FAKE____ + { + name = "____FAKE____"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class construct_smash + { + priority = 60.000000; + to="instinct"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_buildBash;"/*%FSM*/; + action=/*%FSM*/"_doSmash = true;" \n + "_decisionMade = true;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="construct"; + finalStates[] = + { + "end" + }; +}; +/*%FSM*/ diff --git a/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf b/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf index 3a40ac67..9518347b 100644 --- a/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf +++ b/Sources/epoch_code/compile/EPOCH_UnisexCheck.sqf @@ -72,12 +72,12 @@ if (_class in ["Hatchet","CrudeHatchet"]) then { player addMagazine "Hatchet_swing"; }; }; -if (_class in ["MeleeSledge", "MeleeMaul"]) then { +if (_class in ["MeleeSledge","MeleeMaul","MeleeSword"]) then { if !("sledge_swing" in _mags) then { player addMagazine "sledge_swing"; }; }; -if (_class in ["WoodClub","Plunger"]) then { +if (_class in ["WoodClub","Plunger","MeleeRod"]) then { if !("stick_swing" in _mags) then { player addMagazine "stick_swing"; }; diff --git a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf index 7e2fa037..b9b73f87 100644 --- a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf +++ b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf @@ -96,7 +96,7 @@ switch _interactOption do { _isOk = if (_isStorage == 1) then { EPOCH_StorageSlotsCount > 0 } else { EPOCH_BuildingSlotCount > 0 }; - if (_buildClass == "LockBox_SIM_EPOCH") then { + if (_buildClass isKindOf "Secure_Storage_Temp") then { _isOk = (EPOCH_StorageSlotsCount > 0 && EPOCH_BuildingSlotCount > 0); }; if (isNil "EPOCH_simulSwap_Lock") then { diff --git a/Sources/epoch_config/Configs/CfgMagazines.hpp b/Sources/epoch_config/Configs/CfgMagazines.hpp index 8e82d7b8..5f7d2c29 100644 --- a/Sources/epoch_config/Configs/CfgMagazines.hpp +++ b/Sources/epoch_config/Configs/CfgMagazines.hpp @@ -58,6 +58,22 @@ class CfgMagazines interactText = "BUILD"; buildClass = "LockBox_SIM_EPOCH"; }; + class ItemSafe : CA_Magazine + { + scope = 2; + count = 1; + type = 256; + displayName = "Safe"; + model = "\x\addons\a3_epoch_assets_1\models\safe_onside.p3d"; + picture = "\x\addons\a3_epoch_assets_1\pictures\equip_safe_CA.paa"; + descriptionShort = "Secure Safe"; + mass = 50; + interactAction = 3; + interactText = "BUILD"; + buildClass = "Safe_SIM_EPOCH"; + }; + + class PartPlankPack: CA_Magazine { scope = 2; diff --git a/Sources/epoch_config/Configs/CfgPricing.hpp b/Sources/epoch_config/Configs/CfgPricing.hpp index 34396ca6..abb2bf0d 100644 --- a/Sources/epoch_config/Configs/CfgPricing.hpp +++ b/Sources/epoch_config/Configs/CfgPricing.hpp @@ -5,6 +5,7 @@ class CfgPricing class ItemCoolerE {price = 50;}; class JackKit {price = 25;}; class ItemLockbox {price = 250; tax = 0.5;}; + class ItemSafe { price = 1250; tax = 0.5; }; class ItemCompass {price = 3;}; class ItemGPS {price = 20;}; @@ -632,6 +633,7 @@ class CfgPricing class H_104_EPOCH {price = 3;}; class wolf_mask_epoch {price = 30;}; class pkin_mask_epoch {price = 30;}; + class clown_mask_epoch {price = 30;}; class C_Offroad_01_EPOCH {price = 750;}; class C_Quadbike_01_EPOCH {price = 500;}; @@ -650,6 +652,7 @@ class CfgPricing class B_Heli_Light_01_EPOCH {price = 2500;}; class B_SDV_01_EPOCH {price = 1000;}; class B_MRAP_01_EPOCH {price = 2500;}; + class I_MRAP_03_EPOCH { price = 2500; }; class B_G_Offroad_01_armed_EPOCH {price = 2500;}; class B_Truck_01_transport_EPOCH {price = 1000;}; class B_Truck_01_covered_EPOCH {price = 1000;}; diff --git a/Sources/epoch_config/Configs/CfgVehicles.hpp b/Sources/epoch_config/Configs/CfgVehicles.hpp index b129e05e..a46608fb 100644 --- a/Sources/epoch_config/Configs/CfgVehicles.hpp +++ b/Sources/epoch_config/Configs/CfgVehicles.hpp @@ -1927,6 +1927,21 @@ class CfgVehicles class TransportItems{}; class Eventhandlers{}; }; + + class I_MRAP_03_F; + class I_MRAP_03_EPOCH : I_MRAP_03_F + { + scope = 2; + crew = ""; + side = 3; + armor = 75; + faction = "CIV_F"; + maximumLoad = 3500; + typicalCargo[] = {}; + class TransportItems{}; + class Eventhandlers{}; + }; + class B_Truck_01_transport_F; class B_Truck_01_transport_EPOCH: B_Truck_01_transport_F { @@ -2339,8 +2354,8 @@ class CfgVehicles model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\Sapper_corpse.p3d"; displayName = "Sapper Corpse"; }; - - class LockBox_SIM_EPOCH : Constructions_modular_F + class Secure_Storage_Temp : Constructions_modular_F {}; + class LockBox_SIM_EPOCH : Secure_Storage_Temp { scope = 2; model = "\x\addons\a3_epoch_assets_1\models\lockbox.p3d"; @@ -2351,6 +2366,17 @@ class CfgVehicles limitNearby = 2; bypassJammer = 1; }; + class Safe_SIM_EPOCH : Secure_Storage_Temp + { + scope = 2; + model = "\x\addons\a3_epoch_assets_1\models\safe.p3d"; + displayName = "Safe"; + simulClass = "Safe_SIM_EPOCH"; + staticClass = "Safe_EPOCH"; + GhostPreview = "Safe_EPOCH"; + limitNearby = 2; + bypassJammer = 1; + }; class Fireplace_SIM_EPOCH : Constructions_modular_F { scope = 2; @@ -3560,6 +3586,46 @@ class CfgVehicles armor = 5000; bypassJammer = 1; limitNearby = 2; + isSecureStorage = 1; + returnOnPack[] = { { "ItemLockbox", 1 } }; + class UserActions + { + class Unlock + { + displayName = "Unlock"; + onlyforplayer = 1; + position = "Door_knopf"; + radius = 3; + condition = "this getVariable [""EPOCH_Locked"",true]"; + statement = "EPOCH_lockStorage_PVS = [this,false,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS"";"; + }; + class Pack + { + displayName = "Pack"; + onlyforplayer = 1; + position = "Door_knopf"; + radius = 3; + condition = "this getVariable [""EPOCH_Locked"",true]"; + statement = "EPOCH_packStorage_PVS = [this,player,Epoch_personalToken]; publicVariableServer ""EPOCH_packStorage_PVS"";"; + }; + }; + }; + + + class Safe_EPOCH : Constructions_lockedstatic_F + { + scope = 2; + model = "\x\addons\a3_epoch_assets_1\models\safe.p3d"; + displayName = "Lockbox"; + simulClass = "Safe_SIM_EPOCH"; + staticClass = "Safe_EPOCH"; + weaponHolderProxy = "SafeProxy_EPOCH"; + GhostPreview = "Safe_EPOCH"; + armor = 15000; + bypassJammer = 1; + limitNearby = 2; + isSecureStorage = 1; + returnOnPack[] = { { "ItemSafe", 1 } }; class UserActions { class Unlock @@ -4866,7 +4932,8 @@ class CfgVehicles }; }; - class LockBoxProxy_EPOCH : WeaponHolder + class Secure_Storage_Proxy : WeaponHolder {}; + class LockBoxProxy_EPOCH : Secure_Storage_Proxy { scope = 2; model = "\A3\Weapons_f\dummyweapon.p3d"; @@ -4875,6 +4942,32 @@ class CfgVehicles showWeaponCargo = 0; forceSupply = 0; maximumLoad = 600; + isSecureStorage = 1; + + class UserActions + { + class Lock + { + displayName = "Lock"; + onlyforplayer = 1; + position = "Door_knopf"; + radius = 3; + condition = "this == this"; + statement = "EPOCH_lockStorage_PVS = [this,true,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS"";"; + }; + }; + }; + + class SafeProxy_EPOCH : Secure_Storage_Proxy + { + scope = 2; + model = "\A3\Weapons_f\dummyweapon.p3d"; + displayName = "Safe WH"; + isGround = 0; + showWeaponCargo = 0; + forceSupply = 0; + maximumLoad = 3600; + isSecureStorage = 1; class UserActions { diff --git a/Sources/epoch_config/Configs/CfgWeapons.hpp b/Sources/epoch_config/Configs/CfgWeapons.hpp index 5d348a33..c3014009 100644 --- a/Sources/epoch_config/Configs/CfgWeapons.hpp +++ b/Sources/epoch_config/Configs/CfgWeapons.hpp @@ -1116,7 +1116,7 @@ class CfgWeapons scope = 2; weaponPoolAvailable = 1; displayName = "Clown Mask"; - picture = "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\gear_wolfmask_x_ca.paa"; + picture = "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\gear_clownmask_ca.paa"; model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\clown.p3d"; class ItemInfo : HeadgearItem { @@ -2217,6 +2217,24 @@ class CfgWeapons descriptionShort = "Sledge Hammer"; }; + class MeleeSword : MeleeWeapon + { + scope = 2; + type = 4; + primary = 0; + reloadAction = "ReloadRPG"; + autoreload = 1; + magazineReloadTime = 0; + model = "\x\addons\a3_epoch_assets_3\CfgWeapons\sword_weaponized.p3d"; + //TODO ICON + picture = "\x\addons\a3_epoch_assets\textures\Sledge\equip_sledge_CA.paa"; + displayName = "Sword"; + magazines[] = { "sledge_swing" }; + handAnim[] = { "OFP2_ManSkeleton", "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\Sledge_hold.rtm" }; + descriptionShort = "Sword"; + + }; + class MeleeMaul : MeleeWeapon { scope = 2; @@ -2248,6 +2266,22 @@ class CfgWeapons handAnim[] = { "OFP2_ManSkeleton", "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\Sledge_hold.rtm" }; descriptionShort = "Wood Club"; }; + class MeleeRod : MeleeWeapon + { + scope = 2; + type = 4; + primary = 0; + reloadAction = "ReloadRPG"; + autoreload = 1; + magazineReloadTime = 0; + model = "\x\addons\a3_epoch_assets_3\CfgWeapons\fishingpole_weaponized.p3d"; + // TODO + picture = "\x\addons\a3_epoch_assets\textures\improv_weapon\gear_stick_ca.paa"; + displayName = "Fishing Rod"; + magazines[] = { "stick_swing" }; + handAnim[] = { "OFP2_ManSkeleton", "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\Sledge_hold.rtm" }; + descriptionShort = "Fishing Rod"; + }; class Plunger : MeleeWeapon { scope = 2; 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 4c0d2d5e..65c85fdd 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf @@ -82,7 +82,8 @@ for "_i" from 0 to _this do { _marker setMarkerColor "ColorBlue"; }; }; - if (_class == "LockBox_EPOCH") then { + + if (_class isKindOf 'Constructions_lockedstatic_F') then{ if ((_location select 2) < 0) then { _location set [2, 0]; _baseObj setposATL _location; 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 872806b2..7b7e7fc7 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf @@ -85,12 +85,11 @@ if (isText _config) then { _newVehicle setVariable["BUILD_OWNER", _plyrUID, true]; _slot = "-1"; - // TODO change to config based classes - if (_oemType == "LockBox_SIM_EPOCH") then { + if (getNumber(configFile >> "CfgVehicles" >> _staticClass >> "isSecureStorage") == 1) then{ //diag_log format["building lockbox %1", _oemType]; - _buildClass = "LockBoxProxy_EPOCH"; + _buildClass = getText(configFile >> "CfgVehicles" >> _staticClass >> "weaponHolderProxy"); if (!isNull _newVehicle) then { @@ -99,32 +98,34 @@ if (isText _config) then { if !(EPOCH_StorageSlots isEqualTo []) then { //diag_log format["building lockbox findslot %1", _newVehicle]; + if (_buildClass != "") then{ - // TODO need some sanity checks here - _storageObj = createVehicle[_buildClass, _vehiclePos, [], 0.0, "CAN_COLLIDE"]; + // TODO need some sanity checks here + _storageObj = createVehicle[_buildClass, _vehiclePos, [], 0.0, "CAN_COLLIDE"]; - _slot = EPOCH_StorageSlots select 0; - EPOCH_StorageSlots = EPOCH_StorageSlots - [_slot]; + _slot = EPOCH_StorageSlots select 0; + EPOCH_StorageSlots = EPOCH_StorageSlots - [_slot]; - //diag_log format["building lockbox found slot %1", _slot]; + //diag_log format["building lockbox found slot %1", _slot]; - missionNamespace setVariable[format["EPOCH_STORAGE_%1", _slot], _storageObj]; + missionNamespace setVariable[format["EPOCH_STORAGE_%1", _slot], _storageObj]; - _newVehicle setVariable["EPOCH_secureStorage", _slot]; - _newVehicle setVariable["EPOCH_Locked", false, true]; + _newVehicle setVariable["EPOCH_secureStorage", _slot]; + _newVehicle setVariable["EPOCH_Locked", false, true]; - _storageObj setVariable["STORAGE_OWNERS", [_plyrUID]]; - _storageObj setVariable["EPOCH_secStorParent", _objSlot]; - _storageObj setVariable["STORAGE_SLOT", _slot, true]; + _storageObj setVariable["STORAGE_OWNERS", [_plyrUID]]; + _storageObj setVariable["EPOCH_secStorParent", _objSlot]; + _storageObj setVariable["STORAGE_SLOT", _slot, true]; - _storageObj call EPOCH_server_save_storage; + _storageObj call EPOCH_server_save_storage; - _storageObj call EPOCH_server_storageInit; + _storageObj call EPOCH_server_storageInit; - diag_log format["STORAGE: %1 created storage %2 at %3", _plyrUID, _buildClass, _pos]; + diag_log format["STORAGE: %1 created storage %2 at %3", _plyrUID, _buildClass, _pos]; - EPOCH_StorageSlotsCount = count EPOCH_StorageSlots; - publicVariable "EPOCH_StorageSlotsCount"; + EPOCH_StorageSlotsCount = count EPOCH_StorageSlots; + publicVariable "EPOCH_StorageSlotsCount"; + }; }; }; }; 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 396fcb77..83abc489 100644 --- a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf +++ b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf @@ -185,9 +185,9 @@ if (_slot != -1) then { }; }; // select available slot - _slot = EPOCH_VehicleSlots select 0; + _vehslot = EPOCH_VehicleSlots select 0; // Remove from available slots - EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot]; + EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_vehslot]; EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots; publicVariable "EPOCH_VehicleSlotCount"; @@ -203,7 +203,7 @@ if (_slot != -1) then { _lockOwner = _plyrGroup; }; - _vehObj = [_item,_position,random 360,true,_slot,_lockOwner,"NONE",false] call EPOCH_fnc_spawn_vehicle; + _vehObj = [_item,_position,random 360,true,_vehslot,_lockOwner,"NONE",false] call EPOCH_fnc_spawn_vehicle; _returnOut pushBack _item; 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 193171d0..eba369a8 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf @@ -76,9 +76,7 @@ for "_i" from 1 to _this do { if (count _arr >= 6) then { _vehicle setVariable ["STORAGE_OWNERS", _arr select 5]; - - if (_class == "LockBoxProxy_EPOCH") then { - + if (_class isKindOf 'Secure_Storage_Proxy') then{ if ((_arr select 6) != -1) then { _vehicle setVariable ["EPOCH_secStorParent", _arr select 6]; _location set [2, -10]; 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 03abc776..dabf1199 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf @@ -29,7 +29,7 @@ for "_i" from 1 to _this do { _class = _arr select 0; _worldspace = _arr select 1; _damage = _arr select 2; - + if (_class != "" && _damage < 1) then { _location = _worldspace deleteAt 0; @@ -41,7 +41,7 @@ for "_i" from 1 to _this do { }; EPOCH_VehicleSlots deleteAt _vehicleSlotIndex; - + // temp for changes in class names _found = ["O_Heli_Transport_04_F","O_Heli_Transport_04_bench_F","O_Heli_Transport_04_box_F","O_Heli_Transport_04_covered_F","B_Heli_Transport_03_unarmed_F","O_Truck_03_covered_F"] find _class; if (_found != -1) then { @@ -49,13 +49,13 @@ for "_i" from 1 to _this do { }; _vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"]; - - + _allVehicles pushBack _vehicle; _vehicle call EPOCH_server_setVToken; _vehicle setposATL _location; + _vehicle setVectorDirAndUp _worldspace; _vehicle setDamage _damage; @@ -80,7 +80,7 @@ for "_i" from 1 to _this do { }; _vehicle setFuel (_arr select 4); - + _vehicle call EPOCH_server_vehicleInit; _config = configFile >> "CfgVehicles" >> _class >> "availableColors"; @@ -129,7 +129,7 @@ for "_i" from 1 to _this do { case 0: { if (typeName _x == "ARRAY") then { if ((count _x) >= 4) then { - + _vehicle addWeaponCargoGlobal[_x deleteAt 0, 1]; _attachments = []; @@ -150,7 +150,7 @@ for "_i" from 1 to _this do { }; } forEach _x; - // add all attachments to vehicle + // add all attachments to vehicle // TODO replace with adding attachments directly to gun (Arma feature dependant) { _vehicle addItemCargoGlobal[_x, 1]; @@ -161,7 +161,7 @@ for "_i" from 1 to _this do { _vehicle addMagazineAmmoCargo[_wMagsArray select 0, 1, _wMagsArray select 1]; }; }; - + }; }; }; @@ -229,8 +229,8 @@ for "_i" from 1 to _this do { _vehicle enableSimulationGlobal false; }; - - + + }; }; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf index ac9d0793..aed926e7 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf @@ -7,7 +7,7 @@ if (isNull _unit) exitWith{}; if (_plyr distance _unit > 20) exitWith{}; _type = typeOf _unit; -if (_type in ["LockBox_EPOCH","LockBoxProxy_EPOCH"]) then { +if (getNumber(configFile >> "CfgVehicles" >> _type >> "isSecureStorage") == 1) then{ _parentID = _unit getVariable ["EPOCH_secureStorage", "-1"]; _weaponHolder = missionNamespace getVariable [format ["EPOCH_STORAGE_%1",_parentID], objNull]; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packStorage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packStorage.sqf index abd54dcb..cd5f9e5f 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packStorage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packStorage.sqf @@ -5,7 +5,8 @@ if !([_plyr, _this select 2] call EPOCH_server_getPToken) exitWith{}; if (isNull _unit) exitWith{}; if (_plyr distance _unit > 20) exitWith{}; -if (typeOf _unit == "LockBox_EPOCH") then { +_class = typeOf _unit; +if (_class isKindOf 'Constructions_lockedstatic_F') then{ _parentID = _unit getVariable["EPOCH_secureStorage", "-1"]; _weaponHolder = missionNamespace getVariable[format["EPOCH_STORAGE_%1", _parentID], objNull]; if (!isNull _weaponHolder) then { @@ -40,7 +41,11 @@ if (typeOf _unit == "LockBox_EPOCH") then { _gwh = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"]; _gwh setPosATL _posWH; - _gwh addMagazineCargoGlobal["ItemLockbox", 1]; + + _returnItems = getArray(configFile >> "CfgVehicles" >> _class >> "returnOnPack"); + { + _gwh addMagazineCargoGlobal _x; + } forEach _returnItems; { _objType = _forEachIndex; diff --git a/Sources/epoch_server/init/server_securityfunctions.sqf b/Sources/epoch_server/init/server_securityfunctions.sqf index c5c328ad..3e4a4553 100644 --- a/Sources/epoch_server/init/server_securityfunctions.sqf +++ b/Sources/epoch_server/init/server_securityfunctions.sqf @@ -1108,7 +1108,7 @@ call compile ("'"+_skn_doAdminRequest+"' addPublicVariableEventHandler { if ((_content isKindOf 'LandVehicle') || (_content isKindOf 'Air') || (_content isKindOf 'Ship') || (_content isKindOf 'Tank')) then { [_content, _admin] call EPOCH_server_save_killedVehicle; } else { - if (typeOf _content in ['LockBoxProxy_EPOCH'] || (_content isKindOf 'Buildable_Storage')) then { + if (_content isKindOf 'Secure_Storage_Proxy' || (_content isKindOf 'Buildable_Storage')) then{ [_content, _admin] call EPOCH_server_save_killedStorage; } else { [_content, _admin] call EPOCH_server_save_killedBuilding; @@ -2077,7 +2077,7 @@ _skn_admincode = compileFinal (" }forEach _attachments; }; if (_this == 70) then { - _headgear = ['wolf_mask_epoch','pkin_mask_epoch']; + _headgear = ['wolf_mask_epoch','pkin_mask_epoch','clown_mask_epoch']; for '_h' from 1 to 104 do { _headgear pushBack format['H_%1_EPOCH',_h]; diff --git a/Sources/epoch_server/init/server_variables.sqf b/Sources/epoch_server/init/server_variables.sqf index fc0cb476..0fded8cd 100644 --- a/Sources/epoch_server/init/server_variables.sqf +++ b/Sources/epoch_server/init/server_variables.sqf @@ -45,6 +45,7 @@ _configArray = [ ["B_Heli_Light_01_EPOCH", 2], ["B_SDV_01_EPOCH", 2], ["B_MRAP_01_EPOCH", 3], + ["I_MRAP_03_EPOCH", 3], ["B_Truck_01_transport_EPOCH", 1], ["B_Truck_01_covered_EPOCH", 2], ["B_Truck_01_mover_EPOCH", 1], diff --git a/Sources/epoch_server/system/server_monitor.fsm b/Sources/epoch_server/system/server_monitor.fsm index 6750545d..812de4dc 100644 --- a/Sources/epoch_server/system/server_monitor.fsm +++ b/Sources/epoch_server/system/server_monitor.fsm @@ -1,7 +1,7 @@ /*%FSM*/ /*%FSM*/ /* -item0[] = {"Init",0,250,600.000000,-575.000000,700.000000,-525.000000,0.000000,"Init"}; +item0[] = {"Init",0,4346,600.000000,-575.000000,700.000000,-525.000000,0.000000,"Init"}; item1[] = {"_",8,218,600.000000,-500.000000,700.000000,-450.000000,0.000000,""}; item2[] = {"Process",2,250,600.000000,-350.000000,700.000000,-300.000000,0.000000,"Process"}; item3[] = {"De_simulate_Vehicle",4,218,750.000000,-225.000000,850.000000,-175.000000,2.000000,"De-simulate" \n "Vehicle Check"}; @@ -33,8 +33,8 @@ link16[] = {8,2}; link17[] = {9,2}; link18[] = {10,2}; link19[] = {11,2}; -globals[] = {25.000000,1,0,0,0,640,480,1,2,6316128,1,323.926788,885.320923,-53.358742,-574.484070,948,880,1}; -window[] = {2,-1,-1,-1,-1,968,208,1646,208,3,966}; +globals[] = {25.000000,1,0,0,0,640,480,1,2,6316128,1,323.926788,885.320923,-295.501770,-668.580139,948,630,1}; +window[] = {2,-1,-1,-1,-1,942,182,1474,182,3,966}; *//*%FSM*/ class FSM { @@ -126,7 +126,9 @@ class FSM " _list = _this nearEntities[[""Epoch_Male_F"", ""Epoch_Female_F"", ""LandVehicle"", ""Ship"", ""Air"", ""Tank""], 45];" \n " if ({ isPlayer _x }count _list == 0) then {" \n " _this setVariable [""LAST_CHECK"",nil];" \n + " diag_log format[""DEBUG: _cleanIT del %1"", _this];" \n " deleteVehicle _this;" \n + "" \n " };" \n " };" \n " };" \n @@ -147,6 +149,7 @@ class FSM " deleteVehicle _x;" \n " }forEach nearestObjects[_this, [""WeaponHolder""], 2];" \n " _this setVariable [""LAST_CHECK"",nil];" \n + " diag_log format[""DEBUG: _cleanIT2 del %1"", _this];" \n " deleteVehicle _this;" \n " _removed = true;" \n " };" \n @@ -325,6 +328,7 @@ class FSM " _activeVehicles pushBack _x;" \n " };" \n " } else {" \n + " diag_log format[""DEBUG: vtoken del %1"",_x];" \n " deleteVehicle _x;" \n " };" \n " };" \n diff --git a/Sources/epoch_server_settings/configs/loots.h b/Sources/epoch_server_settings/configs/loots.h index c1eaf492..86080332 100644 --- a/Sources/epoch_server_settings/configs/loots.h +++ b/Sources/epoch_server_settings/configs/loots.h @@ -790,7 +790,9 @@ class CfgLootTable { { "scam_epoch", "magazine" }, 15 }, { { "sweetcorn_epoch", "magazine" }, 15 }, { { "FoodSnooter", "magazine" }, 9 }, - { { "TacticalBacon", "magazine" }, 5 } + { { "TacticalBacon", "magazine" }, 5 }, + { { "FoodMeeps", "magazine" }, 1 } + }; }; @@ -831,25 +833,28 @@ class CfgLootTable class GenericLarge { items[] = { - { { "MortarBucket", "magazine" }, 17 }, + { { "MortarBucket", "magazine" }, 16 }, { { "CinderBlocks", "magazine" }, 17 }, { { "VehicleRepair", "magazine" }, 17 }, { { "CircuitParts", "magazine" }, 17 }, { { "ItemCorrugated", "magazine" }, 17 }, { { "ItemSolar", "magazine" }, 5 }, { { "ItemBattery", "magazine" }, 5 }, - { { "ItemCables", "magazine" }, 5 } + { { "ItemCables", "magazine" }, 5 }, + { { "ItemSafe", "magazine" }, 1 } + }; }; class GenericAuto { items[] = { + { { "ItemSafe", "magazine" }, 1 }, { { "ItemLockbox", "magazine" }, 4 }, { { "jerrycan_epoch", "magazine" }, 5 }, { { "CircuitParts", "magazine" }, 6 }, { { "MortarBucket", "magazine" }, 9 }, - { { "VehicleRepair", "magazine" }, 11 }, + { { "VehicleRepair", "magazine" }, 10 }, { { "ItemCorrugated", "magazine" }, 11 }, { { "CinderBlocks", "magazine" }, 12 }, { { "JackKit", "magazine" }, 9 }, @@ -1148,10 +1153,12 @@ class CfgLootTable class Tools { items[] = { - { { "Hatchet", "weapon" }, 65 }, + { { "Hatchet", "weapon" }, 62 }, { { "MeleeSledge", "weapon" }, 20 }, { { "ChainSaw", "weapon" }, 10 }, { { "Plunger", "weapon" }, 4 }, + { { "MeleeSword", "weapon" }, 1 }, + { { "MeleeRod", "weapon" }, 2 }, { { "lighter_epoch", "magazine" }, 1 } }; }; @@ -1358,7 +1365,8 @@ class CfgLootTable { { "KitFirePlace", "magazine" }, 8 }, { { "KitCinderWall", "magazine" }, 5 }, { { "KitFoundation", "magazine" }, 5 }, - { { "KitWoodFoundation", "magazine" }, 14 } + { { "KitWoodFoundation", "magazine" }, 14 }, + { { "ItemSafe", "magazine" }, 1 } }; }; @@ -1369,8 +1377,9 @@ class CfgLootTable { { "Sodas", "CfgLootTable" }, 6 }, { { "CanFood", "CfgLootTable" }, 8 }, { { "BaseBuilding", "CfgLootTable" }, 20 }, - { { "GenericLarge", "CfgLootTable" }, 25 }, + { { "GenericLarge", "CfgLootTable" }, 24 }, { { "ItemLockbox", "magazine" }, 4 }, + { { "ItemSafe", "magazine" }, 1 }, { { "Generic", "CfgLootTable" }, 10 }, { { "Tools", "CfgLootTable" }, 19 } }; @@ -1834,9 +1843,11 @@ class CfgLootTable { { "H_90_EPOCH", "item" }, 1 }, { { "H_91_EPOCH", "item" }, 1 }, { { "H_92_EPOCH", "item" }, 1 }, - { { "H_104_EPOCH", "item" }, 1 } - // { { "wolf_mask_epoch", "item" }, 1 }, - // { { "pkin_mask_epoch", "item" }, 1 } + { { "H_104_EPOCH", "item" }, 1 }, + { { "wolf_mask_epoch", "item" }, 1 }, + { { "pkin_mask_epoch", "item" }, 1 }, + { { "clown_mask_epoch", "item" }, 1 } + }; }; };