From c2b16f0828bbceaa5d3f0892e9a264cf0f84bbcd Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 25 Aug 2016 15:38:27 -0400 Subject: [PATCH] Consolidate DZE_ActionInProgress and r_action_count to one variable There is no point in having two variables for the same purpose. It is also pointless to keep an action count tally like r_action_count was doing, since it is only ever checked for being 0 or 1. Any count higher or lower than that is irrelevant. I will make this change in vanilla too. --- Documents/1.0.6 Variable Name Changes.txt | 2 + .../Configs/CfgMagazines/DZE/Misc.hpp | 82 +++++++++---------- .../Configs/CfgMagazines/Items/BearTrap.hpp | 2 +- .../Configs/CfgMagazines/Items/CamoNet.hpp | 4 +- .../Configs/CfgMagazines/Items/Generator.hpp | 2 +- .../Configs/CfgMagazines/Items/Sandbag.hpp | 18 ++-- .../Configs/CfgMagazines/Items/TankTrap.hpp | 2 +- .../Configs/CfgMagazines/Items/Tent.hpp | 14 ++-- .../Configs/CfgMagazines/Items/TripWire.hpp | 2 +- .../Configs/CfgMagazines/Items/WireFence.hpp | 2 +- .../Configs/CfgMagazines/Items/Wood.hpp | 6 +- .../Configs/CfgMagazines/Items/Workbench.hpp | 2 +- .../CfgMagazines/Magazines/Magazines.hpp | 2 +- .../Configs/CfgMagazines/Throwable.hpp | 8 +- .../Configs/CfgWeapons/Melee/Crowbar.hpp | 2 +- .../Configs/CfgWeapons/Melee/Hatchet.hpp | 2 +- .../Configs/CfgWeapons/Melee/Machete.hpp | 2 +- .../CfgWeapons/Melee/MeleeSledgehammer.hpp | 2 +- .../Configs/CfgWeapons/Tools/Etool.hpp | 4 +- .../Configs/CfgWeapons/Tools/Shovel.hpp | 4 +- .../actions/AdvancedTrading/init.sqf | 2 +- SQF/dayz_code/actions/boil.sqf | 6 +- SQF/dayz_code/actions/cook.sqf | 6 +- SQF/dayz_code/actions/fill_nearestVehicle.sqf | 6 +- SQF/dayz_code/actions/fill_startGenerator.sqf | 6 +- SQF/dayz_code/actions/gather_meat.sqf | 10 +-- SQF/dayz_code/actions/gather_zparts.sqf | 10 +-- SQF/dayz_code/actions/hotwire_veh.sqf | 6 +- SQF/dayz_code/actions/jerry_fill.sqf | 6 +- SQF/dayz_code/actions/lock_veh.sqf | 6 +- SQF/dayz_code/actions/modular_build.sqf | 20 ++--- SQF/dayz_code/actions/object_build.sqf | 7 +- .../actions/player_Constructionitem.sqf | 3 +- SQF/dayz_code/actions/player_addToolbelt.sqf | 10 +-- SQF/dayz_code/actions/player_build.sqf | 19 ++--- SQF/dayz_code/actions/player_buildVanilla.sqf | 14 ++-- .../actions/player_buildingDowngrade.sqf | 10 +-- .../actions/player_buildingMaint.sqf | 8 +- SQF/dayz_code/actions/player_combineMags.sqf | 10 +-- SQF/dayz_code/actions/player_copyKey.sqf | 16 ++-- SQF/dayz_code/actions/player_craftItem.sqf | 11 +-- .../actions/player_craftItemVanilla.sqf | 1 + SQF/dayz_code/actions/player_createstash.sqf | 11 +-- SQF/dayz_code/actions/player_dropWeapon.sqf | 7 +- SQF/dayz_code/actions/player_harvestPlant.sqf | 6 +- SQF/dayz_code/actions/player_loadCrate.sqf | 10 +-- .../actions/player_recombineMagazine.sqf | 10 +-- SQF/dayz_code/actions/player_reloadMags.sqf | 10 +-- SQF/dayz_code/actions/player_setTrap.sqf | 9 +- SQF/dayz_code/actions/player_upgrade.sqf | 8 +- SQF/dayz_code/actions/player_wearClothes.sqf | 18 ++-- .../actions/plotManagement/maintain_area.sqf | 8 +- SQF/dayz_code/actions/refuel.sqf | 8 +- SQF/dayz_code/actions/remove.sqf | 10 +-- SQF/dayz_code/actions/repair.sqf | 6 +- SQF/dayz_code/actions/show_dialog.sqf | 2 +- SQF/dayz_code/actions/snap_build.sqf | 2 +- SQF/dayz_code/actions/stopGenerator.sqf | 6 +- SQF/dayz_code/actions/tent_pitch.sqf | 12 +-- SQF/dayz_code/actions/tow_AttachStraps.sqf | 6 +- SQF/dayz_code/actions/tow_DetachStraps.sqf | 6 +- SQF/dayz_code/actions/trade_any_bicycle.sqf | 8 +- .../actions/trade_any_bicycle_old.sqf | 6 +- SQF/dayz_code/actions/trade_any_boat.sqf | 10 +-- SQF/dayz_code/actions/trade_any_boat_old.sqf | 8 +- SQF/dayz_code/actions/trade_any_vehicle.sqf | 10 +-- .../actions/trade_any_vehicle_free.sqf | 10 +-- .../actions/trade_any_vehicle_old.sqf | 8 +- SQF/dayz_code/actions/trade_backpacks.sqf | 8 +- SQF/dayz_code/actions/trade_backpacks_old.sqf | 6 +- SQF/dayz_code/actions/trade_items.sqf | 6 +- SQF/dayz_code/actions/trade_items_old.sqf | 8 +- SQF/dayz_code/actions/trade_items_wo_db.sqf | 8 +- SQF/dayz_code/actions/trade_metals.sqf | 6 +- SQF/dayz_code/actions/trade_weapons.sqf | 10 +-- SQF/dayz_code/actions/trade_weapons_old.sqf | 6 +- SQF/dayz_code/actions/unlock_veh.sqf | 6 +- SQF/dayz_code/actions/vault_combination_1.sqf | 6 +- SQF/dayz_code/actions/vault_pitch.sqf | 6 +- .../compile/BuildVectors/build_vectors.sqf | 4 +- SQF/dayz_code/compile/dze_buildChecks.sqf | 8 +- .../compile/dze_requiredItemsCheck.sqf | 4 +- SQF/dayz_code/compile/fn_damageActions.sqf | 2 +- SQF/dayz_code/compile/fn_selfActions.sqf | 2 +- SQF/dayz_code/compile/player_lockVault.sqf | 14 ++-- SQF/dayz_code/compile/player_packTent.sqf | 8 +- SQF/dayz_code/compile/player_packVault.sqf | 18 ++-- SQF/dayz_code/compile/player_unlockVault.sqf | 16 ++-- .../compile/player_upgradeVehicle.sqf | 8 +- SQF/dayz_code/init/variables.sqf | 5 +- 90 files changed, 364 insertions(+), 373 deletions(-) diff --git a/Documents/1.0.6 Variable Name Changes.txt b/Documents/1.0.6 Variable Name Changes.txt index 0fc425f37..32a253ae8 100644 --- a/Documents/1.0.6 Variable Name Changes.txt +++ b/Documents/1.0.6 Variable Name Changes.txt @@ -17,10 +17,12 @@ - dayz_combat --> no longer exists use (player getVariable["combattimeout",0] >= diag_tickTime) - dayz_fullMoonNights --> dayz_ForcefullmoonNights - dayz_updateObjects --> DayZ_GearedObjects + - DZE_ActionInProgress --> dayz_actionInProgress - DZE_CanPickup --> canPickup - DZE_trees --> dayz_trees - freeTarget --> OpenTarget - PVDZE_serverObjectMonitor --> dayz_serverObjectMonitor + - r_action_count --> dayz_actionInProgress (now true/false instead of 1/0) - Duplicate public variables have been renamed: - dayzPlayerLogin --> PVCDZ_plr_Login diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp index da4a37a75..23878cc4a 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp @@ -12,7 +12,7 @@ class ItemCanvas: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_190; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"ItemTent",1}}; @@ -21,7 +21,7 @@ class ItemCanvas: CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_191; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"ItemDesertTent",1}}; @@ -30,7 +30,7 @@ class ItemCanvas: CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_192; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"ItemDomeTent",1}}; @@ -39,7 +39,7 @@ class ItemCanvas: CA_Magazine class Crafting3 { text = $STR_EPOCH_PLAYER_193; - script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"sun_shade_kit",1}}; @@ -48,7 +48,7 @@ class ItemCanvas: CA_Magazine class Crafting4 { text = $STR_EPOCH_PLAYER_194; - script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"ItemBurlap",1}}; @@ -70,7 +70,7 @@ class ItemBurlap: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_195; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sand"}; // todo add sand requirement requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"ItemSandbag",1}}; @@ -92,7 +92,7 @@ class ItemLightBulb: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_196; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"light_pole_kit",1}}; @@ -147,7 +147,7 @@ class ItemCorrugated : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_215; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"wooden_shed_kit",1}}; @@ -156,7 +156,7 @@ class ItemCorrugated : CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_217; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"outhouse_kit",1}}; @@ -165,7 +165,7 @@ class ItemCorrugated : CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_216; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"storage_shed_kit",1}}; @@ -187,7 +187,7 @@ class ItemPole: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_218; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"fire"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"ItemCorrugated",1}}; @@ -196,7 +196,7 @@ class ItemPole: CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_219; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"rusty_gate_kit",1}}; @@ -205,7 +205,7 @@ class ItemPole: CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_220; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"metal_panel_kit",1}}; @@ -214,7 +214,7 @@ class ItemPole: CA_Magazine class Crafting3 { text = $STR_EPOCH_PLAYER_305; - script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"ItemScaffoldingKit",1}}; @@ -303,7 +303,7 @@ class ItemFuelBarrelEmpty: ItemFuelBarrel class Crafting { text = $STR_EPOCH_PLAYER_276; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemToolbox","ItemMatchbox"}; output[] = {{"ItemFireBarrel_kit",1}}; @@ -418,7 +418,7 @@ class metal_panel_kit: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_228; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop","fire"}; requiretools[] = {"ItemToolbox","ItemCrowbar","ItemSledge"}; output[] = {{"metal_floor_kit",1}}; @@ -511,7 +511,7 @@ class desert_net_kit: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_229; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"desert_large_net_kit",1}}; @@ -541,7 +541,7 @@ class forest_net_kit: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_229; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"forest_large_net_kit",1}}; @@ -859,7 +859,7 @@ class PartPlankPack: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_251; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sawmill"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"PartWoodLumber",3}}; @@ -882,7 +882,7 @@ class CinderBlocks: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_252; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"half_cinder_wall_kit",1}}; @@ -891,7 +891,7 @@ class CinderBlocks: CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_253; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"cinder_garage_kit",1}}; @@ -900,7 +900,7 @@ class CinderBlocks: CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_234; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"cinder_door_kit",1}}; @@ -909,7 +909,7 @@ class CinderBlocks: CA_Magazine class Crafting3 { text = $STR_EPOCH_PLAYER_252_1; - script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"full_cinder_wall_kit",1}}; @@ -943,7 +943,7 @@ class PartPlywoodPack: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_251; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sawmill"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"PartWoodPlywood",3}}; @@ -966,7 +966,7 @@ class PartWoodLumber: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_254; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sawmill"}; requiretools[] = {"ItemToolbox"}; output[] = {{"PartWoodPlywood",1}}; @@ -976,7 +976,7 @@ class PartWoodLumber: CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_255; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"bulk_empty",1}}; @@ -986,7 +986,7 @@ class PartWoodLumber: CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_256; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"deer_stand_kit",1}}; @@ -996,7 +996,7 @@ class PartWoodLumber: CA_Magazine class Crafting3 { text = $STR_EPOCH_PLAYER_257; - script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemWoodStairs",1}}; @@ -1006,7 +1006,7 @@ class PartWoodLumber: CA_Magazine class Crafting4 { text = $STR_EPOCH_PLAYER_258; - script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemWoodLadder",1}}; @@ -1016,7 +1016,7 @@ class PartWoodLumber: CA_Magazine class Crafting5 { text = $STR_EPOCH_PLAYER_259; - Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sawmill"}; requiretools[] = {"ItemToolbox"}; output[] = {{"PartPlankPack",1}}; @@ -1025,7 +1025,7 @@ class PartWoodLumber: CA_Magazine class Crafting6 { text = $STR_EPOCH_PLAYER_277; - Script = ";['Crafting6','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + Script = ";['Crafting6','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemGunRackKit",1}}; @@ -1034,7 +1034,7 @@ class PartWoodLumber: CA_Magazine class Crafting7 { text = $STR_EPOCH_PLAYER_304; - Script = ";['Crafting7','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + Script = ";['Crafting7','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemWoodCrateKit",1}}; @@ -1056,7 +1056,7 @@ class PartWoodPlywood: CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_260; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"workbench_kit",1}}; @@ -1066,7 +1066,7 @@ class PartWoodPlywood: CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_261; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"wood_shack_kit",1}}; @@ -1075,7 +1075,7 @@ class PartWoodPlywood: CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_262; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"ItemWoodFloorQuarter",1}}; @@ -1084,7 +1084,7 @@ class PartWoodPlywood: CA_Magazine class Crafting3 { text = $STR_EPOCH_PLAYER_263; - script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"ItemWoodWallThird",1}}; @@ -1093,7 +1093,7 @@ class PartWoodPlywood: CA_Magazine class Crafting4 { text = $STR_EPOCH_PLAYER_264; - Script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + Script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sawmill"}; requiretools[] = {"ItemToolbox"}; output[] = {{"PartPlywoodPack",1}}; @@ -1117,7 +1117,7 @@ class ItemSledgeHead : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_275; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {}; @@ -1141,7 +1141,7 @@ class ItemSledgeHandle : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_275; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {}; @@ -1165,7 +1165,7 @@ class ItemKiloHemp : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_269b; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"ItemCanvas",1}}; @@ -1174,7 +1174,7 @@ class ItemKiloHemp : CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_269a; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {""}; requiretools[] = {"ItemKnife"}; output[] = {{"ItemHempSeed",5}}; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/BearTrap.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/BearTrap.hpp index a1750736f..93bda971d 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/BearTrap.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/BearTrap.hpp @@ -14,7 +14,7 @@ class TrapBear : CA_Magazine class Build { text = $STR_ACTION_BUILD; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"TrapBear"}; create = "BearTrap_DZ"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/CamoNet.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/CamoNet.hpp index 1cb77bab3..5f9d5e95f 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/CamoNet.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/CamoNet.hpp @@ -14,7 +14,7 @@ class ItemCamoNet : CA_Magazine class Build { text = $STR_BUILD_CAMONET; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"ItemCamoNet"}; create = "CamoNet_DZ"; @@ -34,7 +34,7 @@ class ItemCamoNet : CA_Magazine class Build { text = $STR_BUILD_CAMONET; - script = "; ['ItemCamoNetGrey','Build'] spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "; ['ItemCamoNetGrey','Build'] spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"ItemCamoNetGrey"}; create = "CamoNet_DZ"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp index 70a03abfd..2d91d26da 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp @@ -15,7 +15,7 @@ class ItemGenerator : CA_Magazine class Build { text = $STR_ACTION_BUILD; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"ItemGenerator"}; create = "Generator_DZ"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Sandbag.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Sandbag.hpp index 019a7c500..e7f453000 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Sandbag.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Sandbag.hpp @@ -14,7 +14,7 @@ class ItemSandbag : CA_Magazine class Build { text = $STR_ACTION_BUILD; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemEtool"}; consume[] = {"ItemSandbag"}; create = "Sandbag1_DZ"; @@ -25,7 +25,7 @@ class ItemSandbag : CA_Magazine class Build2 { text = $STR_CREATE_STASH; - script = "; [_id,'Build2'] spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "; [_id,'Build2'] spawn player_build;"; require[] = {"ItemEtool"}; consume[] = {"ItemSandbag"}; create = "StashSmall"; @@ -36,7 +36,7 @@ class ItemSandbag : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_273; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"ItemSandbagLarge",1}}; @@ -45,7 +45,7 @@ class ItemSandbag : CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_274; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"sandbag_nest_kit",1}}; @@ -54,7 +54,7 @@ class ItemSandbag : CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_298; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"BagFenceRound_DZ_kit",1}}; @@ -64,7 +64,7 @@ class ItemSandbag : CA_Magazine class Crafting3 { text = "Craft M240 Nest"; - script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemEtool","ItemToolbox","M240_DZ"}; output[] = {{"m240_nest_kit",1}}; @@ -99,7 +99,7 @@ class BagFenceRound_DZ_kit : CA_Magazine { class Crafting { text = $STR_EPOCH_PLAYER_195; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"ItemSandbag",1}}; @@ -149,7 +149,7 @@ class ItemSandbagLarge : CA_Magazine { class Crafting { text = "Craft Triple H-barrier"; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"ItemSandbagExLarge",1}}; @@ -177,7 +177,7 @@ class ItemSandbagExLarge : CA_Magazine { class Crafting { text = "Craft 5x H-barrier"; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"ItemSandbagExLarge5x",1}}; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/TankTrap.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/TankTrap.hpp index 3abca4ec4..0b57e3b01 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/TankTrap.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/TankTrap.hpp @@ -14,7 +14,7 @@ class ItemTankTrap : CA_Magazine class Build { text = $STR_ACTION_BUILD; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"ItemTankTrap"}; create = "Hedgehog_DZ"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Tent.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Tent.hpp index 86f5ae2db..6c13a3d76 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Tent.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Tent.hpp @@ -13,7 +13,7 @@ class ItemTent : CA_Magazine class Build { text = $STR_PITCH_TENT; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {}; consume[] = {"ItemTent"}; create = "TentStorage"; @@ -23,7 +23,7 @@ class ItemTent : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_270; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"desert_net_kit",1}}; @@ -32,7 +32,7 @@ class ItemTent : CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_271; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"forest_net_kit",1}}; @@ -57,7 +57,7 @@ class ItemDomeTent : CA_Magazine class Build { text = $STR_PITCH_DOME_TENT; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {}; consume[] = {"ItemDomeTent"}; create = "DomeTentStorage"; @@ -67,7 +67,7 @@ class ItemDomeTent : CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_271; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"forest_net_kit",1}}; @@ -95,7 +95,7 @@ class ItemDesertTent : CA_Magazine class Build { text = $STR_PITCH_DESERT_TENT; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {}; consume[] = {"ItemDesertTent"}; create = "DesertTentStorage"; @@ -103,7 +103,7 @@ class ItemDesertTent : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_270; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"desert_net_kit",1}}; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/TripWire.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/TripWire.hpp index babd6dd51..d1c749922 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/TripWire.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/TripWire.hpp @@ -14,7 +14,7 @@ class ItemTrapTripwireCans : CA_Magazine class Build { text = $STR_ACTION_BUILD; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"ItemTrapTripwireCans"}; create = "Trap_Cans"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/WireFence.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/WireFence.hpp index f91f98938..eb46fca94 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/WireFence.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/WireFence.hpp @@ -14,7 +14,7 @@ class ItemWire : CA_Magazine class Build { text = $STR_ACTION_BUILD; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemToolbox"}; consume[] = {"ItemWire"}; create = "Fort_RazorWire"; // 1.8.7 uses Wire_cat1 diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp index 54b83a400..4f923c156 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp @@ -65,7 +65,7 @@ class PartWoodPile : CA_Magazine class Crafting { text = $STR_EPOCH_PLAYER_242; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"sawmill"}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"PartWoodLumber",1}}; @@ -74,7 +74,7 @@ class PartWoodPile : CA_Magazine class Crafting1 { text = $STR_EPOCH_PLAYER_243; - script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemKnife"}; output[] = {{"WoodenArrow",3}}; @@ -84,7 +84,7 @@ class PartWoodPile : CA_Magazine class Crafting2 { text = $STR_EPOCH_PLAYER_244; - script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; // r_action_count = r_action_count + 1; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"stick_fence_kit",1}}; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Workbench.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Workbench.hpp index 98692d2bc..d16aceb2f 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Workbench.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Workbench.hpp @@ -12,7 +12,7 @@ class ItemWorkBench : CA_Magazine class ItemActions { class Build { text = $STR_BLD_build_ItemWorkBench;//"place WorkBench" - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {}; consume[] = {"ItemWorkBench"}; create = "WorkBench"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Magazines/Magazines.hpp b/SQF/dayz_code/Configs/CfgMagazines/Magazines/Magazines.hpp index 2b7b539d8..e8c305905 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Magazines/Magazines.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Magazines/Magazines.hpp @@ -3,7 +3,7 @@ #define COMBINE_MAG class CombineMag\ {\ text = $STR_MAG_COMBINE;\ - script = "spawn player_combineMag; r_action_count = r_action_count + 1;";\ + script = "spawn player_combineMag;";\ }; #include "9x18.hpp" //Makarov diff --git a/SQF/dayz_code/Configs/CfgMagazines/Throwable.hpp b/SQF/dayz_code/Configs/CfgMagazines/Throwable.hpp index 5d42e1549..ed591dde2 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Throwable.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Throwable.hpp @@ -15,7 +15,7 @@ class HandRoadFlare : HandGrenade class CombineMag { text = $STR_MAG_COMBINE; - script = "spawn player_combineMag; r_action_count = r_action_count + 1;"; + script = "spawn player_combineMag;"; }; }; }; @@ -37,7 +37,7 @@ class HandChemBlue : HandGrenade class CombineMag { text = $STR_MAG_COMBINE; - script = "spawn player_combineMag; r_action_count = r_action_count + 1;"; + script = "spawn player_combineMag;"; }; }; }; @@ -59,7 +59,7 @@ class HandChemGreen : HandGrenade class CombineMag { text = $STR_MAG_COMBINE; - script = "spawn player_combineMag; r_action_count = r_action_count + 1;"; + script = "spawn player_combineMag;"; }; }; }; @@ -81,7 +81,7 @@ class HandChemRed : HandGrenade class CombineMag { text = $STR_MAG_COMBINE; - script = "spawn player_combineMag; r_action_count = r_action_count + 1;"; + script = "spawn player_combineMag;"; }; }; }; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgWeapons/Melee/Crowbar.hpp b/SQF/dayz_code/Configs/CfgWeapons/Melee/Crowbar.hpp index 757eb23ac..b29dcda0a 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Melee/Crowbar.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Melee/Crowbar.hpp @@ -24,7 +24,7 @@ class MeleeCrowbar : MeleeWeapon class Drop { text = $STR_ACTIONS_DROP; - script = "spawn player_dropWeapon;"; // r_action_count = r_action_count + 1; + script = "spawn player_dropWeapon;"; use[] = {"Crowbar_Swing"}; }; }; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Melee/Hatchet.hpp b/SQF/dayz_code/Configs/CfgWeapons/Melee/Hatchet.hpp index b7cab1077..efdbc14eb 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Melee/Hatchet.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Melee/Hatchet.hpp @@ -30,7 +30,7 @@ class MeleeHatchet : MeleeWeapon class Drop { text = $STR_ACTIONS_DROP; - script = "spawn player_dropWeapon;"; // r_action_count = r_action_count + 1; + script = "spawn player_dropWeapon;"; use[] = {"Hatchet_Swing"}; }; }; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Melee/Machete.hpp b/SQF/dayz_code/Configs/CfgWeapons/Melee/Machete.hpp index 3c0131f9b..a16077848 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Melee/Machete.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Melee/Machete.hpp @@ -24,7 +24,7 @@ class MeleeMachete: MeleeWeapon class Drop { text = $STR_ACTIONS_DROP; - script = "spawn player_dropWeapon;"; // r_action_count = r_action_count + 1; + script = "spawn player_dropWeapon;"; use[] = {"Machete_Swing"}; }; }; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Melee/MeleeSledgehammer.hpp b/SQF/dayz_code/Configs/CfgWeapons/Melee/MeleeSledgehammer.hpp index bb54234e0..ad648b70a 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Melee/MeleeSledgehammer.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Melee/MeleeSledgehammer.hpp @@ -24,7 +24,7 @@ class MeleeSledge: MeleeWeapon class Drop { text = $STR_ACTIONS_DROP; - script = "spawn player_dropWeapon;"; // r_action_count = r_action_count + 1; + script = "spawn player_dropWeapon;"; use[] = {"Sledge_Swing"}; }; }; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Tools/Etool.hpp b/SQF/dayz_code/Configs/CfgWeapons/Tools/Etool.hpp index 5569d7ab5..791255943 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Tools/Etool.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Tools/Etool.hpp @@ -15,7 +15,7 @@ class ItemEtool : ItemCore class Build { text = "Build Sandbag Fence"; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemEtool"}; consume[] = {"ItemSandbag"}; create = "Sandbag1_DZ"; @@ -24,7 +24,7 @@ class ItemEtool : ItemCore /*class Use { text=$STR_CREATE_STASH; - script="spawn player_createstash;"; // r_action_count = r_action_count + 1; + script="spawn player_createstash;"; };*/ }; }; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgWeapons/Tools/Shovel.hpp b/SQF/dayz_code/Configs/CfgWeapons/Tools/Shovel.hpp index 8cb47f7d7..d90bcd7ae 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Tools/Shovel.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Tools/Shovel.hpp @@ -16,7 +16,7 @@ class ItemShovel : ItemCore class Build { text = "Build Sandbag Fence"; - script = "spawn player_build;"; //r_action_count = r_action_count + 1; set in sqf + script = "spawn player_build;"; require[] = {"ItemShovel"}; consume[] = {"ItemSandbag"}; create = "Sandbag1_DZ"; @@ -24,7 +24,7 @@ class ItemShovel : ItemCore class Use { text = $STR_CREATE_STASH; - script = "spawn player_createstash;"; // r_action_count = r_action_count + 1; + script = "spawn player_createstash;"; }; }; }; diff --git a/SQF/dayz_code/actions/AdvancedTrading/init.sqf b/SQF/dayz_code/actions/AdvancedTrading/init.sqf index 99032fc45..178cf1b9a 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/init.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/init.sqf @@ -6,7 +6,7 @@ if (isNil "Z_traderData" || count (Z_traderData) == 0) exitWith { localize "STR_EPOCH_TRADE_ERROR" call dayz_rollingMessages; }; -if (DZE_ActionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; if (isNil "Z_AdvancedTradingInit") then { diff --git a/SQF/dayz_code/actions/boil.sqf b/SQF/dayz_code/actions/boil.sqf index 8194b33d0..38dcfa498 100644 --- a/SQF/dayz_code/actions/boil.sqf +++ b/SQF/dayz_code/actions/boil.sqf @@ -1,7 +1,7 @@ private ["_bottletext","_tin1text","_tin2text","_tintext","_hasbottleitem","_hastinitem","_qty","_dis","_sfx","_bottleInfected"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_22" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_22" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterBottle" >> "displayName"); _tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName"); @@ -61,4 +61,4 @@ if (_hasbottleitem and _hastinitem) then { }; a_player_boil = false; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/cook.sqf b/SQF/dayz_code/actions/cook.sqf index e77016060..30546e233 100644 --- a/SQF/dayz_code/actions/cook.sqf +++ b/SQF/dayz_code/actions/cook.sqf @@ -1,6 +1,6 @@ private ["_rawmeat","_cookedmeat","_meat","_meatcooked","_text","_qty","_dis","_sfx"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_23" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_23" call dayz_rollingMessages;}; +dayz_actionInProgress = true; //diag_log ("Cook Enabled"); player removeAction s_player_cook; s_player_cook = -1; @@ -33,4 +33,4 @@ a_player_cooking = true; } forEach _rawmeat; a_player_cooking = false; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/fill_nearestVehicle.sqf b/SQF/dayz_code/actions/fill_nearestVehicle.sqf index e01de3b5d..59db25625 100644 --- a/SQF/dayz_code/actions/fill_nearestVehicle.sqf +++ b/SQF/dayz_code/actions/fill_nearestVehicle.sqf @@ -1,7 +1,7 @@ private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_isVehicle","_configSrcVeh","_capacitySrc","_nameTextSrc","_isFillok","_curFuelSrc","_newFuelSrc","_vehicleSrc"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _isVehicle = false; @@ -149,4 +149,4 @@ if(_IsNearVehicle >= 1) then { } else { localize "str_epoch_player_27" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/fill_startGenerator.sqf b/SQF/dayz_code/actions/fill_startGenerator.sqf index 3a69ca9e8..6c2d43b4c 100644 --- a/SQF/dayz_code/actions/fill_startGenerator.sqf +++ b/SQF/dayz_code/actions/fill_startGenerator.sqf @@ -1,7 +1,7 @@ private ["_vehicle","_started","_finished","_animState","_isMedic","_soundSource","_fuelCan","_emptyCan"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_fillgen; s_player_fillgen = 1; @@ -93,5 +93,5 @@ if (_finished) then { }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_fillgen = -1; \ No newline at end of file diff --git a/SQF/dayz_code/actions/gather_meat.sqf b/SQF/dayz_code/actions/gather_meat.sqf index d695d3351..1fcbce319 100644 --- a/SQF/dayz_code/actions/gather_meat.sqf +++ b/SQF/dayz_code/actions/gather_meat.sqf @@ -1,6 +1,6 @@ private ["_item","_type","_hasHarvested","_config","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_dis","_sfx","_sharpnessRemaining","_qty","_chance","_string"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_29" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_29" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _item = _this select 3; _type = typeOf _item; @@ -13,7 +13,7 @@ player removeAction s_player_butcher; s_player_butcher = -1; _PlayerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1; -if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; DZE_ActionInProgress = false;}; +if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; dayz_actionInProgress = false;}; //Count how many active tools the player has { @@ -22,7 +22,7 @@ if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessag }; } count Dayz_Gutting; -if ((count _knifeArray) < 1) exitWith { localize "str_cannotgut" call dayz_rollingMessages; DZE_ActionInProgress = false; }; +if ((count _knifeArray) < 1) exitWith { localize "str_cannotgut" call dayz_rollingMessages; dayz_actionInProgress = false; }; if ((count _knifeArray > 0) and !_hasHarvested) then { @@ -91,4 +91,4 @@ if ((count _knifeArray > 0) and !_hasHarvested) then { uiSleep 0.02; _string call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/gather_zparts.sqf b/SQF/dayz_code/actions/gather_zparts.sqf index 4df53dcce..17958140a 100644 --- a/SQF/dayz_code/actions/gather_zparts.sqf +++ b/SQF/dayz_code/actions/gather_zparts.sqf @@ -1,6 +1,6 @@ private ["_item","_type","_hasHarvested","_config","_knifeArray","_playerNear","_isListed","_activeKnife","_text","_sharpnessRemaining","_qty","_chance","_string"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_31" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_31" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _item = _this select 3; _type = typeOf _item; @@ -11,14 +11,14 @@ player removeAction s_player_butcher; s_player_butcher = -1; _playerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1; -if (_playerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; DZE_ActionInProgress = false;}; +if (_playerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; dayz_actionInProgress = false;}; //Count how many active tools the player has { if (_x in items player) then {_knifeArray set [count _knifeArray, _x];}; } count Dayz_Gutting; -if ((count _knifeArray) < 1) exitWith {format[localize "str_missing_to_do_this",localize "STR_EQUIP_NAME_4"] call dayz_rollingMessages; DZE_ActionInProgress = false; }; +if ((count _knifeArray) < 1) exitWith {format[localize "str_missing_to_do_this",localize "STR_EQUIP_NAME_4"] call dayz_rollingMessages; dayz_actionInProgress = false; }; if ((count _knifeArray > 0) && !_hasHarvested) then { private "_qty"; @@ -80,4 +80,4 @@ if ((count _knifeArray > 0) && !_hasHarvested) then { uiSleep 0.02; _string call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/hotwire_veh.sqf b/SQF/dayz_code/actions/hotwire_veh.sqf index 21ea1dfb5..fd228b804 100644 --- a/SQF/dayz_code/actions/hotwire_veh.sqf +++ b/SQF/dayz_code/actions/hotwire_veh.sqf @@ -1,8 +1,8 @@ private ["_vehicle","_removed"]; _vehicle = _this select 3; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_32" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_32" call dayz_rollingMessages;}; +dayz_actionInProgress = true; {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = []; s_player_lockUnlock_crtl = 1; @@ -31,4 +31,4 @@ if (_removed == 1) then { s_player_lockUnlock_crtl = -1; s_player_lockUnlockInside_ctrl = -1; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/jerry_fill.sqf b/SQF/dayz_code/actions/jerry_fill.sqf index 8145cc7a7..fd589113e 100644 --- a/SQF/dayz_code/actions/jerry_fill.sqf +++ b/SQF/dayz_code/actions/jerry_fill.sqf @@ -1,5 +1,5 @@ -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_34" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_34" call dayz_rollingMessages;}; +dayz_actionInProgress = true; private ["_qty","_dis","_sfx","_started","_finished","_animState","_isRefuel","_fuelcans","_qty20","_qty5","_qty40","_magazines","_cursorTarget","_fuelAmount"]; player removeAction s_player_fillfuel; @@ -102,4 +102,4 @@ if (("ItemJerrycanEmpty" in _magazines) or ("ItemFuelcanEmpty" in _magazines) or } else { localize "str_player_10" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/lock_veh.sqf b/SQF/dayz_code/actions/lock_veh.sqf index 60fdaf357..39ad793b4 100644 --- a/SQF/dayz_code/actions/lock_veh.sqf +++ b/SQF/dayz_code/actions/lock_veh.sqf @@ -1,8 +1,8 @@ private["_vehicle"]; _vehicle = _this select 3; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;}; +dayz_actionInProgress = true; {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = []; s_player_lockUnlock_crtl = 1; @@ -20,4 +20,4 @@ if(player distance _vehicle < 10) then { s_player_lockUnlock_crtl = -1; s_player_lockUnlockInside_ctrl = -1; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index 9d1309bda..a4f0fa20b 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -3,9 +3,9 @@ if (!isNil "_this" && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith private ["_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objectHelperDir","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_started","_finished","_animState","_isMedic","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild"]; //Check if building already in progress, exit if so. -if (DZE_ActionInProgress || {r_action_count > 0}) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; -r_action_count = r_action_count + 1; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;}; +dayz_actionInProgress = true; + _pos = [player] call FNC_GetPos; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; @@ -38,10 +38,10 @@ DZE_memLeftRight = 0; call gear_ui_init; closeDialog 1; -if (dayz_isSwimming) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; -if (_inVehicle) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; -if (_onLadder) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; -if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; +if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; +if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; +if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; +if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; DZE_buildItem = _this; //This is a magazine! It's global to allow access to it from outside functions @@ -85,8 +85,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActi if (_abort) exitWith { format[localize "str_epoch_player_135",_reason,_distance] call dayz_rollingMessages; - DZE_ActionInProgress = false; - r_action_count = 0; + dayz_actionInProgress = false; }; _canBuild = [_pos, _this, true] call dze_buildChecks; @@ -588,5 +587,4 @@ if (_canBuild select 0) then { }; }; -DZE_ActionInProgress = false; -r_action_count = 0; +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/object_build.sqf b/SQF/dayz_code/actions/object_build.sqf index b59c9363c..eb00175cc 100644 --- a/SQF/dayz_code/actions/object_build.sqf +++ b/SQF/dayz_code/actions/object_build.sqf @@ -80,10 +80,7 @@ if (_build) then { diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; format[localize "str_build_01",_text] call dayz_rollingMessages; - r_action_count = 0; -} else { - r_action_count = 0; - +} else { if ((!isNil "_ghost") and {(!isNull _ghost)}) then { deleteVehicle _ghost; }; { @@ -94,4 +91,4 @@ if (_build) then { format[localize "str_build_failed_02",_text] call dayz_rollingMessages; }; - +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_Constructionitem.sqf b/SQF/dayz_code/actions/player_Constructionitem.sqf index c4fd9ddc3..398353fa4 100644 --- a/SQF/dayz_code/actions/player_Constructionitem.sqf +++ b/SQF/dayz_code/actions/player_Constructionitem.sqf @@ -75,7 +75,6 @@ if (_hasInput) then { //Hack to get craft menu to use build needs a good tidy up [_orignalClass,"Build","ItemActions"] spawn player_build; - r_action_count = r_action_count + 1; - + dayz_actionInProgress = true; }; }; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_addToolbelt.sqf b/SQF/dayz_code/actions/player_addToolbelt.sqf index b992ac7dd..13bbb12c3 100644 --- a/SQF/dayz_code/actions/player_addToolbelt.sqf +++ b/SQF/dayz_code/actions/player_addToolbelt.sqf @@ -1,5 +1,5 @@ -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_39" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_39" call dayz_rollingMessages;}; +dayz_actionInProgress = true; private ["_item","_config","_onLadder","_hastoolweapon","_onBack","_text","_create","_config2","_melee2tb","_isOk"]; disableSerialization; @@ -8,11 +8,11 @@ _config = configFile >> "cfgWeapons" >> _item; _onBack = dayz_onBack in MeleeWeapons; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; DZE_ActionInProgress = false;}; +if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false;}; _hastoolweapon = _item in weapons player; _text = getText (_config >> "displayName"); -if (!_hastoolweapon and !_onBack) exitWith {format[localize "str_player_30",_text] call dayz_rollingMessages; DZE_ActionInProgress = false;}; +if (!_hastoolweapon and !_onBack) exitWith {format[localize "str_player_30",_text] call dayz_rollingMessages; dayz_actionInProgress = false;}; call gear_ui_init; @@ -63,4 +63,4 @@ if (_isOk) then { closeDialog 0; localize "str_player_24" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 674a03b93..67baed59e 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -6,9 +6,8 @@ if (!isNil "_this" && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith */ private ["_location","_pos","_dir","_classname","_item","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_tmpbuilt","_onLadder","_require","_text","_offset","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_distance","_classnametmp","_ghost","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_needNear","_vehicle","_inVehicle","_objHDiff","_isAllowedUnderGround","_canBuild"]; -if (DZE_ActionInProgress || {r_action_count > 0}) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; -r_action_count = r_action_count + 1; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _pos = [player] call FNC_GetPos; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; @@ -37,10 +36,10 @@ DZE_cancelBuilding = false; call gear_ui_init; closeDialog 1; -if (dayz_isSwimming) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; -if (_inVehicle) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; -if (_onLadder) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; -if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; +if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; +if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; +if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; +if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; _item = _this; @@ -85,8 +84,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> if(_abort) exitWith { format[localize "str_epoch_player_135",_reason,_distance] call dayz_rollingMessages; - DZE_ActionInProgress = false; - r_action_count = 0; + dayz_actionInProgress = false; }; _canBuild = [_pos, _item, true] call dze_buildChecks; @@ -494,5 +492,4 @@ if (_canBuild select 0) then { }; }; -DZE_ActionInProgress = false; -r_action_count = 0; +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_buildVanilla.sqf b/SQF/dayz_code/actions/player_buildVanilla.sqf index 5295e9ede..39815b774 100644 --- a/SQF/dayz_code/actions/player_buildVanilla.sqf +++ b/SQF/dayz_code/actions/player_buildVanilla.sqf @@ -24,7 +24,7 @@ if (count _this > 2) then { }; _emergingLevel = 1.1; -r_action_count = 1; +dayz_actionInProgress = true; _isClass = switch (1==1) do { case (isClass (configFile >> "CfgMagazines" >> _item)): {"CfgMagazines"}; @@ -52,7 +52,7 @@ _onLadder = {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animatio _isWater = {(surfaceIsWater (getPosATL _object)) or dayz_isSwimming}; if (0 != count Dayz_constructionContext) then { - r_action_count = 0; + dayz_actionInProgress = false; localize "str_already_building" call dayz_rollingMessages; diag_log [ diag_ticktime, __FILE__, 'already building, exiting', Dayz_constructionContext, typeName Dayz_constructionContext]; }; @@ -81,13 +81,13 @@ _missing = ""; } count _requiredTools; if (!_ok) exitWith { - r_action_count = 0; + dayz_actionInProgress = false; format[localize "str_player_31_missingtools",_text,_missing] call dayz_rollingMessages; }; _posReference = [player] call FNC_GetPos; _canBuild = [_posReference, _item, false] call DZE_BuildChecks; -if !(_canBuild select 0) exitWith {r_action_count = 0;}; +if !(_canBuild select 0) exitWith {dayz_actionInProgress = false;}; // lets check player has requiredParts for upgrade _ok = true; @@ -105,7 +105,7 @@ _upgradeParts = []; if (!_ok) exitWith { { player addMagazine _x; } foreach _upgradeParts; - r_action_count = 0; + dayz_actionInProgress = false; format[localize "str_player_31", _missing, localize "str_player_31_build"] call dayz_rollingMessages; }; @@ -246,7 +246,7 @@ _position = getPosATL _object; _actionBuildHidden = true; _actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts, _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"]; -while {r_action_count != 0 and Dayz_constructionContext select 4} do { +while {dayz_actionInProgress && Dayz_constructionContext select 4} do { // force the angle so that the ghost is showing always the same side _angleRef=Dayz_constructionContext select 1; @@ -361,5 +361,5 @@ if (Dayz_constructionContext select 3) then { // "build" camera was on, switch i }; Dayz_constructionContext = []; -r_action_count = 0; +dayz_actionInProgress = false; //systemChat "Dayz_constructionContext reset"; diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index 3de2efd52..b4b0d68a5 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -4,8 +4,8 @@ */ private ["_location","_dir","_classname","_text","_object","_objectID","_objectUID","_newclassname","_refund","_obj","_upgrade","_objectCharacterID","_ownerID","_i","_invResult","_itemOut","_countOut","_abortInvAdd","_addedItems"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_48" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_48" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_downgrade_build; s_player_downgrade_build = 1; @@ -17,7 +17,7 @@ _obj = _this select 3; _objectCharacterID = _obj getVariable ["CharacterID","0"]; -if (DZE_Lock_Door != _objectCharacterID) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_49" call dayz_rollingMessages;}; +if (DZE_Lock_Door != _objectCharacterID) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_49" call dayz_rollingMessages;}; // Find objectID _objectID = _obj getVariable ["ObjectID","0"]; @@ -25,7 +25,7 @@ _objectID = _obj getVariable ["ObjectID","0"]; // Find objectUID _objectUID = _obj getVariable ["ObjectUID","0"]; -if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; +if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; // Get classname _classname = typeOf _obj; @@ -123,5 +123,5 @@ if ((count _upgrade) > 0) then { localize "str_epoch_player_51" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_downgrade_build = -1; diff --git a/SQF/dayz_code/actions/player_buildingMaint.sqf b/SQF/dayz_code/actions/player_buildingMaint.sqf index 1f8e8ed37..0fc62055e 100644 --- a/SQF/dayz_code/actions/player_buildingMaint.sqf +++ b/SQF/dayz_code/actions/player_buildingMaint.sqf @@ -4,8 +4,8 @@ */ private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_objectCharacterID"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_maint_build; s_player_maint_build = 1; @@ -19,7 +19,7 @@ _objectID = _obj getVariable ["ObjectID","0"]; // Find objectUID _objectUID = _obj getVariable ["ObjectUID","0"]; -if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_maint_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; +if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_maint_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; // Get classname _classname = typeOf _obj; @@ -90,5 +90,5 @@ if (_proceed) then { }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_maint_build = -1; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_combineMags.sqf b/SQF/dayz_code/actions/player_combineMags.sqf index 035fa23b3..24f267664 100644 --- a/SQF/dayz_code/actions/player_combineMags.sqf +++ b/SQF/dayz_code/actions/player_combineMags.sqf @@ -3,11 +3,11 @@ disableSerialization; call gear_ui_init; closeDialog 0; -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; - +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; _create = _this; -if (!(_create in magazines player)) exitWith {r_action_count = 0;}; +if (!(_create in magazines player)) exitWith {dayz_actionInProgress = false;}; _config = configFile >> "CfgMagazines" >> _create; @@ -20,7 +20,7 @@ _magCount = {_x == _create} count magazines player; if (_magCount == 1) exitWith { [format[localize "str_cannotCombine", _name],1] call dayz_rollingMessages; - r_action_count = 0; + dayz_actionInProgress = false; }; //primary/secondary mags? @@ -82,4 +82,4 @@ switch true do { }; uiSleep 1; -r_action_count = 0; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_copyKey.sqf b/SQF/dayz_code/actions/player_copyKey.sqf index 9f545a2d2..95ba3c1a3 100644 --- a/SQF/dayz_code/actions/player_copyKey.sqf +++ b/SQF/dayz_code/actions/player_copyKey.sqf @@ -1,30 +1,30 @@ private ["_item","_config","_pos","_onLadder","_create","_started","_finished","_animState","_isMedic","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _item = _this; _config = configFile >> "cfgWeapons" >> _item; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -if (_onLadder) exitWith {DZE_ActionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; +if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; _text = getText (_config >> "displayName"); _haskey = _this in weapons player; -if (!_haskey) exitWith {DZE_ActionInProgress = false; format[localize "str_player_30",_text] call dayz_rollingMessages;}; +if (!_haskey) exitWith {dayz_actionInProgress = false; format[localize "str_player_30",_text] call dayz_rollingMessages;}; _hastoolweapon = "ItemKeyKit" in weapons player; -if (!_hastoolweapon) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_57" call dayz_rollingMessages;}; +if (!_hastoolweapon) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_57" call dayz_rollingMessages;}; _pos = [player] call FNC_GetPos; _isNear = {inflamed _x} count (_pos nearObjects 3); -if (_isNear == 0) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_58" call dayz_rollingMessages;}; +if (_isNear == 0) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_58" call dayz_rollingMessages;}; call gear_ui_init; // require one tin bar per key _hasTinBar = "ItemTinBar" in magazines player; -if (!_hasTinBar) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_59" call dayz_rollingMessages;}; +if (!_hasTinBar) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_59" call dayz_rollingMessages;}; ["Working",0,[20,40,15,0]] call dayz_NutritionSystem; player playActionNow "Medic"; @@ -72,4 +72,4 @@ if(_finished) then { }; localize "str_epoch_player_61" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index af1cb405f..2b34bfa57 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -25,9 +25,8 @@ class ItemActions */ private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"]; -if (DZE_ActionInProgress || (r_action_count > 0)) exitWith {localize "str_epoch_player_63" call dayz_rollingMessages;}; -r_action_count = r_action_count + 1; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_63" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // This is used to find correct recipe based what itemaction was click allows multiple recipes per item. _crafting = _this select 0; @@ -65,8 +64,7 @@ if("workshop" in _needNear) then { }; if(_abort) exitWith { format[localize "str_epoch_player_149",_reason,_distance] call dayz_rollingMessages; - DZE_ActionInProgress = false; - r_action_count = 0; + dayz_actionInProgress = false; }; // diag_log format["Checking for fire: %1", _isFireNear]; @@ -285,5 +283,4 @@ if (_canDo) then { } else { localize "str_epoch_player_64" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; -r_action_count = 0; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_craftItemVanilla.sqf b/SQF/dayz_code/actions/player_craftItemVanilla.sqf index 4562cfc56..92f0ca007 100644 --- a/SQF/dayz_code/actions/player_craftItemVanilla.sqf +++ b/SQF/dayz_code/actions/player_craftItemVanilla.sqf @@ -10,6 +10,7 @@ failChance = 1; */ //diag_log("crafting system"); +dayz_actionInProgress = true; private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_classname","_isClass","_onLadder","_hasTools","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_i","_j","_dis","_sfx"]; //diag_log(str(isnil "r_player_crafting")); diff --git a/SQF/dayz_code/actions/player_createstash.sqf b/SQF/dayz_code/actions/player_createstash.sqf index f6f330f40..eb388fd04 100644 --- a/SQF/dayz_code/actions/player_createstash.sqf +++ b/SQF/dayz_code/actions/player_createstash.sqf @@ -4,7 +4,8 @@ private ["_playerPos","_item","_location","_config","_text","_dir","_dis","_sfx" call gear_ui_init; closeDialog 1; -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; //Player Pos _playerPos = getPosATL player; @@ -26,7 +27,7 @@ _stashname = getText (configFile >> "CfgVehicles" >> _stashtype >> "displayName" // Items are missing if ((!(_consume IN magazines player))) exitWith { - r_action_count = 0; + dayz_actionInProgress = false; format[localize "str_player_31_stash",_consumetext] call dayz_rollingMessages; }; @@ -35,7 +36,7 @@ _location set [2,0]; //blocked if (["concrete",dayz_surfaceType] call fnc_inString) exitwith { - r_action_count = 0; + dayz_actionInProgress = false; }; _worldspace = [_stashtype, player] call fn_niceSpot; @@ -66,9 +67,9 @@ if ((count _worldspace) == 2) then { publicVariableServer "PVDZ_obj_Publish"; diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; - r_action_count = 0; format[localize "str_success_stash_pitch",_stashname] call dayz_rollingMessages; } else { - r_action_count = 0; format[localize "str_fail_stash_pitch",_stashname] call dayz_rollingMessages; }; + +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_dropWeapon.sqf b/SQF/dayz_code/actions/player_dropWeapon.sqf index 5eeb98cc1..1f1a58481 100644 --- a/SQF/dayz_code/actions/player_dropWeapon.sqf +++ b/SQF/dayz_code/actions/player_dropWeapon.sqf @@ -6,8 +6,9 @@ _config = configFile >> "CfgWeapons" >> _item; _droppedType = getText (_config >> "droppeditem"); _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; r_action_count = 0; }; -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; call gear_ui_init; @@ -32,4 +33,4 @@ _bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 1, "C _bag modelToWorld getPosATL player; _bag setDir (getDir player); player reveal _bag; -r_action_count = 0; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_harvestPlant.sqf b/SQF/dayz_code/actions/player_harvestPlant.sqf index 4b244c1ba..c82d4ace6 100644 --- a/SQF/dayz_code/actions/player_harvestPlant.sqf +++ b/SQF/dayz_code/actions/player_harvestPlant.sqf @@ -5,8 +5,8 @@ */ private ["_isOk","_i","_objName","_started","_finished","_animState","_isMedic","_proceed","_itemOut","_countOut","_tree","_trees","_findNearestTree","_index","_invResult","_treesOutput","_text"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_72" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_72" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // allowed trees list move this later _trees = ["pumpkin.p3d","p_helianthus.p3d","p_fiberplant_ep1.p3d"]; @@ -131,4 +131,4 @@ if (count(_findNearestTree) >= 1) then { } else { localize "str_epoch_player_74" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/player_loadCrate.sqf b/SQF/dayz_code/actions/player_loadCrate.sqf index e8b278fda..c1a0ab7b4 100644 --- a/SQF/dayz_code/actions/player_loadCrate.sqf +++ b/SQF/dayz_code/actions/player_loadCrate.sqf @@ -1,19 +1,19 @@ private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _hasTool = "ItemCrowbar" in items player; if(!_hasTool) exitWith { localize "str_epoch_player_76" call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; _item = _this; _hasCrate = _item in magazines player; if (!_hasCrate) exitWith { localize "str_epoch_player_77" call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; _config = configFile >> "CfgMagazines" >> _item; @@ -65,4 +65,4 @@ player action ["Gear", _b0x1337]; localize "str_epoch_player_78" call dayz_rollingMessages; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/player_recombineMagazine.sqf b/SQF/dayz_code/actions/player_recombineMagazine.sqf index e7cdb4bfd..344f3945e 100644 --- a/SQF/dayz_code/actions/player_recombineMagazine.sqf +++ b/SQF/dayz_code/actions/player_recombineMagazine.sqf @@ -7,12 +7,12 @@ disableSerialization; call gear_ui_init; //note - one slot ammo can be used! -r_action_count = r_action_count + 1; -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; _item = _this; -if (!(_item in magazines player)) exitWith {r_action_count = 0;}; +if (!(_item in magazines player)) exitWith {dayz_actionInProgress = false;}; _config = configFile >> "CfgMagazines" >> _item; @@ -96,7 +96,7 @@ if (_consume_magsize > _create_magsize) then { }; if ((_qtynew_create_mags + _qtynew_consume_mags) > (_qty_create_mags + _qty_consume_mags + _qty_free_slots)) exitWith { - r_action_count = 0; + dayz_actionInProgress = false; localize "str_player_24" call dayz_rollingMessages; }; _qtynew_consume_mags_full = floor(_qtynew_consume_ammo/_consume_magsize); @@ -121,4 +121,4 @@ if (_qtynew_create_ammo_rest != 0) then { player addMagazine [_create,_qtynew_create_ammo_rest]; }; uiSleep 1; -r_action_count = 0; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_reloadMags.sqf b/SQF/dayz_code/actions/player_reloadMags.sqf index 84e3cd174..f7857edf4 100644 --- a/SQF/dayz_code/actions/player_reloadMags.sqf +++ b/SQF/dayz_code/actions/player_reloadMags.sqf @@ -7,12 +7,12 @@ disableSerialization; call gear_ui_init; //note - one slot ammo can be used! -r_action_count = r_action_count + 1; -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; _item = _this; -if (!(_item in magazines player)) exitWith {r_action_count = 0;}; +if (!(_item in magazines player)) exitWith {dayz_actionInProgress = false;}; _config = configFile >> "CfgMagazines" >> _item; @@ -96,7 +96,7 @@ if (_consume_magsize > _create_magsize) then { }; if ((_qtynew_create_mags + _qtynew_consume_mags) > (_qty_create_mags + _qty_consume_mags + _qty_free_slots)) exitWith { - r_action_count = 0; + dayz_actionInProgress = false; localize "str_player_24" call dayz_rollingMessages; }; _qtynew_consume_mags_full = floor(_qtynew_consume_ammo/_consume_magsize); @@ -121,4 +121,4 @@ if (_qtynew_create_ammo_rest != 0) then { player addMagazine [_create,_qtynew_create_ammo_rest]; }; uiSleep 1; -r_action_count = 0; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_setTrap.sqf b/SQF/dayz_code/actions/player_setTrap.sqf index 85f638935..371a9e1d1 100644 --- a/SQF/dayz_code/actions/player_setTrap.sqf +++ b/SQF/dayz_code/actions/player_setTrap.sqf @@ -3,10 +3,11 @@ private ["_item","_config","_onLadder","_classname","_text","_consume","_hastrap _item = _this; _config = configFile >> "CfgWeapons" >> _item; -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -if (_onLadder) exitWith { r_action_count = 0; localize "str_player_21" call dayz_rollingMessages;}; +if (_onLadder) exitWith { dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; call gear_ui_init; @@ -16,7 +17,7 @@ _consume = ([] + getArray (_config >> "magazines")) select 0; _hastrapitem = _item in magazines player; -if (!_hastrapitem) exitWith { r_action_count = 0; format[localize "str_player_31",_text,localize "str_player_31_place"] call dayz_rollingMessages;}; +if (!_hastrapitem) exitWith { dayz_actionInProgress = false; format[localize "str_player_31",_text,localize "str_player_31_place"] call dayz_rollingMessages;}; player removeMagazine _item; _location = getPosATL player; @@ -35,5 +36,5 @@ diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hiv player reveal _object; -r_action_count = 0; +dayz_actionInProgress = false; format[localize "str_build_01",_text] call dayz_rollingMessages; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 75bc202ae..b02549a10 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -4,8 +4,8 @@ */ private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_ownerID"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_upgrade_build; s_player_upgrade_build = 1; @@ -19,7 +19,7 @@ _objectID = _obj getVariable ["ObjectID","0"]; // Find objectUID _objectUID = _obj getVariable ["ObjectUID","0"]; -if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; +if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; // Get classname _classname = typeOf _obj; @@ -157,5 +157,5 @@ if ((count _upgrade) > 0) then { localize "str_epoch_player_82" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_upgrade_build = -1; diff --git a/SQF/dayz_code/actions/player_wearClothes.sqf b/SQF/dayz_code/actions/player_wearClothes.sqf index 7e22a47b7..dcf5ad20e 100644 --- a/SQF/dayz_code/actions/player_wearClothes.sqf +++ b/SQF/dayz_code/actions/player_wearClothes.sqf @@ -2,8 +2,8 @@ if (dayz_lastClothesChange + 5 > diag_tickTime) exitWith {localize "str_player_a dayz_lastClothesChange = diag_tickTime; if (_this in DZE_RestrictSkins) exitWith { format[localize "str_epoch_player_315",_this] call dayz_rollingMessages; }; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;}; +dayz_actionInProgress = true; /* _item call player_wearClothes; Added Female skin changes - DayZ Epoch - vbawol @@ -13,19 +13,19 @@ private ["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_m _item = _this; call gear_ui_init; -r_action_count = 0; //reset for strange glitch +dayz_actionInProgress = false; //reset for strange glitch _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; DZE_ActionInProgress = false;}; +if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false;}; _hasclothesitem = _this in magazines player; _config = configFile >> "CfgMagazines"; _text = getText (_config >> _item >> "displayName"); -if (!_hasclothesitem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_wear"] call dayz_rollingMessages; DZE_ActionInProgress = false;}; +if (!_hasclothesitem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_wear"] call dayz_rollingMessages; dayz_actionInProgress = false;}; -if (vehicle player != player) exitWith {localize "str_player_fail_wear1" call dayz_rollingMessages; DZE_ActionInProgress = false;}; -//if (!isNull (unitBackpack player)) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_9" call dayz_rollingMessages;}; -if ("CSGAS" in (magazines player)) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_10" call dayz_rollingMessages;}; +if (vehicle player != player) exitWith {localize "str_player_fail_wear1" call dayz_rollingMessages; dayz_actionInProgress = false;}; +//if (!isNull (unitBackpack player)) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_9" call dayz_rollingMessages;}; +if ("CSGAS" in (magazines player)) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_10" call dayz_rollingMessages;}; _myModel = (typeOf player); _humanity = player getVariable ["humanity",0]; @@ -57,4 +57,4 @@ if ( (isClass(_config >> _itemNew)) ) then { }; }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/plotManagement/maintain_area.sqf b/SQF/dayz_code/actions/plotManagement/maintain_area.sqf index 75921c1c3..d37b90959 100644 --- a/SQF/dayz_code/actions/plotManagement/maintain_area.sqf +++ b/SQF/dayz_code/actions/plotManagement/maintain_area.sqf @@ -1,8 +1,8 @@ private ["_objectID","_objectUID","_target","_objectClasses","_range","_objects","_requirements","_count","_objects_filtered","_ctrl","_itemText","_type","_amount","_success","_wealth","_message1","_message2","_option"]; disableSerialization; -if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_maintain_area; s_player_maintain_area = 1; @@ -36,7 +36,7 @@ if (_count == 0) exitWith { } else { format[localize "STR_EPOCH_ACTIONS_22",_count] call dayz_rollingMessages; }; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; s_player_maintain_area = -1; s_player_maintain_area_preview = -1; }; @@ -132,6 +132,6 @@ switch _option do { }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_maintain_area = -1; s_player_maintain_area_preview = -1; diff --git a/SQF/dayz_code/actions/refuel.sqf b/SQF/dayz_code/actions/refuel.sqf index 6998f0ad8..f8a03666f 100644 --- a/SQF/dayz_code/actions/refuel.sqf +++ b/SQF/dayz_code/actions/refuel.sqf @@ -1,5 +1,5 @@ -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; +dayz_actionInProgress = true; private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype", "_emptycan","_started","_finished","_animState","_isRefuel"]; @@ -15,7 +15,7 @@ _curFuel = ((fuel _vehicle) * _capacity); _newFuel = (_curFuel + _canSize); _fueling = player getVariable ["fueling",false]; -if (fuel _vehicle == 1) exitWith {DZE_ActionInProgress = false;}; +if (fuel _vehicle == 1) exitWith {dayz_actionInProgress = false;}; player removeAction s_player_fillfuel + _capacity; a_player_jerryfilling = true; @@ -78,4 +78,4 @@ if (!_fueling) then { a_player_jerryfilling = false; r_action = false; player setVariable ["fueling", false]; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 48d7cd01a..231a7c326 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -1,5 +1,5 @@ -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_88" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_88" call dayz_rollingMessages;}; +dayz_actionInProgress = true; /* delete object from db with extra waiting by [VB]AWOL parameters: _obj @@ -22,8 +22,8 @@ if (DZE_permanentPlot) then { _isOwnerOfObj = (_objOwnerID == dayz_characterID); }; -if (_obj in DZE_DoorsLocked) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;}; -if (_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;}; +if (_obj in DZE_DoorsLocked) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;}; +if (_obj getVariable ["GeneratorRunning", false]) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;}; _PlayerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1; if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages;}; @@ -267,7 +267,7 @@ if (_proceed && _success) then { player playActionNow "stop"; }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_deleteBuild = -1; _obj \ No newline at end of file diff --git a/SQF/dayz_code/actions/repair.sqf b/SQF/dayz_code/actions/repair.sqf index 15bf0050a..fc7c5b36a 100644 --- a/SQF/dayz_code/actions/repair.sqf +++ b/SQF/dayz_code/actions/repair.sqf @@ -1,5 +1,5 @@ -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_92" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_92" call dayz_rollingMessages;}; +dayz_actionInProgress = true; private ["_array","_vehicle","_part","_hitpoint","_type","_hasToolbox","_section","_nameType","_namePart","_damage","_selection","_dis","_sfx","_hitpoints","_allFixed","__FILE__"]; _id = _this select 2; @@ -55,4 +55,4 @@ if (_section and _hasToolbox) then { } else { format[localize "str_player_03",_namePart] call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/show_dialog.sqf b/SQF/dayz_code/actions/show_dialog.sqf index e4c21c9ae..f260b8af1 100644 --- a/SQF/dayz_code/actions/show_dialog.sqf +++ b/SQF/dayz_code/actions/show_dialog.sqf @@ -1,6 +1,6 @@ private ["_trader_data", "_dialog"]; -if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_PLAYER_103" call dayz_rollingMessages;}; +if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_103" call dayz_rollingMessages;}; _trader_data = (_this select 3); diff --git a/SQF/dayz_code/actions/snap_build.sqf b/SQF/dayz_code/actions/snap_build.sqf index 0a91f3796..e998c3c79 100644 --- a/SQF/dayz_code/actions/snap_build.sqf +++ b/SQF/dayz_code/actions/snap_build.sqf @@ -236,7 +236,7 @@ switch (snapActionState) do { [1,0,0] call fnc_snapActionCleanup; [] spawn { while {true} do { - if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";}; + if(!dayz_actionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";}; uiSleep 2; }; }; diff --git a/SQF/dayz_code/actions/stopGenerator.sqf b/SQF/dayz_code/actions/stopGenerator.sqf index 65e72c69e..6d104151e 100644 --- a/SQF/dayz_code/actions/stopGenerator.sqf +++ b/SQF/dayz_code/actions/stopGenerator.sqf @@ -1,7 +1,7 @@ private ["_vehicle","_started","_finished","_animState","_isMedic","_soundObject"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_99" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_99" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_fillgen; s_player_fillgen = 1; @@ -63,5 +63,5 @@ if (_finished) then { }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_fillgen = -1; \ No newline at end of file diff --git a/SQF/dayz_code/actions/tent_pitch.sqf b/SQF/dayz_code/actions/tent_pitch.sqf index 497595175..94b52c7c9 100644 --- a/SQF/dayz_code/actions/tent_pitch.sqf +++ b/SQF/dayz_code/actions/tent_pitch.sqf @@ -13,11 +13,12 @@ _classname = getText (_config >> "tentmodel"); //diag_log ("Classname: "+str(_classname)); //diag_log ("Item: "+str(_item)); -if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; // item is missing or tools are missing if ((!(_item IN magazines player))) exitWith { - r_action_count = 0; + dayz_actionInProgress = false; format[localize "str_player_31",_text,localize "str_player_31_pitch"] call dayz_rollingMessages; }; @@ -95,10 +96,9 @@ _booleans = []; //testonLadder, testSea, testPond, testBuilding, testSlope, test localize "str_success_tent_pitch" call dayz_rollingMessages; sleep 1; - r_action_count = 0; - } else { - r_action_count = 0; localize "str_fail_tent_pitch" call dayz_rollingMessages; }; -*/ + +dayz_actionInProgress = false; +*/ \ No newline at end of file diff --git a/SQF/dayz_code/actions/tow_AttachStraps.sqf b/SQF/dayz_code/actions/tow_AttachStraps.sqf index 0a5e16cf6..a39be796c 100644 --- a/SQF/dayz_code/actions/tow_AttachStraps.sqf +++ b/SQF/dayz_code/actions/tow_AttachStraps.sqf @@ -1,7 +1,7 @@ private ["_vehicle","_started","_finished","_animState","_isMedic","_abort","_configVeh","_nameText","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_towTruck","_towTruckSize","_allowedSize"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_towing; s_player_towing = 1; @@ -100,5 +100,5 @@ if(_IsNearVehicle >= 1) then { } else { localize "str_epoch_player_27" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_towing = -1; \ No newline at end of file diff --git a/SQF/dayz_code/actions/tow_DetachStraps.sqf b/SQF/dayz_code/actions/tow_DetachStraps.sqf index e52719dd4..f64c82702 100644 --- a/SQF/dayz_code/actions/tow_DetachStraps.sqf +++ b/SQF/dayz_code/actions/tow_DetachStraps.sqf @@ -1,7 +1,7 @@ private ["_vehicle","_started","_finished","_animState","_isMedic","_configVeh","_nameText","_towTruck","_inTow"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_towing; s_player_towing = 1; @@ -79,5 +79,5 @@ if(_inTow) then { } else { localize "str_epoch_player_102" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; s_player_towing = -1; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_bicycle.sqf b/SQF/dayz_code/actions/trade_any_bicycle.sqf index 300750d96..ce44df76e 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle.sqf @@ -1,7 +1,7 @@ private ["_sign","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // [part_out,part_in, qty_out, qty_in, loc]; @@ -57,7 +57,7 @@ if (!_finished) exitWith { player playActionNow "stop"; }; localize "str_epoch_player_106" call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; if (_finished) then { @@ -232,4 +232,4 @@ if (_finished) then { }; }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_bicycle_old.sqf b/SQF/dayz_code/actions/trade_any_bicycle_old.sqf index 8c1ae6bb0..35874c6ab 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle_old.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle_old.sqf @@ -1,7 +1,7 @@ private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // [part_out,part_in, qty_out, qty_in, loc]; @@ -191,4 +191,4 @@ if (_qty >= _qty_in) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_boat.sqf b/SQF/dayz_code/actions/trade_any_boat.sqf index 7e4a559d3..fdb7a67bd 100644 --- a/SQF/dayz_code/actions/trade_any_boat.sqf +++ b/SQF/dayz_code/actions/trade_any_boat.sqf @@ -1,11 +1,11 @@ private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // Test cannot lock while another player is nearby //_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1; -//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; +//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; // [part_out,part_in, qty_out, qty_in, loc]; @@ -61,7 +61,7 @@ if (!_finished) exitWith { player playActionNow "stop"; }; localize "str_epoch_player_106" call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; if (_finished) then { @@ -204,4 +204,4 @@ if (_finished) then { }; }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_boat_old.sqf b/SQF/dayz_code/actions/trade_any_boat_old.sqf index df8414135..fece90570 100644 --- a/SQF/dayz_code/actions/trade_any_boat_old.sqf +++ b/SQF/dayz_code/actions/trade_any_boat_old.sqf @@ -1,11 +1,11 @@ private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // Test cannot lock while another player is nearby //_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1; -//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; +//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; // [part_out,part_in, qty_out, qty_in, loc]; @@ -173,4 +173,4 @@ if (_qty >= _qty_in) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_vehicle.sqf b/SQF/dayz_code/actions/trade_any_vehicle.sqf index 0f59f3ab4..c3a796e1f 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle.sqf @@ -1,11 +1,11 @@ private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_damage","_tireDmg","_tires","_okToSell","_temp_keys","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // Test cannot lock while another player is nearby //_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1; -//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; +//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; // [part_out,part_in, qty_out, qty_in, loc]; @@ -61,7 +61,7 @@ if (!_finished) exitWith { player playActionNow "stop"; }; localize "str_epoch_player_106" call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; if (_finished) then { @@ -248,4 +248,4 @@ if (_finished) then { }; }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/trade_any_vehicle_free.sqf b/SQF/dayz_code/actions/trade_any_vehicle_free.sqf index b1f308283..adad362f1 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle_free.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle_free.sqf @@ -1,11 +1,11 @@ private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // Test cannot lock while another player is nearby //_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1; -//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; +//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; // [part_out,part_in, qty_out, qty_in, loc]; @@ -61,7 +61,7 @@ if (!_finished) exitWith { player playActionNow "stop"; }; localize "str_epoch_player_106" call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; if (_finished) then { @@ -232,4 +232,4 @@ if (_finished) then { }; }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_vehicle_old.sqf b/SQF/dayz_code/actions/trade_any_vehicle_old.sqf index 9cbeb5a96..3eff83824 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle_old.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle_old.sqf @@ -1,11 +1,11 @@ private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // Test cannot lock while another player is nearby //_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1; -//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; +//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;}; // [part_out,part_in, qty_out, qty_in, loc]; @@ -208,4 +208,4 @@ if (_qty >= _qty_in) then { }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/trade_backpacks.sqf b/SQF/dayz_code/actions/trade_backpacks.sqf index d0fc6b155..bc506001e 100644 --- a/SQF/dayz_code/actions/trade_backpacks.sqf +++ b/SQF/dayz_code/actions/trade_backpacks.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_class","_started","_finished","_animState","_isMedic","_num_removed","_needed","_activatingPlayer","_buy_o_sell","_textPartIn","_textPartOut","_traderID"]; // [part_out,part_in, qty_out, qty_in,]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _activatingPlayer = player; @@ -57,7 +57,7 @@ if (!_finished) exitWith { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; localize "str_epoch_player_106" call dayz_rollingMessages; }; @@ -132,4 +132,4 @@ if (_finished) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_backpacks_old.sqf b/SQF/dayz_code/actions/trade_backpacks_old.sqf index dfd34dc4a..a423e1d0b 100644 --- a/SQF/dayz_code/actions/trade_backpacks_old.sqf +++ b/SQF/dayz_code/actions/trade_backpacks_old.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_class","_started","_finished","_animState","_isMedic","_num_removed","_needed","_activatingPlayer","_buy_o_sell","_textPartIn","_textPartOut","_traderID"]; // [part_out,part_in, qty_out, qty_in,]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _activatingPlayer = player; @@ -130,4 +130,4 @@ if (_qty >= _qty_in) then { format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_items.sqf b/SQF/dayz_code/actions/trade_items.sqf index 1b302b7b7..182512efd 100644 --- a/SQF/dayz_code/actions/trade_items.sqf +++ b/SQF/dayz_code/actions/trade_items.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_activatingPlayer","_traderID","_done","_actualMags"]; // [part_out,part_in, qty_out, qty_in,]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _activatingPlayer = player; @@ -146,4 +146,4 @@ while {r_autoTrade} do { uiSleep 1; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/trade_items_old.sqf b/SQF/dayz_code/actions/trade_items_old.sqf index 44a0f5358..e4b3a3a22 100644 --- a/SQF/dayz_code/actions/trade_items_old.sqf +++ b/SQF/dayz_code/actions/trade_items_old.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","_activatingPlayer","_traderID","_total_trades"]; // [part_out,part_in, qty_out, qty_in,]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _total_parts_out = 0; @@ -36,7 +36,7 @@ _abort = false; if(_total_trades < 1) exitWith { _needed = _qty_in - _qty; format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; // perform number of total trades @@ -269,4 +269,4 @@ if(_total_parts_out >= 1) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_items_wo_db.sqf b/SQF/dayz_code/actions/trade_items_wo_db.sqf index 98d74f7bc..3698c3226 100644 --- a/SQF/dayz_code/actions/trade_items_wo_db.sqf +++ b/SQF/dayz_code/actions/trade_items_wo_db.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut","_qty","_needed","_started","_finished","_animState","_isMedic","_abort","_removed","_tradeCounter","_total_trades","_humanityGain","_humanity"]; // [part_out,part_in, qty_out, qty_in,]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; @@ -21,7 +21,7 @@ _total_trades = floor (_qty / _qty_in); if(_total_trades < 1) exitWith { _needed = _qty_in - _qty; format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; _abort = false; @@ -117,4 +117,4 @@ for "_x" from 1 to _total_trades do { }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_metals.sqf b/SQF/dayz_code/actions/trade_metals.sqf index ee190fe84..0fdb4b25e 100644 --- a/SQF/dayz_code/actions/trade_metals.sqf +++ b/SQF/dayz_code/actions/trade_metals.sqf @@ -1,7 +1,7 @@ private ["_buy","_metals_conversion","_cancel"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; {player removeAction _x} count s_player_parts;s_player_parts = []; s_player_parts_crtl = 1; @@ -23,4 +23,4 @@ _metals_conversion = [ _cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false]; s_player_parts set [count s_player_parts,_cancel]; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf index 0a1d84546..d3ca5ab57 100644 --- a/SQF/dayz_code/actions/trade_weapons.sqf +++ b/SQF/dayz_code/actions/trade_weapons.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_needed","_activatingPlayer","_textPartIn","_textPartOut","_started","_finished","_animState","_isMedic","_removed"]; // [part_out,part_in, qty_out, qty_in,"buy"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _activatingPlayer = player; @@ -70,7 +70,7 @@ if(_buy_o_sell == "sell") then { if (_abort) exitWith { _msg call dayz_rollingMessages; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; localize "str_epoch_player_105" call dayz_rollingMessages; @@ -108,7 +108,7 @@ if (!_finished) exitWith { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; localize "str_epoch_player_106" call dayz_rollingMessages; }; @@ -184,4 +184,4 @@ if (_finished) then { }; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/trade_weapons_old.sqf b/SQF/dayz_code/actions/trade_weapons_old.sqf index 53707a19c..da4b4d916 100644 --- a/SQF/dayz_code/actions/trade_weapons_old.sqf +++ b/SQF/dayz_code/actions/trade_weapons_old.sqf @@ -1,8 +1,8 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_needed","_activatingPlayer","_textPartIn","_textPartOut","_started","_finished","_animState","_isMedic","_removed"]; // [part_out,part_in, qty_out, qty_in,"buy"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _activatingPlayer = player; @@ -120,4 +120,4 @@ if (_qty >= _qty_in) then { format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/unlock_veh.sqf b/SQF/dayz_code/actions/unlock_veh.sqf index 5d49c3964..5cdedd315 100644 --- a/SQF/dayz_code/actions/unlock_veh.sqf +++ b/SQF/dayz_code/actions/unlock_veh.sqf @@ -2,8 +2,8 @@ private["_vehicle","_key"]; _vehicle = (_this select 3) select 0; _key = (_this select 3) select 1; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;}; +dayz_actionInProgress = true; {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = []; s_player_lockUnlock_crtl = 1; @@ -23,4 +23,4 @@ if(player distance _vehicle < 10) then { s_player_lockUnlock_crtl = -1; s_player_lockUnlockInside_ctrl = -1; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/vault_combination_1.sqf b/SQF/dayz_code/actions/vault_combination_1.sqf index eae12981a..23e9642d6 100644 --- a/SQF/dayz_code/actions/vault_combination_1.sqf +++ b/SQF/dayz_code/actions/vault_combination_1.sqf @@ -1,7 +1,7 @@ private ["_ok"]; -if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_PLAYER_21" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_21" call dayz_rollingMessages;}; +dayz_actionInProgress = true; dayz_selectedVault = _this select 3; dayz_combination = ""; @@ -15,4 +15,4 @@ if(!isNull dayz_selectedVault) then { }; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/vault_pitch.sqf b/SQF/dayz_code/actions/vault_pitch.sqf index 5b61999b3..66ac1c978 100644 --- a/SQF/dayz_code/actions/vault_pitch.sqf +++ b/SQF/dayz_code/actions/vault_pitch.sqf @@ -5,8 +5,8 @@ private ["_tent","_location","_isOk","_cancel","_location3","_location4","_location1","_location2","_counter","_pondPos","_isPond","_ppos","_hastentitem","_dir","_building","_isBuilding","_playerPos","_item","_offset_x","_offset_y","_offset_z","_offset_z_attach","_config","_text","_tmpvault","_vault_location","_objectsPond","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_removed"]; //check if can pitch here -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_108" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_108" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _playerPos = getPosATL player; _item = _this; @@ -160,4 +160,4 @@ if(!_cancel) then { localize "str_epoch_player_111" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/compile/BuildVectors/build_vectors.sqf b/SQF/dayz_code/compile/BuildVectors/build_vectors.sqf index 3ac437072..a2a0874da 100644 --- a/SQF/dayz_code/compile/BuildVectors/build_vectors.sqf +++ b/SQF/dayz_code/compile/BuildVectors/build_vectors.sqf @@ -66,7 +66,7 @@ if(_todo == 1 || _todo == 0) then{ [1,0] call fnc_vectorActionCleanup; [] spawn { while {true} do { - if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {[0,0] call fnc_vectorActionCleanup; vectorActionState = "CLOSE";}; + if(!dayz_actionInProgress || DZE_cancelBuilding) exitWith {[0,0] call fnc_vectorActionCleanup; vectorActionState = "CLOSE";}; sleep 2; }; }; @@ -122,7 +122,7 @@ if(_todo == 2 || _todo == 0) then{ [1,0] call fnc_degreeActionCleanup; [] spawn { while {true} do { - if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {[0,0] call fnc_degreeActionCleanup; degreeActionState = "CLOSE";}; + if(!dayz_actionInProgress || DZE_cancelBuilding) exitWith {[0,0] call fnc_degreeActionCleanup; degreeActionState = "CLOSE";}; sleep 2; }; }; diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf index d0c0128f1..83ce65efd 100644 --- a/SQF/dayz_code/compile/dze_buildChecks.sqf +++ b/SQF/dayz_code/compile/dze_buildChecks.sqf @@ -7,7 +7,7 @@ _toolCheck = _this select 2; _classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); _requireplot = DZE_requireplot; // "Unable to build trader nearby." -if (!canbuild) exitWith {DZE_ActionInProgress = false; format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"] call dayz_rollingMessages; [false, false];}; +if (!canbuild) exitWith {dayz_actionInProgress = false; format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"] call dayz_rollingMessages; [false, false];}; if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then { _requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot"); @@ -27,7 +27,7 @@ _plotcheck = [player, false] call FNC_find_plots; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; -if(_isPole && {_IsNearPlot > 0}) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];}; +if(_isPole && {_IsNearPlot > 0}) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];}; if(_IsNearPlot == 0) then { if (_requireplot == 0 || {_isLandFireDZ}) then { @@ -54,11 +54,11 @@ if(_IsNearPlot == 0) then { }; }; -if(!_canBuild) exitWith { DZE_ActionInProgress = false; format[localize "STR_EPOCH_PLAYER_135",_needText,_distance] call dayz_rollingMessages; [_canBuild, _isPole];}; +if(!_canBuild) exitWith { dayz_actionInProgress = false; format[localize "STR_EPOCH_PLAYER_135",_needText,_distance] call dayz_rollingMessages; [_canBuild, _isPole];}; // Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit _buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"]; _center = if (isNull _nearestPole) then {_pos} else {_nearestPole}; -if ((count (nearestObjects [_center,_buildables,_distance])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_41",_distance] call dayz_rollingMessages; [false, _isPole];}; +if ((count (nearestObjects [_center,_buildables,_distance])) >= DZE_BuildingLimit) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_41",_distance] call dayz_rollingMessages; [false, _isPole];}; if (_toolCheck) then { _require = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> "Build" >> "require"); diff --git a/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf b/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf index 007f54f12..47897d11a 100644 --- a/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf +++ b/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf @@ -30,8 +30,8 @@ _missingText = ""; } forEach _missing; _hasbuilditem = _item in magazines player; -if (!_hasbuilditem) exitWith {DZE_ActionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;}; -if (!_hasrequireditem) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; false;}; +if (!_hasbuilditem) exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;}; +if (!_hasrequireditem) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; false;}; //When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!_hasrequireditem) exitWith{}; _hasrequireditem; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_damageActions.sqf b/SQF/dayz_code/compile/fn_damageActions.sqf index f7a38ed4a..9a3009903 100644 --- a/SQF/dayz_code/compile/fn_damageActions.sqf +++ b/SQF/dayz_code/compile/fn_damageActions.sqf @@ -1,5 +1,5 @@ scriptName "Functions\misc\fn_damageActions.sqf"; -if (DZE_ActionInProgress) exitWith {}; +if (dayz_actionInProgress) exitWith {}; #include "\z\addons\dayz_code\util\array.hpp"; /*********************************************************** diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 3acf5a916..43ddbe54d 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf"; - Function - [] call fnc_usec_selfActions; ************************************************************/ -if (DZE_ActionInProgress) exitWith {}; +if (dayz_actionInProgress) exitWith {}; private ["_canPickLight","_text","_dir","_canDoThis","_w2m","_bb","_waterHoles","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names", "_hasKey","_oldOwner","_hasAttached","_isAnimal","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild", "_player_lockUnlock_crtl","_displayName","_hasIgnators","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached", diff --git a/SQF/dayz_code/compile/player_lockVault.sqf b/SQF/dayz_code/compile/player_lockVault.sqf index 6702f4937..e8b2b7e54 100644 --- a/SQF/dayz_code/compile/player_lockVault.sqf +++ b/SQF/dayz_code/compile/player_lockVault.sqf @@ -4,8 +4,8 @@ Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ private ["_obj","_ownerID","_alreadyPacking","_text","_playerNear","_ComboMatch","_objType"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_10" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_10" call dayz_rollingMessages;}; +dayz_actionInProgress = true; player removeAction s_player_lockvault; s_player_lockvault = 1; @@ -17,7 +17,7 @@ _lockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "lockedClass" _text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName"); // Silently exit if object no longer exists -if (isNull _obj) exitWith { DZE_ActionInProgress = false; }; +if (isNull _obj) exitWith { dayz_actionInProgress = false; }; ["Working",0,[3,2,8,0]] call dayz_NutritionSystem; player playActionNow "Medic"; uiSleep 1; @@ -25,16 +25,16 @@ uiSleep 1; uiSleep 5; _playerNear = _obj call dze_isnearest_player; -if (_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_11" call dayz_rollingMessages;}; +if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_11" call dayz_rollingMessages;}; _ownerID = _obj getVariable["CharacterID","0"]; _ComboMatch = (_ownerID == dayz_combination); if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];}; -if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {DZE_ActionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_115",_text] call dayz_rollingMessages; }; +if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {dayz_actionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_115",_text] call dayz_rollingMessages; }; _alreadyPacking = _obj getVariable["packing",0]; -if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_116",_text] call dayz_rollingMessages;}; +if (_alreadyPacking == 1) exitWith {dayz_actionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_116",_text] call dayz_rollingMessages;}; _obj setVariable["packing",1]; if (!isNull _obj) then { @@ -53,4 +53,4 @@ if (!isNull _obj) then { format[localize "str_epoch_player_117",_text] call dayz_rollingMessages; }; s_player_lockvault = -1; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index 541ff48e4..3f8bebdfc 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -1,8 +1,8 @@ /* [_obj] call player_packTent; */ -if (DZE_ActionInProgress) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _obj = _this; _ownerID = _obj getVariable["CharacterID","0"]; _objectID = _obj getVariable["ObjectID","0"]; @@ -24,7 +24,7 @@ _campItems = ["IC_DomeTent","IC_Tent"]; if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems) then { player playActionNow "Medic"; _alreadyPacking = _obj getVariable["packing",0]; - if (_alreadyPacking == 1) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages; DZE_ActionInProgress = false;}; + if (_alreadyPacking == 1) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages; dayz_actionInProgress = false;}; _obj setVariable["packing",1]; _dir = direction _obj; @@ -82,4 +82,4 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems) } else { localize "str_fail_tent_pack" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf index 03fc7d7c2..54fdd5407 100644 --- a/SQF/dayz_code/compile/player_packVault.sqf +++ b/SQF/dayz_code/compile/player_packVault.sqf @@ -3,18 +3,18 @@ */ private ["_obj","_ownerID","_objectID","_objectUID","_alreadyPacking","_location1","_location2","_packedClass","_text","_playerNear"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_15" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_15" call dayz_rollingMessages;}; +dayz_actionInProgress = true; _obj = _this; _packedClass = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "packedClass"); _text = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "displayName"); // Silently exit if object no longer exists -if (isNull _obj || !(alive _obj)) exitWith { DZE_ActionInProgress = false; }; +if (isNull _obj || !(alive _obj)) exitWith { dayz_actionInProgress = false; }; _playerNear = _obj call dze_isnearest_player; -if (_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_16" call dayz_rollingMessages;}; +if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_16" call dayz_rollingMessages;}; _ownerID = _obj getVariable["CharacterID","0"]; _objectID = _obj getVariable["ObjectID","0"]; @@ -25,12 +25,12 @@ if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];}; player removeAction s_player_packvault; s_player_packvault = 1; -if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_118",_text] call dayz_rollingMessages;}; +if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_118",_text] call dayz_rollingMessages;}; -if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith { DZE_ActionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_119",_text] call dayz_rollingMessages;}; +if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith { dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_119",_text] call dayz_rollingMessages;}; _alreadyPacking = _obj getVariable["packing",0]; -if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_120",_text] call dayz_rollingMessages;}; +if (_alreadyPacking == 1) exitWith {dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_120",_text] call dayz_rollingMessages;}; _obj setVariable["packing",1]; format[localize "str_epoch_player_121",_text] call dayz_rollingMessages; @@ -43,7 +43,7 @@ if(_location1 distance _location2 > 0.1) exitWith { format[localize "str_epoch_player_122",_text] call dayz_rollingMessages; _obj setVariable["packing",0]; s_player_packvault = -1; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; if (!isNull _obj && alive _obj) then { @@ -67,4 +67,4 @@ if (!isNull _obj && alive _obj) then { format[localize "str_epoch_player_123",_text] call dayz_rollingMessages; }; s_player_packvault = -1; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf index 16676df17..54ee0fd5b 100644 --- a/SQF/dayz_code/compile/player_unlockVault.sqf +++ b/SQF/dayz_code/compile/player_unlockVault.sqf @@ -5,8 +5,8 @@ */ private ["_obj","_ownerID","_alreadyPacking","_playerNear","_claimedBy","_text","_objType","_ComboMatch"]; -if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_21" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "str_epoch_player_21" call dayz_rollingMessages;}; +dayz_actionInProgress = true; {player removeAction _x} count s_player_combi; s_player_combi = []; @@ -17,14 +17,14 @@ _objType = typeOf _obj; if !(_objType in DZE_LockedStorage) exitWith { s_player_unlockvault = -1; - DZE_ActionInProgress = false; + dayz_actionInProgress = false; }; _playerNear = _obj call dze_isnearest_player; -if (_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_20" call dayz_rollingMessages;}; +if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_20" call dayz_rollingMessages;}; // Silently exit if object no longer exists || alive -if (isNull _obj || !(alive _obj)) exitWith { DZE_ActionInProgress = false; }; +if (isNull _obj || !(alive _obj)) exitWith { dayz_actionInProgress = false; }; _unlockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "unlockedClass"); _text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName"); @@ -35,7 +35,7 @@ _ownerID = _obj getVariable["CharacterID","0"]; _ComboMatch = (_ownerID == dayz_combination); if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];}; -if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_124",_text] call dayz_rollingMessages;}; +if (_alreadyPacking == 1) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_124",_text] call dayz_rollingMessages;}; if (_ComboMatch || (_ownerID == dayz_playerUID)) then { // Check if any players are nearby if not allow player to claim item. @@ -73,7 +73,7 @@ if (_ComboMatch || (_ownerID == dayz_playerUID)) then { format[localize "STR_BLD_UNLOCKED",_text] call dayz_rollingMessages; }; } else { - DZE_ActionInProgress = false; + dayz_actionInProgress = false; format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; }; } else { @@ -86,4 +86,4 @@ if (_ComboMatch || (_ownerID == dayz_playerUID)) then { format[localize "STR_BLD_WRONG_COMBO",_text] call dayz_rollingMessages; }; s_player_unlockvault = -1; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/compile/player_upgradeVehicle.sqf b/SQF/dayz_code/compile/player_upgradeVehicle.sqf index d254bf226..c33fbaba8 100644 --- a/SQF/dayz_code/compile/player_upgradeVehicle.sqf +++ b/SQF/dayz_code/compile/player_upgradeVehicle.sqf @@ -4,13 +4,13 @@ */ private ["_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_removed","_tobe_removed_total","_textMissing","_num_removed","_removed_total","_temp_removed_array","_countr","_objectID","_objectUID","_location","_dir","_objectCharacterID","_weapons","_magazines","_backpacks","_classname","_object","_holder","_objWpnTypes","_objWpnQty","_newclassname","_requirements","_upgrade","_vehicle","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle"]; -if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_PLAYER_52" call dayz_rollingMessages;}; -DZE_ActionInProgress = true; +if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_52" call dayz_rollingMessages;}; +dayz_actionInProgress = true; // This is used to find correct upgrade based what upgrades was called allows multiple upgrades per vehicle. _upgrade = _this; -if (vehicle player != player) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_18" call dayz_rollingMessages;}; +if (vehicle player != player) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_18" call dayz_rollingMessages;}; // look for nearest empty vehicle _findNearestVehicles = player nearEntities [["LandVehicle"],10]; @@ -155,4 +155,4 @@ else { localize "STR_EPOCH_PLAYER_27" call dayz_rollingMessages; }; -DZE_ActionInProgress = false; +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index c5bdb60cd..b14bf54a9 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -326,6 +326,7 @@ r_antiA_done = false; r_antiB_done = false; r_antiD_done = false; carryClick = false; +dayz_actionInProgress = false; dayz_workingInprogress = false; //player warming up vars @@ -342,9 +343,6 @@ r_player_temp_max_factor = 0.04; //(lvl3 up arrow) r_player_Nutrition = 0; // Calories r_player_nutritionMuilpty = 2; -//count actions -r_action_count = 0; - //ammo routine r_player_actions2 = []; r_action2 = false; @@ -674,7 +672,6 @@ if (!isDedicated) then { if (isNil "DZE_requireplot") then {DZE_requireplot = 1;}; if (isNil "DZE_StaticConstructionCount") then {DZE_StaticConstructionCount = 0;}; autoRunActive = false; - DZE_ActionInProgress = false; DZE_AntiWallCounter = 0; DZE_myHaloVehicle = objNull; dayz_myLiftVehicle = objNull;