From c0e9fe62e1e17b8b9d93ca5dd730f684faab9023 Mon Sep 17 00:00:00 2001 From: A Man Date: Sun, 20 Oct 2019 07:26:51 +0200 Subject: [PATCH 01/14] Make Hide Body customizable Do not use hideBody as command without the action. It just hides the body but it still can be geared. If using hideBody in correlation with deleteVehicle it breaks the allDead command. player action ["hideBody", body] deletes the body and the marker from the map but it stays inside allDead. This fixes the issue that hided players were still shown on the map and still searched for their body. Needs additional testing for a new release. --- CHANGE LOG 1.0.6.3.txt | 2 ++ SQF/dayz_code/Configs/CfgArma.hpp | 1 + SQF/dayz_code/actions/hide_body.sqf | 16 +++++++++++++ SQF/dayz_code/compile/fn_selfActions.sqf | 9 ++++++++ SQF/dayz_code/configVariables.sqf | 1 + SQF/dayz_code/init/variables.sqf | 29 ++++++++++++------------ 6 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 SQF/dayz_code/actions/hide_body.sqf diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index 130471666..1698b6627 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -1,6 +1,7 @@ [NEW] Time between unlocking safes/lockboxes after a failed code will be exponentially higher, see configVariables.sqf\DZE_lockablesHarderPenalty @oiad [NEW] Added 93 new zombie models with loot groups and strings for Server Admins @Airwavesman [NEW] Zombie Loot supports backpacks now @Airwavesman +[NEW] Hide Body can be edited and toggled now. Enabled by default, configVariables.sqf/DZE_Hide_Body @AirwavesMan [FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2, 048caa5) [FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed (e89eebc) #2009 @TheFirstNoob @@ -15,6 +16,7 @@ [FIXED] DistanceFoot database stat was incorrect. @dihan48 [FIXED] Wrong cargo count of Refuel Trucks after last Corepatch. @AirwavesMan [FIXED] Vehicles jumping into the air after flipping. @AirwavesMan +[FIXED] Crafting wooden arrows from wood piles and razors was not possible. @AirwavesMan [UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_ [UPDATED] Added notification when status icons are disabled diff --git a/SQF/dayz_code/Configs/CfgArma.hpp b/SQF/dayz_code/Configs/CfgArma.hpp index 4a3a1bda9..25a1f695b 100644 --- a/SQF/dayz_code/Configs/CfgArma.hpp +++ b/SQF/dayz_code/Configs/CfgArma.hpp @@ -27,6 +27,7 @@ class CfgActions { class PutMagazine : None { show = 0; }; class DeactivateMine : None { show = 0; }; class RepairVehicle: None { show = 0; }; + class HideBody: None { show = 0; }; //Moved to fn_selfactions to allow editing /* "None" "GetInCommander" diff --git a/SQF/dayz_code/actions/hide_body.sqf b/SQF/dayz_code/actions/hide_body.sqf new file mode 100644 index 000000000..646e022a4 --- /dev/null +++ b/SQF/dayz_code/actions/hide_body.sqf @@ -0,0 +1,16 @@ +if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; +dayz_actionInProgress = true; + +private "_body"; + +player removeAction s_player_hide_body; +s_player_hide_body = -1; + +closeDialog 0; + +_body = _this select 3; +if (isNull _body) exitWith { dayz_actionInProgress = false;}; + +player action ["hideBody", _body]; + +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 8f51ae0ba..d20591b2f 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -712,6 +712,15 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_lockUnlock_crtl = -1; }; + if (DZE_Hide_Body && {_isMan} && {!_isAlive}) then { + if (s_player_hide_body < 0) then { + s_player_hide_body = player addAction [localize "str_action_hide_body", "\z\addons\dayz_code\actions\hide_body.sqf",_cursorTarget, 1, true, true]; + }; + } else { + player removeAction s_player_hide_body; + s_player_hide_body = -1; + }; + // gear access on surrendered player if (isPlayer _cursorTarget && {_isAlive} && {_cursorTarget getVariable ["DZE_Surrendered",false]}) then { if (s_player_SurrenderedGear < 0) then { diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 9f4dc3e79..924aa0f2b 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -34,6 +34,7 @@ DZE_DisabledChannels = [(localize "str_channel_side"),(localize "str_channel_glo DZE_NutritionDivisor = [1, 1, 1, 1]; //array of DIVISORS that regulate the rate of [calories, thirst, hunger, temperature] use when "working" (keep in mind that temperature raises with actions) - min values 0.1 - Larger values slow the effect, smaller values accelerate it DZE_ZombieSpeed = [0,0]; //Default agro speed is 6 per zombie config, set array elements 0 and 1 the same for non-variable speed, set to 0 to disable. array format = [min, max]; Ex: [2, 6]; results in a range of speed between 2 and 6 (2 is the old DZE_slowZombies hard-coded speed) DZE_lockablesHarderPenalty = true; // Enforce an exponential wait on attempts between unlocking a safe/lockbox from a failed code. +DZE_Hide_Body = true; //Enable hide dead bodies. Hiding a dead body removes the corps marker from the map too. Default = true // SafeZone DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray? diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index b6232cc90..fe68884bf 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -194,7 +194,7 @@ dayz_resetSelfActions = { s_player_setCode = -1; s_player_BuildUnLock = -1; s_player_BuildLock = -1;*/ - + // EPOCH ADDITIONS s_player_packvault = -1; s_player_lockvault = -1; @@ -217,7 +217,7 @@ dayz_resetSelfActions = { s_player_barkdog = -1; s_player_warndog = -1; s_player_followdog = -1; - s_player_information = -1; + s_player_information = -1; s_player_fuelauto = -1; s_player_fuelauto2 = -1; s_player_fillgen = -1; @@ -247,6 +247,7 @@ dayz_resetSelfActions = { s_player_toggleVectors=[]; vectorActions = -1; s_player_manageDoor = -1; + s_player_hide_body = -1; }; call dayz_resetSelfActions; @@ -311,13 +312,13 @@ gear_done = false; //player warming up vars //heatpack r_player_warming_heatpack = [false, 0]; -r_player_warming_heatpack_time = 600; +r_player_warming_heatpack_time = 600; //displays temp progress r_player_temp_factor = 0; //to be used for temp(up/down) indicators r_player_temp_min_factor = -0.04; //(lvl3 down arrow) r_player_temp_max_factor = 0.04; //(lvl3 up arrow) - + //INT Nutrition Info r_player_Nutrition = 0; // Calories r_player_nutritionMuilpty = 2; @@ -376,10 +377,10 @@ dayz_traps_active = []; dayz_traps_trigger = []; //Settings Not under dayz_settings -if(isNil "dayz_attackRange") then { +if(isNil "dayz_attackRange") then { dayz_attackRange = 3; }; -if(isNil "dayz_DamageMultiplier") then { +if(isNil "dayz_DamageMultiplier") then { dayz_DamageMultiplier = 1; }; if(isNil "dayz_quickSwitch") then { @@ -416,7 +417,7 @@ if (toLower worldName != "chernarus") then { if(isNil "dayz_presets") then { dayz_presets = "Vanilla"; }; switch (dayz_presets) do { - case "Custom": { //Custom + case "Custom": { //Custom if(isNil "dayz_enableGhosting") then { dayz_enableGhosting = false; }; if(isNil "dayz_ghostTimer") then { dayz_ghostTimer = 120; }; if(isNil "dayz_spawnselection") then { dayz_spawnselection = 0; }; @@ -436,7 +437,7 @@ switch (dayz_presets) do { dayz_spawnselection = 0; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass - dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass + dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass dayz_bleedingeffect = 2; //1= blood on the ground, 2= partical effect, 3 = both. dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked. dayz_temperature_override = true; // Set to true to disable all temperature changes. @@ -450,7 +451,7 @@ switch (dayz_presets) do { dayz_spawnselection = 0; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass - dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass + dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass dayz_bleedingeffect = 3; //1= blood on the ground, 2= partical effect, 3 = both. dayz_OpenTarget_TimerTicks = 60 * 25; //how long can a player be freely attacked for after attacking someone unprovoked. dayz_temperature_override = false; // Set to true to disable all temperature changes. @@ -464,7 +465,7 @@ switch (dayz_presets) do { dayz_spawnselection = 1; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass - dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass + dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass dayz_bleedingeffect = 3; //1= blood on the ground, 2= partical effect, 3 = both. dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked. dayz_temperature_override = false; // Set to true to disable all temperature changes. @@ -554,8 +555,8 @@ if (isServer) then { dead_bodyCleanup = []; needUpdate_objects = []; needUpdate_FenceObjects = []; - //dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass - //dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass + //dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass + //dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass //Objects to remove when killed. DayZ_nonCollide = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3", "StashMedium4", "DomeTentStorage", "DomeTentStorage0", "DomeTentStorage1", "DomeTentStorage2", "DomeTentStorage3", "DomeTentStorage4", "CamoNet_DZ", "DesertTentStorage", "DesertTentStorage0", "DesertTentStorage1", "DesertTentStorage2", "DomeTentStorage3", "DesertTentStorage4"]; DayZ_WoodenFence = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7"]; @@ -589,7 +590,7 @@ if (!isDedicated) then { dayz_plantTypes = ["","MAP_pumpkin","MAP_p_Helianthus","fiberplant"]; //Needed for trees spawned with createVehicle like POI (typeOf returns class instead of "") dayz_treeTypes = ["","MAP_t_picea1s","MAP_t_picea2s","MAP_t_picea3f","MAP_t_pinusN2s","MAP_t_pinusS2f","MAP_t_populus3s","MAP_t_betula2s","MAP_t_fagus2s","MAP_t_fagus2W","MAP_t_malus1s"]; - + //temperature variables dayz_temperatur = 36; //TeeChange dayz_temperaturnormal = 36; //TeeChange @@ -649,7 +650,7 @@ if (!isDedicated) then { //Animals dayz_currentGlobalAnimals = 0; dayz_maxGlobalAnimals = 50; - //Plants + //Plants dayz_currentGlobalPlants = 0; dayz_maxGlobalPlants = 500; //Loot From e884a17552b0309fcb6767849d59b57b2fd68f3e Mon Sep 17 00:00:00 2001 From: A Man Date: Sun, 20 Oct 2019 07:37:22 +0200 Subject: [PATCH 02/14] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 74134be34..61776a9db 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,8 @@ GitHub Collaborators (In order of most commits) * Axles - https://github.com/Axles * Armifer - https://github.com/Armifer * Zupa - https://github.com/Windmolders +* oiad - https://github.com/oiad +* AirwavesMan - https://github.com/AirwavesMan -------------------------- GitHub Contributors (In order of most commits) From 8f10a36b994f299402415b87df81ef73664f5a56 Mon Sep 17 00:00:00 2001 From: A Man Date: Sun, 20 Oct 2019 18:30:29 +0200 Subject: [PATCH 03/14] Fix snap point for half cinder wall --- CHANGE LOG 1.0.6.3.txt | 1 + SQF/dayz_code/Configs/CfgExtra/snappoints.hpp | 2 +- SQF/dayz_code/configVariables.sqf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index 1698b6627..051da16b6 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -17,6 +17,7 @@ [FIXED] Wrong cargo count of Refuel Trucks after last Corepatch. @AirwavesMan [FIXED] Vehicles jumping into the air after flipping. @AirwavesMan [FIXED] Crafting wooden arrows from wood piles and razors was not possible. @AirwavesMan +[FIXED] Top snap point for half cinder wall was incorrect. @ndavalos, @AirwavesMan [UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_ [UPDATED] Added notification when status icons are disabled diff --git a/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp b/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp index 877bb471f..75af544fe 100644 --- a/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp +++ b/SQF/dayz_code/Configs/CfgExtra/snappoints.hpp @@ -288,7 +288,7 @@ class SnapBuilding { {0,0,0,"Pivot"}, {-2.64, 0, 1.685,"Left"}, {2.64, 0, 1.685,"Right"}, - {0, 0, 1.685,"Top"} + {0, 0, 1.5,"Top"} }; }; class CinderWallDoorSmall_DZ: Cinder_DZE {}; diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 924aa0f2b..373b57bb6 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -34,7 +34,7 @@ DZE_DisabledChannels = [(localize "str_channel_side"),(localize "str_channel_glo DZE_NutritionDivisor = [1, 1, 1, 1]; //array of DIVISORS that regulate the rate of [calories, thirst, hunger, temperature] use when "working" (keep in mind that temperature raises with actions) - min values 0.1 - Larger values slow the effect, smaller values accelerate it DZE_ZombieSpeed = [0,0]; //Default agro speed is 6 per zombie config, set array elements 0 and 1 the same for non-variable speed, set to 0 to disable. array format = [min, max]; Ex: [2, 6]; results in a range of speed between 2 and 6 (2 is the old DZE_slowZombies hard-coded speed) DZE_lockablesHarderPenalty = true; // Enforce an exponential wait on attempts between unlocking a safe/lockbox from a failed code. -DZE_Hide_Body = true; //Enable hide dead bodies. Hiding a dead body removes the corps marker from the map too. Default = true +DZE_Hide_Body = true; //Enable hide dead bodies. Hiding a dead body removes the corpse marker from the map too. Default = true // SafeZone DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray? From ba8ff32cd7b29f888a9cc2fbf464ba4afa66121d Mon Sep 17 00:00:00 2001 From: A Man Date: Sun, 20 Oct 2019 20:18:41 +0200 Subject: [PATCH 04/14] Localize player_craftItem near check --- SQF/dayz_code/actions/modular_build.sqf | 2 +- SQF/dayz_code/actions/player_build.sqf | 2 +- SQF/dayz_code/actions/player_craftItem.sqf | 4 ++-- SQF/dayz_code/stringtable.xml | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index 40883fcd4..b4112f8ff 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -66,7 +66,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActi _isNear = count (nearestObjects [_pos, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]); if(_isNear == 0) then { _abort = true; - _reason = localize "STR_BLD_name_ItemWorkshop"; + _reason = localize "STR_EPOCH_WORKBENCH_NEARBY"; }; }; case "fueltank": diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index d8b277204..89e06840e 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -66,7 +66,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> _isNear = count (nearestObjects [_pos, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]); if(_isNear == 0) then { _abort = true; - _reason = localize "STR_BLD_name_ItemWorkshop"; + _reason = localize "STR_EPOCH_WORKBENCH_NEARBY"; }; }; case "fueltank": diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 82ab405c7..9e3e80a28 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -53,14 +53,14 @@ if ("fire" in _needNear) then { _isNear = {inflamed _x} count (_pPos nearObjects _distance); if(_isNear == 0) then { _abort = true; - _reason = "fire"; + _reason = localize "STR_EPOCH_FIRE"; }; }; if ("workshop" in _needNear) then { _isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]); if(_isNear == 0) then { _abort = true; - _reason = "workshop"; + _reason = localize "STR_EPOCH_WORKBENCH_NEARBY"; }; }; if (_abort) exitWith { diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index b6db5c88d..1f1894517 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -16853,6 +16853,10 @@ Feuer (angezündet) Ohniště (hořící) + + Workbench, Wooden Shed or Wood Shack + Werkbank, Holzschuppen oder Holzhütte + Humans Nearby Spieler in der Nähe From 82485ea0c6db3eaca3560d4d40e188508e19b1b0 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 23 Oct 2019 09:25:20 +0200 Subject: [PATCH 05/14] Adding AK-107 to attachment system, loot, trader This adds 6 AK-107 versions to the dayz attachment system. There is no SD version at the moment. The RPK-74 magazine could only be used with the AK-74 SD. This was unintentional. All AK-74 versions support the RPK-74 magazine now. The RPK-74 and the AK-74 magazine description needed a few adjustments. --- CHANGE LOG 1.0.6.3.txt | 2 + .../Configs/CfgLoot/Groups/Weapons.hpp | 1 + .../Category/FriendlyAssaultRifle.hpp | 30 ++++ .../Configs/CfgWeapons/CfgWeapons.hpp | 2 + .../Configs/CfgWeapons/Rifles/AK74.hpp | 7 +- .../Configs/CfgWeapons/Rifles/AKS74U.hpp | 6 +- .../CfgWeapons/Weapon/Assault/AK107.hpp | 157 ++++++++++++++++++ .../R3F_Realism/R3F_Weight/Weapons/Rifles.hpp | 24 +++ SQF/dayz_code/stringtable.xml | 55 +++++- 9 files changed, 278 insertions(+), 6 deletions(-) create mode 100644 SQF/dayz_code/Configs/CfgWeapons/Weapon/Assault/AK107.hpp diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index 051da16b6..b1def13e8 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -2,6 +2,7 @@ [NEW] Added 93 new zombie models with loot groups and strings for Server Admins @Airwavesman [NEW] Zombie Loot supports backpacks now @Airwavesman [NEW] Hide Body can be edited and toggled now. Enabled by default, configVariables.sqf/DZE_Hide_Body @AirwavesMan +[NEW] 6 AK-107 versions added with attachment support. @AirwavesMan [FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2, 048caa5) [FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed (e89eebc) #2009 @TheFirstNoob @@ -18,6 +19,7 @@ [FIXED] Vehicles jumping into the air after flipping. @AirwavesMan [FIXED] Crafting wooden arrows from wood piles and razors was not possible. @AirwavesMan [FIXED] Top snap point for half cinder wall was incorrect. @ndavalos, @AirwavesMan +[FIXED] The RPK-74 magazine could not be used with all AK-74 versions. @AirwavesMan [UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_ [UPDATED] Added notification when status icons are disabled diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Weapons.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Weapons.hpp index 872c3fb17..d34215562 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Weapons.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Weapons.hpp @@ -74,6 +74,7 @@ assaultrifles[] = { {Loot_WEAPON, 0.1, AKS_GOLD}, {Loot_WEAPON, 0.5, AKM_DZ}, //AK_47_M {Loot_WEAPON, 0.5, AK74_DZ}, //AK_74 + {Loot_WEAPON, 0.5, AK107_DZ}, //AK_107 {Loot_WEAPON, 0.3, FNFAL_DZ}, //FN_FAL {Loot_WEAPON, 0.1, FN_FAL_ANPVS4_DZE}, //FNFAL_ANPVS4_DZ is NV only _DZE is toggleable {Loot_WEAPON, 0.5, G36A_Camo_DZ}, //G36A_camo diff --git a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyAssaultRifle.hpp b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyAssaultRifle.hpp index 71756661a..5fab69e42 100644 --- a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyAssaultRifle.hpp +++ b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyAssaultRifle.hpp @@ -769,6 +769,36 @@ class Category_485 { buy[] = {-1,"ItemGoldBar"}; // Sell only sell[] = {1,"ItemGoldBar10oz"}; }; + class AK107_DZ { + type = "trade_weapons"; + buy[] = {2,"ItemGoldBar"}; + sell[] = {1,"ItemGoldBar"}; + }; + class AK107_Kobra_DZ { + type = "trade_weapons"; + buy[] = {-1,"ItemGoldBar"}; // Sell only + sell[] = {3,"ItemGoldBar"}; + }; + class AK107_PSO1_DZ { + type = "trade_weapons"; + buy[] = {-1,"ItemGoldBar"}; // Sell only + sell[] = {5,"ItemGoldBar"}; + }; + class AK107_GL_DZ { + type = "trade_weapons"; + buy[] = {-1,"ItemGoldBar"}; // Sell only + sell[] = {3,"ItemGoldBar"}; + }; + class AK107_GL_Kobra_DZ { + type = "trade_weapons"; + buy[] = {-1,"ItemGoldBar"}; // Sell only + sell[] = {5,"ItemGoldBar"}; + }; + class AK107_GL_PSO1_DZ { + type = "trade_weapons"; + buy[] = {-1,"ItemGoldBar"}; // Sell only + sell[] = {7,"ItemGoldBar"}; + }; class FNFAL_DZ { type = "trade_weapons"; buy[] = {8,"ItemGoldBar"}; diff --git a/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp b/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp index c10c7af8e..587773450 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp @@ -29,6 +29,8 @@ class CfgWeapons #include "Weapon\Sniper\M4SPR.hpp" #include "Weapon\Sniper\VSSVintorez.hpp" + //Ak107 + #include "Weapon\Assault\AK107.hpp" //each include is preceded by its required external references. diff --git a/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp b/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp index 196a01ab5..243907c02 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp @@ -5,13 +5,14 @@ class AK74_Kobra_DZ : AK_74 model = "z\addons\dayz_communityweapons\ak74\ak74_kobra.p3d"; picture = "\z\addons\dayz_communityweapons\ak74\data\w_ak74_kobra_ca.paa"; displayName = $STR_DZ_WPN_AK74_KOBRA_NAME; - /* //Allow default A2 mags + magazines[] = { 30Rnd_545x39_AK, - 30Rnd_545x39_AKSD + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK }; - */ + class Attachments { Attachment_GP25 = "AK74_GL_Kobra_DZ"; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Rifles/AKS74U.hpp b/SQF/dayz_code/Configs/CfgWeapons/Rifles/AKS74U.hpp index a38b59f82..a2ca5804b 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Rifles/AKS74U.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Rifles/AKS74U.hpp @@ -7,7 +7,8 @@ class AKS74U_Kobra_DZ : AKS_74_U magazines[] = { 30Rnd_545x39_AK, - 30Rnd_545x39_AKSD + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK }; class Attachments @@ -34,7 +35,8 @@ class AKS74U_Kobra_SD_DZ : AKS_74_UN_kobra magazines[] = { 30Rnd_545x39_AKSD, - 30Rnd_545x39_AK //Allow both SD and non-SD + 30Rnd_545x39_AK, //Allow both SD and non-SD + 75Rnd_545x39_RPK }; class ItemActions diff --git a/SQF/dayz_code/Configs/CfgWeapons/Weapon/Assault/AK107.hpp b/SQF/dayz_code/Configs/CfgWeapons/Weapon/Assault/AK107.hpp new file mode 100644 index 000000000..ec4ee4834 --- /dev/null +++ b/SQF/dayz_code/Configs/CfgWeapons/Weapon/Assault/AK107.hpp @@ -0,0 +1,157 @@ +class AK_107_kobra; +class AK107_Kobra_DZ : AK_107_kobra +{ + displayName = $STR_DZ_WPN_AK107_KOBRA_NAME; + + magazines[] = + { + 30Rnd_545x39_AK, + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK + }; + + class Attachments + { + Attachment_GP25 = "AK107_GL_Kobra_DZ"; + }; + + class ItemActions + { + class RemoveKobra + { + text = $STR_DZ_ATT_KOBRA_RMVE; + script = "; ['Attachment_Kobra',_id,'AK107_DZ'] call player_removeAttachment"; + }; + }; +}; + +class AK_107_CP; +class AK107_DZ : AK_107_CP +{ + displayName = $STR_DZ_WPN_AK107_NAME; + + magazines[] = + { + 30Rnd_545x39_AK, + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK + }; + + class Attachments + { + Attachment_Kobra = "AK107_Kobra_DZ"; + Attachment_PSO1 = "AK107_PSO_DZ"; + Attachment_GP25 = "AK107_GL_DZ"; + }; + + class ItemActions {}; +}; + +class AK_107_GL_CP; +class AK107_GL_DZ : AK_107_GL_CP +{ + displayName = $STR_DZ_WPN_AK107_GL_NAME; + + magazines[] = + { + 30Rnd_545x39_AK, + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK + }; + + class Attachments + { + Attachment_Kobra = "AK107_GL_Kobra_DZ"; + Attachment_PSO1 = "AK107_GL_PSO_DZ"; + }; + class ItemActions + { + class RemoveGL + { + text = $STR_DZ_ATT_GP25_RMVE; + script = "; ['Attachment_GP25',_id,'AK107_DZ'] call player_removeAttachment"; + }; + }; +}; + +class AK_107_pso; +class AK107_PSO_DZ : AK_107_pso +{ + displayName = $STR_DZ_WPN_AK107_PSO1_NAME; + + magazines[] = + { + 30Rnd_545x39_AK, + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK + }; + + class Attachments + { + Attachment_GP25 = "AK107_GL_PSO_DZ"; + }; + class ItemActions + { + class RemovePSO1 + { + text = $STR_DZ_ATT_PSO1_RMVE; + script = "; ['Attachment_PSO1',_id,'AK107_DZ'] call player_removeAttachment"; + }; + }; +}; + +class AK_107_GL_pso; +class AK107_GL_PSO_DZ : AK_107_GL_pso +{ + displayName = $STR_DZ_WPN_AK107_GL_PSO1_NAME; + + magazines[] = + { + 30Rnd_545x39_AK, + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK + }; + + class Attachments {}; + class ItemActions + { + class RemovePSO1 + { + text = $STR_DZ_ATT_PSO1_RMVE; + script = "; ['Attachment_PSO1',_id,'AK107_GL_DZ'] call player_removeAttachment"; + }; + class RemoveGL + { + text = $STR_DZ_ATT_GP25_RMVE; + script = "; ['Attachment_GP25',_id,'AK107_PSO_DZ'] call player_removeAttachment"; + }; + }; +}; + +class AK_107_GL_kobra; +class AK107_GL_Kobra_DZ : AK_107_GL_kobra +{ + displayName = $STR_DZ_WPN_AK107_GL_KOBRA_NAME; + + magazines[] = + { + 30Rnd_545x39_AK, + 30Rnd_545x39_AKSD, //Allow both SD and non-SD + 75Rnd_545x39_RPK + }; + + class Attachments {}; + class ItemActions + { + class RemoveKobra + { + text = $STR_DZ_ATT_KOBRA_RMVE; + script = "; ['Attachment_Kobra',_id,'AK107_GL_DZ'] call player_removeAttachment"; + }; + class RemoveGL + { + text = $STR_DZ_ATT_GP25_RMVE; + script = "; ['Attachment_GP25',_id,'AK107_Kobra_DZ'] call player_removeAttachment"; + }; + }; +}; \ No newline at end of file diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Weapons/Rifles.hpp b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Weapons/Rifles.hpp index 90a557eb4..219637f30 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Weapons/Rifles.hpp +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Weapons/Rifles.hpp @@ -23,6 +23,30 @@ class AK_107_GL_pso { weight = 5.5; }; +class AK107_Kobra_DZ +{ + weight = 3.8; +}; +class AK107_GL_Kobra_DZ +{ + weight = 5.3; +}; +class AK107_PSO_DZ +{ + weight = 4; +}; +class AK107_GL_PSO_DZ +{ + weight = 5.5; +}; +class AK107_DZ +{ + weight = 3; +}; +class AK107_GL_DZ +{ + weight = 4.5; +}; class AKS_74_U { weight = 2.7; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 1f1894517..c84ab2a31 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -17261,7 +17261,60 @@ Leaf of a tobacco plant Blatt einer Tabakpflanze Лист табака с табачной плантации - + + + + + Kaliber: 5,45x39mm <br/>Schuss: 30 <br/>Eingesetzt in: AK-74, AK-74 Kobra, AKS-74U, AK-107 und RPK-74 + Caliber: 5.45x39mm <br/>Rounds: 30 <br/>Used in: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 + Calibro: 5,45x39 mm <br/>Munizioni: 30 <br/>Si usa in: AK-74, AK-74 Kobra, AKS-74U, AK-107 e RPK-74 + Calibre: 5,45x39 mm <br/>Cargas: 30 <br/>Uso: AK-74, AK-74 Kobra, AKS-74U, AK-107 y RPK-74 + Calibre : 5.45x39 mm <br/>Munitions : 30 <br/>Utilisé avec : AK-74, AK-74 Kobra, AKS-74U, AK-107 et RPK-74 + Kalibr: 5,45x39mm <br/>Nábojů: 30 <br/>Pro: AK-74, AK-74 Kobra, AKS-74U, AK-107 a RPK-74 + Патрон: 5.45x39 мм <br/>Количество: 30 <br/>Используется в: АК-74, АКС-74, АКС-74У, АК-107, РПК-74 + Kaliber: 5,45x39mm <br/>Naboje: 30 <br/>Używane w: AK-74, AK-74 Kobra, AKS-74U, AK-107 i RPK-74 + Kaliber: 5.45x39mm <br/> Töltények: 30 <br/> Hozzá tartozó fegyver: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 + + + Kaliber: 5,45x39mm <br/>Schuss: 75 <br/>Eingesetzt in: AK-74, AK-74 Kobra, AKS-74U, AK-107 und RPK-74 + Caliber: 5.45x39mm <br/>Rounds: 75 <br/>Used in: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 + Calibro: 5,45x39 mm <br/>Munizioni: 75 <br/>Si usa in: AK-74, AK-74 Kobra, AKS-74U, AK-107 e RPK-74 + Calibre: 5,45x39 mm <br/>Cargas: 75 <br/>Uso: AK-74, AK-74 Kobra, AKS-74U, AK-107 y RPK-74 + Calibre : 5.45x39 mm <br/>Munitions : 75 <br/>Utilisé avec : AK-74, AK-74 Kobra, AKS-74U, AK-107 et RPK-74 + Kalibr: 5,45x39mm <br/>Nábojů: 75 <br/>Pro: AK-74, AK-74 Kobra, AKS-74U, AK-107 a RPK-74 + Патрон: 5.45x39 мм <br/>Количество: 75 <br/>Используется в: АК-74, АКС-74, АКС-74У, АК-107, РПК-74 + Kaliber: 5,45x39mm <br/>Naboje: 75 <br/>Używane w: AK-74, AK-74 Kobra, AKS-74U, AK-107 i RPK-74 + Kaliber: 5.45x39mm <br/> Töltények: 75 <br/> Hozzá tartozó fegyver: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 + + + + + AK-107 + АК-107 + + + AK-107 GP-25 + АК-107 ГП-25 + + + AK-107 Kobra + АК-107 Кобра + + + AK-107 GP-25 Kobra + АК-107 ГП-25 Кобра + + + AK-107 PSO-1 + АК-107 ПСО-1 + + + AK-107 GP-25 PSO-1 + АК-107 ГП-25 ПСО-1 + + Winter Ghillie Suit From a09bb81a7a78348c305c5085afd7ba2ea92a7481 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 23 Oct 2019 10:50:01 +0200 Subject: [PATCH 06/14] Fix in ground spawn pickaxe and broken pickaxe The pickaxe and the broken pickaxe spawned headlong in the ground. It was the same for the crowbar. We need to add an extra weaponholder for this tools for a proper spawn. --- CHANGE LOG 1.0.6.3.txt | 42 ++++++++++--------- .../CfgLoot/Groups/Buildings/Castle.hpp | 6 ++- .../CfgLoot/Groups/Buildings/Construction.hpp | 6 ++- .../CfgLoot/Groups/Buildings/Industrial.hpp | 6 ++- .../Configs/CfgVehicles/WeaponHolder.hpp | 21 ++++++++++ SQF/dayz_code/stringtable.xml | 4 +- 6 files changed, 58 insertions(+), 27 deletions(-) diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index b1def13e8..7b3c62351 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -1,28 +1,32 @@ -[NEW] Time between unlocking safes/lockboxes after a failed code will be exponentially higher, see configVariables.sqf\DZE_lockablesHarderPenalty @oiad -[NEW] Added 93 new zombie models with loot groups and strings for Server Admins @Airwavesman -[NEW] Zombie Loot supports backpacks now @Airwavesman -[NEW] Hide Body can be edited and toggled now. Enabled by default, configVariables.sqf/DZE_Hide_Body @AirwavesMan -[NEW] 6 AK-107 versions added with attachment support. @AirwavesMan +[NEW] Time between unlocking safes/lockboxes after a failed code will be exponentially higher, see configVariables.sqf\DZE_lockablesHarderPenalty (c3cbca1) @oiad +[NEW] Added 93 new zombie models with loot groups and strings for Server Admins. (2e15009) @AirwavesMan +[NEW] Zombie Loot supports backpacks now. (096fc13) @AirwavesMan +[NEW] Hide Body can be edited and toggled now. Enabled by default, configVariables.sqf/DZE_Hide_Body (c0e9fe6) @AirwavesMan +[NEW] 6 AK-107 versions added with attachment support. (82485ea) @AirwavesMan -[FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2, 048caa5) +[FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2, 048caa5) @ebayShopper [FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed (e89eebc) #2009 @TheFirstNoob -[FIXED] POI fires were still spawning when POI was off and town generator was on (2855997) -[FIXED] Combo locks could be duplicated by two players removing them at the same time (564e3da) -[FIXED] Bush b_corylus.p3d allowed chopping down for wood like a tree (42e519a) -[FIXED] Player could shoot during unconscious wake up animation (634a01a) +[FIXED] POI fires were still spawning when POI was off and town generator was on (2855997) @ebayShopper +[FIXED] Combo locks could be duplicated by two players removing them at the same time (564e3da) @shu @oiad +[FIXED] Bush b_corylus.p3d allowed chopping down for wood like a tree (42e519a) @ebayShopper +[FIXED] Player could shoot during unconscious wake up animation (634a01a) @ebayShopper [FIXED] Rare publicVariable value restrictions for AuthKey due to RNG with basic Latin characters (d48c907) @oiad @AirwavesMan [FIXED] Freeze when iterating through CfgWeapons in A2OA 1.64 due to conflict with ItemKeys in dayz_epoch_b.pbo #2010 @S-fly -[FIXED] 45Rnd_545x39_RPK error after it was removed with the 2018-04-05 A2OA CorePatch (d249227) +[FIXED] 45Rnd_545x39_RPK error after it was removed with the 2018-04-05 A2OA CorePatch (d249227) @ebayShopper [FIXED] Disabled Arma's automatic vehicle refuel, repair and rearm at WarfareBVehicleServicePoint buildings (2c4f06c) @dihan48 -[FIXED] DistanceFoot database stat was incorrect. @dihan48 -[FIXED] Wrong cargo count of Refuel Trucks after last Corepatch. @AirwavesMan -[FIXED] Vehicles jumping into the air after flipping. @AirwavesMan -[FIXED] Crafting wooden arrows from wood piles and razors was not possible. @AirwavesMan -[FIXED] Top snap point for half cinder wall was incorrect. @ndavalos, @AirwavesMan -[FIXED] The RPK-74 magazine could not be used with all AK-74 versions. @AirwavesMan +[FIXED] DistanceFoot database stat was incorrect. (be777dd) @dihan48 +[FIXED] Wrong cargo count of Refuel Trucks after last Corepatch. (e26fb24) @AirwavesMan +[FIXED] Vehicles jumping into the air after flipping. (096fc13) @AirwavesMan +[FIXED] Crafting wooden arrows from wood piles and razors was not possible. (d4b46e4) @AirwavesMan +[FIXED] Top snap point for half cinder wall was incorrect. (8f10a36) @ndavalos, @AirwavesMan +[FIXED] The RPK-74 magazine could not be used with all AK-74 versions. (82485ea) @AirwavesMan +[FIXED] Multiple Vehicle Upgrades were not possbile. (ac884f2), (a430f79), (c24504a) @F507DMT +[FIXED] Fix an inventory dupe if on water. (a052ba7), (baf92eb) @F507DMT +[FIXED] The pickaxe and the broken pickaxe spawned in the ground on loot spawn. @AirwavesMan [UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_ -[UPDATED] Added notification when status icons are disabled -[UPDATED] Added night vision mode back to DMR_DZ and M4SPR_DZE after it was removed with the 2018-04-05 A2OA CorePatch +[UPDATED] Added notification when status icons are disabled. (e04f0fc) @ebayShopper +[UPDATED] Added night vision mode back to DMR_DZ and M4SPR_DZE after it was removed with the 2018-04-05 A2OA CorePatch (d6cf707) @ebayShopper +[UPDATED] All M32 grenades using one inventroy slot now. (cc85067) @AirwavesMan [INFO] Synced with DayZMod upstream up to commit fe063a8 diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp index 8192b2f99..6d8ecbb36 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp @@ -5,8 +5,10 @@ Castle[] = {Loot_WEAPON, 1, ItemMap}, {Loot_WEAPON, 1, ItemCompass}, {Loot_WEAPON, 2, ItemFlashlight}, - {Loot_WEAPON, 1, ItemPickaxe}, - {Loot_WEAPON, 2, ItemPickaxeBroken}, + //{Loot_WEAPON, 1, ItemPickaxe}, + //{Loot_WEAPON, 2, ItemPickaxeBroken}, + {Loot_VEHICLE, 1, WeaponHolder_ItemPickaxe}, + {Loot_VEHICLE, 2, WeaponHolder_ItemPickaxeBroken}, // {Loot_WEAPON, 2, ItemShovel}, // {Loot_WEAPON, 1, ItemHatchet}, {Loot_VEHICLE, 1, WeaponHolder_ItemHatchet}, diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp index cb2f5d8db..400ff5021 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp @@ -10,8 +10,10 @@ Construction[] = {Loot_MAGAZINE, 1, equip_lever}, {Loot_MAGAZINE, 1, ItemComboLock}, - {Loot_WEAPON, 1, ItemPickaxe}, - {Loot_WEAPON, 2, ItemPickaxeBroken}, + //{Loot_WEAPON, 1, ItemPickaxe}, + //{Loot_WEAPON, 2, ItemPickaxeBroken}, + {Loot_VEHICLE, 1, WeaponHolder_ItemPickaxe}, + {Loot_VEHICLE, 2, WeaponHolder_ItemPickaxeBroken}, {Loot_WEAPON, 1, ItemSledge}, {Loot_MAGAZINE, 2, ItemSledgeHandle}, {Loot_MAGAZINE, 2, ItemSledgeHead}, diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Industrial.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Industrial.hpp index 59452e3df..c9658f64b 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Industrial.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Industrial.hpp @@ -7,8 +7,10 @@ Industrial[] = {Loot_VEHICLE, 8, WeaponHolder_ItemCrowbar}, // {Loot_WEAPON, 5, ItemHatchet}, {Loot_VEHICLE, 5, WeaponHolder_ItemHatchet}, - {Loot_WEAPON, 1, ItemPickaxe}, - {Loot_WEAPON, 2, ItemPickaxeBroken}, + //{Loot_WEAPON, 1, ItemPickaxe}, + //{Loot_WEAPON, 2, ItemPickaxeBroken}, + {Loot_VEHICLE, 1, WeaponHolder_ItemPickaxe}, + {Loot_VEHICLE, 2, WeaponHolder_ItemPickaxeBroken}, {Loot_WEAPON, 1, ItemSledge}, {Loot_MAGAZINE, 2, ItemSledgeHandle}, {Loot_MAGAZINE, 2, ItemSledgeHead}, diff --git a/SQF/dayz_code/Configs/CfgVehicles/WeaponHolder.hpp b/SQF/dayz_code/Configs/CfgVehicles/WeaponHolder.hpp index 0d2cb973e..3a596680a 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/WeaponHolder.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/WeaponHolder.hpp @@ -22,6 +22,27 @@ class WeaponHolder_ItemCrowbar: WeaponHolderBase init="[(_this select 0),'cfgWeapons','ItemCrowbar'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';"; }; }; +class WeaponHolder_ItemPickaxe: WeaponHolderBase +{ + scope=2; + displayName = $STR_EQUIP_NAME_PICKAXE; + model = "z\addons\dayz_communityweapons\models\pickaxe\pickaxe.p3d"; + destrType = "DestructNo"; + + class eventHandlers + { + init="[(_this select 0),'cfgWeapons','ItemPickaxe'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';"; + }; +}; +class WeaponHolder_ItemPickaxeBroken: WeaponHolder_ItemPickaxe +{ + displayName = $STR_name_ItemPickaxeBroken; + + class eventHandlers + { + init="[(_this select 0),'cfgWeapons','ItemPickaxeBroken'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';"; + }; +}; class WeaponHolder_ItemSledge : WeaponHolderBase { // Epoch class. Needed for player_dropWeapon scope = public; displayName = $STR_EQUIP_NAME_SledgeHammer; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index c84ab2a31..eac67ec0e 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -14798,7 +14798,7 @@ Lumber Pack - Bauholzstapel + Bauholzpaket Упаковка пиломатериалов @@ -14833,7 +14833,7 @@ Plywood in a stack. - Sperrholzstapel. + Sperrholz, gestapelt und zusammengebunden. Упакованная фанера. From 1268f55f32ded9f4e5703040f36fb74595933ee7 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 23 Oct 2019 12:46:08 +0200 Subject: [PATCH 07/14] Fix floating loot after remove, pack or output from fn_dropItem --- CHANGE LOG 1.0.6.3.txt | 5 +-- SQF/dayz_code/actions/remove.sqf | 37 ++++++++++++---------- SQF/dayz_code/compile/fn_dropItem.sqf | 11 ++++--- SQF/dayz_code/compile/player_packTent.sqf | 20 +++++++++--- SQF/dayz_code/compile/player_packVault.sqf | 25 ++++++++------- 5 files changed, 59 insertions(+), 39 deletions(-) diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index 7b3c62351..143f0637a 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -20,9 +20,10 @@ [FIXED] Crafting wooden arrows from wood piles and razors was not possible. (d4b46e4) @AirwavesMan [FIXED] Top snap point for half cinder wall was incorrect. (8f10a36) @ndavalos, @AirwavesMan [FIXED] The RPK-74 magazine could not be used with all AK-74 versions. (82485ea) @AirwavesMan -[FIXED] Multiple Vehicle Upgrades were not possbile. (ac884f2), (a430f79), (c24504a) @F507DMT +[FIXED] Multiple Vehicle Upgrades were not possibile. (ac884f2), (a430f79), (c24504a) @F507DMT [FIXED] Fix an inventory dupe if on water. (a052ba7), (baf92eb) @F507DMT -[FIXED] The pickaxe and the broken pickaxe spawned in the ground on loot spawn. @AirwavesMan +[FIXED] The pickaxe and the broken pickaxe spawned in the ground on loot spawn. (a09bb81a) @AirwavesMan +[FIXED] Fix floating loot from remove, pack and fn_dropItem. @AirwavesMan [UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_ [UPDATED] Added notification when status icons are disabled. (e04f0fc) @ebayShopper diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index a5b0de1e2..31a9130f9 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -4,7 +4,7 @@ dayz_actionInProgress = true; delete object from db with extra waiting by [VB]AWOL parameters: _obj */ -private ["_obj","_objectID","_objectUID","_finished","_isOk","_proceed","_counter","_limit","_objType","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_ownerID","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular","_success","_lootGroupIndex","_output"]; +private ["_plotcheck","_PlayerNear","_isMine","_obj","_objectID","_objectUID","_finished","_isOk","_proceed","_counter","_limit","_objType","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_isWreckBuilding","_nameVehicle","_isModular","_success","_lootGroupIndex","_output"]; player removeAction s_player_deleteBuild; s_player_deleteBuild = 1; @@ -38,7 +38,6 @@ _isRemovable = _objType in DZE_isRemovable; _isWreckBuilding = _objType in DZE_isWreckBuilding; _isMine = _objType in ["Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck"]; _isModular = _obj isKindOf "ModularItems"; -_distance = DZE_PlotPole select 0; _PlayerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1; if (_PlayerNear && (_isMine or _objType == "Land_ammo_supply_wreck")) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;}; @@ -58,6 +57,8 @@ _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; if(_IsNearPlot >= 1) then { + private ["_buildcheck","_isowner","_isfriendly"]; + // Since there are plot poles nearby we need to check ownership && friend status _buildcheck = [player, _nearestPole] call FNC_check_access; _isowner = _buildcheck select 0; @@ -89,7 +90,7 @@ while {_isOk} do { _isOk = false; _proceed = false; }; - + format[localize "str_epoch_player_163",_nameVehicle,(_counter + 1),_limit] call dayz_rollingMessages; [player,"repair",0,false,20] call dayz_zombieSpeak; @@ -150,7 +151,7 @@ if (_proceed && _success) then { // Double check that object is not null if(!isNull(_obj)) then { _ipos = getPosATL _obj; - + if(!_isWreck && !_isWreckBuilding) then { //Server performs deleteVehicle PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,dayz_authKey]; @@ -158,7 +159,7 @@ if (_proceed && _success) then { } else { deleteVehicle _obj; }; - + if (_isWreckBuilding) then { PVDZ_send = [player,"RemoveObject",_ipos]; publicVariableServer "PVDZ_send"; @@ -194,10 +195,10 @@ if (_proceed && _success) then { if ({_objType in _x} count DZE_modularConfig > 0) then { { private ["_class", "_refund"]; - + _class = _x select 0; _refund = _x select 1; - + if (_objType == _class) then { {_selectedRemoveOutput set [count _selectedRemoveOutput,_x];} forEach _refund; }; @@ -214,14 +215,10 @@ if (_proceed && _success) then { [localize "str_epoch_player_90",1] call dayz_rollingMessages; }; - if (_ipos select 2 < 0) then { - _ipos set [2,0]; - }; - - _radius = 1; - if (_isMine) then { if((random 10) <= 4) then { + private ["_gems","_weights","_gemSelected"]; + _gems = []; _weights = []; { @@ -235,7 +232,16 @@ if (_proceed && _success) then { // give refund items if((count _selectedRemoveOutput) > 0 && !_preventRefund) then { - _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; + private "_posPlayer"; + + _posPlayer = getPosATL player; + _iPos set [2,_posPlayer select 2]; + + if (_iPos select 2 < 0) then { + _iPos set [2,0]; + }; + + _item = "WeaponHolder" createVehicle [0,0,0]; { _itemOut = _x select 0; _countOut = _x select 1; @@ -254,7 +260,6 @@ if (_proceed && _success) then { } count _selectedRemoveOutput; _item setposATL _iPos; - player reveal _item; DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on item player action ["Gear", _item]; @@ -265,4 +270,4 @@ if (_proceed && _success) then { }; dayz_actionInProgress = false; -s_player_deleteBuild = -1; \ No newline at end of file +s_player_deleteBuild = -1; diff --git a/SQF/dayz_code/compile/fn_dropItem.sqf b/SQF/dayz_code/compile/fn_dropItem.sqf index 758f84537..076f9dbfa 100644 --- a/SQF/dayz_code/compile/fn_dropItem.sqf +++ b/SQF/dayz_code/compile/fn_dropItem.sqf @@ -17,15 +17,18 @@ _nearByPile= nearestObjects [_pos, ["WeaponHolder","WeaponHolderBase"],PILE_SEAR if (count _nearByPile == 0) then { //No weapon holders found in the radius, spawn a new one - _holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"]; + _holder = "WeaponHolder" createVehicle [0,0,0]; + _holder setPosATL _pos; } else { //Found a near by weapon holder lets select it. _holder = _nearByPile select 0; - + if (!_manualPos) then { + private "_objects"; + //check to make sure the player can see the selected weapon holder. _objects = lineIntersectsWith [(_holder modeltoWorld PILE_OFFSET), _pos, player, _holder, true]; - + //Can you see the current selected weapon holder if (count _objects > 0) then { //Unable to see the current selected weapon holder within the radius lets create a new one. @@ -42,4 +45,4 @@ switch _type do { }; //Revel the item -player reveal _holder; \ No newline at end of file +player reveal _holder; diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index f334e1fc9..a021679c8 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -4,7 +4,7 @@ if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; -private ["_alreadyPacking","_backpacks","_bag","_campItems","_dir","_holder","_magazines","_obj","_objectID","_objectUID","_ownerID","_packobj","_playerNear","_pos","_weapons","_finished"]; +private ["_alreadyPacking","_backpacks","_bag","_campItems","_dir","_holder","_magazines","_obj","_objectID","_objectUID","_ownerID","_packobj","_playerNear","_pos","_weapons","_finished","_posPlayer"]; _obj = _this; _ownerID = _obj getVariable["CharacterID","0"]; @@ -42,13 +42,21 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems) if (isNull _obj) exitWith {}; if (!_finished) exitWith {_obj setVariable["packing",0,true];}; + _posPlayer = getPosATL player; + _pos set [2,_posPlayer select 2]; + + if (_pos select 2 < 0) then { + _pos set [2,0]; + }; + //place tent (local) - _bag = createVehicle [_packobj, _pos, [], 0, "CAN_COLLIDE"]; + _bag = _packobj createVehicle [0,0,0]; _bag setDir _dir; - player reveal _bag; - - _holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"]; + _bag setPosATL _pos; + _holder = "WeaponHolder" createVehicle [0,0,0]; + _holder setPosATL _pos; + _weapons = getWeaponCargo _obj; _magazines = getMagazineCargo _obj; _backpacks = getBackpackCargo _obj; @@ -59,6 +67,8 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems) [_weapons,_magazines,_backpacks,_holder] call fn_addCargo; + player reveal _holder; + localize "str_success_tent_pack" call dayz_rollingMessages; } else { localize "str_fail_tent_pack" call dayz_rollingMessages; diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf index f7d5cd698..767c57d68 100644 --- a/SQF/dayz_code/compile/player_packVault.sqf +++ b/SQF/dayz_code/compile/player_packVault.sqf @@ -1,10 +1,11 @@ +if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; +dayz_actionInProgress = true; + /* [_obj] spawn player_packVault; */ -private ["_obj","_ownerID","_objectID","_objectUID","_location1","_location2","_packedClass","_text","_playerNear","_finished"]; -if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; -dayz_actionInProgress = true; +private ["_obj","_ownerID","_objectID","_objectUID","_location1","_location2","_packedClass","_text","_playerNear","_finished","_ComboMatch"]; _obj = _this; _packedClass = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "packedClass"); @@ -31,11 +32,11 @@ if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = fal if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith { dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_119",_text] call dayz_rollingMessages;}; format[localize "str_epoch_player_121",_text] call dayz_rollingMessages; -uiSleep 1; +uiSleep 1; _location1 = getPosATL player; uiSleep 5; _location2 = getPosATL player; - + if(_location1 distance _location2 > 0.1) exitWith { format[localize "str_epoch_player_122",_text] call dayz_rollingMessages; s_player_packvault = -1; @@ -44,22 +45,22 @@ if(_location1 distance _location2 > 0.1) exitWith { if (!isNull _obj && alive _obj) then { [player,"tentpack",0,false] call dayz_zombieSpeak; - + _finished = ["Medic",1] call fn_loopAction; if (isNull _obj or !_finished) exitWith {}; - + ["Working",0,[3,2,4,0]] call dayz_NutritionSystem; - + (findDisplay 106) closeDisplay 0; // Close gear dze_waiting = nil; - + [_packedClass,objNull] call fn_waitForObject; - + PVDZE_handleSafeGear = [player,_obj,2]; - publicVariableServer "PVDZE_handleSafeGear"; + publicVariableServer "PVDZE_handleSafeGear"; //wait for response from server to verify pack was logged and gear added before proceeding waitUntil {!isNil "dze_waiting"}; - + format[localize "str_epoch_player_123",_text] call dayz_rollingMessages; }; s_player_packvault = -1; From f7ea9cb3d715d27f0d34240cf00b37c152e1a9ca Mon Sep 17 00:00:00 2001 From: A Man Date: Thu, 24 Oct 2019 08:27:33 +0200 Subject: [PATCH 08/14] Fix disappearing weapons from backpack The normal intention to have a bag with this small size is, that not a weapon can be carried. Having 5 slots or more in a backpack is normally the signal that at least a secondary weapon can be carried inside this backpack. If a weapon will be put inside a bag without any free weapon slot, the weapon just disappears. To have a better and more intuitive playstyle every backpack with more as 5 slots should be able to carry at least 1 weapon. --- CHANGE LOG 1.0.6.3.txt | 1 + SQF/dayz_code/Configs/CfgVehicles/Bags.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index 143f0637a..cbe5a5ea0 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -29,5 +29,6 @@ [UPDATED] Added notification when status icons are disabled. (e04f0fc) @ebayShopper [UPDATED] Added night vision mode back to DMR_DZ and M4SPR_DZE after it was removed with the 2018-04-05 A2OA CorePatch (d6cf707) @ebayShopper [UPDATED] All M32 grenades using one inventroy slot now. (cc85067) @AirwavesMan +[UPDATED] The Czech Vest Pouch can carry one weapon now. This was changed to be more intuitive and to avoid disappearing weapons. @AirwavesMan [INFO] Synced with DayZMod upstream up to commit fe063a8 diff --git a/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp b/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp index 61b169ef4..a6434bbc9 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp @@ -62,7 +62,7 @@ class DZ_Czech_Vest_Pouch: Bag_Base_EP1 picture = "\ca\weapons_e\data\icons\backpack_ACR_small_CA.paa"; scope = 2; transportmaxmagazines = 12; - transportmaxweapons = 0; + transportmaxweapons = 1; class eventHandlers { init="[(_this select 0),'CfgVehicles','DZ_Czech_Vest_Pouch'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';"; From 63dfe8a802dad48658d1f14927ac58d987ce0d3e Mon Sep 17 00:00:00 2001 From: A Man Date: Sun, 27 Oct 2019 18:46:02 +0100 Subject: [PATCH 09/14] Adding back break chance for wheels on salvaging In Epoch 1.0.5.1 wheels could break on salvaging. This was unintentionally removed with Epoch 1.0.6. Thx @Seelenapperat --- SQF/dayz_code/actions/salvage.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/salvage.sqf b/SQF/dayz_code/actions/salvage.sqf index 6033f987c..de9255499 100644 --- a/SQF/dayz_code/actions/salvage.sqf +++ b/SQF/dayz_code/actions/salvage.sqf @@ -34,7 +34,7 @@ if (_hasToolbox) then { _hits = [_vehicle,_hitpoint] call object_getHit; _damage = _hits select 0; if (_damage < 1 && {_damage > 0}) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal - _BreakableParts = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"]; + _BreakableParts = ["HitLFWheel","HitRFWheel","HitLBWheel","HitRBWheel","HitLF2Wheel","HitRF2Wheel","HitLMWheel","HitRMWheel","HitLFWheel","HitRFWheel","HitLBWheel","HitRBWheel","HitLF2Wheel","HitRF2Wheel","HitLMWheel","HitRMWheel","HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"]; if (_hitpoint in _BreakableParts) then { if ((random 1) < (_damage * 0.9)) then { //max 90% chance to break _isOK = true; From cedd22dee3711dadac6ad34f2e243bfda12c3597 Mon Sep 17 00:00:00 2001 From: A Man Date: Tue, 29 Oct 2019 14:45:36 +0100 Subject: [PATCH 10/14] Rename changelog to new version --- CHANGE LOG 1.0.6.3.txt => CHANGE LOG 1.0.7.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename CHANGE LOG 1.0.6.3.txt => CHANGE LOG 1.0.7.txt (100%) diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.7.txt similarity index 100% rename from CHANGE LOG 1.0.6.3.txt rename to CHANGE LOG 1.0.7.txt From 915cf72df3a402d1ccb686e90dc25b1c7efb3812 Mon Sep 17 00:00:00 2001 From: A Man Date: Tue, 29 Oct 2019 15:23:30 +0100 Subject: [PATCH 11/14] Adding dayz mod waterbottles This commit adds the waterbottles from DayZ Mod. The icons were made by @DeVloek. The waterbottles are fully functional with all actions. To boil a plastic waterbottle you need an empty trash can. Dogs could not be watered with other waterbottle than the ItemWaterbottle itself. This is fixed now. Also fix missing reset action from hide body. --- CHANGE LOG 1.0.7.txt | 6 +- README.md | 1 + .../Configs/CfgMagazines/CfgMagazines.hpp | 1 + .../CfgMagazines/Consumables/Canteen.hpp | 54 -- .../CfgMagazines/Consumables/Consumables.hpp | 1 - .../CfgMagazines/DZE/PlasticWaterbottle.hpp | 649 ++++++++++++++++++ .../Category/FriendlyDrinks.hpp | 5 + SQF/dayz_code/actions/boil.sqf | 95 ++- SQF/dayz_code/actions/dog/feed.sqf | 35 +- SQF/dayz_code/actions/player_craftItem.sqf | 40 +- SQF/dayz_code/actions/player_fixBottle.sqf | 8 +- SQF/dayz_code/actions/player_sharpen.sqf | 19 +- SQF/dayz_code/compile/fn_selfActions.sqf | 104 +-- SQF/dayz_code/config.cpp | 1 + .../R3F_Weight/Magazines/Drinks.hpp | 212 +++++- 15 files changed, 1018 insertions(+), 213 deletions(-) delete mode 100644 SQF/dayz_code/Configs/CfgMagazines/Consumables/Canteen.hpp create mode 100644 SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp diff --git a/CHANGE LOG 1.0.7.txt b/CHANGE LOG 1.0.7.txt index cbe5a5ea0..bf393e7b2 100644 --- a/CHANGE LOG 1.0.7.txt +++ b/CHANGE LOG 1.0.7.txt @@ -3,6 +3,7 @@ [NEW] Zombie Loot supports backpacks now. (096fc13) @AirwavesMan [NEW] Hide Body can be edited and toggled now. Enabled by default, configVariables.sqf/DZE_Hide_Body (c0e9fe6) @AirwavesMan [NEW] 6 AK-107 versions added with attachment support. (82485ea) @AirwavesMan +[NEW] Added new waterbottles from DayZ Mod. Icons made by @DeVloek. Fully functional with all actions. @AirwavesMan [FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2, 048caa5) @ebayShopper [FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed (e89eebc) #2009 @TheFirstNoob @@ -23,12 +24,13 @@ [FIXED] Multiple Vehicle Upgrades were not possibile. (ac884f2), (a430f79), (c24504a) @F507DMT [FIXED] Fix an inventory dupe if on water. (a052ba7), (baf92eb) @F507DMT [FIXED] The pickaxe and the broken pickaxe spawned in the ground on loot spawn. (a09bb81a) @AirwavesMan -[FIXED] Fix floating loot from remove, pack and fn_dropItem. @AirwavesMan +[FIXED] Fix floating loot from remove, pack and fn_dropItem. (1268f55) @AirwavesMan +[FIXED] Water dogs did not work with other waterbottles than the normal one. @AirwavesMan [UPDATED] Spawning of Zombies and Loot in Safe Zones can now be toggled, disabled by default, see configVariables.sqf/DZE_SafeZoneZombieLoot (6248add, 141b25e) @oiad @_Lance_ [UPDATED] Added notification when status icons are disabled. (e04f0fc) @ebayShopper [UPDATED] Added night vision mode back to DMR_DZ and M4SPR_DZE after it was removed with the 2018-04-05 A2OA CorePatch (d6cf707) @ebayShopper [UPDATED] All M32 grenades using one inventroy slot now. (cc85067) @AirwavesMan -[UPDATED] The Czech Vest Pouch can carry one weapon now. This was changed to be more intuitive and to avoid disappearing weapons. @AirwavesMan +[UPDATED] The Czech Vest Pouch can carry one weapon now. This was changed to be more intuitive and to avoid disappearing weapons. (f7ea9cb) @AirwavesMan [INFO] Synced with DayZMod upstream up to commit fe063a8 diff --git a/README.md b/README.md index 61776a9db..a210c92cb 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ GitHub Contributors (In order of most commits) * F507DMT - https://github.com/F507DMT * ndavalos - https://github.com/ndavalos * SmokeyBR - https://github.com/SmokeyBR +* DeVloek - https://github.com/DeVloek -------------------------- Special thanks diff --git a/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp b/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp index fec140941..ee1b1aaa5 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp @@ -69,6 +69,7 @@ class CfgMagazines #include "DZE\Currency\TinBar.hpp" #include "DZE\ItemWaterbottle.hpp" + #include "DZE\PlasticWaterbottle.hpp" #include "Planting.hpp" // Building Stuff diff --git a/SQF/dayz_code/Configs/CfgMagazines/Consumables/Canteen.hpp b/SQF/dayz_code/Configs/CfgMagazines/Consumables/Canteen.hpp deleted file mode 100644 index 31fcf1bb1..000000000 --- a/SQF/dayz_code/Configs/CfgMagazines/Consumables/Canteen.hpp +++ /dev/null @@ -1,54 +0,0 @@ -class ItemCanteen : FoodDrink -{ - scope = public; - - model = "\dayz_equip\models\waterbottle_gear.p3d"; - picture = "\dayz_equip\textures\equip_waterbottle_ca.paa"; - displayName = $STR_ITEM_CANTEEN_NAME; - descriptionShort = $STR_ITEM_CANTEEN_DESC; - - Nutrition[] = {0,0,1000,0}; - - infectionChance = 0.3; - - consumeOutput = "ItemCanteenEmpty"; - - containerEmpty = "ItemCanteenEmpty"; - - class ItemActions : ItemActions - { - class Consume : Consume - { - }; - - class Empty - { - text = $STR_ITEM_CANTEEN_EMPTY; - script = "spawn player_emptyContainer"; - }; - }; -}; - -class ItemCanteenInfected : ItemCanteen -{ - infectionChance = 1; -}; - -class ItemCanteenSafe : ItemCanteen -{ - infectionChance = 0; -}; - -class ItemCanteenBoiled : ItemCanteen -{ - displayName = $STR_ITEM_CANTEEN_BOILED_NAME; - - infectionChance = 0; - }; - -class ItemCanteenHerbal : ItemCanteen -{ - displayName = $STR_ITEM_CANTEEN_HERBAL_NAME; - - infectionChance = -0.5; -}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgMagazines/Consumables/Consumables.hpp b/SQF/dayz_code/Configs/CfgMagazines/Consumables/Consumables.hpp index 2ae55973a..3852eba36 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Consumables/Consumables.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Consumables/Consumables.hpp @@ -111,4 +111,3 @@ class FoodCooked : FoodEdible #include "Soda.hpp" #include "WaterBottle.hpp" -//#include "Canteen.hpp" \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp new file mode 100644 index 000000000..429b3133d --- /dev/null +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp @@ -0,0 +1,649 @@ +class ItemPlasticWaterbottleUnfilled : CA_Magazine +{ + scope = public; + count = 1; + type = WeaponSlotItem; + + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottleEmpty.paa"; + displayName = $STR_EQUIP_NAME_13; + descriptionShort = $STR_EQUIP_DESC_13; + + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + + class ItemActions + { + class Fill + { + text = $STR_ACTIONS_FILL_W; + script = "spawn player_fillWater;"; + }; + }; +}; + +class ItemPlasticWaterbottleDmg : CA_Magazine +{ + scope = public; + count = 1; + type = WeaponSlotItem; + + model = "z\addons\dayz_communityassets\models\waterbottle_damaged.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottleEmpty.paa"; + displayName = $STR_ITEMWATERBOTTLEDMG_CODE_NAME; + descriptionShort = $STR_ITEMWATERBOTTLEDMG_CODE_DESC; + + class ItemActions + { + class Repair + { + text = $STR_ACTIONS_FIX_W; + script = "spawn player_fixBottle;"; + }; + }; +}; + +class ItemPlasticWaterBottle : ItemWaterBottle { + scope = public; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; + + Nutrition[] = {0,0,1000,0}; + infectionChance = 0.3; + + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; +}; + +class ItemPlasticWaterBottleInfected : ItemWaterBottle +{ + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; + infectionChance = 1; + + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; +}; + +class ItemPlasticWaterBottleSafe : ItemWaterBottle +{ + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; + infectionChance = 0; + + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; +}; + +class ItemPlasticWaterBottleBoiled : ItemWaterBottle +{ + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; + displayName = $STR_ITEMWATERBOTTLEBOILED_CODE_NAME; + descriptionShort = $STR_ITEMWATERBOTTLEBOILED_CODE_DESC; + + infectionChance = 0; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + }; + +class ItemPlasticWaterBottleHerbal : ItemWaterBottle +{ + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; + displayName = $STR_ITEM_NAME_HerbalDrink; + descriptionShort = $STR_ITEM_DESC_HerbalDrink; + + infectionChance = -0.5; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; +}; + +class ItemPlasticWaterbottle1oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE1OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE1OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle1oz.paa"; + wateroz = 1; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,100,0}; + infectionChance = 0.03; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle2oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE2OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE2OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle2oz.paa"; + wateroz = 2; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,200,0}; + infectionChance = 0.06; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; + +}; +class ItemPlasticWaterbottle3oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE3OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE3OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle3oz.paa"; + wateroz = 3; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,300,0}; + infectionChance = 0.09; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; + +}; +class ItemPlasticWaterbottle4oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE4OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE4OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle4oz.paa"; + wateroz = 4; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,400,0}; + infectionChance = 0.12; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; + +}; +class ItemPlasticWaterbottle5oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE5OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE5OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle5oz.paa"; + wateroz = 5; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,500,0}; + infectionChance = 0.15; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; + +}; +class ItemPlasticWaterbottle6oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE6OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE6OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle6oz.paa"; + wateroz = 6; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,600,0}; + infectionChance = 0.18; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; + +}; +class ItemPlasticWaterbottle7oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE7OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE7OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle7oz.paa"; + wateroz = 7; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,700,0}; + infectionChance = 0.21; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle8oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE8OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE8OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle8oz.paa"; + wateroz = 8; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,800,0}; + infectionChance = 0.24; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; + +}; +class ItemPlasticWaterbottle9oz : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE9OZ; + descriptionShort = $STR_EPOCH_WATERBOTTLE9OZ_DESC; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle9oz.paa"; + wateroz = 9; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,900,0}; + infectionChance = 0.27; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +//inherit from ItemWaterBottle because that's how the crafting script checks required input +class ItemPlasticWaterbottle1ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE1OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE1OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle1oz.paa"; + wateroz = 1; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,100,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle2ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE2OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE2OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle2oz.paa"; + wateroz = 2; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,200,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle3ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE3OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE3OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle3oz.paa"; + wateroz = 3; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,300,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle4ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE4OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE4OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle4oz.paa"; + wateroz = 4; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,400,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle5ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE5OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE5OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle5oz.paa"; + wateroz = 5; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,500,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle6ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE6OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE6OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle6oz.paa"; + wateroz = 6; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,600,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle7ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE7OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE7OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle7oz.paa"; + wateroz = 7; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,700,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle8ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE8OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE8OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle8oz.paa"; + wateroz = 8; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,800,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; +class ItemPlasticWaterbottle9ozBoiled : ItemWaterBottle { + displayName = $STR_EPOCH_WATERBOTTLE9OZBOILED; + descriptionShort = $STR_EPOCH_WATERBOTTLE9OZBOILED_DESC; + infectionChance = 0; + model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle9oz.paa"; + wateroz = 9; + containerWater = "ItemPlasticWaterbottle"; + containerWaterSafe = "ItemPlasticWaterbottleSafe"; + containerWaterInfected = "ItemPlasticWaterbottleInfected"; + Nutrition[] = {0,0,900,0}; + consumeOutput = "ItemPlasticWaterbottleUnfilled"; + containerEmpty = "ItemPlasticWaterbottleUnfilled"; + class ItemActions { + class Consume + { + text = $STR_ACTIONS_DRINK2; + script = "spawn player_consume"; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + class Fill { + text = "$STR_ACTIONS_FILL_W"; + script = "spawn player_fillWater;"; + }; + }; +}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyDrinks.hpp b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyDrinks.hpp index 34ac1f575..f9b9d8551 100644 --- a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyDrinks.hpp +++ b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyDrinks.hpp @@ -4,6 +4,11 @@ class Category_601 { buy[] = {3,"ItemSilverBar"}; sell[] = {1,"ItemSilverBar"}; }; + class ItemPlasticWaterbottleUnfilled { + type = "trade_items"; + buy[] = {2,"ItemSilverBar"}; + sell[] = {1,"ItemSilverBar"}; + }; class ItemSodaCoke { type = "trade_items"; buy[] = {2,"ItemSilverBar"}; diff --git a/SQF/dayz_code/actions/boil.sqf b/SQF/dayz_code/actions/boil.sqf index fcf8cf159..14159c013 100644 --- a/SQF/dayz_code/actions/boil.sqf +++ b/SQF/dayz_code/actions/boil.sqf @@ -1,61 +1,84 @@ -private ["_bottletext","_tin1text","_tin2text","_tintext","_hastinitem","_qty","_dis","_sfx","_WB2Add","_finished"]; - if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; +private ["_bottletext","_hastinitem","_qty","_dis","_sfx","_bottle","_finished","_waterbottles","_platicBottles","_magsPlayer","_bottles"]; + _bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterBottle" >> "displayName"); -_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName"); -_tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName"); -_tintext = format["%1 / %2",_tin1text,_tin2text]; -_qty = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz"]} count magazines player; +_waterbottles = ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz"]; +_platicBottles = ["ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz"]; +_magsPlayer = magazines player; +_qty = {_x in _waterbottles} count _magsPlayer; +_hastinitem = true; a_player_boil = true; player removeAction s_player_boil; //s_player_boil = -1; -/* //canteens are metal, we only use canteens in Epoch -_hastinitem = {_x in magazines player} count boil_tin_cans > 0; -if (!_hastinitem) exitWith {format[localize "str_player_31",_tintext,localize "str_player_31_fill"] call dayz_rollingMessages; a_player_boil = false; dayz_actionInProgress = false;}; -*/ +if ({_x in _platicBottles} count _magsPlayer > 0) then { + _hastinitem = {_x in _magsPlayer} count boil_tin_cans > 0; +}; + +if !(_hastinitem) exitWith { + private ["_tin1text","_tin2text","_tintext"]; + + _tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName"); + _tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName"); + _tintext = format["%1 / %2",_tin1text,_tin2text]; + format[localize "str_player_31",_tintext,localize "str_player_31_fill"] call dayz_rollingMessages; + a_player_boil = false; + dayz_actionInProgress = false; +}; + if (_qty > 0) then { _dis=10; _sfx = "cook"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] call player_alertZombies; - - _finished = ["Medic",1] call fn_loopAction; - - // Double check player did not drop item - _qty = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz"]} count magazines player; - - if (_qty == 0 or !_finished) exitWith {}; - for "_x" from 1 to _qty do { - _WB2Add = "ItemWaterBottleBoiled"; - switch (true) do { - case ("ItemWaterBottleInfected" in magazines player): { player removeMagazine "ItemWaterBottleInfected"; }; - case ("ItemWaterBottleSafe" in magazines player): { player removeMagazine "ItemWaterBottleSafe"; }; - case ("ItemWaterBottle" in magazines player): { player removeMagazine "ItemWaterBottle"; }; - case ("ItemWaterbottle1oz" in magazines player): { player removeMagazine "ItemWaterbottle1oz"; _WB2Add = "ItemWaterbottle1ozBoiled"; }; - case ("ItemWaterbottle2oz" in magazines player): { player removeMagazine "ItemWaterbottle2oz"; _WB2Add = "ItemWaterbottle2ozBoiled"; }; - case ("ItemWaterbottle3oz" in magazines player): { player removeMagazine "ItemWaterbottle3oz"; _WB2Add = "ItemWaterbottle3ozBoiled"; }; - case ("ItemWaterbottle4oz" in magazines player): { player removeMagazine "ItemWaterbottle4oz"; _WB2Add = "ItemWaterbottle4ozBoiled"; }; - case ("ItemWaterbottle5oz" in magazines player): { player removeMagazine "ItemWaterbottle5oz"; _WB2Add = "ItemWaterbottle5ozBoiled"; }; - case ("ItemWaterbottle6oz" in magazines player): { player removeMagazine "ItemWaterbottle6oz"; _WB2Add = "ItemWaterbottle6ozBoiled"; }; - case ("ItemWaterbottle7oz" in magazines player): { player removeMagazine "ItemWaterbottle7oz"; _WB2Add = "ItemWaterbottle7ozBoiled"; }; - case ("ItemWaterbottle8oz" in magazines player): { player removeMagazine "ItemWaterbottle8oz"; _WB2Add = "ItemWaterbottle8ozBoiled"; }; - case ("ItemWaterbottle9oz" in magazines player): { player removeMagazine "ItemWaterbottle9oz"; _WB2Add = "ItemWaterbottle9ozBoiled"; }; + _finished = ["Medic",1] call fn_loopAction; + + // Double check player did not drop item + _bottles = []; + + { + if (_x in _waterbottles) then { + _bottles set [count _bottles, _x]; }; + } count magazines player; + + _qty = count _bottles; + + if (_qty < 1 || !_finished) exitWith {}; + + { + _bottle = _x; + player removeMagazine _bottle; if (dayz_waterBottleBreaking && {[0.1] call fn_chance}) then { - player addMagazine "ItemWaterBottleDmg"; + if (_bottle in _platicBottles) then { + player addMagazine "ItemPlasticWaterbottleDmg"; + } else { + player addMagazine "ItemWaterBottleDmg"; + }; localize "str_waterbottle_broke" call dayz_rollingMessages; } else { - player addMagazine _WB2Add; + if (_bottle in _platicBottles) then { + if (_bottle in ["ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe"]) then { + player addMagazine "ItemPlasticWaterbottleBoiled"; + } else { + player addMagazine (_bottle + "Boiled"); + }; + } else { + if (_bottle in ["ItemWaterBottleInfected","ItemWaterBottleSafe"]) then { + player addMagazine "ItemWaterBottleBoiled"; + } else { + player addMagazine (_bottle + "Boiled"); + }; + }; }; - }; + } count _bottles; format [localize "str_player_boiledwater",_qty] call dayz_rollingMessages; } else { format[localize "str_player_31",_bottletext,localize "str_player_31_fill"] call dayz_rollingMessages; }; a_player_boil = false; -dayz_actionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/dog/feed.sqf b/SQF/dayz_code/actions/dog/feed.sqf index c0ef56085..7688e498e 100644 --- a/SQF/dayz_code/actions/dog/feed.sqf +++ b/SQF/dayz_code/actions/dog/feed.sqf @@ -1,14 +1,15 @@ -private ["_array","_handle","_type","_onLadder","_removed","_itemIn","_countIn"]; +if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; +dayz_actionInProgress = true; + +private ["_array","_handle","_type","_onLadder","_removed","_itemIn","_countIn","_bottles"]; + +_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; +if (_onLadder) exitWith {dayz_actionInProgress = false;localize "str_player_21" call dayz_rollingMessages;}; + _array = _this select 3; _handle = _array select 0; _type = _array select 1; -_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages;}; - -if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; -dayz_actionInProgress = true; - player playActionNow "PutDown"; switch (_type) do { @@ -17,7 +18,7 @@ switch (_type) do { _removed = 0; _itemIn = "FoodRaw"; _countIn = 1; - { + { if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { _removed = _removed + ([player,_x] call BIS_fnc_invRemove); }; @@ -30,13 +31,21 @@ switch (_type) do { }; case 1: { - if(([player,"ItemWaterbottle"] call BIS_fnc_invRemove) == 1) then { - player addMagazine "ItemWaterbottleUnfilled"; - }; - _handle setFSMVariable ["_thirst",0]; + _bottles = ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterBottleBoiled"]; + { + if (_x in _bottles) exitwith { + if (_x in ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled"]) then { + player addMagazine "ItemWaterbottleUnfilled"; + } else { + player addMagazine "ItemPlasticWaterbottleUnfilled"; + }; + player removeMagazine _x; + }; + } count magazines player; + _handle setFSMVariable ["_thirst",0]; player removeAction s_player_waterdog; s_player_waterdog = -1; }; }; -dayz_actionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 9e3e80a28..16ca71337 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -23,11 +23,11 @@ class ItemActions }; }; */ -private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"]; - if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; +private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx","_configParent","_pPos"]; + // This is used to find correct recipe based what itemaction was click allows multiple recipes per item. _crafting = _this select 0; @@ -102,10 +102,8 @@ if (_canDo) then { _itemIn = _x select 0; _countIn = _x select 1; - _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; - + _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)} count magazines player; if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; }; @@ -127,7 +125,7 @@ if (_canDo) then { _removed = 0; _itemIn = _x select 0; _countIn = _x select 1; - // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; + //diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; _tobe_removed_total = _tobe_removed_total + _countIn; // Preselect the item @@ -135,7 +133,7 @@ if (_canDo) then { _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); if ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn)) then { // Get lowest waterlevel - if ((_x == "ItemWaterbottle") ||( _configParent == "ItemWaterbottle")) then { + if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then { _waterLevel = getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz"); if (_waterLevel_lowest == 0 || _waterLevel < _waterLevel_lowest) then { _waterLevel_lowest = _waterLevel; @@ -157,9 +155,9 @@ if (_canDo) then { _removed_total = _removed_total + _num_removed; if (_num_removed >= 1) then { //diag_log format["debug remove: %1 of: %2", _configParent, _x]; - if (_x == "ItemWaterbottle" || _configParent == "ItemWaterbottle") then { + if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then { _waterLevel = floor((getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz")) - 1); - if (_x in ["ItemWaterbottle9ozBoiled","ItemWaterbottle8ozBoiled","ItemWaterbottle7ozBoiled","ItemWaterbottle6ozBoiled","ItemWaterbottle5ozBoiled","ItemWaterbottle4ozBoiled","ItemWaterbottle3ozBoiled","ItemWaterbottle2ozBoiled","ItemWaterBottleBoiled"]) then { + if (_x in ["ItemWaterbottle9ozBoiled","ItemWaterbottle8ozBoiled","ItemWaterbottle7ozBoiled","ItemWaterbottle6ozBoiled","ItemWaterbottle5ozBoiled","ItemWaterbottle4ozBoiled","ItemWaterbottle3ozBoiled","ItemWaterbottle2ozBoiled","ItemWaterBottleBoiled","ItemPlasticWaterbottle9ozBoiled","ItemPlasticWaterbottle8ozBoiled","ItemPlasticWaterbottle7ozBoiled","ItemPlasticWaterbottle6ozBoiled","ItemPlasticWaterbottle5ozBoiled","ItemPlasticWaterbottle4ozBoiled","ItemPlasticWaterbottle3ozBoiled","ItemPlasticWaterbottle2ozBoiled","ItemPlasticWaterBottleBoiled"]) then { _boiled = true; }; }; @@ -202,14 +200,28 @@ if (_canDo) then { _itemOut = _x select 0; _countOut = _x select 1; if (_itemOut == "ItemWaterbottleUnfilled") then { - if (_waterLevel > 0) then { - if (_boiled) then { - _itemOut = format["ItemWaterbottle%1ozBoiled",_waterLevel]; + { + if (_x in ["ItemPlasticWaterbottle","ItemPlasticWaterbottleInfected","ItemPlasticWaterbottleSafe","ItemPlasticWaterBottleBoiled","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz","ItemPlasticWaterbottle1ozBoiled","ItemPlasticWaterbottle2ozBoiled","ItemPlasticWaterbottle3ozBoiled","ItemPlasticWaterbottle4ozBoiled","ItemPlasticWaterbottle5ozBoiled","ItemPlasticWaterbottle6ozBoiled","ItemPlasticWaterbottle7ozBoiled","ItemPlasticWaterbottle8ozBoiled","ItemPlasticWaterbottle9ozBoiled"]) then { + _itemOut = "ItemPlasticWaterbottleUnfilled"; + if (_waterLevel > 0) then { + if (_boiled) then { + _itemOut = format["ItemPlasticWaterbottle%1ozBoiled",_waterLevel]; + } else { + _itemOut = format["ItemPlasticWaterbottle%1oz",_waterLevel]; + }; + }; } else { - _itemOut = format["ItemWaterbottle%1oz",_waterLevel]; + if (_waterLevel > 0) then { + if (_boiled) then { + _itemOut = format["ItemWaterbottle%1ozBoiled",_waterLevel]; + } else { + _itemOut = format["ItemWaterbottle%1oz",_waterLevel]; + }; + }; }; - }; + } foreach _temp_removed_array; }; + // diag_log format["Checking for water level: %1", _waterLevel]; for "_x" from 1 to _countOut do { player addMagazine _itemOut; diff --git a/SQF/dayz_code/actions/player_fixBottle.sqf b/SQF/dayz_code/actions/player_fixBottle.sqf index 039e63d90..6deb22455 100644 --- a/SQF/dayz_code/actions/player_fixBottle.sqf +++ b/SQF/dayz_code/actions/player_fixBottle.sqf @@ -1,11 +1,11 @@ +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; + private ["_bottle","_tape","_fixedBottle","_finished"]; _bottle = _this; _tape = "equip_duct_tape"; -_fixedBottle = "ItemWaterBottleUnfilled"; - -if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; -dayz_actionInProgress = true; +_fixedBottle = ["ItemPlasticWaterbottleUnfilled", "ItemWaterBottleUnfilled"] select (_bottle == "ItemWaterbottleDmg"); call gear_ui_init; closeDialog 0; diff --git a/SQF/dayz_code/actions/player_sharpen.sqf b/SQF/dayz_code/actions/player_sharpen.sqf index 41b224068..debfa9bbc 100644 --- a/SQF/dayz_code/actions/player_sharpen.sqf +++ b/SQF/dayz_code/actions/player_sharpen.sqf @@ -1,10 +1,13 @@ +if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; +dayz_actionInProgress = true; + private ["_item","_use","_repair","_waterUsed","_displayName"]; //['ItemKnifeBlunt','ItemKnife'] _item = _this select 0; //Item to be sharpened _repair = _this select 1; //Item to be given back. -_use = ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemWaterBottleHerbal","ItemCanteen","ItemCanteenInfected","ItemCanteenSafe","ItemCanteenBoiled","ItemCanteenHerbal"]; +_use = ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemWaterBottleHerbal","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterBottleBoiled","ItemPlasticWaterBottleHerbal"]; _waterUsed = nil; call gear_ui_init; @@ -18,20 +21,22 @@ closeDialog 1; if (isNil "_waterUsed") exitWith { //_displayName = getText (configFile >> "CfgMagazines" >> _use >> "displayName"); localize "str_sharpen_missing_water" call dayz_rollingMessages; + dayz_actionInProgress = false; }; // item is missing or tools are missing if !("equip_brick" IN magazines player) exitWith { _displayName = getText (configFile >> "CfgMagazines" >> "equip_brick" >> "displayName"); format [localize "str_missing_to_do_this",_displayName] call dayz_rollingMessages; + dayz_actionInProgress = false; }; if (player hasWeapon _item) then { _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); - + player removeMagazine _waterUsed; player removeWeapon _item; - + if !(player hasWeapon _repair) then { player addWeapon _repair; } else { @@ -39,11 +44,13 @@ if (player hasWeapon _item) then { [_repair,2,1] call fn_dropItem; format[localize "str_actions_noroom",_repair] call dayz_rollingMessages; }; - + player addMagazine (getText(configFile >> "CfgMagazines" >> _waterUsed >> "containerEmpty")); - + //Remove Later player removeMagazine "equip_brick"; format [localize "str_sharpen_success",_displayName] call dayz_rollingMessages; -}; \ No newline at end of file +}; + +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index d20591b2f..a9abaccb4 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -13,7 +13,7 @@ private ["_canPickLight","_text","_unlock","_lock","_totalKeys","_temp_keys","_t "_isModular","_isModularDoor","_isHouse","_isGateOperational","_isGateLockable","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock", "_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo", "_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance","_id","_upgrade","_weaponsPlayer","_hasCrowbar", -"_allowed","_hasAccess","_uid","_myCharID","_isLocked","_isClose"]; +"_allowed","_hasAccess","_uid","_myCharID","_isLocked","_isClose","_hasunboiledwater","_characterID","_text2"]; _vehicle = vehicle player; _inVehicle = (_vehicle != player); @@ -116,10 +116,10 @@ if (_inVehicle) then { if (s_player_lockUnlockInside_ctrl < 0) then { _totalKeys = call epoch_tempKeys; _temp_keys = _totalKeys select 0; - _temp_keys_names = _totalKeys select 1; + _temp_keys_names = _totalKeys select 1; _hasKey = _vehicleOwnerID in _temp_keys; _oldOwner = (_vehicleOwnerID == _uid); - + _text = getText (configFile >> "CfgVehicles" >> (typeOf DZE_myVehicle) >> "displayName"); if (locked DZE_myVehicle) then { if (_hasKey || _oldOwner) then { @@ -239,14 +239,14 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur _weaponsPlayer = weapons player; _hasCrowbar = "ItemCrowbar" in _itemsPlayer or "MeleeCrowbar" in _weaponsPlayer or dayz_onBack == "MeleeCrowbar"; _hasToolbox = "ItemToolbox" in _itemsPlayer; - _hasbottleitem = (("ItemWaterBottle" in _magazinesPlayer) || {"ItemWaterBottleInfected" in _magazinesPlayer} || {"ItemWaterBottleSafe" in _magazinesPlayer} || {"ItemWaterBottleBoiled" in _magazinesPlayer}); + _hasbottleitem = ({_x in ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterBottleBoiled"]} count _magazinesPlayer) > 0; _isAlive = alive _cursorTarget; _text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName"); _isPlant = _typeOfCursorTarget in Dayz_plants; _istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent"); _upgradeItems = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3"]; _characterID = _cursorTarget getVariable ["CharacterID","0"]; - + if (DZE_permanentPlot) then { _id = _uid; _ownerID = _cursorTarget getVariable ["ownerPUID","0"]; @@ -255,13 +255,13 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur _ownerID = _characterID; }; - _isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"]; + _isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"]; _isDog = (_cursorTarget isKindOf "Pastor" || _cursorTarget isKindOf "Fin"); _isModular = _cursorTarget isKindOf "ModularItems"; _isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ"]; _player_deleteBuild = false; _player_lockUnlock_crtl = false; - + //fuel tanks if (_hasEmptyFuelCan) then { { @@ -283,7 +283,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_flipveh; s_player_flipveh = -1; }; - + //Allow player to fill Fuel can if (_hasEmptyFuelCan && _isFuel && _isAlive) then { if (s_player_fillfuel < 0) then { @@ -293,7 +293,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_fillfuel; s_player_fillfuel = -1; }; - + if (damage _cursorTarget < 1) then { //Allow player to fill vehicle 210L if (_hasBarrel && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then { @@ -304,7 +304,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_fillfuel210; s_player_fillfuel210 = -1; }; - + //Allow player to fill vehicle 20L if (_hasFuel20 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then { if (s_player_fillfuel20 < 0) then { @@ -348,20 +348,20 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_siphonfuel; s_player_siphonfuel = -1; }; - + //Fireplace Actions check if ((_cursorTarget call isInflamed) or (inflamed _cursorTarget)) then { _hasRawMeat = {_x in Dayz_meatraw} count _magazinesPlayer > 0; //_hastinitem = {_x in boil_tin_cans} count _magazinesPlayer > 0; - _hasunboiledwater = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz"]} count _magazinesPlayer > 0; + _hasunboiledwater = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz"]} count _magazinesPlayer > 0; - - //Cook Meat + + //Cook Meat if (_hasRawMeat && !a_player_cooking) then { if (s_player_cook < 0) then { s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",_cursorTarget, 3, true, true]; }; - }; + }; //Boil Water if (_hasunboiledwater && !a_player_boil) then { if (s_player_boil < 0) then { @@ -378,7 +378,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_boil = -1; }; }; - + if (_isAlive) then { _restrict = _typeOfCursorTarget in DZE_restrictRemoval; @@ -396,14 +396,14 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur _player_deleteBuild = true; }; }; - }; + }; if (_isVehicle) then { if ((_characterID != "0") && {!_isMan}) then { _player_lockUnlock_crtl = true; }; }; }; - + if (_player_deleteBuild) then { if (s_player_deleteBuild < 0) then { s_player_deleteBuild = player addAction [format[localize "STR_EPOCH_REMOVE",_text], "\z\addons\dayz_code\actions\remove.sqf",_cursorTarget, 1, false, true]; @@ -450,7 +450,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur } else { player removeAction s_player_destroytent; s_player_destroytent = -1; - }; + }; if (_typeOfCursorTarget in ["IC_DomeTent","IC_Tent"]) then { if (s_player_packtentinfected < 0) then { s_player_packtentinfected = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true]; @@ -467,7 +467,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_sleep; s_player_sleep = -1; }; - + //Study Body if (_cursorTarget getVariable["bodyName",""] != "") then { if (s_player_studybody < 0) then { @@ -477,7 +477,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_studybody; s_player_studybody = -1; }; -/* +/* //Carbomb _hasCarBomb = "ItemCarBomb" in _magazinesPlayer; if (((_cursorTarget isKindOf "Car") || (_cursorTarget isKindOf "Air") || (_cursorTarget isKindOf "Motorcycle")) && _hasCarBomb) then { @@ -523,18 +523,18 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Only the owners can lock the gates _isLockableGate = _typeOfCursorTarget in ["WoodenGate_2","WoodenGate_3","WoodenGate_4","MetalGate_2","MetalGate_3","MetalGate_4"]; _isUnlocked = _cursorTarget getVariable ["isOpen","0"] == "1"; - + _isActionInProgress = _cursorTarget getVariable ["actionInProgress",false]; //Allow the gates to be opened when not locked by anyone _isOpen = ((_cursorTarget animationPhase "DoorL") == 1) || ((_cursorTarget animationPhase "DoorR") == 1); _isClosed = ((_cursorTarget animationPhase "DoorL") == 0) || ((_cursorTarget animationPhase "DoorR") == 0); - + //[["ownerArray",["PID"]]] _ownerArray = _cursorTarget getVariable ["ownerArray",["0"]]; - _ownerBuildLock = _cursorTarget getVariable ["BuildLock",false]; + _ownerBuildLock = _cursorTarget getVariable ["BuildLock",false]; _ownerPID = (_ownerArray select 0); - + // open Gate if (_isGateOperational && _isClosed && _isUnlocked) then { if (s_player_openGate < 0) then { @@ -636,10 +636,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_plot_boundary; s_player_plot_boundary = -1; }; - + if (DZE_HeliLift) then { _liftHeli = objNull; - _found = false; + _found = false; _allowTow = false; if ((count (crew _cursorTarget)) == 0) then { { @@ -676,8 +676,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_heli_lift = -1; }; }; - - // Allow Owner to lock and unlock vehicle + + // Allow Owner to lock and unlock vehicle if (_player_lockUnlock_crtl) then { if (s_player_lockUnlock_crtl < 0) then { _totalKeys = call epoch_tempKeys; @@ -706,12 +706,12 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_lockUnlock_crtl = 1; }; }; - }; + }; } else { {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = []; s_player_lockUnlock_crtl = -1; }; - + if (DZE_Hide_Body && {_isMan} && {!_isAlive}) then { if (s_player_hide_body < 0) then { s_player_hide_body = player addAction [localize "str_action_hide_body", "\z\addons\dayz_code\actions\hide_body.sqf",_cursorTarget, 1, true, true]; @@ -719,8 +719,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur } else { player removeAction s_player_hide_body; s_player_hide_body = -1; - }; - + }; + // gear access on surrendered player if (isPlayer _cursorTarget && {_isAlive} && {_cursorTarget getVariable ["DZE_Surrendered",false]}) then { if (s_player_SurrenderedGear < 0) then { @@ -794,13 +794,13 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_information; s_player_information = -1; }; - + //Fuel Pump if (_typeOfCursorTarget in dayz_fuelpumparray) then { - if (s_player_fuelauto < 0) then { + if (s_player_fuelauto < 0) then { // check if Generator_DZ is running within 30 meters _findNearestGen = {((alive _x) && (_x getVariable ["GeneratorRunning",false]))} count (([player] call FNC_getPos) nearObjects ["Generator_DZ",30]); - + // show that pump needs power if no generator nearby. if (_findNearestGen > 0) then { s_player_fuelauto = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",objNull, 0, false, true]; @@ -848,11 +848,11 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_upgrade_build; s_player_upgrade_build = -1; }; - + // downgrade system if (DZE_Lock_Door == _characterID && {!keypadCancel} && {_cursorTarget isKindOf "Land_DZE_WoodDoorLocked_Base" || _cursorTarget isKindOf "CinderWallDoorLocked_DZ_Base"}) then { if ((s_player_lastTarget select 1) != _cursorTarget) then { - if (s_player_downgrade_build > 0) then { + if (s_player_downgrade_build > 0) then { player removeAction s_player_downgrade_build; s_player_downgrade_build = -1; }; @@ -892,10 +892,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Start Generator if (_isGenerator) then { - if (s_player_fillgen < 0) then { - // check if not running + if (s_player_fillgen < 0) then { + // check if not running if (_cursorTarget getVariable ["GeneratorRunning", false]) then { - s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR1", "\z\addons\dayz_code\actions\stopGenerator.sqf",_cursorTarget, 0, false, true]; + s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR1", "\z\addons\dayz_code\actions\stopGenerator.sqf",_cursorTarget, 0, false, true]; } else { // check if not filled and player has jerry. if (_cursorTarget getVariable ["GeneratorFilled", false]) then { @@ -917,9 +917,9 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if(_typeOfCursorTarget == "TOW_DZE") then { if (s_player_towing < 0) then { if(!(_cursorTarget getVariable ["DZEinTow", false])) then { - s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_ATTACH" "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true]; + s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_ATTACH" "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true]; } else { - s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_DETACH", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true]; + s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_DETACH", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true]; }; }; } else { @@ -932,7 +932,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if (_isMan && {!(isPlayer _cursorTarget)} && {_typeOfCursorTarget in serverTraders}) then { if (s_player_parts_crtl < 0) then { _humanity = player getVariable ["humanity",0]; - _traderMenu = call compile format["menu_%1;",_typeOfCursorTarget]; + _traderMenu = call compile format["menu_%1;",_typeOfCursorTarget]; _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_LOW"; _humanity_logic = false; if ((_traderMenu select 2) == "friendly") then { @@ -952,7 +952,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur // Static Menu { _buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true]; - s_player_parts set [count s_player_parts,_buy]; + s_player_parts set [count s_player_parts,_buy]; } count (_traderMenu select 1); if (DZE_ConfigTrader) then { _buyV = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\AdvancedTrading\init.sqf",(_traderMenu select 0), 999, true, false]; @@ -963,13 +963,13 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_parts set [count s_player_parts,_buy]; }; }; - s_player_parts_crtl = 1; + s_player_parts_crtl = 1; }; } else { {player removeAction _x} count s_player_parts;s_player_parts = []; s_player_parts_crtl = -1; }; - + if (dayz_tameDogs) then { //Dog _hasRawMeat = {_x in Dayz_meatraw} count _magazinesPlayer > 0; @@ -1001,7 +1001,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if (s_player_warndog < 0) then { _warn = _dogHandle getFSMVariable "_watchDog"; if (_warn) then { _text = localize "str_epoch_player_247"; _warn = false; } else { _text = localize "str_epoch_player_248"; _warn = true; }; - s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true]; + s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true]; }; if (s_player_followdog < 0) then { s_player_followdog = player addAction [localize "str_actions_followdog","\z\addons\dayz_code\actions\dog\follow.sqf",[_dogHandle,true], 6, false, true]; @@ -1087,7 +1087,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_BuildUnLock = -1; player removeAction s_player_BuildLock; s_player_BuildLock = -1;*/ - {player removeAction _x} count s_player_combi;s_player_combi = []; + {player removeAction _x} count s_player_combi;s_player_combi = []; s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull]; {player removeAction _x} count s_player_parts;s_player_parts = []; s_player_parts_crtl = -1; @@ -1100,7 +1100,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_maintain_area_force; s_player_maintain_area_force = -1; player removeAction s_player_maintain_area_preview; - s_player_maintain_area_preview = -1; + s_player_maintain_area_preview = -1; player removeAction s_player_tamedog; s_player_tamedog = -1; player removeAction s_player_feeddog; @@ -1141,6 +1141,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_fuelauto2 = -1; player removeAction s_player_manageDoor; s_player_manageDoor = -1; + player removeAction s_player_hide_body; + s_player_hide_body = -1; }; //Dog actions on player self @@ -1163,7 +1165,7 @@ if (_dogHandle > 0) then { }; }; } else { - player removeAction s_player_movedog; + player removeAction s_player_movedog; s_player_movedog = -1; player removeAction s_player_speeddog; s_player_speeddog = -1; diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp index 368f806c1..090bba880 100644 --- a/SQF/dayz_code/config.cpp +++ b/SQF/dayz_code/config.cpp @@ -86,6 +86,7 @@ class CfgAddons "redryder", "Anzio_20", "dayz_epoch_b", + "dayz_epoch_c", "CfgVehicles" }; }; diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/Drinks.hpp b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/Drinks.hpp index e4f1e0a69..f6972c22f 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/Drinks.hpp +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/Drinks.hpp @@ -7,57 +7,205 @@ along with this program. If not, see . @version 1.00 @date 20101006 *****************************************************************************/ -class ItemCanteen -{ - weight = 0.25; -}; -class ItemCanteenInfected -{ - weight = 0.25; -}; -class ItemCanteenSafe -{ - weight = 0.25; -}; -class ItemCanteenBoiled -{ - weight = 0.25; -}; -class ItemCanteenHerbal -{ - weight = 0.25; -}; -class ItemCanteenEmpty -{ - weight = 0.05; -}; class ItemWaterbottle { - weight = 0.25; + weight = 0.22; }; class ItemWaterbottleBoiled { - weight = 0.25; + weight = 0.22; }; class ItemWaterBottleInfected { - weight = 0.25; + weight = 0.22; }; class ItemWaterBottleSafe { - weight = 0.25; + weight = 0.22; }; class ItemWaterBottleHerbal { - weight = 0.25; + weight = 0.22; }; -class ItemWaterbottleUnfilled +class ItemWaterBottleUnfilled { - weight = 0.05; + weight = 0.02; }; class ItemWaterBottleDmg { - weight = 0.05; + weight = 0.02; +}; +class ItemWaterbottle1oz +{ + weight = 0.04; +}; +class ItemWaterbottle2oz +{ + weight = 0.06; +}; +class ItemWaterbottle3oz +{ + weight = 0.08; +}; +class ItemWaterbottle4oz +{ + weight = 0.1; +}; +class ItemWaterbottle5oz +{ + weight = 0.12; +}; +class ItemWaterbottle6oz +{ + weight = 0.14; +}; +class ItemWaterbottle7oz +{ + weight = 0.16; +}; +class ItemWaterbottle8oz +{ + weight = 0.17; +}; +class ItemWaterbottle9oz +{ + weight = 0.2; +}; +class ItemWaterbottle1ozBoiled +{ + weight = 0.04; +}; +class ItemWaterbottle2ozBoiled +{ + weight = 0.06; +}; +class ItemWaterbottle3ozBoiled +{ + weight = 0.08; +}; +class ItemWaterbottle4ozBoiled +{ + weight = 0.1; +}; +class ItemWaterbottle5ozBoiled +{ + weight = 0.12; +}; +class ItemWaterbottle6ozBoiled +{ + weight = 0.14; +}; +class ItemWaterbottle7ozBoiled +{ + weight = 0.16; +}; +class ItemWaterbottle8ozBoiled +{ + weight = 0.17; +}; +class ItemWaterbottle9ozBoiled +{ + weight = 0.2; +}; +class ItemPlasticWaterBottle +{ + weight = 0.22; +}; +class ItemPlasticWaterBottleBoiled +{ + weight = 0.22; +}; +class ItemPlasticWaterBottleInfected +{ + weight = 0.22; +}; +class ItemPlasticWaterBottleSafe +{ + weight = 0.22; +}; +class ItemPlasticWaterBottleHerbal +{ + weight = 0.22; +}; +class ItemPlasticWaterbottleUnfilled +{ + weight = 0.02; +}; +class ItemPlasticWaterbottleDmg +{ + weight = 0.02; +}; +class ItemPlasticWaterbottle1oz +{ + weight = 0.04; +}; +class ItemPlasticWaterbottle2oz +{ + weight = 0.06; +}; +class ItemPlasticWaterbottle3oz +{ + weight = 0.08; +}; +class ItemPlasticWaterbottle4oz +{ + weight = 0.1; +}; +class ItemPlasticWaterbottle5oz +{ + weight = 0.12; +}; +class ItemPlasticWaterbottle6oz +{ + weight = 0.14; +}; +class ItemPlasticWaterbottle7oz +{ + weight = 0.16; +}; +class ItemPlasticWaterbottle8oz +{ + weight = 0.17; +}; +class ItemPlasticWaterbottle9oz +{ + weight = 0.2; +}; +class ItemPlasticWaterbottle1ozBoiled +{ + weight = 0.04; +}; +class ItemPlasticWaterbottle2ozBoiled +{ + weight = 0.06; +}; +class ItemPlasticWaterbottle3ozBoiled +{ + weight = 0.08; +}; +class ItemPlasticWaterbottle4ozBoiled +{ + weight = 0.1; +}; +class ItemPlasticWaterbottle5ozBoiled +{ + weight = 0.12; +}; +class ItemPlasticWaterbottle6ozBoiled +{ + weight = 0.14; +}; +class ItemPlasticWaterbottle7ozBoiled +{ + weight = 0.16; +}; +class ItemPlasticWaterbottle8ozBoiled +{ + weight = 0.17; +}; +class ItemPlasticWaterbottle9ozBoiled +{ + weight = 0.2; }; class ItemSodaMdew { From f1d50386dfa66f7a0803df0e34b62ff29385d05e Mon Sep 17 00:00:00 2001 From: A Man Date: Tue, 29 Oct 2019 16:43:11 +0100 Subject: [PATCH 12/14] Adding support for backpack descriptions --- SQF/dayz_code/system/handleGear.sqf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/SQF/dayz_code/system/handleGear.sqf b/SQF/dayz_code/system/handleGear.sqf index 2aca86ca5..14f045992 100644 --- a/SQF/dayz_code/system/handleGear.sqf +++ b/SQF/dayz_code/system/handleGear.sqf @@ -97,6 +97,13 @@ _isMagazine = { _return }; +_isBackpack = { + private ["_item","_return"]; + _item = _this select 0; + _return = (str(configfile >> "cfgVehicles" >> _item) != ""); + _return +}; + _IDCsArray = [ [107], [121], @@ -421,6 +428,11 @@ private ["_inputItem","_return"]; _return = (_name); }; + if ([_inputItem] call _isBackpack) then { + _name = getText(configfile >> "cfgVehicles" >> _inputItem >> "descriptionShort"); + _return = ( _name); + }; + _return }; @@ -439,6 +451,11 @@ _itemName = { _return = ( _name); }; + if ([_item] call _isBackpack) then { + _name = getText(configfile >> "cfgVehicles" >> _item >> "displayName"); + _return = ( _name); + }; + _return }; From d2333465633396a43ed577d995b1f3614c096d75 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 30 Oct 2019 10:01:14 +0100 Subject: [PATCH 13/14] Updating strings for AK74, RPK74, MG36 magazines This fixes the error message of duplicated stringtable entry from a commit before. --- .../Configs/CfgMagazines/Magazines/545x39.hpp | 3 ++- .../Configs/CfgMagazines/Magazines/556x45.hpp | 4 ++-- SQF/dayz_code/stringtable.xml | 24 +++++++++++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/Magazines/545x39.hpp b/SQF/dayz_code/Configs/CfgMagazines/Magazines/545x39.hpp index 5257c76f4..37447b3b7 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Magazines/545x39.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Magazines/545x39.hpp @@ -2,6 +2,7 @@ class 30Rnd_545x39_AK : CA_Magazine { picture = "\z\addons\dayz_communityweapons\magazines\data\m_ak74_ca.paa"; displayName = $STR_DZ_MAG_30RND_545x39_AK_NAME; + descriptionShort = $STR_DZ_MAG_30RND_AK74_DESC; cartridgeName = "545x39"; class ItemActions @@ -27,7 +28,7 @@ class 75Rnd_545x39_RPK : CA_Magazine model = "\ca\weapons\mag_univ.p3d"; picture = "\CA\weapons\AK\data\equip\M_RPK_74_CA.paa"; displayName = $STR_DZ_MAG_75RND_545X39_RPK_NAME; - descriptionShort = $STR_DSS_75Rnd_RPK; + descriptionShort = $STR_DZ_MAG_75RND_RPK74_DESC; count = 75; tracersEvery = 4; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Magazines/556x45.hpp b/SQF/dayz_code/Configs/CfgMagazines/Magazines/556x45.hpp index 99ba006fd..66c417222 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Magazines/556x45.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Magazines/556x45.hpp @@ -19,7 +19,7 @@ class 100Rnd_556x45_M249 : 200Rnd_556x45_M249 class 100Rnd_556x45_BetaCMag: CA_Magazine { scope = public; - displayName = "MG36 Mag."; + displayName = $STR_DZ_MAG_100RND_556x45_MG36_NAME; ammo = "B_556x45_Ball"; count = 100; initSpeed = 920; @@ -27,7 +27,7 @@ class 100Rnd_556x45_BetaCMag: CA_Magazine { type="256"; tracersEvery = 4; lastRoundsTracer = 4; - descriptionShort = "Caliber: 5.56x45 mm NATO Rounds: 100 Used in: MG36, X8 SAW"; + descriptionShort = $STR_DZ_MAG_100RND_MG36_DESC; }; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index eac67ec0e..ba158b32f 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -17263,9 +17263,8 @@ Лист табака с табачной плантации - - + + Kaliber: 5,45x39mm <br/>Schuss: 30 <br/>Eingesetzt in: AK-74, AK-74 Kobra, AKS-74U, AK-107 und RPK-74 Caliber: 5.45x39mm <br/>Rounds: 30 <br/>Used in: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 Calibro: 5,45x39 mm <br/>Munizioni: 30 <br/>Si usa in: AK-74, AK-74 Kobra, AKS-74U, AK-107 e RPK-74 @@ -17276,8 +17275,7 @@ Kaliber: 5,45x39mm <br/>Naboje: 30 <br/>Używane w: AK-74, AK-74 Kobra, AKS-74U, AK-107 i RPK-74 Kaliber: 5.45x39mm <br/> Töltények: 30 <br/> Hozzá tartozó fegyver: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 - + Kaliber: 5,45x39mm <br/>Schuss: 75 <br/>Eingesetzt in: AK-74, AK-74 Kobra, AKS-74U, AK-107 und RPK-74 Caliber: 5.45x39mm <br/>Rounds: 75 <br/>Used in: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 Calibro: 5,45x39 mm <br/>Munizioni: 75 <br/>Si usa in: AK-74, AK-74 Kobra, AKS-74U, AK-107 e RPK-74 @@ -17288,6 +17286,22 @@ Kaliber: 5,45x39mm <br/>Naboje: 75 <br/>Używane w: AK-74, AK-74 Kobra, AKS-74U, AK-107 i RPK-74 Kaliber: 5.45x39mm <br/> Töltények: 75 <br/> Hozzá tartozó fegyver: AK-74, AK-74 Kobra, AKS-74U, AK-107 and RPK-74 + + 100Rnd. MG36 drum mag. + 100 Schuss MG36 Trommelmagazin + 100п. МГ-36 барабан + + + Kaliber: 5.56x45mm <br/>Schuss: 100 <br/>Eingesetzt in: G36, MG36, M16, M4, M249, MK-12, M8 und L110 + Caliber: 5.56x45mm <br/>Rounds: 100 <br/>Used in: G36, MG36, M16, M4, M249, MK-12, M8 and L110 + Calibro: 5.56x45mm <br/>Munizioni: 100 <br/>Si usa in: G36, MG36, M16, M4, M249, MK-12, M8 e L110 + Calibre: 5.56x45mm <br/>Cargas: 100 <br/>Uso: G36, MG36, M16, M4, M249, MK-12, M8 y L110 + Calibre : 5.56x45mm <br/>Munitions : 100 <br/>Utilisé avec : G36, MG36, M16, M4, M249, MK-12, M8 et L110 + Kalibr: 5.56x45mm <br/>Nábojů: 100 <br/>Pro: G36, MG36, M16, M4, M249, MK-12, M8 a L110 + Патрон: 5.56x45 мм <br/>Количество: 100 <br/>Используется в: G36, MG36, M16, M4, M249, MK-12, M8, L110 + Kaliber: 5.56x45mm <br/>Naboje: 100 <br/>Używane w: G36, MG36, M16, M4, M249, MK-12, M8 i L110 + Kaliber: 5.56x45mm <br/> Töltények: 100 <br/> Hozzá tartozó fegyver: G36, MG36, M16, M4, M249, MK-12, M8 and L110 + From 276615a8f191b3b9872c9cc5b213d4ec899f51c6 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 30 Oct 2019 10:03:16 +0100 Subject: [PATCH 14/14] Fuel container can be emptied now --- .../Configs/CfgMagazines/DZE/Items.hpp | 30 +++++++++++++++++++ .../Configs/CfgMagazines/DZE/Misc.hpp | 25 +++++++++++++++- .../Configs/CfgMagazines/Items/Fuel.hpp | 18 +++++++++-- SQF/dayz_code/actions/fill_startGenerator.sqf | 16 +++++----- SQF/dayz_code/actions/player_destroyTent.sqf | 17 +++++------ SQF/dayz_code/actions/refuel.sqf | 3 +- 6 files changed, 88 insertions(+), 21 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp index 5b9df45aa..e80911e9b 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp @@ -70,6 +70,8 @@ class ItemJerryMixed: CA_Magazine { picture = "\dayz_equip\textures\equip_jerrycan_ca.paa"; descriptionShort = $STR_EPOCH_CHAINSAW_MIXEDGAS20L_CAN_DESC; sfx = "refuel"; + containerEmpty = "ItemJerrycanEmpty"; + class ItemActions { class Crafting { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; @@ -79,6 +81,10 @@ class ItemJerryMixed: CA_Magazine { output[] = {{"CSGAS",1},{"ItemJerryMixed4",1}}; input[] = {{"ItemJerryMixed",1}}; }; + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; }; }; class ItemJerryMixed4: CA_Magazine { @@ -90,6 +96,8 @@ class ItemJerryMixed4: CA_Magazine { picture = "\dayz_equip\textures\equip_jerrycan_ca.paa"; descriptionShort = $STR_EPOCH_CHAINSAW_MIXEDGAS16L_CAN_DESC; sfx = "refuel"; + containerEmpty = "ItemJerrycanEmpty"; + class ItemActions { class Crafting { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; @@ -99,6 +107,10 @@ class ItemJerryMixed4: CA_Magazine { output[] = {{"CSGAS",1},{"ItemJerryMixed3",1}}; input[] = {{"ItemJerryMixed4",1}}; }; + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; }; }; class ItemJerryMixed3: CA_Magazine { @@ -110,6 +122,8 @@ class ItemJerryMixed3: CA_Magazine { picture = "\dayz_equip\textures\equip_jerrycan_ca.paa"; descriptionShort = $STR_EPOCH_CHAINSAW_MIXEDGAS12L_CAN_DESC; sfx = "refuel"; + containerEmpty = "ItemJerrycanEmpty"; + class ItemActions { class Crafting { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; @@ -119,6 +133,10 @@ class ItemJerryMixed3: CA_Magazine { output[] = {{"CSGAS",1},{"ItemJerryMixed2",1}}; input[] = {{"ItemJerryMixed3",1}}; }; + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; }; }; class ItemJerryMixed2: CA_Magazine { @@ -130,6 +148,8 @@ class ItemJerryMixed2: CA_Magazine { picture = "\dayz_equip\textures\equip_jerrycan_ca.paa"; descriptionShort = $STR_EPOCH_CHAINSAW_MIXEDGAS8L_CAN_DESC; sfx = "refuel"; + containerEmpty = "ItemJerrycanEmpty"; + class ItemActions { class Crafting { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; @@ -139,6 +159,10 @@ class ItemJerryMixed2: CA_Magazine { output[] = {{"CSGAS",1},{"ItemJerryMixed1",1}}; input[] = {{"ItemJerryMixed2",1}}; }; + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; }; }; class ItemJerryMixed1: CA_Magazine { @@ -150,6 +174,8 @@ class ItemJerryMixed1: CA_Magazine { picture = "\dayz_equip\textures\equip_jerrycan_ca.paa"; descriptionShort = $STR_EPOCH_CHAINSAW_MIXEDGAS4L_CAN; sfx = "refuel"; + containerEmpty = "ItemJerrycanEmpty"; + class ItemActions { class Crafting { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; @@ -159,6 +185,10 @@ class ItemJerryMixed1: CA_Magazine { output[] = {{"CSGAS",1},{"ItemJerrycanEmpty",1}}; input[] = {{"ItemJerryMixed1",1}}; }; + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp index b10bdcaa8..b55bbbfd8 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp @@ -274,6 +274,14 @@ class ItemOilBarrel: CA_Magazine model = "\z\addons\dayz_epoch\models\oil_drum_model.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_oil_drum_model_ca.paa"; descriptionShort = $STR_EPOCH_OILBARREL_DESC; + containerEmpty = "ItemOilBarrelEmpty"; + + class ItemActions { + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; }; class ItemFuelBarrel: CA_Magazine { @@ -286,7 +294,14 @@ class ItemFuelBarrel: CA_Magazine picture = "\z\addons\dayz_epoch\pictures\equip_oil_drum_model_ca.paa"; descriptionShort = $STR_EPOCH_FUELBARREL_DESC; fireIntensity = 6; //used for tent burning - emptycan = "ItemFuelBarrelEmpty"; + containerEmpty = "ItemFuelBarrelEmpty"; + + class ItemActions { + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; }; class ItemFuelBarrelEmpty: ItemFuelBarrel { @@ -1198,6 +1213,14 @@ class ItemMethylaminBarrel : ItemOilBarrel { displayName = $STR_EPOCH_METHYLAMINEBARREL; descriptionShort = $STR_EPOCH_METHYLAMINEBARREL_DESC; + containerEmpty = "ItemMethylaminBarrelEmpty"; + + class ItemActions { + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; }; class ItemC4Charge : CA_Magazine diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Fuel.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Fuel.hpp index 995ca137a..171a4811a 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Fuel.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Fuel.hpp @@ -20,10 +20,17 @@ class ItemJerrycan : ItemJerrycanEmpty descriptionShort = $STR_ITEM_DESC_JERRYCAN; fuelQuantity = 20; - emptycan = "ItemJerrycanEmpty"; + containerEmpty = "ItemJerrycanEmpty"; //used for tent burning fireIntensity = 6; + + class ItemActions { + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; }; class ItemFuelcanEmpty : ItemJerrycanEmpty @@ -46,8 +53,15 @@ class ItemFuelcan : ItemFuelcanEmpty descriptionShort = $STR_ITEM_DESC_FUELCAN; fuelQuantity = 5; - emptycan = "ItemFuelcanEmpty"; + containerEmpty = "ItemFuelcanEmpty"; //used for tent burning fireIntensity = 4; + + class ItemActions { + class Empty { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; }; \ No newline at end of file diff --git a/SQF/dayz_code/actions/fill_startGenerator.sqf b/SQF/dayz_code/actions/fill_startGenerator.sqf index 59763a718..d9ca46cb7 100644 --- a/SQF/dayz_code/actions/fill_startGenerator.sqf +++ b/SQF/dayz_code/actions/fill_startGenerator.sqf @@ -1,8 +1,8 @@ -private ["_vehicle","_finished","_soundSource","_fuelCan","_emptyCan"]; - if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; +private ["_vehicle","_finished","_soundSource","_fuelCan","_emptyCan"]; + player removeAction s_player_fillgen; s_player_fillgen = 1; @@ -24,16 +24,16 @@ _fuelCan = nil; if (_finished) then { // take fuel can and replace with empty - + if(!(_vehicle getVariable ["GeneratorFilled", false]) && !isNil "_fuelCan") then { - + if(([player,_fuelCan] call BIS_fnc_invRemove) == 1) then { - _emptyCan = getText (configFile >> "CfgMagazines" >> _fuelCan >> "emptycan"); + _emptyCan = getText (configFile >> "CfgMagazines" >> _fuelCan >> "containerEmpty"); player addMagazine _emptyCan; // mark as once filled _vehicle setVariable ["GeneratorFilled", true,true]; - + // Start generator _vehicle setVariable ["GeneratorRunning", true,true]; @@ -46,7 +46,7 @@ if (_finished) then { localize "str_epoch_player_28" call dayz_rollingMessages; ["Working",0,[0,1,3,0]] call dayz_NutritionSystem; }; - } else { + } else { // Start generator _vehicle setVariable ["GeneratorRunning", true,true]; @@ -63,4 +63,4 @@ if (_finished) then { }; dayz_actionInProgress = false; -s_player_fillgen = -1; \ No newline at end of file +s_player_fillgen = -1; diff --git a/SQF/dayz_code/actions/player_destroyTent.sqf b/SQF/dayz_code/actions/player_destroyTent.sqf index 372cc7cb5..4089c5d40 100644 --- a/SQF/dayz_code/actions/player_destroyTent.sqf +++ b/SQF/dayz_code/actions/player_destroyTent.sqf @@ -1,3 +1,6 @@ +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; + private ["_emptycan","_objectID","_objectUID","_obj","_fuelArray","_matchArray","_randomJerryCan","_fireIntensity","_dis","_sfx","_finished"]; //Tent Object @@ -24,11 +27,8 @@ _matchArray = []; } count DayZ_fuelCans; //Make sure we have both components to create the fire. -if ((count _fuelArray == 0)) exitwith { systemChat (localize ("str_setFireFuel")); }; -if ((count _matchArray == 0)) exitwith { systemChat (localize ("str_setFireMatches")); }; - -if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; -dayz_actionInProgress = true; +if ((count _fuelArray == 0)) exitwith { dayz_actionInProgress = false; systemChat (localize ("str_setFireFuel")); }; +if ((count _matchArray == 0)) exitwith { dayz_actionInProgress = false; systemChat (localize ("str_setFireMatches")); }; //Actionmenu tools player removeAction s_player_destroytent; @@ -46,10 +46,9 @@ if (!_finished or (isNull _obj)) exitWith { //Jerry can system ** Needs redoing //Select random can from array -_randomJerryCan = _fuelArray call BIS_fnc_selectRandom; +_randomJerryCan = _fuelArray call BIS_fnc_selectRandom; -_name = getText (configFile >> "CfgMagazines" >> _randomJerryCan >> "displayName"); -_emptycan = getText (configFile >> "CfgMagazines" >> _randomJerryCan >> "emptycan"); +_emptycan = getText (configFile >> "CfgMagazines" >> _randomJerryCan >> "containerEmpty"); _fireIntensity = getNumber (configFile >> "CfgMagazines" >> _randomJerryCan >> "fireIntensity"); if !(_randomJerryCan in magazines player) exitWith { @@ -81,4 +80,4 @@ _obj inflame true; //_obj spawn player_fireMonitor; localize "str_success_tent_destroyed" call dayz_rollingMessages; -dayz_actionInProgress = false; \ No newline at end of file +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/refuel.sqf b/SQF/dayz_code/actions/refuel.sqf index a6f7a3ac0..85fa6b513 100644 --- a/SQF/dayz_code/actions/refuel.sqf +++ b/SQF/dayz_code/actions/refuel.sqf @@ -1,5 +1,6 @@ if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; + private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype", "_emptycan","_started","_finished","_animState","_isRefuel","_type"]; @@ -8,7 +9,7 @@ _cantype = _array select 0; _vehicle = _array select 1; _type = typeOf _vehicle; _canSize = getNumber(configFile >> "cfgMagazines" >> _cantype >> "fuelQuantity"); -_emptycan = getText(configFile >> "cfgMagazines" >> _cantype >> "emptycan"); +_emptycan = getText(configFile >> "cfgMagazines" >> _cantype >> "containerEmpty"); _configVeh = configFile >> "cfgVehicles" >> _type; _capacity = getNumber(_configVeh >> "fuelCapacity"); _nameType = getText(_configVeh >> "displayName");