From 3dc7db7a7a36e5e29a21c38d0dc18d323ec9e4b7 Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Fri, 4 Jan 2019 18:49:20 +0600 Subject: [PATCH 01/60] Update player_countMagazines.sqf Variables("_item","_val","_max") get lost in other scripts, causing errors. --- SQF/dayz_code/compile/player_countMagazines.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/compile/player_countMagazines.sqf b/SQF/dayz_code/compile/player_countMagazines.sqf index 4e38bbd7d..289a8aaaf 100644 --- a/SQF/dayz_code/compile/player_countMagazines.sqf +++ b/SQF/dayz_code/compile/player_countMagazines.sqf @@ -4,7 +4,7 @@ return all player magazines with ammo count */ -private ["_dialog","_created","_magazineArray"]; +private ["_dialog","_created","_magazineArray","_item","_val","_max"]; disableSerialization; _dialog = findDisplay 106; @@ -53,4 +53,4 @@ if ( _created ) then { closeDialog 0; }; -_magazineArray \ No newline at end of file +_magazineArray From 387f77b9dad61b5c603e7cd7735474d55946ee6d Mon Sep 17 00:00:00 2001 From: oiad Date: Sat, 5 Jan 2019 09:32:12 +1300 Subject: [PATCH 02/60] Update private tags --- SQF/dayz_code/compile/player_countMagazines.sqf | 13 ++++++------- .../compile/player_countMagazinesWBackpack.sqf | 5 +++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SQF/dayz_code/compile/player_countMagazines.sqf b/SQF/dayz_code/compile/player_countMagazines.sqf index 289a8aaaf..13533a912 100644 --- a/SQF/dayz_code/compile/player_countMagazines.sqf +++ b/SQF/dayz_code/compile/player_countMagazines.sqf @@ -4,13 +4,14 @@ return all player magazines with ammo count */ -private ["_dialog","_created","_magazineArray","_item","_val","_max"]; +private ["_control","_created","_dialog","_i","_item","_magazineArray","_max","_val"]; + disableSerialization; _dialog = findDisplay 106; _created = false; -if ( isNull _dialog ) then { +if (isNull _dialog) then { //Load Minimal gearMenu createGearDialog [player, "RscDisplayGearMinimal"]; _dialog = findDisplay 106; @@ -19,8 +20,7 @@ if ( isNull _dialog ) then { _magazineArray = []; -for "_i" from 109 to 120 do -{ +for "_i" from 109 to 120 do { _control = _dialog displayCtrl _i; _item = gearSlotData _control; _val = gearSlotAmmoCount _control; @@ -34,8 +34,7 @@ for "_i" from 109 to 120 do }; }; -for "_i" from 122 to 129 do -{ +for "_i" from 122 to 129 do { _control = _dialog displayCtrl _i; _item = gearSlotData _control; _val = gearSlotAmmoCount _control; @@ -49,7 +48,7 @@ for "_i" from 122 to 129 do }; }; -if ( _created ) then { +if (_created) then { closeDialog 0; }; diff --git a/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf b/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf index 56b47dd7d..be92fdefd 100644 --- a/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf +++ b/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf @@ -4,7 +4,8 @@ return all player magazines with ammo count Modified to save backpack magazine count by icomrade - Base for fix by Ziellos2k */ -private ["_control","_item","_val","_max","_count","_magazineArray","_dialog"]; +private ["_control","_count","_dialog","_i","_item","_magazineArray","_max","_val"]; + disableUserInput true; disableUserInput true; disableSerialization; @@ -70,4 +71,4 @@ if ((typeOf (unitBackPack player)) != "") then { (findDisplay 106) closeDisplay 0; if (gear_done) then {sleep 0.001;}; -_magazineArray; \ No newline at end of file +_magazineArray From 0391fef4ff62aa0b9b92bcab83517a8ad01669d8 Mon Sep 17 00:00:00 2001 From: oiad Date: Sat, 5 Jan 2019 11:12:29 +1300 Subject: [PATCH 03/60] Update private tags This was breaking scripts that use a variable called `_chance` _chance = 30; [player,"repair",0,false,50] call dayz_zombieSpeak; _chance would get changed to 0 --- SQF/dayz_code/compile/object_speak.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/compile/object_speak.sqf b/SQF/dayz_code/compile/object_speak.sqf index 97845424c..820db5a3b 100644 --- a/SQF/dayz_code/compile/object_speak.sqf +++ b/SQF/dayz_code/compile/object_speak.sqf @@ -1,4 +1,4 @@ -private ["_type","_local","_unit"]; +private ["_chance","_dis","_isWoman","_local","_num","_rnd","_sound","_type","_unit"]; _unit = _this select 0; _type = _this select 1; From b4e5a38db54d7d952e852b106ea4235d40a5300d Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 7 Jan 2019 21:23:08 +0600 Subject: [PATCH 04/60] Update private tags --- SQF/dayz_code/compile/object_getHit.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/compile/object_getHit.sqf b/SQF/dayz_code/compile/object_getHit.sqf index 4d6a8d6c8..bdf5c0895 100644 --- a/SQF/dayz_code/compile/object_getHit.sqf +++ b/SQF/dayz_code/compile/object_getHit.sqf @@ -1,7 +1,8 @@ +private["_unit","_hp","_selection","_strH","_dam"]; _unit = _this select 0; _hp = _this select 1; _selection = getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints" >> _hp >> "name"); _dam = _unit getHit _selection; -[_dam, _selection]; \ No newline at end of file +[_dam, _selection]; From 967abbdcd9c0fc063112caf18aef17306782bcbf Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Tue, 15 Jan 2019 01:58:39 +0600 Subject: [PATCH 05/60] Update player_countMagazinesWBackpack.sqf There may be too long pauses with low FPS. --- SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf b/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf index be92fdefd..ec35e1d7a 100644 --- a/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf +++ b/SQF/dayz_code/compile/player_countMagazinesWBackpack.sqf @@ -50,7 +50,7 @@ if ((typeOf (unitBackPack player)) != "") then { ctrlActivate (_dialog displayCtrl 157); if (gear_done) then { waitUntil {ctrlShown (_dialog displayCtrl 159)}; - sleep 0.001; + uiSleep 0.001; }; for "_i" from 5000 to (5000 + _count) do { @@ -69,6 +69,6 @@ if ((typeOf (unitBackPack player)) != "") then { }; (findDisplay 106) closeDisplay 0; -if (gear_done) then {sleep 0.001;}; +if (gear_done) then {uiSleep 0.001;}; _magazineArray From ebc952e94d20a3bd211655cc61edeb78411b55d0 Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Sun, 20 Jan 2019 12:24:27 -0500 Subject: [PATCH 06/60] Update add_recommended_mysql_events.sql required declaration for functions in MySQL server 8.0+ --- Server Files/SQL/add_recommended_mysql_events.sql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Server Files/SQL/add_recommended_mysql_events.sql b/Server Files/SQL/add_recommended_mysql_events.sql index bcc4a293c..5525ad6e2 100644 --- a/Server Files/SQL/add_recommended_mysql_events.sql +++ b/Server Files/SQL/add_recommended_mysql_events.sql @@ -7,7 +7,9 @@ -- ---------------------------- DROP FUNCTION IF EXISTS `FindVehicleKeysCount`; DELIMITER ;; -CREATE FUNCTION `FindVehicleKeysCount`(`keyId` INT) RETURNS int(11) +CREATE FUNCTION `FindVehicleKeysCount`(`keyId` INT) + RETURNS int(11) + DETERMINISTIC BEGIN DECLARE totalKeys INT DEFAULT 0; DECLARE keyName VARCHAR(32) DEFAULT ""; @@ -37,7 +39,9 @@ DELIMITER ; -- ---------------------------- DROP FUNCTION IF EXISTS `DeleteNonKeyVehicles`; DELIMITER ;; -CREATE FUNCTION `DeleteNonKeyVehicles`() RETURNS int(11) +CREATE FUNCTION `DeleteNonKeyVehicles`() + RETURNS int(11) + DETERMINISTIC BEGIN DELETE FROM `Object_DATA` From 156d2d043da138537c40e733ce1d7eecca6b690c Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Sun, 20 Jan 2019 14:16:11 -0500 Subject: [PATCH 07/60] Update publicvariableval.txt vanilla commit: https://github.com/DayZMod/Battleye-Filters/commit/8c43660 --- Server Files/DZE_Server_Config/BattlEye/publicvariableval.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Server Files/DZE_Server_Config/BattlEye/publicvariableval.txt b/Server Files/DZE_Server_Config/BattlEye/publicvariableval.txt index 59c4214c4..a938db9b8 100644 --- a/Server Files/DZE_Server_Config/BattlEye/publicvariableval.txt +++ b/Server Files/DZE_Server_Config/BattlEye/publicvariableval.txt @@ -1,6 +1,5 @@ //new 5 \{ -5 \( 5 ; 5 & 5 % From 73118c249bb0837613af776600df298611290898 Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Sat, 26 Jan 2019 11:28:10 -0500 Subject: [PATCH 08/60] Fix error in 634a01a #2029 Vanilla commit: https://github.com/DayZMod/DayZ/commit/42368d7 --- SQF/dayz_code/compile/fn_unconscious.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf index c0de6e20b..03d47be9f 100644 --- a/SQF/dayz_code/compile/fn_unconscious.sqf +++ b/SQF/dayz_code/compile/fn_unconscious.sqf @@ -90,8 +90,10 @@ if (player == vehicle player) then { "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5; "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5; -//Prevent firing while weapon is still shown on back. AmovPpneMstpSnonWnonDnon_healed has disableWeapons=0 in config (should be =1) -waitUntil {uiSleep 1; !(animationState player in ["ainjppnemstpsnonwnondnon_rolltofront","amovppnemstpsnonwnondnon_healed","amovppnemstpsnonwnondnon"])}; +if ({getNumber (configFile >> "CfgWeapons" >> _x >> "type") in [1,2]} count (weapons player) > 0) then { + //Prevent firing while weapon is still shown on back or holstered. AmovPpneMstpSnonWnonDnon_healed has disableWeapons=0 in config (should be 1) + waitUntil {uiSleep 1; !(animationState player in ["ainjppnemstpsnonwnondnon_rolltofront","amovppnemstpsnonwnondnon_healed","amovppnemstpsnonwnondnon"])}; +}; //once more to be safe disableUserInput false; disableUserInput false; From ac41428404bab70056f43f533716d5b69e6ce05d Mon Sep 17 00:00:00 2001 From: oiad Date: Mon, 28 Jan 2019 23:35:44 +1300 Subject: [PATCH 09/60] Change ComboLockUI to check if selected door is null This then matches the safe/lockbox gui check which means modders can use the GUI screens for setting /retreiving codes (as per my codeChange script): https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/RscDisplay/safegui.hpp#L306 https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/RscDisplay/safegui.hpp#L654 Also removed the check for the safeKeyPad since it's done further along in `player_unlockVault` and also matches the lockbox ui. Thanks to @AirwavesMan for reporting --- SQF/dayz_code/Configs/RscDisplay/safegui.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/Configs/RscDisplay/safegui.hpp b/SQF/dayz_code/Configs/RscDisplay/safegui.hpp index a6d77984f..85e1e343f 100644 --- a/SQF/dayz_code/Configs/RscDisplay/safegui.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/safegui.hpp @@ -303,7 +303,7 @@ class SafeKeyPad colorText[] = {0,1,0,1}; colorBackground[] = {0,0,0,0}; colorBackgroundActive[] = {0,0,0,0}; - onButtonClick = "[player,""keypad_tick"",0,false] call dayz_zombieSpeak; keypadCancel = false; ((ctrlParent (_this select 0)) closeDisplay 2); if(!isNull dayz_selectedVault and (typeOf dayz_selectedVault) in DZE_LockedStorage) then {dayz_selectedVault spawn player_unlockVault;};"; + onButtonClick = "[player,""keypad_tick"",0,false] call dayz_zombieSpeak; keypadCancel = false; ((ctrlParent (_this select 0)) closeDisplay 2); if(!isNull dayz_selectedVault) then {dayz_selectedVault spawn player_unlockVault;};"; }; }; }; @@ -458,7 +458,7 @@ class ComboLockUI y = 0.762017; w = 0.201064; h = 0.233964; - onButtonClick = "keypadCancel = false; call player_unlockDoor"; + onButtonClick = "keypadCancel = false; if (!isNull dayz_selectedDoor) then {call player_unlockDoor;};"; }; }; }; From bad2b9a28598192e5c57b0e5cee88886eb9b760c Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Sun, 3 Feb 2019 13:25:17 -0500 Subject: [PATCH 10/60] Update scripts.txt for A2OA\Common\Ca\data\scripts\onplayerkilled.sqf Vanilla commit: https://github.com/DayZMod/Battleye-Filters/commit/4f9f7e9 --- Server Files/DZE_Server_Config/BattlEye/scripts.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server Files/DZE_Server_Config/BattlEye/scripts.txt b/Server Files/DZE_Server_Config/BattlEye/scripts.txt index ff801e673..6b01c2453 100644 --- a/Server Files/DZE_Server_Config/BattlEye/scripts.txt +++ b/Server Files/DZE_Server_Config/BattlEye/scripts.txt @@ -11,8 +11,8 @@ 5 attachTo !"(_variation * 2)) - _variation)];\n_bolt attachTo [_hitObject,_val,_hitMemoryPt];" !"player playActionNow \"PutDown\";\nuiSleep 2;\n_flare attachTo [player,[0,0,0],\"granat2\"];" !"tchmove \"ainjpfalmstpsnonwrfldnon_carried_still\";\n_dragee attachto [_unit,[-0.2, 0.2, 0]];" !"_source setDropInterval 0.02;\n_point attachTo [_unit,_modelPos,_wound];" !" attachto [_v,[0,0,0],\"destructionEffect" !"publicVariable \"PVDZ_drg_RaDrag\";\n\n_dragee attachto [_unit,[0.1, 1.01, 0]];" !="_l1 attachTo [_lh,[0,0,0],\"light\"];" !"_objectHelper attachTo [player,_offset];" !"_object attachTo [player,_offset];\n\n_position = getPosATL _object;" !="_vehicle attachTo [_liftHeli,[0,0,-7]];" !="_obj attachTo [_axis];" !"_objectSnapGizmo attachTo [_object,[_x select 0,_x select 1,_x select 2]];" !="_vehicle attachTo [_towTruck,[1.3,-2,2.3]];" !"localize \"STR_EPOCH_ACTIONS_ATTACHTOHELI\"," 5 buttonSetAction 5 callExtension -5 camCreate !"camCreate (player modeltoWorld [0,0,2]);\n0.2 fadeSound 0.1;\nDayz_" !"_body;\n_playerID = getPlayerUID player;\n\n\n_camera = \"camera\" camCreate _death" !="_camera = \"camera\" camCreate [12222.323, 3415.7791, -0.059190542]" -5 cameraEffect !"0.2 fadeSound 0.1;\nDayz_BuildCamera cameraeffect [\"External\", \"TOP\"];" !"cameraEffect [\"Internal\",\"TOP\"];\n_camera camSetTarget _deathPos;\n_camera camSetPos [_deathPos select" !"r_Simulation\";\n\n_camera cameraEffect [\"Terminate" !"cameraEffect [\"internal\",\"back\"]\n\n_camera camPrepareTarget [6433.5" +5 camCreate !"camCreate (player modeltoWorld [0,0,2]);\n0.2 fadeSound 0.1;\nDayz_" !"_body;\n_playerID = getPlayerUID player;\n\n\n_camera = \"camera\" camCreate _death" !="_camera = \"camera\" camCreate [12222.323, 3415.7791, -0.059190542]" !"kdy = cos _dir * _size;\n_kdz = _size;\n\n\n_camera =" +5 cameraEffect !"0.2 fadeSound 0.1;\nDayz_BuildCamera cameraeffect [\"External\", \"TOP\"];" !"cameraEffect [\"Internal\",\"TOP\"];\n_camera camSetTarget _deathPos;\n_camera camSetPos [_deathPos select" !"r_Simulation\";\n\n_camera cameraEffect [\"Terminate" !"cameraEffect [\"internal\",\"back\"]\n\n_camera camPrepareTarget [6433.5" !"kdy = cos _dir * _size;\n_kdz = _size;\n\n\n_camera =" 5 closeDisplay !"'closeDisplay'" !"closeDisplay 0" !"closeDisplay 2" !"if (!isNil \"closeDisplay\") then {" 1 compile !"ca\\communityconfiguration" !"ca\\Data\\" !"ca\\missions" !"ca\\modules" !"ca\\ui\\" !"ca\\Warfare2\\" !"scriptName \"Functions\\systems\\fn_inv" !"scriptName \"MP\\data\\script" !"code = compile preprocessFileLineNumbers (BIS_PathMPscriptCommands" !"t = missionConfigFile >> \"onMinimapScript" !="_this call (call compile GetText (configFile >> \"CfgAmmo\" >> _amm >> \"muzzleEffect\"));" !"z\\addons\\dayz_code\\" !"_menu ctrlSetEventHandler [\"ButtonClick\",_compile];\n};\n_pos set [3" !"{ _x set [1, compile (_x select 1)]; }" !"silver_1oz_b);\n\n{ \nif (!isNil {call compile" !"Var = compile format[\"epoch_death_board_record_" 5 createAgent !="_agent = createAgent [_type, _position, [], _radius, \"CAN_COLLIDE\"];" !="_agent = if (_type == \"Pastor\") then {createAgent [_type, _Pos, [], 0, \"NONE\"]} else {createAgent [_type, _Pos, [], 0, \"FORM\"]};" !="_dog = createAgent [_type, _Pos, [], 0, \"NONE\"];" @@ -68,7 +68,7 @@ 5 setVehicle !"if(_status) then {\n_vehicle setVehicleLock \"LOCKED\";\n} else {\n_vehicle setVehicleLock \"UNLOCKED\";\n};" 5 setViewDistance 5 sideLogic !"publicVariable \"BIS_MPF_logic\";" -5 switchCamera !"\"switchCamera\", " !"rswitchCamera" !="player switchCamera (Dayz_constructionContext select 2);" !"player switchCamera _currentCamera;\nif (_currentWpn !=" +5 switchCamera !"\"switchCamera\", " !"rswitchCamera" !="player switchCamera (Dayz_constructionContext select 2);" !"player switchCamera _currentCamera;\nif (_currentWpn !=" !"< 150) && random 1 > 0.5) then {\n_killer switchcamera" 5 systemChat !="systemChat format[localize \"str_missing_to_do_this\", _x];" !"systemChat (localize " !"systemChat format[localize \"STR_EPOCH_" !"systemChat localize \"STR_EPOCH_" !"case \"system\": {systemChat _message;};" 5 title !"titleCut [\"\", \"BLACK " !"\"titleCut\", " !"\"titleText\"" !="rtitleCut = 'titleCut'" !"rtitleCutc" !="rtitleText = 'titleText'" !"rtitleTextc" !"(_missionTextListPath >> \"titles\")" !"(_display displayCtrl _titleIDC) ctrlShow false;" !"titleText [format[localize \"str_return_lobby\", _x" !",\"_titleText\"" !"localize 'STR_UI_GENDER_TITLE';\n_timeNem" !="scriptName \"MP\\data\\scriptCommands\\titleText.sqf\";" !_fillTradeTitle !_bldTxtStringTitle !"localize \"str_halo_altitude_speed" 5 toString !"_animCheck = toString ([(_animStateArray select 0),(_animStateArray select 1)" !="_skinToModel = toString (_finalArray);" !="{_textArrayTemp = _textArrayTemp + [tostring [_x]]} foreach _line;" !="_cmpt = toString _cmpt;" !="_objName = toLower(toString(_objName));" !"if (toString _hayArr != _needle) then {" !="_type = toString _typeA;" !="_anim4 = toString _anim4;" !"{(count _stance>17)}) then {toString [_stance select 17]}" !"BIS_fnc_timeToString" !"02, if (typeName _name == \"ARRAY\") then {toString _name} else {_name}];" From 590b997050d33e4486130095ef291dce3212df6d Mon Sep 17 00:00:00 2001 From: vbawol Date: Fri, 1 Mar 2019 07:17:38 -0600 Subject: [PATCH 11/60] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24f308182..74134be34 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Initial Developers -------------------------- * [VB]AWOL - Lead Developer - http://www.twitch.tv/vbawol * Axle - Tester, Trader City Designer - http://www.twitch.tv/axles -* Paul Tomany - Models, Textures - ptomany@gmail.com - http://www.twitch.tv/sequisha +* Sequisha - Models, Textures - http://www.twitch.tv/sequisha * [VB]GREEN - Graphics - http://www.twitch.tv/vbgreen -------------------------- From cc67bf42d1cd8246e7839c2844610d77080917e8 Mon Sep 17 00:00:00 2001 From: vbawol Date: Fri, 1 Mar 2019 07:18:30 -0600 Subject: [PATCH 12/60] Update credits.txt --- SQF/dayz_code/credits.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/credits.txt b/SQF/dayz_code/credits.txt index daafe82e0..6ce6e7267 100644 --- a/SQF/dayz_code/credits.txt +++ b/SQF/dayz_code/credits.txt @@ -41,7 +41,7 @@ feature. * [Sharkiller](https://github.com/Sharkiller) (Spanish Tranlations) * [Defwen](https://github.com/Defwen) (Czech Translations) * [[VB]AWOL](https://github.com/vbawol) - * [Paul Tomany](https://github.com/Sequisha) + * [Sequisha](https://github.com/Sequisha) * [M1lkM8n](https://github.com/M1lkm8n) * [JST](https://github.com/Cybersam248) * [NonovUrbizniz](https://github.com/NonovUrbizniz) From fcae42a7f834683f18f6aaa547f466dd08f38cc4 Mon Sep 17 00:00:00 2001 From: vbawol Date: Fri, 1 Mar 2019 07:19:15 -0600 Subject: [PATCH 13/60] Update CHANGE LOG 1.0.4.2.txt --- Documents/CHANGE LOG 1.0.4.2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documents/CHANGE LOG 1.0.4.2.txt b/Documents/CHANGE LOG 1.0.4.2.txt index 45af604ab..9afc2441c 100644 --- a/Documents/CHANGE LOG 1.0.4.2.txt +++ b/Documents/CHANGE LOG 1.0.4.2.txt @@ -16,5 +16,5 @@ [REMOVED] Old Towngenerator Config. @Skaronator -[INFO] Models/textures by Paul Tomany. @Sequisha. +[INFO] Models/textures by @Sequisha. [INFO] Special thanks to http://verthosting.com for hosting our development server. From ca7a77e2ad315e173391489a5bab23b55173a9f0 Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 11 Mar 2019 15:44:33 +0600 Subject: [PATCH 14/60] Update player_switchWeapon.sqf (#2032) * Update player_switchWeapon.sqf It is forbidden to change weapons, when player swimming. * Update player_switchWeapon.sqf --- SQF/dayz_code/actions/player_switchWeapon.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/player_switchWeapon.sqf b/SQF/dayz_code/actions/player_switchWeapon.sqf index de7ec6782..bca3b9e49 100644 --- a/SQF/dayz_code/actions/player_switchWeapon.sqf +++ b/SQF/dayz_code/actions/player_switchWeapon.sqf @@ -27,6 +27,7 @@ dz_fn_switchWeapon = if (vehicle player != player) exitWith {}; if Player_IsOnLadder() exitWith {}; if (dayz_autoRun) then {call dayz_autoRunOff;}; + if (dayz_isSwimming) exitWith {}; private ["_current","_primary","_secondary","_swapWeapons"]; @@ -289,4 +290,4 @@ dz_fn_switchWeapon_animDone = if (IS_MELEE(primaryWeapon player)) then { call dayz_meleeMagazineCheck; }; #endif -}; \ No newline at end of file +}; From b798abf7fb212b29ee85bd5546c75e892693d1bc Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 11 Mar 2019 15:47:07 +0600 Subject: [PATCH 15/60] Update player_switchModel.sqf (#2031) delete all items, if used custom skins --- SQF/dayz_code/compile/player_switchModel.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQF/dayz_code/compile/player_switchModel.sqf b/SQF/dayz_code/compile/player_switchModel.sqf index 7da621de9..161894b3b 100644 --- a/SQF/dayz_code/compile/player_switchModel.sqf +++ b/SQF/dayz_code/compile/player_switchModel.sqf @@ -79,6 +79,8 @@ if (_isArray) then { _newUnit setDir _dir; {_newUnit removeMagazine _x;} count magazines _newUnit; removeAllWeapons _newUnit; +removeAllItems _newUnit; +removebackpack _newUnit; //Equip New Character { From ac884f2e18a9919acdda6fb6fed6aff65862b0bd Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 11 Mar 2019 15:49:26 +0600 Subject: [PATCH 16/60] fix Pickup_PK_GUE_DZE1 upgrade (#2035) fix Pickup_PK_GUE_DZE1 upgrade --- SQF/dayz_code/Configs/CfgVehicles/Car/Pickup_PK_INS.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/Configs/CfgVehicles/Car/Pickup_PK_INS.hpp b/SQF/dayz_code/Configs/CfgVehicles/Car/Pickup_PK_INS.hpp index 47350f02b..9ef977257 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Car/Pickup_PK_INS.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Car/Pickup_PK_INS.hpp @@ -125,7 +125,7 @@ class Pickup_PK_GUE_DZE1: Pickup_PK_GUE_DZE { terrainCoef = 1.8; class Upgrades { - ItemAVE[] = {"Pickup_PK_GUE_DZE1",{},{{"ItemAVE",1},{"PartGeneric",4},{"ItemTankTrap",2}}}; + ItemAVE[] = {"Pickup_PK_GUE_DZE2",{},{{"ItemAVE",1},{"PartGeneric",4},{"ItemTankTrap",2}}}; }; }; class Pickup_PK_TK_GUE_EP1_DZE1: Pickup_PK_TK_GUE_EP1_DZE { From a430f798420bc30b2a9cb3cc6872058a83f9a7f7 Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 11 Mar 2019 15:50:54 +0600 Subject: [PATCH 17/60] fix ArmoredSUV_PMC_DZE2 upgrade (#2037) fix ArmoredSUV_PMC_DZE2 upgrade --- SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp b/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp index e3b9adf90..48111db05 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp @@ -493,7 +493,7 @@ class ArmoredSUV_PMC_DZE2: ArmoredSUV_PMC_DZE1 }; class Upgrades { - ItemLRK[] = {"ArmoredSUV_PMC_DZE4",{},{{"ItemLRK",1},{"PartGeneric",1},{"ItemTent",1}}}; + ItemLRK[] = {"ArmoredSUV_PMC_DZE3",{},{{"ItemLRK",1},{"PartGeneric",1},{"ItemTent",1}}}; }; }; From c24504ac6b9e0624257d2234cf5cc5a73b6a699a Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 11 Mar 2019 15:52:29 +0600 Subject: [PATCH 18/60] fix Offroad_DSHKM_Gue_DZE1 upgrade (#2036) fix Offroad_DSHKM_Gue_DZE1 upgrade --- SQF/dayz_code/Configs/CfgVehicles/Car/Offroad_DSHKM_INS.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgVehicles/Car/Offroad_DSHKM_INS.hpp b/SQF/dayz_code/Configs/CfgVehicles/Car/Offroad_DSHKM_INS.hpp index 7464bd088..e7b8b406f 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Car/Offroad_DSHKM_INS.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Car/Offroad_DSHKM_INS.hpp @@ -110,10 +110,10 @@ class Offroad_DSHKM_Gue_DZE1: Offroad_DSHKM_Gue_DZE maxspeed = 170; // Offroad_DSHKM_base 150 | car 100 class Upgrades { - ItemLRK[] = {"Offroad_DSHKM_Gue_DZE2", + ItemAVE[] = {"Offroad_DSHKM_Gue_DZE2", { }, { - { "ItemLRK",1 }, + { "ItemAVE",1 }, { "PartGeneric",2 }, { "ItemTent",1 } }}; }; From 096fc13150714160ba6ca84539cdf51cdcd71c10 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 16 Sep 2019 01:38:38 +0200 Subject: [PATCH 19/60] Adding backpack support for zombies (#2033) * Adding backpack support for zombies * Adding backpack support for zombies * Update CHANGE LOG 1.0.6.3.txt * Fix jumping vehicles after fliping * Update CHANGE LOG 1.0.6.3.txt --- CHANGE LOG 1.0.6.3.txt | 2 ++ SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp | 3 ++- SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp | 1 + SQF/dayz_code/actions/player_flipvehicle.sqf | 6 ++++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGE LOG 1.0.6.3.txt b/CHANGE LOG 1.0.6.3.txt index 7c2d23194..130471666 100644 --- a/CHANGE LOG 1.0.6.3.txt +++ b/CHANGE LOG 1.0.6.3.txt @@ -1,5 +1,6 @@ [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 [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 @@ -13,6 +14,7 @@ [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 [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/CfgVehicles/Zeds/SwarmZeds.hpp b/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp index 8bb53b70f..9a18744bf 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp @@ -20,6 +20,7 @@ class Swarm_Base : Citizen1 { damageScale = 200; sepsisChance = 10; forcedSpeed = 6; + canCarryBackPack = 1; class Eventhandlers { init = "_this call zombie_initialize;"; @@ -126,4 +127,4 @@ class swarm_newBase : Swarm_Base { // tex[] = {}; // mat[] = {"Ca\characters_E\Overall\Data\Overall.rvmat", "Ca\characters_E\Overall\Data\W1_Overall.rvmat", "Ca\characters_E\Overall\Data\W2_Overall.rvmat"}; //}; -}; \ No newline at end of file +}; diff --git a/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp b/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp index b21d1ebdc..f59fca2c9 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp @@ -28,6 +28,7 @@ class Zed_Base : Citizen1 { class HitDamage {}; armor = 3; agentTasks[] = {}; + canCarryBackPack = 1; }; class zZombie_Base : Zed_Base { scope = public; diff --git a/SQF/dayz_code/actions/player_flipvehicle.sqf b/SQF/dayz_code/actions/player_flipvehicle.sqf index 075539652..f0ab82d12 100644 --- a/SQF/dayz_code/actions/player_flipvehicle.sqf +++ b/SQF/dayz_code/actions/player_flipvehicle.sqf @@ -1,4 +1,4 @@ -private ["_nearPlayers","_object"]; +private ["_nearPlayers","_object","_pos"]; _object = _this select 3; _nearPlayers = {(isPlayer _x && _x != player)} count (player nearEntities ["CAManBase",8]); @@ -11,10 +11,12 @@ if (!(_object isKindOf "ATV_Base_EP1") && _nearPlayers < 1) exitWith { player playMove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"; waitUntil { animationState player != "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"}; +_pos = getposATL _object; _object setVectorUp [0,0,1]; +_object setposATL _pos; // Alert Zombies [player,20,true,(getPosATL player)] call player_alertZombies; // Added Nutrition-Factor for work -["Working",0,[20,40,15,0]] call dayz_NutritionSystem; \ No newline at end of file +["Working",0,[20,40,15,0]] call dayz_NutritionSystem; From a052ba767b6f708233c8c8761e1a12f5b7725cea Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 16 Sep 2019 05:39:56 +0600 Subject: [PATCH 20/60] Update server_onPlayerDisconnect.sqf (#2039) * Update server_onPlayerDisconnect.sqf fix dupe and save inventory bag, if object position in sea * Update server_onPlayerDisconnect.sqf --- SQF/dayz_server/compile/server_onPlayerDisconnect.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf b/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf index 947eef702..6eb546e86 100644 --- a/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf +++ b/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf @@ -85,7 +85,7 @@ if (_characterID != "?") then { }; } else { //Done in server_playerSync above if player is alive - {[_x,"gear"] call server_updateObject} count (nearestObjects [_playerPos,DayZ_GearedObjects,10]); + {[_x,"gear"] call server_updateObject} count (nearestObjects [[_playerObj] call FNC_GetPos,DayZ_GearedObjects,10]); }; [_playerUID,_characterID,3,_playerName,(_playerPos call fa_coor2str)] call dayz_recordLogin; @@ -95,4 +95,4 @@ missionNamespace setVariable [_playerUID,nil]; if (alive _playerObj) then { _playerObj call sched_co_deleteVehicle; -}; \ No newline at end of file +}; From baf92ebf29199a147b64e9f51741d0fc1e52986f Mon Sep 17 00:00:00 2001 From: F507DMT <12347771234@mail.ru> Date: Mon, 16 Sep 2019 05:40:38 +0600 Subject: [PATCH 21/60] Update server_playerSync.sqf (#2038) * Update server_playerSync.sqf fix dupe and save inventory bag, if object position in sea * Update server_playerSync.sqf --- SQF/dayz_server/compile/server_playerSync.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_server/compile/server_playerSync.sqf b/SQF/dayz_server/compile/server_playerSync.sqf index 441944147..765d113cc 100644 --- a/SQF/dayz_server/compile/server_playerSync.sqf +++ b/SQF/dayz_server/compile/server_playerSync.sqf @@ -230,4 +230,4 @@ if (Z_SingleCurrency) then { //update global coins }; // Force gear updates for nearby vehicles/tents -{[_x,"gear"] call server_updateObject;} count nearestObjects [_charPos,DayZ_GearedObjects,10]; \ No newline at end of file +{[_x,"gear"] call server_updateObject;} count nearestObjects [[_character] call FNC_GetPos,DayZ_GearedObjects,10]; From 47eb85f6577ab5930358af91e22eae42338f3ced Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 19 Oct 2019 07:44:45 +0200 Subject: [PATCH 22/60] Remove bronze bar from configs The bronze bar has no model under the wirtten path but it can be spawned in. --- SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp | 2 +- SQF/dayz_code/Configs/CfgMagazines/DZE/Currency/BronzeBar.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp b/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp index 0300993ec..fec140941 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/CfgMagazines.hpp @@ -64,7 +64,7 @@ class CfgMagazines #include "DZE\Currency\GoldBar.hpp" #include "DZE\Currency\SilverBar.hpp" #include "DZE\Currency\CopperBar.hpp" - #include "DZE\Currency\BronzeBar.hpp" + //#include "DZE\Currency\BronzeBar.hpp" //The Bronze Bar has no model #include "DZE\Currency\AluminumBar.hpp" #include "DZE\Currency\TinBar.hpp" diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Currency/BronzeBar.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Currency/BronzeBar.hpp index 70ae1c872..f8e89540b 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Currency/BronzeBar.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Currency/BronzeBar.hpp @@ -3,7 +3,7 @@ class ItemBronzeBar: CA_Magazine { count = 1; type = 256; displayName = $STR_EPOCH_BRONZE; - model = "\z\addons\dayz_epoch\models\bronze_bar.p3d"; + model = "\z\addons\dayz_epoch\models\bronze_bar.p3d"; // This model does not exist under the written path picture = "\z\addons\dayz_epoch\pictures\equip_bar_bronze_CA.paa"; descriptionShort = $STR_EPOCH_BRONZE_DESC; }; \ No newline at end of file From d4b46e4287919c10b91661d6e93e09caa5219a74 Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 19 Oct 2019 15:11:57 +0200 Subject: [PATCH 23/60] Fixing arrow crafting --- SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp index 7c7080922..026dbe5c0 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp @@ -77,7 +77,7 @@ class PartWoodPile : CA_Magazine script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemKnife"}; - output[] = {{"WoodenArrow",3}}; + output[] = {{"1Rnd_Arrow_Wood",3}}; input[] = {{"PartWoodPile",1},{"ItemTrashRazor",1}}; }; From 719b6206138584fdb04848437724c3967ecf074e Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 19 Oct 2019 15:32:11 +0200 Subject: [PATCH 24/60] Fix german localization for gutting an animal --- SQF/dayz_code/stringtable.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 27d2f3e9d..b6db5c88d 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -6508,7 +6508,7 @@ Při stavbě %1 došlo k chybě. - You cannot make a fireplace here. The area must be flat, and free of other objects + You cannot make a fireplace here. The area must be flat, and free of other objects. Du kannst hier kein Feuer machen. Der Untergrund muss flach und frei von Hindernissen sein. Костер нужно разводить на ровной поверхности, без объектов поблизости. No puedes hacer una fogata aquí. El área debe ser plana y libre de otros objetos. @@ -6516,8 +6516,8 @@ Ohniště zde nelze postavit. Plocha musí být rovná a dostatečně veliká. - %1 has been gutted, %2 meat steaks now on the carcass - Du hast das Tier (%1) ausgenommen. Vom verbleibenden Fleisch kannst du %2 Stücke abschneiden. + %1 has been gutted, %2 meat steaks now on the carcass. + Du hast %1 ausgenommen und kannst nun %2 Stück(e) Fleisch aus dem Kadavar nehmen. Вы разделали: %1. Доступно кусков мяса: %2 Un %1 fue achurado, dejando %2 trozos de carne en el cuerpo. %1 a été dépecé, %2 morceaux de viande sont maintenant dans la carcasse. From cc85067f1fdb8a0b86872493eec47487a099dae5 Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 19 Oct 2019 17:56:41 +0200 Subject: [PATCH 25/60] Change M32 grenades inventory slots All M32 grenades still used more as one inventory slot. --- .../CfgMagazines/Magazines/LauncherAmmo.hpp | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/SQF/dayz_code/Configs/CfgMagazines/Magazines/LauncherAmmo.hpp b/SQF/dayz_code/Configs/CfgMagazines/Magazines/LauncherAmmo.hpp index 62d199837..bb5c89333 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Magazines/LauncherAmmo.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Magazines/LauncherAmmo.hpp @@ -78,4 +78,88 @@ class NLAW : CA_LauncherMagazine { class Dragon_EP1 : CA_LauncherMagazine { type = WeaponSlotItem; +}; + +//M32 grenades + +class 1Rnd_HE_M203; +class 6Rnd_HE_M203: 1Rnd_HE_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_HE_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_HE_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmHP_CA.paa"; +}; +class FlareWhite_M203; +class 6Rnd_FlareWhite_M203: FlareWhite_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_FlareWhite_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_FlareWhite_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmFlare_CA.paa"; +}; +class FlareGreen_M203; +class 6Rnd_FlareGreen_M203: FlareGreen_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_FlareGreen_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_FlareGreen_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmFlare_CA.paa"; +}; +class FlareRed_M203; +class 6Rnd_FlareRed_M203: FlareRed_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_FlareRed_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_FlareRed_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmFlare_CA.paa"; +}; +class FlareYellow_M203; +class 6Rnd_FlareYellow_M203: FlareYellow_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_FlareYellow_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_FlareYellow_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmFlare_CA.paa"; +}; +class 1Rnd_Smoke_M203; +class 6Rnd_Smoke_M203: 1Rnd_Smoke_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_Smoke_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_Smoke_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmSmoke_CA.paa"; +}; +class 1Rnd_SmokeRed_M203; +class 6Rnd_SmokeRed_M203: 1Rnd_SmokeRed_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_SmokeRed_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_SmokeRed_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmSmoke_CA.paa"; +}; +class 1Rnd_SmokeGreen_M203; +class 6Rnd_SmokeGreen_M203: 1Rnd_SmokeGreen_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_SmokeGreen_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_SmokeGreen_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmSmoke_CA.paa"; +}; +class 1Rnd_SmokeYellow_M203; +class 6Rnd_SmokeYellow_M203: 1Rnd_SmokeYellow_M203 +{ + count = 6; + displayName = "$STR_EP1_DN_6Rnd_SmokeYellow_M203"; + descriptionShort = "$STR_EP1_DSS_6Rnd_SmokeYellow_M203"; + type = 256; + picture = "\CA\weapons_E\Data\icons\m_6x40mmSmoke_CA.paa"; }; \ No newline at end of file From c0e9fe62e1e17b8b9d93ca5dd730f684faab9023 Mon Sep 17 00:00:00 2001 From: A Man Date: Sun, 20 Oct 2019 07:26:51 +0200 Subject: [PATCH 26/60] 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 27/60] 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 28/60] 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 29/60] 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 30/60] 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 31/60] 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 32/60] 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 33/60] 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 34/60] 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 35/60] 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 36/60] 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 37/60] 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 38/60] 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 39/60] 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"); From 12f9e1640795c5be406d9430387faab5806aa75d Mon Sep 17 00:00:00 2001 From: oiad Date: Wed, 30 Oct 2019 22:17:18 +1300 Subject: [PATCH 40/60] Show distance/limit in failed distance verification check --- SQF/dayz_server/compile/server_verifySender.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_server/compile/server_verifySender.sqf b/SQF/dayz_server/compile/server_verifySender.sqf index ef2681423..f863215ff 100644 --- a/SQF/dayz_server/compile/server_verifySender.sqf +++ b/SQF/dayz_server/compile/server_verifySender.sqf @@ -21,7 +21,7 @@ _exitReason = switch true do { //If object or player was moved with setPos on client, position takes a second to update on server //Coordinates can be used in place of object case (_objPos distance _player > (Z_VehicleDistance + 10)): { - format["%1 error: Verification failed, player is too far from object. PV ARRAY: %2",_function,_params] + format["%1 error: Verification failed, player is too far from object. Distance: %2m/%3m limit PV ARRAY: %4",_function,round (_objPos distance _player),Z_VehicleDistance + 10,_params] }; case (_index < 0): { format["%1 error: PUID NOT FOUND ON SERVER. PV ARRAY: %2",_function,_params] From ad541b03b0fb79be2b888aba41a40b8aad2d96d6 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 30 Oct 2019 20:08:08 +0100 Subject: [PATCH 41/60] Adding more lazy evaluation for damage_actions --- SQF/dayz_code/compile/fn_damageActions.sqf | 45 ++++++++++------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/SQF/dayz_code/compile/fn_damageActions.sqf b/SQF/dayz_code/compile/fn_damageActions.sqf index 2c51d9593..f7923f62f 100644 --- a/SQF/dayz_code/compile/fn_damageActions.sqf +++ b/SQF/dayz_code/compile/fn_damageActions.sqf @@ -8,7 +8,7 @@ scriptName "Functions\misc\fn_damageActions.sqf"; - [] call fnc_usec_damageActions; ************************************************************/ -private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_assignedRole","_driver","_action","_turret","_weapons","_weaponName","_crew","_unconscious_crew","_patients","_vehType","_unit","_antibiotics","_bloodBags","_unconscious","_lowBlood","_injured","_hasSepsis","_inPain","_legsBroke","_armsBroke","_infected","_hasBandage","_hasSepsisBandage","_hasEpi","_hasMorphine","_hasSplint","_hasPainkillers","_hasEmptyBag","_hasTester","_hasAntibiotics","_hasBloodBag","_vehClose","_action1","_action2","_action3","_playerMagazines","_isFriendly"]; +private ["_menClose","_hasPatient","_vehicle","_inVehicle","_isClose","_assignedRole","_driver","_action","_turret","_weapons","_weaponName","_crew","_unconscious_crew","_patients","_vehType","_unit","_antibiotics","_bloodBags","_unconscious","_lowBlood","_injured","_hasSepsis","_inPain","_legsBroke","_armsBroke","_infected","_hasBandage","_hasSepsisBandage","_hasEpi","_hasMorphine","_hasSplint","_hasPainkillers","_hasAntibiotics","_hasBloodBag","_vehClose","_action1","_action2","_action3","_playerMagazines","_isFriendly"]; _menClose = cursorTarget; _hasPatient = alive _menClose; @@ -29,9 +29,9 @@ if (_inVehicle) then { }; if (!r_player_unconscious && !r_action2) then { r_player_lastSeat = _assignedRole; - if (_vehicle isKindOf "helicopter" || (_inVehicle && ({(isPlayer _x) && (alive _x)} count (crew _vehicle) > 1))) then { + if (_vehicle isKindOf "helicopter" || {_inVehicle && {{(isPlayer _x) && (alive _x)} count (crew _vehicle) > 1}}) then { //allow switch to pilot - if (((_assignedRole select 0) != "driver") && ((!alive _driver) or ((_vehicle emptyPositions "Driver") > 0))) then { + if (((_assignedRole select 0) != "driver") && {(!alive _driver) || {(_vehicle emptyPositions "Driver") > 0}}) then { if (_vehicle isKindOf "helicopter") then { _action = _vehicle addAction [localize "str_actions_helipilotseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToPilot",_driver], 0, false, true]; } else { @@ -41,25 +41,25 @@ if (_inVehicle) then { r_action2 = true; }; //allow switch to cargo - if (((_assignedRole select 0) != "cargo") && ((_vehicle emptyPositions "Cargo") > 0)) then { + if (((_assignedRole select 0) != "cargo") && {(_vehicle emptyPositions "Cargo") > 0}) then { _action = _vehicle addAction [localize "str_actions_helibackseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToCargo",_driver], 0, false, true]; r_player_actions2 set [count r_player_actions2,_action]; r_action2 = true; }; //allow switch to gunner - if (((_assignedRole select 0) != "Turret") && ((_vehicle emptyPositions "Gunner") > 0)) then { + if (((_assignedRole select 0) != "Turret") && {(_vehicle emptyPositions "Gunner") > 0}) then { _action = _vehicle addAction [localize "str_actions_heligunnerseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToTurret",_driver], 0, false, true]; r_player_actions2 set [count r_player_actions2,_action]; r_action2 = true; }; //allow switch to commander - if (((assignedCommander _vehicle) != player) && ((_vehicle emptyPositions "Commander") > 0)) then { + if (((assignedCommander _vehicle) != player) && {(_vehicle emptyPositions "Commander") > 0}) then { _action = _vehicle addAction[localize "STR_EPOCH_PLAYER_311", "\z\addons\dayz_code\actions\veh_seatActions.sqf", ["MoveToTurret", _driver], 0, false, true]; r_player_actions2 set [count r_player_actions2,_action]; r_action2 = true; }; }; - if ((count _assignedRole) > 1 || ((_assignedRole select 0) == "driver")) then { + if ((count _assignedRole) > 1 || {(_assignedRole select 0) == "driver"}) then { _turret = [-1]; if ((count _assignedRole) > 1) then { _turret = _assignedRole select 1; @@ -113,14 +113,14 @@ if (r_player_unconscious) then { //Lets make sure the player is looking at the target if (isPlayer cursorTarget) then { - if (!r_drag_sqf && !r_action && !_inVehicle && !r_player_unconscious && (player distance _menClose < 3)) then { + if (!r_drag_sqf && {!r_action} && {!_inVehicle} && {!r_player_unconscious} && {player distance _menClose < 3}) then { _unit = cursorTarget; player reveal _unit; - + //Arrays _antibiotics =["ItemAntibiotic","ItemAntibiotic1","ItemAntibiotic2","ItemAntibiotic3","ItemAntibiotic4","ItemAntibiotic5","ItemAntibiotic6"]; _bloodBags = ["ItemBloodbag","bloodBagANEG","bloodBagAPOS","bloodBagBNEG","bloodBagBPOS","bloodBagABNEG","bloodBagABPOS","bloodBagONEG","bloodBagOPOS"]; - + //Var checks _unconscious = _unit getVariable ["NORRN_unconscious", false]; _lowBlood = _unit getVariable ["USEC_lowBlood", false]; @@ -130,7 +130,7 @@ if (isPlayer cursorTarget) then { _legsBroke = _unit getVariable ["hit_legs", 0] >= 1; _armsBroke = _unit getVariable ["hit_hands", 0] >= 1; _infected = _unit getVariable ["USEC_infected", false]; - + //Magazine checks _playerMagazines = magazines player; _hasBandage = "ItemBandage" in _playerMagazines; @@ -139,12 +139,9 @@ if (isPlayer cursorTarget) then { _hasMorphine = "ItemMorphine" in _playerMagazines; _hasSplint = "equip_woodensplint" in _playerMagazines; _hasPainkillers = "ItemPainkiller" in _playerMagazines; - //_hasEmptyBag = "emptyBloodBag" in _playerMagazines; - //_hasTester = "bloodTester" in _playerMagazines; - _hasAntibiotics = Array_Any(_playerMagazines, {_this in _antibiotics}); _hasBloodBag = Array_Any(_playerMagazines, {_this in _bloodBags}); - + _vehClose = (getPosATL player) nearEntities [["Car","Tank","Helicopter","Plane","StaticWeapon","Ship"],5]; if (_hasPatient) then { @@ -168,49 +165,49 @@ if (isPlayer cursorTarget) then { r_player_actions set [count r_player_actions,NORRN_loadWoundedAction]; }; //Allow player to bandage - if(_injured && _hasBandage) then { + if(_injured && {_hasBandage}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemBandage"], 0, true, true, "", "'ItemBandage' in magazines player"]; r_player_actions set [count r_player_actions,_action]; }; //Sepsis - if(_hasSepsis && _hasSepsisBandage) then { + if(_hasSepsis && {_hasSepsisBandage}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_04", "\z\addons\dayz_code\medical\bandage.sqf",[_unit,"ItemSepsisBandage"], 0, true, true, "", "'ItemBandage' in magazines player"]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to give Epinephrine - if(_unconscious && _hasEpi) then { + if(_unconscious && {_hasEpi}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_05", "\z\addons\dayz_code\medical\epinephrine.sqf",[_unit], 0, true, true]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to give Morphine - if((_legsBroke or _armsBroke) && _hasMorphine) then { + if((_legsBroke || {_armsBroke}) && {_hasMorphine}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_06", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"ItemMorphine"], 0, true, true, "", "'ItemMorphine' in magazines player"]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to give equip_woodensplint - if((_legsBroke or _armsBroke) && _hasSplint) then { + if((_legsBroke || {_armsBroke}) && {_hasSplint}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_06_splint", "\z\addons\dayz_code\medical\brokeBones.sqf",[_unit,"equip_woodensplint"], 0, true, true, "", "'equip_woodensplint' in magazines player"]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to give Painkillers - if(_inPain && _hasPainkillers) then { + if(_inPain && {_hasPainkillers}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_07", "\z\addons\dayz_code\medical\painkiller.sqf",[_unit], 0, true, true, "", "'ItemPainkiller' in magazines player"]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to transfuse blood - if(_lowBlood && _hasBloodBag) then { + if(_lowBlood && {_hasBloodBag}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_08", "\z\addons\dayz_code\medical\transfusion.sqf",[_unit], 0, true, true]; r_player_actions set [count r_player_actions,_action]; }; //Allow player to give antibiotics - if (_infected && _hasAntibiotics) then { + if (_infected && {_hasAntibiotics}) then { r_action = true; _action = _unit addAction [localize "str_actions_medical_give_antibiotics", "\z\addons\dayz_code\medical\antibiotics.sqf",[_unit], 0, true, true]; r_player_actions set [count r_player_actions, _action]; @@ -233,7 +230,7 @@ if (isPlayer cursorTarget) then { }; //Remove Actions -if ((!_isClose or !_hasPatient) && r_action) then { +if ((!_isClose || {!_hasPatient}) && {r_action}) then { call fnc_usec_medic_removeActions; r_action = false; }; From 4828c087ce9a8a56eb7e4313f2cad38e7b5a66b7 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 30 Oct 2019 20:08:57 +0100 Subject: [PATCH 42/60] Adding more lazy evaluation for fn_selfactions --- SQF/dayz_code/compile/fn_selfActions.sqf | 82 ++++++++++++------------ 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index a9abaccb4..850f9eaac 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -40,7 +40,7 @@ if (!isNull _nearLight) then { }; //Grab Flare -if (_canPickLight && !dayz_hasLight && !_isPZombie) then { +if (_canPickLight && {!dayz_hasLight} && {!_isPZombie}) then { if (s_player_grabflare < 0) then { _text = getText (configFile >> "CfgAmmo" >> (typeOf _nearLight) >> "displayName"); s_player_grabflare = player addAction [format[localize "str_actions_medical_15",_text], "\z\addons\dayz_code\actions\flare_pickup.sqf",_nearLight, 1, false, true]; @@ -112,7 +112,7 @@ if (_canDo && !_inVehicle && !dayz_isSwimming && ((call fn_nearWaterHole) select if (_inVehicle) then { DZE_myVehicle = _vehicle; - if (_vehicleOwnerID != "0" && _canDo) then { + if ((_vehicleOwnerID != "0") && {_canDo}) then { if (s_player_lockUnlockInside_ctrl < 0) then { _totalKeys = call epoch_tempKeys; _temp_keys = _totalKeys select 0; @@ -178,7 +178,7 @@ if (DZE_HaloJump) then { }; if (DZE_NameTags > 0) then { - if (s_player_showname < 0 && !_isPZombie) then { + if (s_player_showname < 0 && {!_isPZombie}) then { if (DZE_NameTags < 2) then { s_player_showname = 1; player setVariable["DZE_display_name",true,true]; @@ -199,11 +199,11 @@ if (_isPZombie) then { if (s_player_pzombiesvision < 0) then { s_player_pzombiesvision = player addAction [localize "STR_EPOCH_ACTIONS_NIGHTVIS", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"]; }; - if (!isNull _cursorTarget && _isClose) then { + if (!isNull _cursorTarget && {_isClose}) then { _isZombie = _cursorTarget isKindOf "zZombie_base"; _isHarvested = _cursorTarget getVariable["meatHarvested",false]; _isMan = _cursorTarget isKindOf "Man"; //includes animals and zombies - if (!alive _cursorTarget && _isMan && !_isZombie && !_isHarvested) then { + if (!alive _cursorTarget && {_isMan} && {!_isZombie} && {!_isHarvested}) then { if (s_player_pzombiesfeed < 0) then { s_player_pzombiesfeed = player addAction [localize "STR_EPOCH_ACTIONS_FEED", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",_cursorTarget, 3, true, false]; }; @@ -218,9 +218,9 @@ if (_isPZombie) then { }; // Increase distance only if AIR or SHIP -_allowedDistance = if ((_cursorTarget isKindOf "Air") or (_cursorTarget isKindOf "Ship")) then {8} else {4}; +_allowedDistance = [4, 8] select ((_cursorTarget isKindOf "Air") || (_cursorTarget isKindOf "Ship")); -if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cursorTarget < _allowedDistance) && _canDo) then { +if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance _cursorTarget < _allowedDistance} && {_canDo}) then { //Has some kind of target _typeOfCursorTarget = typeOf _cursorTarget; _isVehicle = _cursorTarget isKindOf "AllVehicles"; @@ -239,7 +239,6 @@ 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 = ({_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; @@ -285,7 +284,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; //Allow player to fill Fuel can - if (_hasEmptyFuelCan && _isFuel && _isAlive) then { + if (_hasEmptyFuelCan && {_isFuel} && {_isAlive}) then { if (s_player_fillfuel < 0) then { s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",_cursorTarget, 1, false, true]; }; @@ -357,13 +356,13 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Cook Meat - if (_hasRawMeat && !a_player_cooking) then { + 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 (_hasunboiledwater && {!a_player_boil}) then { if (s_player_boil < 0) then { s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",_cursorTarget, 3, true, true]; }; @@ -383,16 +382,16 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur _restrict = _typeOfCursorTarget in DZE_restrictRemoval; //Allow player to remove objects with no ownership or access required - if (!_restrict && (_isDestructable || _typeOfCursorTarget in DZE_isWreck || _typeOfCursorTarget in DZE_isWreckBuilding || _typeOfCursorTarget in DZE_isRemovable)) then { - if (_hasToolbox && _hasCrowbar) then { + if (!_restrict && {_isDestructable || {_typeOfCursorTarget in DZE_isWreck} || {_typeOfCursorTarget in DZE_isWreckBuilding} || {_typeOfCursorTarget in DZE_isRemovable}}) then { + if (_hasToolbox && {_hasCrowbar}) then { _player_deleteBuild = true; }; }; //Allow player to remove objects only if they have proper ownership or access - if (_restrict || _isModular || _isModularDoor || _isGenerator || _typeOfCursorTarget in DZE_isDestroyableStorage) then { - if (_hasToolbox && _hasCrowbar) then { + if (_restrict || {_isModular} || {_isModularDoor} || {_isGenerator} || {_typeOfCursorTarget in DZE_isDestroyableStorage}) then { + if (_hasToolbox && {_hasCrowbar}) then { _hasAccess = [player, _cursorTarget] call FNC_check_access; - if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) then { + if ((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3}) then { _player_deleteBuild = true; }; }; @@ -443,7 +442,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //other tents if (_istypeTent) then { _hasIgnitors = {_x in DayZ_Ignitors} count _itemsPlayer > 0; - if ((_hasFuel20 or _hasFuel5 or _hasBarrel) && _hasIgnitors) then { + if ((_hasFuel20 || {_hasFuel5} || {_hasBarrel}) && {_hasIgnitors}) then { if (s_player_destroytent < 0) then { s_player_destroytent = player addAction [localize "str_actions_self_destroytent", "\z\addons\dayz_code\actions\player_destroyTent.sqf",_cursorTarget, 0, false, true]; }; @@ -607,11 +606,11 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_breakinhouse; s_player_breakinhouse = -1; };*/ - if (_typeOfCursorTarget == "Plastic_Pole_EP1_DZ" && {speed player <= 1}) then { + if ((_typeOfCursorTarget == "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then { _hasAccess = [player, _cursorTarget] call FNC_check_access; - _allowed = ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3) or (_hasAccess select 4)); + _allowed = ((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3} || {_hasAccess select 4}); if (DZE_permanentPlot) then { - if (s_player_plotManagement < 0 && _allowed) then { + if (s_player_plotManagement < 0 && {_allowed}) then { s_player_plotManagement = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MANAGEPLOT"], "\z\addons\dayz_code\actions\plotManagement\initPlotManagement.sqf", [], 5, false]; }; } else { @@ -621,7 +620,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_maintain_area_preview = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false]; }; }; - if (s_player_plot_boundary < 0 && (_allowed or (_hasAccess select 1))) then { + if (s_player_plot_boundary < 0 && {_allowed || (_hasAccess select 1)}) then { s_player_plot_boundary = player addAction [localize "STR_EPOCH_PLOTMANAGEMENT_SHOW_BOUNDARY", "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf", "", 1, false]; }; } else { @@ -686,7 +685,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur _hasKey = _characterID in _temp_keys; _oldOwner = (_characterID == _uid); if (_isLocked) then { - if (_hasKey || _oldOwner) then { + if (_hasKey || {_oldOwner}) then { _unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (_temp_keys find _characterID))], 2, true, true]; s_player_lockunlock set [count s_player_lockunlock,_unlock]; s_player_lockUnlock_crtl = 1; @@ -700,7 +699,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_lockUnlock_crtl = 1; }; } else { - if (_hasKey || _oldOwner) then { + if (_hasKey || {_oldOwner}) then { _lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true]; s_player_lockunlock set [count s_player_lockunlock,_lock]; s_player_lockUnlock_crtl = 1; @@ -732,10 +731,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; // Allow manage door - if (DZE_doorManagement && (_typeOfCursorTarget in DZE_DoorsLocked)) then { + if (DZE_doorManagement && {_typeOfCursorTarget in DZE_DoorsLocked}) then { // Check player access _hasAccess = [player, _cursorTarget] call FNC_check_access; - if (s_player_manageDoor < 0 && ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3) or (_hasAccess select 4) or (_hasAccess select 5) or (_hasAccess select 6))) then { + if (s_player_manageDoor < 0 && {(_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3} || {_hasAccess select 4} || {_hasAccess select 5} || {_hasAccess select 6}}) then { s_player_manageDoor = player addAction [format["%1", localize "STR_EPOCH_ACTIONS_MANAGEDOOR"], "\z\addons\dayz_code\actions\doorManagement\initDoorManagement.sqf", _cursorTarget, 5, false]; }; } else { @@ -747,7 +746,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if ((_typeOfCursorTarget in DZE_LockableStorage) && {_characterID != "0"} && {_isClose} && {!keypadCancel}) then { if (s_player_unlockvault < 0) then { if (_typeOfCursorTarget in DZE_LockedStorage) then { - if (_characterID == dayz_combination || _ownerID == _uid) then { + if ((_characterID == dayz_combination) || {_ownerID == _uid}) then { _combi = player addAction [format[localize "STR_EPOCH_ACTIONS_OPEN",_text], "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true]; s_player_combi set [count s_player_combi,_combi]; } else { @@ -756,7 +755,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; s_player_unlockvault = 1; } else { - if (_characterID != dayz_combination && _ownerID != _uid) then { + if ((_characterID != dayz_combination) && {_ownerID != _uid}) then { _combi = player addAction [localize "STR_EPOCH_ACTIONS_RECOMBO", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true]; s_player_combi set [count s_player_combi,_combi]; s_player_unlockvault = 1; @@ -771,11 +770,11 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Allow owner to pack vault if ((_typeOfCursorTarget in DZE_UnLockedStorage) && {_characterID != "0"} && {_isClose} && {!keypadCancel}) then { if (s_player_lockvault < 0) then { - if (_characterID == dayz_combination || _ownerID == _uid) then { + if ((_characterID == dayz_combination) || {_ownerID == _uid}) then { s_player_lockvault = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\vault_lock.sqf",_cursorTarget, 0, false, true]; }; }; - if (s_player_packvault < 0 && (_characterID == dayz_combination || _ownerID == _uid)) then { + if (s_player_packvault < 0 && {(_characterID == dayz_combination) || (_ownerID == _uid)}) then { s_player_packvault = player addAction [format["%1",(format[localize "STR_EPOCH_ACTIONS_PACK",_text])], "\z\addons\dayz_code\actions\vault_pack.sqf",_cursorTarget, 0, false, true]; }; } else { @@ -814,7 +813,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; //Fuel Pump on truck - if (_typeOfCursorTarget in DZE_fueltruckarray && _isAlive) then { + if (_typeOfCursorTarget in DZE_fueltruckarray && {_isAlive}) then { if (s_player_fuelauto2 < 0) then { // show that fuel truck pump needs power. if (isEngineOn _cursorTarget) then { @@ -829,7 +828,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; // inplace upgrade tool - if ((_cursorTarget isKindOf "ModularItems") || (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") || (_cursorTarget isKindOf "CinderWallDoor_DZ_Base")) then { + if ((_cursorTarget isKindOf "ModularItems") || {_cursorTarget isKindOf "Land_DZE_WoodDoor_Base"} || {_cursorTarget isKindOf "CinderWallDoor_DZ_Base"}) then { if ((s_player_lastTarget select 0) != _cursorTarget) then { if (s_player_upgrade_build > 0) then { player removeAction s_player_upgrade_build; @@ -839,7 +838,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if (s_player_upgrade_build < 0) then { _hasAccess = [player, _cursorTarget] call FNC_check_access; _upgrade = getArray (configFile >> "CfgVehicles" >> (typeOf _cursorTarget) >> "upgradeBuilding"); - if (((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) && (count _upgrade) > 0) then { + if (((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3}) && {(count _upgrade) > 0}) then { s_player_lastTarget set [0,_cursorTarget]; s_player_upgrade_build = player addAction [format[localize "STR_EPOCH_UPGRADE",_text], "\z\addons\dayz_code\actions\player_upgrade.sqf",_cursorTarget, -1, false, true]; }; @@ -859,7 +858,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; if (s_player_downgrade_build < 0) then { _hasAccess = [player, _cursorTarget] call FNC_check_access; - if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) then { + if ((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3}) then { s_player_lastTarget set [1,_cursorTarget]; s_player_downgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_REMLOCK",_text], "\z\addons\dayz_code\actions\player_buildingDowngrade.sqf",_cursorTarget, -2, false, true]; }; @@ -870,7 +869,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; // inplace maintenance tool - if ((damage _cursorTarget >= DZE_DamageBeforeMaint) && {_cursorTarget isKindOf "ModularItems" || _cursorTarget isKindOf "DZE_Housebase" || _typeOfCursorTarget == "LightPole_DZ"}) then { + if ((damage _cursorTarget >= DZE_DamageBeforeMaint) && {_cursorTarget isKindOf "ModularItems" || {_cursorTarget isKindOf "DZE_Housebase"} || {_typeOfCursorTarget == "LightPole_DZ"}}) then { if ((s_player_lastTarget select 2) != _cursorTarget) then { if (s_player_maint_build > 0) then { player removeAction s_player_maint_build; @@ -879,7 +878,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; if (s_player_maint_build < 0) then { _hasAccess = [player, _cursorTarget] call FNC_check_access; - if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) then { + if ((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3}) then { _text2 = _text + " (" + str(round ((damage _cursorTarget) * 100)) + "% damaged)"; s_player_lastTarget set [2,_cursorTarget]; s_player_maint_build = player addAction [format["%1 %2",localize "STR_EPOCH_ACTIONS_MAINTAIN",_text2], "\z\addons\dayz_code\actions\player_buildingMaint.sqf",_cursorTarget, -2, false, true]; @@ -901,7 +900,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if (_cursorTarget getVariable ["GeneratorFilled", false]) then { s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR2", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",_cursorTarget, 0, false, true]; } else { - if (_hasFuel20 or _hasFuel5 or _hasBarrel) then { + if (_hasFuel20 || {_hasFuel5} || {_hasBarrel}) then { s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR3", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",_cursorTarget, 0, false, true]; }; }; @@ -970,9 +969,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_parts_crtl = -1; }; + //Dog if (dayz_tameDogs) then { - //Dog _hasRawMeat = {_x in Dayz_meatraw} count _magazinesPlayer > 0; + if (_isDog && {_hasRawMeat} && {_isAlive} && {_ownerID == "0"} && {player getVariable ["dogID",0] == 0}) then { if (s_player_tamedog < 0) then { s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\dog\tame_dog.sqf", _cursorTarget, 1, false, true]; @@ -982,10 +982,12 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_tamedog = -1; }; if (_isDog && {_ownerID == _id} && {_isAlive}) then { - if (s_player_feeddog < 0 && _hasRawMeat) then { + _hasbottleitem = ({_x in ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterBottleBoiled"]} count _magazinesPlayer) > 0; + + if (s_player_feeddog < 0 && {_hasRawMeat}) then { s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true]; }; - if (s_player_waterdog < 0 && _hasbottleitem) then { + if (s_player_waterdog < 0 && {_hasbottleitem}) then { s_player_waterdog = player addAction [localize "str_actions_waterdog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,1], 0, false, true]; }; if (s_player_staydog < 0) then { @@ -1150,7 +1152,7 @@ if (_dogHandle > 0) then { _dog = _dogHandle getFSMVariable "_dog"; if (isNil "_dog") exitWith {}; if (isNil "_ownerID") then {_ownerID = "0"}; - if (_canDo && !_inVehicle && alive _dog && !(_ownerID in [_myCharID,_uid])) then { + if (_canDo && {!_inVehicle} && {alive _dog} && {!(_ownerID in [_myCharID,_uid])}) then { if (s_player_movedog < 0) then { s_player_movedog = player addAction [localize "str_actions_movedog", "\z\addons\dayz_code\actions\dog\move.sqf", player getVariable ["dogID",0], 1, false, true]; }; From 0c2080552489c7050f69533e888e1eeb2bf88b10 Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 30 Oct 2019 20:12:31 +0100 Subject: [PATCH 43/60] Move low blood check to scheduler The old low blood check runs every frame until server restart. Having it in the scheduler does almost the same with much less performance impact. --- SQF/dayz_code/system/player_monitor.fsm | 2 +- .../system/scheduler/sched_medical.sqf | 50 +++++++++++++------ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index 593a66384..83eec62df 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -1144,7 +1144,7 @@ class FSM init = /*%FSM*/"if (_debug == 1) then {diag_log [diag_tickTime,'Initialize'];};" \n "" \n "//Medical" \n - "dayz_medicalH = [] execVM ""\z\addons\dayz_code\medical\init_medical.sqf""; //Medical Monitor Script (client only)" \n + "//dayz_medicalH = [] execVM ""\z\addons\dayz_code\medical\init_medical.sqf""; //Medical Monitor Script (client only)" \n "[player] call fnc_usec_damageHandle;" \n "" \n "if (r_player_unconscious) then {" \n diff --git a/SQF/dayz_code/system/scheduler/sched_medical.sqf b/SQF/dayz_code/system/scheduler/sched_medical.sqf index acf698a4c..e203fb1ba 100644 --- a/SQF/dayz_code/system/scheduler/sched_medical.sqf +++ b/SQF/dayz_code/system/scheduler/sched_medical.sqf @@ -7,7 +7,7 @@ sched_medical_slow = { // 10 seconds //Do not global send player setVariable["USEC_BloodQty", r_player_blood, false]; player setVariable["medForceUpdate", true, false]; - //Send only to server + //Send only to server PVDZ_serverStoreVar = [player, "USEC_BloodQty", r_player_blood]; publicVariableServer "PVDZ_serverStoreVar"; }; @@ -18,7 +18,9 @@ sched_medical_slow = { // 10 seconds sched_medical_init = { [ []spawn{} ] }; sched_medical = { // 1 second HIDE_FSM_VARS - private "_unconHdlr"; + + private ["_unconHdlr","_lowBlood"]; + _unconHdlr = _this select 0; if (r_player_blood == r_player_bloodTotal) then { @@ -26,7 +28,7 @@ sched_medical = { // 1 second }; //r_player_unconscious = getVariable ["NORRN_unconscious", true]; - + if (r_player_blood <= 0) then { [dayz_sourceBleeding,"find"] call player_death; }; @@ -38,14 +40,29 @@ sched_medical = { // 1 second }; }; - if ((r_player_blood <= 3000) and !r_player_unconscious) then { - if (random 100 > 99) then { + if (!r_player_unconscious && {(r_player_blood/r_player_bloodTotal) < 0.35}) then { + r_player_lowblood = true; + playSound "heartbeat_1"; + addCamShake [2, 0.5, 25]; + if (r_player_lowblood) then { + if (!dayz_soundMuted) then { + // muted is 0.25, so this is always higher + 0 fadeSound ((r_player_blood/r_player_bloodTotal) + 0.5); + }; + "dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [random 4]; "dynamicBlur" ppEffectCommit 0.2; + }; + _lowBlood = player getVariable ["USEC_lowBlood", false]; + if ((r_player_blood < r_player_bloodTotal) and {!_lowBlood}) then { + player setVariable["USEC_lowBlood",true,true]; + }; + + if (r_player_blood <= 3000 && {random 100 > 99}) then { [player, ((random 0.1) + 0.2)] call fnc_usec_damageUnconscious; }; }; //Handle Unconscious player - if ((r_player_unconscious) and (!r_player_unconsciousInProgress) and (scriptDone _unconHdlr)) then { + if ((r_player_unconscious) and {!r_player_unconsciousInProgress} and {scriptDone _unconHdlr}) then { //localize "CLIENT: Start Unconscious Function"; _unconHdlr = [] spawn fnc_usec_unconscious; }; @@ -62,7 +79,7 @@ sched_medical = { // 1 second [_unconHdlr] }; -sched_medical_effects_init = { +sched_medical_effects_init = { private ["_hndCC", "_hndDB", "_hndRB"]; _hndCC = ppEffectCreate ["colorCorrections", 3]; @@ -72,17 +89,18 @@ sched_medical_effects_init = { _hndRB = ppEffectCreate ["radialBlur", 1]; _hndRB ppEffectEnable true; _hndRB ppEffectAdjust [0, 0, 0.5, 0.5]; - _hndRB ppEffectCommit 0; - + _hndRB ppEffectCommit 0; + [ _hndCC, _hndDB, _hndRB ] }; -sched_medical_effects = { +sched_medical_effects = { // every 2 seconds: // change saturation, blur and vignetting according to blood level // Shivering if character temperature is near the minimum - - private ["_hndCC", "_hndDB", "_tmp1", "_tmp2", "_tmp3"]; + + private ["_hndCC", "_hndDB", "_tmp1", "_tmp2", "_tmp3","_hndRB"]; + _hndCC = _this select 0; _hndDB = _this select 1; _hndRB = _this select 2; @@ -114,7 +132,7 @@ sched_medical_effects = { [_hndCC, _hndDB, _hndRB] ppEffectCommit 1.5; //Add Shivering - if (dayz_temperatur <= (0.125 * (dayz_temperaturmax - dayz_temperaturmin) + dayz_temperaturmin) and ((vehicle player == player and speed player < 5) or (vehicle player != player))) then { + if (dayz_temperatur <= (0.125 * (dayz_temperaturmax - dayz_temperaturmin) + dayz_temperaturmin) and {(vehicle player == player and speed player < 5) or (vehicle player != player)}) then { addCamShake [0.6 * (dayz_temperaturmin / dayz_temperatur), 2, 30]; }; @@ -125,15 +143,15 @@ sched_medical_effectsSlow = { // every 10 seconds HIDE_FSM_VARS - if (!r_player_unconscious && (r_player_infected or r_player_inpain)) then { + if (!r_player_unconscious && {r_player_infected or r_player_inpain}) then { //Original pain shake was stronger [2, 1, 25] //Low blood still uses strong shake in init_medical.sqf addCamShake [1, 1, 20]; - + if (!r_player_infected) then { playSound "breath_1"; //In pain } else { - if (1 > random 2 && (speed player < 5 or {vehicle player != player})) then { + if ((1 > random 2) && {speed player < 5 or {vehicle player != player}}) then { [player,"cough",1,false] call dayz_zombieSpeak; }; }; From 0617a77e1a78dc77a944f54edad7aa32ade3b08e Mon Sep 17 00:00:00 2001 From: oiad Date: Thu, 31 Oct 2019 08:20:44 +1300 Subject: [PATCH 44/60] Fix Advanced Trading lag exploit Every button action that processes money/vehicles in some way should do closeDialog before actions are called, currently it's possible to game the system using a net limiter. Thanks to Merlijn for the fix --- SQF/dayz_code/Configs/RscDisplay/advancedTrading.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/Configs/RscDisplay/advancedTrading.hpp b/SQF/dayz_code/Configs/RscDisplay/advancedTrading.hpp index 41108cfa5..6a4db922e 100644 --- a/SQF/dayz_code/Configs/RscDisplay/advancedTrading.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/advancedTrading.hpp @@ -328,7 +328,7 @@ class AdvancedTrading x = 0.46 * safezoneW + safezoneX; y = 0.77 * safezoneH + safezoneY; w = 0.13 * safezoneW; - onButtonClick = "call Z_SellItems;"; + onButtonClick = "closeDialog 0; call Z_SellItems;"; }; class ZSC_RscButtonMenu_AT27: ZSC_RscButtonMenu { @@ -338,7 +338,7 @@ class AdvancedTrading y = 0.77 * safezoneH + safezoneY; w = 0.13 * safezoneW; onload = "ctrlShow [_this,false]"; - onButtonClick = "call Z_BuyItems;"; + onButtonClick = "closeDialog 0; call Z_BuyItems;"; }; class ZSC_RscButtonMenu_AT28: ZSC_RscButtonMenu { From f24921ab1e96a4ea5c9a4eb770539aac595aa364 Mon Sep 17 00:00:00 2001 From: A Man Date: Thu, 31 Oct 2019 20:41:15 +0100 Subject: [PATCH 45/60] Updating server_updateObject --- .../compile/server_updateObject.sqf | 293 ++---------------- .../compile/updateObject_functions.sqf | 180 +++++++++++ SQF/dayz_server/init/server_functions.sqf | 1 + 3 files changed, 213 insertions(+), 261 deletions(-) create mode 100644 SQF/dayz_server/compile/updateObject_functions.sqf diff --git a/SQF/dayz_server/compile/server_updateObject.sqf b/SQF/dayz_server/compile/server_updateObject.sqf index 26c3ece24..ec557e739 100644 --- a/SQF/dayz_server/compile/server_updateObject.sqf +++ b/SQF/dayz_server/compile/server_updateObject.sqf @@ -1,14 +1,13 @@ // [_object,_type] spawn server_updateObject; #include "\z\addons\dayz_server\compile\server_toggle_debug.hpp" if (isNil "sm_done") exitWith {}; -private ["_class","_objectID","_objectUID","_object_position","_isNotOk","_object","_type","_recorddmg","_forced","_lastUpdate","_needUpdate","_object_inventory","_object_damage","_objWallDamage","_object_killed","_object_maintenance","_object_variables","_totalDmg"]; +private ["_class","_objectID","_objectUID","_isNotOk","_object","_type","_forced","_totalDmg"]; _object = _this select 0; _type = _this select 1; -_recorddmg = false; -_isNotOk = false; _forced = if (count _this > 2) then {_this select 2} else {false}; _totalDmg = if (count _this > 3) then {_this select 3} else {false}; +_isNotOk = false; _objectID = "0"; _objectUID = "0"; @@ -17,7 +16,7 @@ _objectID = _object getVariable ["ObjectID","0"]; _objectUID = _object getVariable ["ObjectUID","0"]; _class = typeOf _object; -if (typeName _objectID != "STRING" or (typeName _objectUID != "STRING")) then { +if (typeName _objectID != "STRING" || {typeName _objectUID != "STRING"}) then { #ifdef OBJECT_DEBUG diag_log (format["Non-string Object: ID %1 UID %2", _objectID, _objectUID]); #endif @@ -26,17 +25,16 @@ if (typeName _objectID != "STRING" or (typeName _objectUID != "STRING")) then { _objectUID = nil; }; -if (!(_class in DZE_safeVehicle) && !locked _object) then { +if (!(_class in DZE_safeVehicle) && {!locked _object}) then { //diag_log format["Object: %1, ObjectID: %2, ObjectUID: %3",_object,_objectID,_objectUID]; - if (!(_objectID in dayz_serverIDMonitor) && isNil {_objectUID}) then { + if (!(_objectID in dayz_serverIDMonitor) && {isNil "_objectUID"}) then { //force fail _objectID = nil; - _objectUID = nil; + _objectUID = nil; }; - if ((isNil {_objectID}) && (isNil {_objectUID})) then { - _object_position = getPosATL _object; + if (isNil "_objectID" && {isNil "_objectUID"}) then { #ifdef OBJECT_DEBUG - diag_log format["Object %1 with invalid ID at pos %2",_class,_object_position]; + diag_log format["Object %1 with invalid ID at pos %2",_class,getPosATL _object]; #endif _isNotOk = true; }; @@ -46,263 +44,36 @@ if (_isNotOk) exitWith { //deleteVehicle _object; }; -_lastUpdate = _object getVariable ["lastUpdate",diag_tickTime]; -_needUpdate = _object in needUpdate_objects; - -// TODO ---------------------- -_object_position = { - private ["_position","_worldspace","_fuel","_key"]; - _position = getPosATL _object; - //_worldspace = [round (direction _object),_position]; - _worldspace = [getDir _object, _position] call AN_fnc_formatWorldspace; // Precise Base Building 1.0.5 - _fuel = if (_class isKindOf "AllVehicles") then {fuel _object} else {0}; - - _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; - _key call server_hiveWrite; - - #ifdef OBJECT_DEBUG - diag_log ("HIVE: WRITE: "+ str(_key)); - #endif -}; - -_object_inventory = { - private ["_inventory","_key","_isNormal","_coins"]; - if (_class isKindOf "TrapItems") then { - _inventory = [["armed",_object getVariable ["armed",false]]]; - } else { - _isNormal = true; - - if (DZE_permanentPlot && (_class == "Plastic_Pole_EP1_DZ")) then { - _isNormal = false; - _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item - }; - - if (DZE_doorManagement && (_class in DZE_DoorsLocked)) then { - _isNormal = false; - _inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item - }; - - if (_isNormal) then { - _inventory = [getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object]; - }; - }; - - _previous = str(_object getVariable["lastInventory",[]]); - if (str _inventory != _previous) then { - _object setVariable["lastInventory",_inventory]; - if (_objectID == "0") then { - _key = format["CHILD:309:%1:",_objectUID] + str _inventory + ":"; - } else { - _key = format["CHILD:303:%1:",_objectID] + str _inventory + ":"; - }; - if (Z_SingleCurrency) then { - _coins = _object getVariable [Z_MoneyVariable, -1]; //set to invalid value if getVariable fails to prevent overwriting of coins in DB - _key = _key + str _coins + ":"; - }; - - #ifdef OBJECT_DEBUG - diag_log ("HIVE: WRITE: "+ str(_key)); - #endif - - _key call server_hiveWrite; - }; -}; - -_object_damage = { - //Allow dmg process - private ["_hitpoints","_array","_hit","_selection","_key","_damage","_allFixed"]; - _hitpoints = _object call vehicle_getHitpoints; - _damage = damage _object; - _array = []; - _allFixed = true; - - { - _hit = [_object,_x] call object_getHit; - if ((_hit select 0) > 0) then { - - _allFixed = false; - _array set [count _array,[(_hit select 1),(_hit select 0)]]; - //diag_log format ["Section Part: %1, Dmg: %2",(_hit select 1),(_hit select 0)]; - } else { - _array set [count _array,[(_hit select 1),0]]; - }; - } forEach _hitpoints; - - if (_allFixed && !_totalDmg) then {_object setDamage 0;}; - - if (_forced) then { - if (_object in needUpdate_objects) then {needUpdate_objects = needUpdate_objects - [_object];}; - _recorddmg = true; - } else { - //Prevent damage events for the first 10 seconds of the servers live. - if (diag_ticktime - _lastUpdate > 10) then { - if !(_object in needUpdate_objects) then { - //diag_log format["DEBUG: Monitoring: %1",_object]; - needUpdate_objects set [count needUpdate_objects, _object]; - _recorddmg = true; - }; - }; - }; - - if (_recorddmg) then { - if (_objectID == "0") then { - _key = format["CHILD:306:%1:",_objectUID] + str _array + ":" + str _damage + ":"; - } else { - _key = format["CHILD:306:%1:",_objectID] + str _array + ":" + str _damage + ":"; - }; - #ifdef OBJECT_DEBUG - diag_log ("HIVE: WRITE: "+ str(_key)); - #endif - - _key call server_hiveWrite; - }; -}; - -//Walls -_objWallDamage = { - private ["_key","_damage"]; - _damage = (damage _object); - - if (_objectID == "0") then { - _key = format["CHILD:306:%1:%2:%3:",_objectUID,[],_damage]; - } else { - _key = format["CHILD:306:%1:%2:%3:",_objectID,[],_damage]; - }; - #ifdef OBJECT_DEBUG - diag_log ("HIVE: WRITE: "+ str(_key)); - #endif - - _key call server_hiveWrite; -}; - -_object_killed = { - private ["_clientKey","_exitReason","_index","_key","_playerUID"]; - - if (count _this != 6) exitWith { - diag_log "Server_UpdateObject error: wrong parameter format"; - }; - - _playerUID = _this select 4; - _clientKey = _this select 5; - _index = dayz_serverPUIDArray find _playerUID; - - _exitReason = switch true do { - //Can't use owner because player may already be dead, can't use distance because player may be far from vehicle wreck - case (_clientKey == dayz_serverKey): {""}; - case (_index < 0): { - format["Server_UpdateObject error: PUID NOT FOUND ON SERVER. PV ARRAY: %1",_this] - }; - case ((dayz_serverClientKeys select _index) select 1 != _clientKey): { - format["Server_UpdateObject error: CLIENT AUTH KEY INCORRECT OR UNRECOGNIZED. PV ARRAY: %1",_this] - }; - case (alive _object && {!(_class isKindOf "TentStorage_base" or _class isKindOf "IC_Tent")}): { - format["Server_UpdateObject error: object kill request on living object. PV ARRAY: %1",_this] - }; - default {""}; - }; - - if (_exitReason != "") exitWith {diag_log _exitReason}; - _object setDamage 1; - - if (_objectID == "0") then { - //Need to update hive to make a new call to allow UID to be updated for a killed event - //_key = format["CHILD:306:%1:%2:%3:",_objectUID,[],1]; - _key = format["CHILD:310:%1:",_objectUID]; - } else { - _key = format["CHILD:306:%1:%2:%3:",_objectID,[],1]; - }; - _key call server_hiveWrite; - - if (_playerUID == "SERVER") then { - #ifdef OBJECT_DEBUG - diag_log format["DELETE: Server requested destroy on object %1 ID:%2 UID:%3",_class,_objectID,_objectUID]; - #endif - } else { - diag_log format["DELETE: PUID(%1) requested destroy on object %2 ID:%3 UID:%4",_playerUID,_class,_objectID,_objectUID]; - }; - - if (_class in DayZ_removableObjects or (_class in DZE_isRemovable)) then {[_objectID,_objectUID] call server_deleteObjDirect;}; -}; - -_object_maintenance = { - private ["_ownerArray","_key"]; - - _ownerArray = _object getVariable ["ownerArray",[]]; - _accessArray = _object getVariable ["dayz_padlockCombination",[]]; - _variables set [count _variables, ["ownerArray", _ownerArray]]; - _variables set [count _variables, ["padlockCombination", _accessArray]]; - - _object setDamage 0; - - if (_objectID == "0") then { - //_key = format["CHILD:309:%1:%2:",_objectUID,_ownerArray]; - _key = format["CHILD:306:%1:%2:%3:",_objectUID,[],0]; //Wont work just now. - } else { - //_key = format["CHILD:303:%1:%2:",_objectID,_ownerArray]; - _key = format["CHILD:306:%1:%2:%3:",_objectID,[],0]; - }; - -// #ifdef OBJECT_DEBUG - diag_log ("HIVE: WRITE: Maintenance, "+ str(_key)); -// #endif - _key call server_hiveWrite; -}; - -_object_variables = { - private ["_ownerArray","_key","_accessArray","_variables","_coins"]; - - _ownerArray = _object getVariable ["ownerArray",[]]; - _accessArray = _object getVariable ["dayz_padlockCombination",[]]; - _lockedArray = _object getVariable ["BuildLock",false]; - - //diag_log format ["[%1,%2]",_ownerArray,_accessArray]; - _variables = []; - _variables set [count _variables, ["ownerArray", _ownerArray]]; - _variables set [count _variables, ["padlockCombination", _accessArray]]; - _variables set [count _variables, ["BuildLock", _lockedArray]]; - - if (_objectID == "0") then { - _key = format["CHILD:309:%1:%2:",_objectUID,_variables]; - } else { - _key = format["CHILD:303:%1:%2:",_objectID,_variables]; - }; - if (Z_SingleCurrency) then { - _coins = _object getVariable [Z_MoneyVariable, -1]; - _key = _key + str _coins + ":"; - }; - _key call server_hiveWrite; -}; - _object setVariable ["lastUpdate",diag_ticktime,true]; -switch (_type) do { - case "all": { - call _object_position; - call _object_inventory; - call _object_damage; + +call { + if (_type == "all") exitwith { + [_object,_objectID] call server_obj_pos; + [_object,_objectID,_objectUID] call server_obj_inv; + [_object,_objectID,_objectUID,_forced,_totalDmg] call server_obj_dam; }; - case "position": { - call _object_position; + if (_type == "position") exitwith { + [_object,_objectID] call server_obj_pos; }; - case "gear": { - call _object_inventory; + if (_type == "gear") exitwith { + [_object,_objectID,_objectUID] call server_obj_inv; }; - case "maintenance": { - call _object_maintenance; + if (_type == "damage" || {_type == "repair"}) exitwith { + [_object,_objectID,_objectUID,_forced,_totalDmg] call server_obj_dam; }; - case "damage"; case "repair" : { - call _object_damage; + if (_type == "killed") exitwith { + private ["_playerUID", "_clientKey"]; + + if (count _this != 6) exitWith { + diag_log "Server_UpdateObject error: wrong parameter format"; + }; + + _playerUID = _this select 4; + _clientKey = _this select 5; + [_object,_objectID,_objectUID,_playerUID,_clientKey] call server_obj_killed; }; - case "killed": { - _this call _object_killed; - }; - case "accessCode"; case "buildLock" : { - call _object_variables; - }; - case "objWallDamage": { - call _objWallDamage; - }; - case "coins": { + if (_type == "coins") exitwith { _object setVariable ["lastInventory",["forceUpdate"]]; - call _object_inventory; + [_object,_objectID,_objectUID] call server_obj_inv; }; }; diff --git a/SQF/dayz_server/compile/updateObject_functions.sqf b/SQF/dayz_server/compile/updateObject_functions.sqf new file mode 100644 index 000000000..5b7da6b11 --- /dev/null +++ b/SQF/dayz_server/compile/updateObject_functions.sqf @@ -0,0 +1,180 @@ +#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp" + +server_obj_pos = { + private ["_object","_objectID","_class","_position","_worldspace","_fuel","_key"]; + + _object = _this select 0; + _objectID = _this select 1; + _class = typeOf _object; + + _position = getPosATL _object; + //_worldspace = [round (direction _object),_position]; + _worldspace = [getDir _object, _position] call AN_fnc_formatWorldspace; // Precise Base Building 1.0.5 + _fuel = [0, fuel _object] select (_class isKindOf "AllVehicles"); + + _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; + _key call server_hiveWrite; + + #ifdef OBJECT_DEBUG + diag_log ("HIVE: WRITE: "+ str(_key)); + #endif +}; + +server_obj_inv = { + private ["_object","_objectID", "_objectUID", "_class","_inventory","_key","_isNormal","_coins","_previous"]; + + _object = _this select 0; + _objectID = _this select 1; + _objectUID = _this select 2; + _class = typeOf _object; + + if (_class isKindOf "TrapItems") then { + _inventory = [["armed",_object getVariable ["armed",false]]]; + } else { + _isNormal = true; + + if (DZE_permanentPlot && {_class == "Plastic_Pole_EP1_DZ"}) then { + _isNormal = false; + _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item + }; + + if (DZE_doorManagement && {_class in DZE_DoorsLocked}) then { + _isNormal = false; + _inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item + }; + + if (_isNormal) then { + _inventory = [getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object]; + }; + }; + + _previous = str(_object getVariable["lastInventory",[]]); + if (str _inventory != _previous) then { + _object setVariable ["lastInventory",_inventory]; + if (_objectID == "0") then { + _key = format["CHILD:309:%1:",_objectUID] + str _inventory + ":"; + } else { + _key = format["CHILD:303:%1:",_objectID] + str _inventory + ":"; + }; + + if (Z_SingleCurrency) then { + _coins = _object getVariable [Z_MoneyVariable, -1]; //set to invalid value if getVariable fails to prevent overwriting of coins in DB + _key = _key + str _coins + ":"; + }; + + #ifdef OBJECT_DEBUG + diag_log ("HIVE: WRITE: "+ str(_key)); + #endif + + _key call server_hiveWrite; + }; +}; + +server_obj_dam = { + //Allow dmg process + private ["_object","_objectID", "_objectUID","_forced","_totalDmg","_recorddmg","_hitpoints","_array","_hit","_key","_damage","_allFixed","_lastUpdate"]; + + _object = _this select 0; + _objectID = _this select 1; + _objectUID = _this select 2; + _forced = _this select 3; + _totalDmg = _this select 4; + + _recorddmg = false; + _hitpoints = _object call vehicle_getHitpoints; + _damage = damage _object; + _array = []; + _allFixed = true; + _lastUpdate = _object getVariable ["lastUpdate",diag_tickTime]; + + { + _hit = [_object,_x] call object_getHit; + if ((_hit select 0) > 0) then { + + _allFixed = false; + _array set [count _array,[(_hit select 1),(_hit select 0)]]; + //diag_log format ["Section Part: %1, Dmg: %2",(_hit select 1),(_hit select 0)]; + } else { + _array set [count _array,[(_hit select 1),0]]; + }; + } count _hitpoints; + + if (_allFixed && {!_totalDmg}) then {_object setDamage 0;}; + + if (_forced) then { + if (_object in needUpdate_objects) then {needUpdate_objects = needUpdate_objects - [_object];}; + _recorddmg = true; + } else { + //Prevent damage events for the first 10 seconds of the servers live. + if (diag_ticktime - _lastUpdate > 10) then { + if !(_object in needUpdate_objects) then { + //diag_log format["DEBUG: Monitoring: %1",_object]; + needUpdate_objects set [count needUpdate_objects, _object]; + _recorddmg = true; + }; + }; + }; + + if (_recorddmg) then { + if (_objectID == "0") then { + _key = format["CHILD:306:%1:",_objectUID] + str _array + ":" + str _damage + ":"; + } else { + _key = format["CHILD:306:%1:",_objectID] + str _array + ":" + str _damage + ":"; + }; + #ifdef OBJECT_DEBUG + diag_log ("HIVE: WRITE: "+ str(_key)); + #endif + + _key call server_hiveWrite; + }; +}; + +server_obj_killed = { + private ["_object", "_objectID", "_objectUID", "_class","_clientKey","_exitReason","_index","_key","_playerUID"]; + + _object = _this select 0; + _objectID = _this select 1; + _objectUID = _this select 2; + _playerUID = _this select 3; + _clientKey = _this select 4; + + _class = typeOf _object; + _index = dayz_serverPUIDArray find _playerUID; + + _exitReason = call { + //Can't use owner because player may already be dead, can't use distance because player may be far from vehicle wreck + if (_clientKey == dayz_serverKey) exitwith {""}; + if (_index < 0) exitwith { + format["Server_UpdateObject error: PUID NOT FOUND ON SERVER. PV ARRAY: %1",_this] + }; + if ((dayz_serverClientKeys select _index) select 1 != _clientKey) exitwith { + format["Server_UpdateObject error: CLIENT AUTH KEY INCORRECT OR UNRECOGNIZED. PV ARRAY: %1",_this] + }; + if (alive _object && {!(_class isKindOf "TentStorage_base" or _class isKindOf "IC_Tent")}) exitwith { + format["Server_UpdateObject error: object kill request on living object. PV ARRAY: %1",_this] + }; + if (1==1) exitwith {""}; + }; + + if (_exitReason != "") exitWith {diag_log _exitReason}; + _object setDamage 1; + + if (_objectID == "0") then { + //Need to update hive to make a new call to allow UID to be updated for a killed event + //_key = format["CHILD:306:%1:%2:%3:",_objectUID,[],1]; + _key = format["CHILD:310:%1:",_objectUID]; + } else { + _key = format["CHILD:306:%1:%2:%3:",_objectID,[],1]; + }; + _key call server_hiveWrite; + + if (_playerUID == "SERVER") then { + #ifdef OBJECT_DEBUG + diag_log format["DELETE: Server requested destroy on object %1 ID:%2 UID:%3",_class,_objectID,_objectUID]; + #endif + } else { + diag_log format["DELETE: PUID(%1) requested destroy on object %2 ID:%3 UID:%4",_playerUID,_class,_objectID,_objectUID]; + }; + + if (_class in DayZ_removableObjects || {_class in DZE_isRemovable}) then {[_objectID,_objectUID] call server_deleteObjDirect;}; +}; diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 803179faa..edfa29b3d 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -21,6 +21,7 @@ dayz_serverKey = toString dayz_serverKey; server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf"; server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf"; server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf"; +call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\updateObject_functions.sqf"; server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf"; server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf"; server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf"; //Creates the object in DB From bc75ad8590842007c2b1023f7fa7caf66d97368c Mon Sep 17 00:00:00 2001 From: A Man Date: Fri, 1 Nov 2019 16:01:20 +0100 Subject: [PATCH 46/60] Adding combine matches --- .../Configs/CfgWeapons/Tools/Matchbox.hpp | 4 +++ .../actions/player_combineAntibiotics.sqf | 10 +++++- .../actions/player_combineMatches.sqf | 33 +++++++++++++++++++ SQF/dayz_code/init/compiles.sqf | 1 + 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 SQF/dayz_code/actions/player_combineMatches.sqf diff --git a/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp b/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp index eaa5e537f..c9b124727 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp @@ -29,6 +29,10 @@ class ItemMatchbox : ItemMatchbox_base script = "spawn player_makeFire;"; //Do not use player_build because we have no ghost preview model for Land_Fire_DZ yet use[] = {"PartWoodPile"}; }; + class Combine { + text = $STR_ANTIBIOTICS_COMBINE; + script = "spawn player_combineMatches;"; + }; }; }; diff --git a/SQF/dayz_code/actions/player_combineAntibiotics.sqf b/SQF/dayz_code/actions/player_combineAntibiotics.sqf index ac48a1968..18ebdd8af 100644 --- a/SQF/dayz_code/actions/player_combineAntibiotics.sqf +++ b/SQF/dayz_code/actions/player_combineAntibiotics.sqf @@ -1,7 +1,11 @@ +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; + private ["_total", "_full", "_remain", "_amount"]; + _total = 0; { - if(configName inheritsFrom (configfile >> "CfgMagazines" >> _x) == "ItemAntibiotic") then { + if (configName inheritsFrom (configfile >> "CfgMagazines" >> _x) == "ItemAntibiotic") then { _amount = getNumber(configFile >> "CfgMagazines" >> _x >> "medical" >> "amount"); if(_amount > 0) then { _total = _total + _amount; @@ -9,8 +13,10 @@ _total = 0; }; }; } count (magazines player); + _full = floor(_total / 6); _remain = _total % 6; + for "_i" from 1 to _full do { player addMagazine "ItemAntibiotic6"; @@ -19,3 +25,5 @@ for "_i" from 1 to _full do if(_remain > 0 ) then { player addMagazine "ItemAntibiotic" + str(_remain); }; + +dayz_actionInProgress = false; diff --git a/SQF/dayz_code/actions/player_combineMatches.sqf b/SQF/dayz_code/actions/player_combineMatches.sqf new file mode 100644 index 000000000..e1376a8cf --- /dev/null +++ b/SQF/dayz_code/actions/player_combineMatches.sqf @@ -0,0 +1,33 @@ +if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; +dayz_actionInProgress = true; + +private ["_total", "_full", "_remain", "_amount"]; + +_total = 0; +{ + if (configName inheritsFrom (configfile >> "CfgWeapons" >> _x) == "ItemMatchbox") then { + _amount = getNumber(configFile >> "CfgWeapons" >> _x >> "matches"); + if(_amount > 0) then { + _total = _total + _amount; + player removeWeapon _x; + }; + }; +} count (weapons player); + +_full = floor(_total / 5); +_remain = _total % 5; + +for "_i" from 1 to _full do +{ + if ("Item5Matchbox" in weapons player) then { + "Item5Matchbox" call player_addDuplicateTool; + } else { + player addWeapon "Item5Matchbox"; + }; +}; + +if(_remain > 0 ) then { + player addWeapon "Item"+ str(_remain)+"Matchbox"; +}; + +dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index c4abee41a..0360c3b7a 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -109,6 +109,7 @@ if (!isDedicated) then { //player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf"; player_combineMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_combineMags.sqf"; player_combineAntibiotics = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_combineAntibiotics.sqf"; + player_combineMatches = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_combineMatches.sqf"; player_createquiver = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_createQuiver.sqf"; player_fillquiver = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_fillQuiver.sqf"; //player_takearrow = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_takeArrow.sqf"; From 91a5ccf06ab3d01e3bc244956d35033ed3854336 Mon Sep 17 00:00:00 2001 From: A Man Date: Fri, 1 Nov 2019 16:07:39 +0100 Subject: [PATCH 47/60] Add proper medic anim The medic animation can be interrupted now. Also clean up the script from redundant code. --- SQF/dayz_code/actions/refuel.sqf | 71 ++++++++++---------------------- 1 file changed, 22 insertions(+), 49 deletions(-) diff --git a/SQF/dayz_code/actions/refuel.sqf b/SQF/dayz_code/actions/refuel.sqf index 85fa6b513..8c037cafd 100644 --- a/SQF/dayz_code/actions/refuel.sqf +++ b/SQF/dayz_code/actions/refuel.sqf @@ -1,8 +1,8 @@ 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"]; +private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_array","_cantype", +"_emptycan","_finished","_type"]; _array = _this select 3; _cantype = _array select 0; @@ -15,68 +15,41 @@ _capacity = getNumber(_configVeh >> "fuelCapacity"); _nameType = getText(_configVeh >> "displayName"); _curFuel = ((fuel _vehicle) * _capacity); _newFuel = (_curFuel + _canSize); -_fueling = player getVariable ["fueling",false]; -if (fuel _vehicle == 1 || !(_canType in magazines player)) exitWith {dayz_actionInProgress = false;}; +if (fuel _vehicle == 1 || {!(_canType in magazines player)}) exitWith {dayz_actionInProgress = false;}; player removeAction s_player_fillfuel + _capacity; -player setVariable ["fueling", true]; -if (!_fueling) then { - [player] allowGetIn false; +_dis=5; +_sfx = "refuel"; +[player,_sfx,0,false,_dis] call dayz_zombieSpeak; +[player,_dis,true,(getPosATL player)] call player_alertZombies; +_finished = ["Medic",1] call fn_loopAction; + +if (_finished) then { if (_newFuel > _capacity) then {_newFuel = _capacity}; _newFuel = (_newFuel / _capacity); player removeMagazine _cantype; player addMagazine _emptycan; - player playActionNow "Medic"; - - _dis=5; - _sfx = "refuel"; - [player,_sfx,0,false,_dis] call dayz_zombieSpeak; - [player,_dis,true,(getPosATL player)] call player_alertZombies; - // Added Nutrition-Factor for work ["Working",0,[0,1,3,0]] call dayz_NutritionSystem; - - r_doLoop = true; - _started = false; - _finished = false; - while {r_doLoop} do { - _animState = animationState player; - _isRefuel = ["medic",_animState] call fnc_inString; - if (_isRefuel or dayz_isSwimming) then { - _started = true; - }; - if (_started and !_isRefuel) then { - r_doLoop = false; - _finished = true; - }; - uiSleep 0.1; + if ((_type == "Generator_DZ") && {!(_vehicle getVariable ["GeneratorFilled", false])}) then { + _vehicle setVariable ["GeneratorFilled", true, true]; }; - r_doLoop = false; - - if (_finished) then { - if ((_type == "Generator_DZ") && {!(_vehicle getVariable ["GeneratorFilled", false])}) then { - _vehicle setVariable ["GeneratorFilled", true, true]; - }; - if (local _vehicle) then { - [_vehicle,_newFuel] call local_setFuel; - } else { - PVDZ_send = [_vehicle,"SetFuel",[_vehicle,_newFuel]]; - publicVariableServer "PVDZ_send"; - }; - - format[localize "str_player_05",_nameType,_canSize] call dayz_rollingMessages; - uiSleep 1; - call fnc_usec_medic_removeActions; + if (local _vehicle) then { + [_vehicle,_newFuel] call local_setFuel; + } else { + PVDZ_send = [_vehicle,"SetFuel",[_vehicle,_newFuel]]; + publicVariableServer "PVDZ_send"; }; - [player] allowGetIn true; + + format[localize "str_player_05",_nameType,_canSize] call dayz_rollingMessages; + uiSleep 1; + call fnc_usec_medic_removeActions; } else { - localize "str_refuel_fail" call dayz_rollingMessages; + localize "str_epoch_player_26" call dayz_rollingMessages; }; -r_action = false; -player setVariable ["fueling", false]; dayz_actionInProgress = false; From e9712c2b2cdfd2c25633544761117a67fcdcf216 Mon Sep 17 00:00:00 2001 From: A Man Date: Fri, 1 Nov 2019 18:31:49 +0100 Subject: [PATCH 48/60] Force knife, matches models if other mods were used --- SQF/dayz_code/Configs/CfgWeapons/Tools/Knife.hpp | 2 ++ SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SQF/dayz_code/Configs/CfgWeapons/Tools/Knife.hpp b/SQF/dayz_code/Configs/CfgWeapons/Tools/Knife.hpp index b96e5e03e..2331d885b 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Tools/Knife.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Tools/Knife.hpp @@ -18,6 +18,8 @@ class ItemKnife_Base : ItemCore class ItemKnife : ItemKnife_Base { scope = public; + model = "\dayz_equip\models\knife_gear.p3d"; // Some mods override this. We leave this here just to be sure. + picture = "\dayz_equip\textures\equip_knife_ca.paa"; descriptionShort = $STR_EQUIP_DESC_4; sharpnessRemaining = "ItemKnife5"; }; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp b/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp index c9b124727..9b3404ffe 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Tools/Matchbox.hpp @@ -18,6 +18,8 @@ class ItemMatchboxEmpty : ItemMatchbox_base class ItemMatchbox : ItemMatchbox_base { scope = public; + model = "\dayz_equip\models\matchbox_gear.p3d"; // Some mods override this. We leave this here just to be sure. + picture = "\dayz_equip\textures\equip_matchbox_ca.paa"; matches = -1; qtyRemaining = "Item5Matchbox"; From b0edf3cb75358c810487e6da10c4151e529afc0e Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 2 Nov 2019 09:57:05 +0100 Subject: [PATCH 49/60] Fill mixed gas into a chainsaw requires a chainsaw now --- .../Configs/CfgMagazines/DZE/Items.hpp | 10 ++++----- .../compile/dze_requiredItemsCheck.sqf | 22 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp index e80911e9b..ffb13ef02 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp @@ -77,7 +77,7 @@ class ItemJerryMixed: CA_Magazine { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {"ItemToolbox"}; + requiretools[] = {"ItemToolbox","ChainSaw"}; output[] = {{"CSGAS",1},{"ItemJerryMixed4",1}}; input[] = {{"ItemJerryMixed",1}}; }; @@ -103,7 +103,7 @@ class ItemJerryMixed4: CA_Magazine { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {"ItemToolbox"}; + requiretools[] = {"ItemToolbox","ChainSaw"}; output[] = {{"CSGAS",1},{"ItemJerryMixed3",1}}; input[] = {{"ItemJerryMixed4",1}}; }; @@ -129,7 +129,7 @@ class ItemJerryMixed3: CA_Magazine { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {"ItemToolbox"}; + requiretools[] = {"ItemToolbox","ChainSaw"}; output[] = {{"CSGAS",1},{"ItemJerryMixed2",1}}; input[] = {{"ItemJerryMixed3",1}}; }; @@ -155,7 +155,7 @@ class ItemJerryMixed2: CA_Magazine { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {"ItemToolbox"}; + requiretools[] = {"ItemToolbox","ChainSaw"}; output[] = {{"CSGAS",1},{"ItemJerryMixed1",1}}; input[] = {{"ItemJerryMixed2",1}}; }; @@ -181,7 +181,7 @@ class ItemJerryMixed1: CA_Magazine { text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {"ItemToolbox"}; + requiretools[] = {"ItemToolbox","ChainSaw"}; output[] = {{"CSGAS",1},{"ItemJerrycanEmpty",1}}; input[] = {{"ItemJerryMixed1",1}}; }; diff --git a/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf b/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf index 28f0c894c..e76e2c078 100644 --- a/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf +++ b/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf @@ -13,26 +13,30 @@ _weapons = weapons player; { _weapon = _x; _hastoolweapon = _x in _weapons; - + if (_x == "ItemKnife") then { - {if (_x in Dayz_Gutting) exitWith {_hastoolweapon = true};} forEach _items; + {if (_x in Dayz_Gutting) exitWith {_hastoolweapon = true};} count _items; }; if (_x == "ItemMatchbox") then { - {if (_x in DayZ_Ignitors) exitWith {_hastoolweapon = true};} forEach _items; + {if (_x in DayZ_Ignitors) exitWith {_hastoolweapon = true};} count _items; }; + if (_x == "ChainSaw") then { + {if (_x in ["ChainSaw","ChainSawB","ChainSawG","ChainSawG","ChainSawR"]) exitWith {_hastoolweapon = true};} count _weapons; + }; + { _melee = format ["Melee%1",_x]; - if (_weapon == format["Item%1",_x] && {(_melee in _weapons) or (dayz_onBack == _melee)}) then { + if (_weapon == format["Item%1",_x] && {(_melee in _weapons) || {dayz_onBack == _melee}}) then { _hastoolweapon = true; }; - } forEach ["Crowbar","Hatchet","Sledge"]; - + } count ["Crowbar","Hatchet","Sledge"]; + if (!_hastoolweapon) then { _missingText = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); _missing set [count _missing, _missingText]; _hasrequireditem = false; }; -} forEach _require; +} count _require; _missingText = ""; { @@ -48,8 +52,8 @@ _missingText = ""; } forEach _missing; _hasbuilditem = _item in magazines player; -if (!_hasbuilditem && _text != "") exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;}; +if (!_hasbuilditem && {_text != ""}) exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;}; if (!_hasrequireditem) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; false;}; //When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!_hasrequireditem) exitWith{}; -_hasrequireditem; \ No newline at end of file +_hasrequireditem; From a8b006b530fee62598a1dfd41f130e39ecb028ed Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 2 Nov 2019 10:52:28 +0100 Subject: [PATCH 50/60] Update backpack descriptions --- SQF/dayz_code/Configs/CfgVehicles/Bags.hpp | 4 + SQF/dayz_code/stringtable.xml | 116 +++++++++++++-------- 2 files changed, 76 insertions(+), 44 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp b/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp index a6434bbc9..bfd12dd5b 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Bags.hpp @@ -158,6 +158,7 @@ class DZ_LargeGunBag_EP1: Bag_Base_EP1 { scope = public; displayName = $STR_EPOCH_PACK_LGB; + descriptionShort = $STR_EPOCH_PACK_DESC_LGB; model = "\ca\weapons_e\AmmoBoxes\StaticX.p3d"; picture = "\ca\weapons_e\data\icons\staticX_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; @@ -173,6 +174,7 @@ class DZ_GunBag_EP1: Bag_Base_EP1 { scope = public; displayName = $STR_EPOCH_PACK_GB; + descriptionShort = $STR_EPOCH_PACK_DESC_GB; model = "\ca\weapons_e\AmmoBoxes\StaticY.p3d"; picture = "\ca\weapons_e\data\icons\staticY_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; @@ -188,6 +190,7 @@ class DZ_CompactPack_EP1: Bag_Base_EP1 { scope = public; displayName = $STR_EPOCH_PACK_COMPACT; + descriptionShort = $STR_EPOCH_PACK_DESC_COMPACT; picture = "\ca\weapons_e\data\icons\backpack_RPG_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; mapsize = 2; @@ -203,6 +206,7 @@ class DZ_TerminalPack_EP1: Bag_Base_EP1 { scope = public; displayName = $STR_EPOCH_PACK_TERMINAL; + descriptionShort = $STR_EPOCH_PACK_DESC_TERMINAL; picture = "\ca\weapons_e\data\icons\backpack_US_ASSAULT_CA.paa"; icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; mapSize = 2; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index ba158b32f..8bb898a96 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -6048,12 +6048,12 @@ Patrouillerugzak (coyote) - Patrol Pack (coyote) - Sac de patrouille (coyote). <br/>Taille: 8 - Рюкзак на (8 слотов) - Mochila de patrullaje de tamaño pequeño. - Malý batůžek na kratší výlety. - Einfacher Trekkingrucksack von "Coyote". Volumen: 8 Liter. + Patrol Pack (coyote). <br/>Capacity: 10 items + Sac de patrouille (coyote). <br/>Taille: 10 + Рюкзак на (10 слотов) + Mochila de patrullaje de tamaño pequeño: <br/>10 litros + Malý batůžek na kratší výlety. <br/>Objem: 10 litrů + Einfacher Trekkingrucksack von "Coyote". <br/>Volumen: 10 Liter Assault Pack (ACU) @@ -6065,12 +6065,12 @@ Aanvalsrugzak (ACU) - Assault Pack (ACU) + Assault Pack (ACU). <br/>Capacity: 12 items Sac d'assault (ACU). <br/>Taille: 12 Рюкзак на (12 слотов) - Mochila de asalto de tamaño intermedio. - Klasický batoh americké armády. - Kleiner taktischer Rucksack mit ACU-Tarnschema. Volumen: 12 Liter. + Mochila de asalto de tamaño intermedio. <br/>12 litros + Klasický batoh americké armády. <br/>Objem: 12 litrů + Kleiner taktischer Rucksack mit ACU-Tarnschema. <br/>Volumen: 12 Liter Czech Vest Pouch @@ -6082,12 +6082,12 @@ Tsjechische Borstzak - Czech Vest Pouch + Czech Vest Pouch. <br/>Capacity: 12 items Sac tchèque. <br/>Taille: 12 Рюкзак на (12 слотов) - Bolsa en forma de chaleco de pequeño tamaño y poca visibilidad. - Česká vesta, která unese jen pár věcí. - Kleiner Rucksack des tschechischen Militärs, der eng am Rücken anliegt. Volumen: 12 Liter. + Bolsa en forma de chaleco de pequeño tamaño y poca visibilidad. <br/>12 litros + Česká vesta, která unese jen pár věcí. <br/>Objem: 12 litrů + Kleiner Rucksack des tschechischen Militärs, der eng am Rücken anliegt. <br/>Volumen: 12 Liter Alice pack @@ -6099,12 +6099,12 @@ ALICE Rugzak - Alice pack - Sac Alice. <br/>Taille: 16 - Рюкзак на (16 слотов) - Mochila Alice de tamaño medio. - Jeden z nejlepších vojenských batohů, který byl kdy vyroben. - Mittlerer Trekkingrucksack von "Alice". Volumen: 16 Liter + Alice pack. <br/>Capacity: 20 items + Sac Alice. <br/>Taille: 20 + Рюкзак на (20 слотов) + Mochila Alice de tamaño medio. <br/>20 litros + Jeden z nejlepších vojenských batohů, který byl kdy vyroben. <br/>Objem: 20 litrů + Mittlerer Trekkingrucksack von "Alice". <br/>Volumen: 20 Liter Survival ACU @@ -6116,12 +6116,12 @@ Overlevings ACU - Survival ACU - ACU de survie<br/>Taille: 16 - Рюкзак на (16 слотов) - Mochila de supervivencia de tamaño medio. - Větší batoh z obchodu Přežiju s.r.o. - Mittlerer Kampfrucksack mit Woodland-Tarnschema. Volumen: 16 Liter. + Survival ACU. <br/>Capacity: 22 items + ACU de survie<br/>Taille: 22 + Рюкзак на (22 слотов) + Mochila de supervivencia de tamaño medio. <br/>22 litros + Větší batoh z obchodu Přežiju s.r.o. <br/>Objem: 22 litrů + Mittlerer Kampfrucksack mit Woodland-Tarnschema. <br/>Volumen: 22 Liter British Assault Pack @@ -6133,12 +6133,12 @@ Britse Aanvalsrugzak - British Assault Pack - Sac d'assault britannique. <br/>Taille: 18 - Рюкзак на (18 слотов) - Mochila de asalto británica de tamaño medio. - Moderní a stylový batoh britské armády. - Großer Kampfrucksack der britischen Streitkräfte. Volumen: 18 Liter. + British Assault Pack. <br/>Capacity: 30 items + Sac d'assault britannique. <br/>Taille: 30 + Рюкзак на (30 слотов) + Mochila de asalto británica de tamaño medio. <br/>30 litros + Moderní a stylový batoh britské armády. <br/>Objem: 30 litrů + Großer Kampfrucksack der britischen Streitkräfte. <br/>Volumen: 30 Liter Czech Backpack @@ -6150,12 +6150,12 @@ Tsjechische Rugzak - Czech Backpack - Sac-à-dos tchèque. <br/>Taille: 24 - Рюкзак на (24 слота) - Mochila checa de gran tamaño y difícil de ocultar. - Vojenská krosna pro nošení nejen českých věcí. - Großer tschechischer Trekkingrucksack. Volumen: 24 Liter. + Czech Backpack. <br/>Capacity: 40 items + Sac-à-dos tchèque. <br/>Taille: 40 + Рюкзак на (40 слота) + Mochila checa de gran tamaño y difícil de ocultar. <br/>40 litros + Vojenská krosna pro nošení nejen českých věcí. <br/>Objem: 40 litrů + Großer tschechischer Trekkingrucksack. <br/>Volumen: 40 Liter Backpack (coyote) @@ -6167,12 +6167,12 @@ Rugzak (Coyote) - Backpack (coyote) - Sac-à-dos (coyote). <br/>Taille: 24 - Рюкзак на (24 слота) - Mochila coyote de gran tamaño y difícil de ocultar. - Batoh větších rozměrů, který je schopen unést kromě zásob i zbraně. - Großer Kampfrucksack von "Coyote". Volumen: 24 Liter. + Backpack (coyote). <br/>Capacity: 50 items + Sac-à-dos (coyote). <br/>Taille: 50 + Рюкзак на (50 слота) + Mochila coyote de gran tamaño y difícil de ocultar. <br/>50 litros + Batoh větších rozměrů, který je schopen unést kromě zásob i zbraně. <br/>Objem: 50 litrů + Großer Kampfrucksack von "Coyote". <br/>Volumen: 50 Liter Wipes @@ -13361,6 +13361,13 @@ Grote Wapenzak Grand Fourreau + + Large Gunbag <br/>Capacity: 60 items + Große Waffentasche <br/>Volumen: 60 Liter + Большая оружейная сумка (60 слота) + Grote Wapenzak <br/>Inhoud: 60 liter + Grand Fourreau <br/>Taille: 60 + Gunbag Waffentasche @@ -13368,6 +13375,13 @@ Wapenzak Fourreau + + Gunbag <br/>Capacity: 35 items + Waffentasche <br/>Volumen: 35 Liter + Оружейная сумка (35 слота) + Wapenzak <br/>Inhoud: 35 liter + Fourreau<br/>Taille: 35 + Compact Pack Compact Rucksack @@ -13375,6 +13389,13 @@ Compacte Rugzak Sac Compact + + Compact Pack <br/>Capacity: 25 items + Compact Rucksack <br/>Volumen: 25 Liter + Компактный рюкзак (25 слота) + Compacte Rugzak <br/>Inhoud: 25 liter + Sac Compact <br/>Taille: 25 + Terminal Pack Terminal Rucksack @@ -13382,6 +13403,13 @@ Terminal Rugzak Sac à Dos (terminal) + + Terminal Pack <br/>Capacity: 15 items + Terminal Rucksack <br/>Volumen: 15 Liter + Вокзальный рюкзак (15 слота) + Terminal Rugzak <br/>Inhoud: 15 liter + Sac à Dos (terminal) <br/>Taille: 15 + HALO Jump Fallschirm Sprung From 9d77578e978716e592fc7e0080d49938ec93552c Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 2 Nov 2019 14:24:55 +0100 Subject: [PATCH 51/60] Update russian strings by @RedLink-kam --- SQF/dayz_code/stringtable.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 8bb898a96..dd65b4996 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -6118,7 +6118,7 @@ Survival ACU. <br/>Capacity: 22 items ACU de survie<br/>Taille: 22 - Рюкзак на (22 слотов) + Рюкзак на (22 слота) Mochila de supervivencia de tamaño medio. <br/>22 litros Větší batoh z obchodu Přežiju s.r.o. <br/>Objem: 22 litrů Mittlerer Kampfrucksack mit Woodland-Tarnschema. <br/>Volumen: 22 Liter @@ -6152,7 +6152,7 @@ Czech Backpack. <br/>Capacity: 40 items Sac-à-dos tchèque. <br/>Taille: 40 - Рюкзак на (40 слота) + Рюкзак на (40 слотов) Mochila checa de gran tamaño y difícil de ocultar. <br/>40 litros Vojenská krosna pro nošení nejen českých věcí. <br/>Objem: 40 litrů Großer tschechischer Trekkingrucksack. <br/>Volumen: 40 Liter @@ -6169,7 +6169,7 @@ Backpack (coyote). <br/>Capacity: 50 items Sac-à-dos (coyote). <br/>Taille: 50 - Рюкзак на (50 слота) + Рюкзак на (50 слотов) Mochila coyote de gran tamaño y difícil de ocultar. <br/>50 litros Batoh větších rozměrů, který je schopen unést kromě zásob i zbraně. <br/>Objem: 50 litrů Großer Kampfrucksack von "Coyote". <br/>Volumen: 50 Liter @@ -13364,7 +13364,7 @@ Large Gunbag <br/>Capacity: 60 items Große Waffentasche <br/>Volumen: 60 Liter - Большая оружейная сумка (60 слота) + Большая оружейная сумка (60 слотов) Grote Wapenzak <br/>Inhoud: 60 liter Grand Fourreau <br/>Taille: 60 @@ -13378,7 +13378,7 @@ Gunbag <br/>Capacity: 35 items Waffentasche <br/>Volumen: 35 Liter - Оружейная сумка (35 слота) + Оружейная сумка (35 слотов) Wapenzak <br/>Inhoud: 35 liter Fourreau<br/>Taille: 35 @@ -13392,7 +13392,7 @@ Compact Pack <br/>Capacity: 25 items Compact Rucksack <br/>Volumen: 25 Liter - Компактный рюкзак (25 слота) + Компактный рюкзак (25 слотов) Compacte Rugzak <br/>Inhoud: 25 liter Sac Compact <br/>Taille: 25 @@ -13406,7 +13406,7 @@ Terminal Pack <br/>Capacity: 15 items Terminal Rucksack <br/>Volumen: 15 Liter - Вокзальный рюкзак (15 слота) + Вокзальный рюкзак (15 слотов) Terminal Rugzak <br/>Inhoud: 15 liter Sac à Dos (terminal) <br/>Taille: 15 From 3da345b865516fdacc34e0915becfc7dd77c6808 Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 2 Nov 2019 14:45:54 +0100 Subject: [PATCH 52/60] Move craft strings, wood piles, planks to epoch crafting There is no need to use the dayz mod craft if it can be done with the normal epoch craft. Also allow crafting wood piles directly from wooden logs. --- .../CfgMagazines/Crafting/equip_rope.hpp | 8 +++---- .../Configs/CfgMagazines/Items/Wood.hpp | 23 +++++++++++++------ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/Crafting/equip_rope.hpp b/SQF/dayz_code/Configs/CfgMagazines/Crafting/equip_rope.hpp index e8a94488b..38a3c9053 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Crafting/equip_rope.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Crafting/equip_rope.hpp @@ -11,11 +11,11 @@ class equip_rope : CA_Magazine { class Crafting { text = $STR_BLD_craft_equip_rope;//"String" - script = "spawn player_craftItem;"; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {""}; - output[] = {{"equip_string","CfgMagazines",2}}; - input[] = {{"equip_rope","CfgMagazines",1}}; + requiretools[] = {"ItemKnife"}; + output[] = {{"equip_string",2}}; + input[] = {{"equip_rope",1}}; }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp index 026dbe5c0..dabbf6d64 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp @@ -13,12 +13,21 @@ class ItemLog : CA_Magazine class Crafting { text = $STR_BLD_craft_ItemLog;//"Wooden Plank" - script = "spawn player_craftItem;"; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemHatchet"}; - output[] = {{"ItemPlank","CfgMagazines",2}}; - input[] = {{"ItemLog","CfgMagazines",1}}; + output[] = {{"ItemPlank",2}}; + input[] = {{"ItemLog",1}}; }; + class Crafting1 + { + text = $STR_EQUIP_NAME_40;//"Wood Piles" + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemHatchet"}; + output[] = {{"PartWoodPile",4}}; + input[] = {{"ItemLog",1}}; + }; }; }; @@ -36,12 +45,12 @@ class ItemPlank : CA_Magazine { class Crafting { - text = $STR_BLD_craft_ItemPlank;//"Wood Piles" - script = "spawn player_craftItem;"; + text = $STR_EQUIP_NAME_40;//"Wood Piles" + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemHatchet"}; - output[] = {{"PartWoodPile","CfgMagazines",2}}; - input[] = {{"ItemPlank","CfgMagazines",1}}; + output[] = {{"PartWoodPile",2}}; + input[] = {{"ItemPlank",1}}; }; }; }; From 85616130bef1d441498a59748d8717c96abc8400 Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Sun, 3 Nov 2019 15:07:38 -0600 Subject: [PATCH 53/60] 1.0.7 Updates - variables.sqf, compiles.sqf, and publicEH.sqf (#2041) * Move PVCDZ_OpenTarget_Reset to client only * Move some functions to client only fnc_usec_damageHandler, dayz_inflame_showMenu, dayz_inflame_showMenu_other, DZ_KeyDown_EH, dayz_EjectPlayer compiled on client only. * Upload the reorganized variables.sqf * Update Changelog --- CHANGE LOG 1.0.7.txt | 3 + SQF/dayz_code/init/compiles.sqf | 150 ++-- SQF/dayz_code/init/publicEH.sqf | 2 +- SQF/dayz_code/init/variables.sqf | 1286 ++++++++++++++---------------- 4 files changed, 658 insertions(+), 783 deletions(-) diff --git a/CHANGE LOG 1.0.7.txt b/CHANGE LOG 1.0.7.txt index bf393e7b2..3755b716a 100644 --- a/CHANGE LOG 1.0.7.txt +++ b/CHANGE LOG 1.0.7.txt @@ -32,5 +32,8 @@ [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. (f7ea9cb) @AirwavesMan +[UPDATED] Old/unused variables removed from variables.sqf. Entire file reorganized. (4accdee) @worldwidesorrow +[UPDATED] Functions fnc_usec_damageHandler, dayz_inflame_showMenu, dayz_inflame_showMenu_other, DZ_KeyDown_EH, dayz_EjectPlayer compiled on client only - compiles.sqf. (7613e3a) @worldwidesorrow +[UPDATED] "PVCDZ_OpenTarget_Reset" moved to client only - publicEH.sqf. (58a98b7) @worldwidesorrow [INFO] Synced with DayZMod upstream up to commit fe063a8 diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 0360c3b7a..022fde7f1 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -206,6 +206,7 @@ if (!isDedicated) then { player_manageDoor = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\initDoorManagement.sqf"; player_enterCode = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\player_enterCode.sqf"; FNC_check_access = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_check_access.sqf"; + fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; //Event handler run on damage // Advanced trading default inits for maintaining, Advanced Trading and custom scripts to utilize gem based currency. call compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\AdvancedTrading\defaultInit.sqf"; @@ -613,6 +614,80 @@ if (!isDedicated) then { if (!DZE_ConfigTrader) then {call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_hiveTrading.sqf";}; // recent murders menu call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_murderBoard.sqf"; + + dayz_inflame_showMenu = { + private ["_object","_ret","_flame","_islit","_hasTool","_whatIwant"]; + + _object = _this select 0; + _whatIwant = _this select 1; + _ret = false; + + _islit = (inflamed _object); + + _hasTool = false; + if (!_islit) then { + { + if (_x in items player) exitWith { _hasTool = true; }; + } count DayZ_Ignitors; + }; + _ret = (_whatIwant && !_islit && _hasTool) or (!_whatIwant && _isLit); + + _ret + }; + + dayz_reduceItems = { + private ["_item","_class","_amount","_qtyRemaining"]; + + _item = _this select 0; //Item in current inventory. + _class = _this select 1; //Class type to use. + + //Does player have the original item? (Not Really needed player_useMeds checks) + if (_item in magazines player) exitWith { + //Amount in current box (will be -1 for a random chance to start the reducing) + _amount = getNumber(configfile >> "CfgMagazines" >> _item >> _class >> "amount"); + + //Item to move too if there is some left + _qtyRemaining = getText(configfile >> "CfgMagazines" >> _item >> _class >> "qtyRemaining"); + + //Only run for the random amount. + if (_amount == -1) then { + //Chance to start the reduction + if ([getNumber(configfile >> "CfgMagazines" >> _item >> _class >> "chance")] call fn_chance) then { + player removeMagazine _item; + player addMagazine _qtyRemaining; + }; + } else { + player removeMagazine _item; + player addMagazine _qtyRemaining; + }; + }; + true + }; + + dayz_inflame_showMenu_other = { + private ["_fireplace","_ret","_flame","_islit","_hasTool","_whatIwant"]; + + _fireplace = _this select 0; + _whatIwant = _this select 1; + _ret = false; + // return a boolean. true <=> player can put out the lit fire, can light a fire with match + _flame = nearestObjects [_fireplace, ["flamable_DZ"], 1]; + _flame = if (count _flame > 0) then { _flame select 0 } else { objNull }; + _islit = !(isNull _flame) && {(inflamed _flame)}; + _hasTool = false; + if (!_islit) then { + { + if (_x in items player) exitWith { _hasTool = true; }; + } count DayZ_Ignitors; + }; + _ret = (_whatIwant && !_islit && _hasTool) or (!_whatIwant && _isLit); + //systemChat str [_flame, _hasTool, _islit, _ret]; + + _ret + }; + + DZ_KeyDown_EH = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\keyboard.sqf"; + dayz_EjectPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_ejectPlayer.sqf"; }; //Both @@ -629,7 +704,6 @@ object_getHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\o object_setHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHit.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles) object_processHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_processHit.sqf"; //process the hit in the REVO damage system (records and sets hit) //object_cargoCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_cargoCheck.sqf"; //Run by the player or server to monitor changes in cargo contents -fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; //Event handler run on damage // Vehicle damage fix fnc_veh_handleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_handleDam.sqf"; fnc_veh_handleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_handleKilled.sqf"; @@ -663,10 +737,10 @@ fn_getModelName = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile fn_niceSpot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_niceSpot.sqf"; fnc_Obj_FenceHandleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fence_handleDam.sqf"; object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf"; -DZ_KeyDown_EH = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\keyboard.sqf"; fn_shuffleArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_shuffleArray.sqf"; zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_initialize.sqf"; call compile preprocessFileLineNumbers "\z\addons\dayz_code\traps\init.sqf"; +//call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\achievements_init.sqf"; //start achievements_init if (dayz_townGenerator) then { call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\psrnd.sqf"; // pseudo random for plantSpanwer @@ -682,7 +756,6 @@ BIS_fnc_numberDigits = compile preprocessFileLineNumbers "\z\addons\dayz_code\co BIS_fnc_numberText = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_numberText.sqf"; local_lockUnlock = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lockUnlock.sqf"; //When vehicle is local to unit perform locking vehicle FNC_GetSetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getSetPos.sqf"; -dayz_EjectPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_ejectPlayer.sqf"; dayz_groupInvite = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\handleInvite.sqf"; player_sumMedical = { @@ -719,35 +792,6 @@ player_sumMedical = { _medical }; -dayz_reduceItems = { - private ["_item","_class","_amount","_qtyRemaining"]; - - _item = _this select 0; //Item in current inventory. - _class = _this select 1; //Class type to use. - - //Does player have the original item? (Not Really needed player_useMeds checks) - if (_item in magazines player) exitWith { - //Amount in current box (will be -1 for a random chance to start the reducing) - _amount = getNumber(configfile >> "CfgMagazines" >> _item >> _class >> "amount"); - - //Item to move too if there is some left - _qtyRemaining = getText(configfile >> "CfgMagazines" >> _item >> _class >> "qtyRemaining"); - - //Only run for the random amount. - if (_amount == -1) then { - //Chance to start the reduction - if ([getNumber(configfile >> "CfgMagazines" >> _item >> _class >> "chance")] call fn_chance) then { - player removeMagazine _item; - player addMagazine _qtyRemaining; - }; - } else { - player removeMagazine _item; - player addMagazine _qtyRemaining; - }; - }; - true -}; - dayz_inflame = { private "_object"; _object = _this select 0; @@ -759,26 +803,6 @@ dayz_inflame = { }; }; -dayz_inflame_showMenu = { - private ["_object","_ret","_flame","_islit","_hasTool","_whatIwant"]; - - _object = _this select 0; - _whatIwant = _this select 1; - _ret = false; - - _islit = (inflamed _object); - - _hasTool = false; - if (!_islit) then { - { - if (_x in items player) exitWith { _hasTool = true; }; - } count DayZ_Ignitors; - }; - _ret = (_whatIwant && !_islit && _hasTool) or (!_whatIwant && _isLit); - - _ret -}; - dayz_inflame_other = { private ["_fireplace","_ret","_flame","_islit","_isLit","_pos"]; @@ -806,28 +830,6 @@ dayz_inflame_other = { }; }; -dayz_inflame_showMenu_other = { - private ["_fireplace","_ret","_flame","_islit","_hasTool","_whatIwant"]; - - _fireplace = _this select 0; - _whatIwant = _this select 1; - _ret = false; - // return a boolean. true <=> player can put out the lit fire, can light a fire with match - _flame = nearestObjects [_fireplace, ["flamable_DZ"], 1]; - _flame = if (count _flame > 0) then { _flame select 0 } else { objNull }; - _islit = !(isNull _flame) && {(inflamed _flame)}; - _hasTool = false; - if (!_islit) then { - { - if (_x in items player) exitWith { _hasTool = true; }; - } count DayZ_Ignitors; - }; - _ret = (_whatIwant && !_islit && _hasTool) or (!_whatIwant && _isLit); - //systemChat str [_flame, _hasTool, _islit, _ret]; - - _ret -}; - isInflamed = { private "_flame"; diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index 2a3ab6d35..3ce6232ac 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -9,7 +9,6 @@ "PVCDZ_obj_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject}; "PVCDZ_veh_SetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel}; "PVCDZ_veh_engineSwitch" addPublicVariableEventHandler {(_this select 1) spawn dayz_engineSwitch}; -"PVCDZ_OpenTarget_Reset" addPublicVariableEventHandler { OpenTarget_Time = diag_tickTime; }; //reset OpenTarget timer // EPOCH ADDITIONS "PVDZE_veh_Lock" addPublicVariableEventHandler {(_this select 1) call local_lockUnlock}; @@ -268,6 +267,7 @@ if (!isDedicated) then { "PVCDZ_hlt_Transfuse_completed" addPublicVariableEventHandler {player setVariable["TransfusionCompleted",true]; }; "PVCDZ_hlt_PainK" addPublicVariableEventHandler {(_this select 1) call player_medPainkiller}; "PVCDZ_hlt_AntiB" addPublicVariableEventHandler {(_this select 1) call player_medAntiBiotics}; + "PVCDZ_OpenTarget_Reset" addPublicVariableEventHandler { OpenTarget_Time = diag_tickTime; }; //reset OpenTarget timer "PVCDZ_plr_Legs" addPublicVariableEventHandler { _entity = (_this select 1) select 0; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index fe68884bf..949bbb6b2 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -1,708 +1,578 @@ -disableSerialization; - -//Model Variables -Bandit1_DZ = "Bandit1_DZ"; -BanditW1_DZ = "BanditW1_DZ"; -Survivor1_DZ = "Survivor1_DZ"; -Survivor2_DZ = "Survivor2_DZ"; -SurvivorW2_DZ = "SurvivorW2_DZ"; -Sniper1_DZ = "Sniper1_DZ"; -Camo1_DZ = "Camo1_DZ"; -Soldier1_DZ = "Soldier1_DZ"; -Rocket_DZ = "Rocket_DZ"; -// EPOCH ADDITIONS -Bandit2_DZ = "Bandit2_DZ"; -BanditW2_DZ = "BanditW2_DZ"; -SurvivorW3_DZ = "SurvivorW2_DZ"; - -//Rolling Msg system -Message_1 = ""; -Message_2 = ""; -Message_3 = ""; -Message_1_time = 0; -Message_2_time = 0; -Message_3_time = 0; -//Kill Feed -death_1 = ""; -death_2 = ""; -death_3 = ""; -death_4 = ""; -death_1_time = 0; -death_2_time = 0; -death_3_time = 0; -death_4_time = 0; - -//OpenTarget timer -OpenTarget_Time = 0; - -///Player classes -AllPlayers = ["Survivor_DZ","Survivor1_DZ","SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWsequishaD_DZ","SurvivorWsequisha_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","Bandit2_DZ","BanditW2_DZ","Soldier_Crew_PMC","Rocket_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_CO_DZ","GUE_Soldier_2_DZ","TK_Special_Forces_MG_EP1_DZ","TK_Soldier_Sniper_EP1_DZ","TK_Commander_EP1_DZ","RU_Soldier_Crew_DZ","INS_Lopotev_DZ","INS_Soldier_AR_DZ","INS_Soldier_CO_DZ","INS_Bardak_DZ","INS_Worker2_DZ","USMC_Soldier_Officer_DZ","USMC_Soldier_MG_DZ","USMC_Soldier_Pilot_DZ","FR_TL_DZ","FR_R_DZ","FR_Marksman_DZ","FR_Assault_R_DZ","RU_Soldier_DZ","RU_Soldier_Officer_DZ","RUS_Soldier1_DZ","RUS_Commander_DZ","MVD_Soldier_DZ","Ins_Soldier_2_DZ","Ins_Commander_DZ","Ins_Soldier_Crew_DZ","CDF_Soldier_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","TK_INS_Soldier_AR_EP1_DZ","TK_GUE_Soldier_EP1_DZ","CZ_Soldier_SL_DES_EP1_DZ","US_Soldier_EP1_DZ","UN_CDF_Soldier_Guard_EP1_DZ","UN_CDF_Soldier_EP1_DZ","GER_Soldier_TL_EP1_DZ","BAF_Soldier_Officer_MTP_DZ","BAF_Soldier_N_MTP_DZ","FR_Sapper_DZ"]; -DayZ_Male = ["Survivor_DZ","Survivor1_DZ","Survivor2_DZ","Survivor3_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","Bandit1_DZ","Bandit2_DZ","Soldier_Crew_PMC","Rocket_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_CO_DZ","GUE_Soldier_2_DZ","TK_Special_Forces_MG_EP1_DZ","TK_Soldier_Sniper_EP1_DZ","TK_Commander_EP1_DZ","RU_Soldier_Crew_DZ","INS_Lopotev_DZ","INS_Soldier_AR_DZ","INS_Soldier_CO_DZ","INS_Bardak_DZ","INS_Worker2_DZ","USMC_Soldier_Officer_DZ","USMC_Soldier_MG_DZ","USMC_Soldier_Pilot_DZ","FR_TL_DZ","FR_R_DZ","FR_Marksman_DZ","FR_Assault_R_DZ","RU_Soldier_DZ","RU_Soldier_Officer_DZ","RUS_Soldier1_DZ","RUS_Commander_DZ","MVD_Soldier_DZ","Ins_Soldier_2_DZ","Ins_Commander_DZ","Ins_Soldier_Crew_DZ","CDF_Soldier_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","TK_INS_Soldier_AR_EP1_DZ","TK_GUE_Soldier_EP1_DZ","CZ_Soldier_SL_DES_EP1_DZ","US_Soldier_EP1_DZ","UN_CDF_Soldier_Guard_EP1_DZ","UN_CDF_Soldier_EP1_DZ","GER_Soldier_TL_EP1_DZ","BAF_Soldier_Officer_MTP_DZ","BAF_Soldier_N_MTP_DZ","FR_Sapper_DZ"]; -DayZ_Female = ["SurvivorW2_DZ","BanditW1_DZ","BanditW2_DZ","SurvivorWcombat_DZ","SurvivorWurban_DZ","SurvivorWdesert_DZ","SurvivorWsequishaD_DZ","SurvivorWsequisha_DZ","SurvivorWpink_DZ","SurvivorW3_DZ"]; - -//Classnames for specific items -MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails","MeleeFishingPole","MeleeSledge"]; -MeleeMagazines = ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing"]; -MeleeAmmo = ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo","Bat_Swing_Ammo","BatBarbed_Swing_Ammo","BatNailed_Swing_Ammo","Fishing_Swing_Ammo","Sledge_Swing_Ammo","Chainsaw_Swing_Ammo"]; -Dayz_fishingItems = ["MeleeFishingPole"]; -Dayz_plants = ["Dayz_Plant1","Dayz_Plant2","Dayz_Plant3"]; -Dayz_attachment_array = ["Attachment_ACG","Attachment_AIM"]; -//DayZ_Tents = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4"] -//DayZ_Stashs = ["StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4"] -//DayZ_cutter = ["Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","CamoNet_DZ"] -DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Pouch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_TerminalPack_EP1","DZ_CompactPack_EP1","DZ_GunBag_EP1","DZ_LargeGunBag_EP1"]; -Dayz_Gutting = ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1","ItemKnifeBlunt"]; -DayZ_Ignitors = ["ItemMatchbox","Item5Matchbox","Item4Matchbox","Item3Matchbox","Item2Matchbox","Item1Matchbox"]; -DayZ_ViralZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"]; -DayZ_SafeObjects = ["Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"]; -DayZ_DropDrageeObjects = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","StickFence_DZ","SandNest_DZ","MetalPanel_DZ","WorkBench_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","WoodFloorHalf_DZ","WoodFloor_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","MetalFloor_DZ","WoodRamp_DZ"]; -DayZ_GearedObjects = ["Car","Helicopter","Motorcycle","Ship","TentStorage_base","StashSmall_base","StashMedium_base","Plane","Tank","VaultStorage","LockboxStorage","TentStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ","Scaffolding_DZ","Generator_DZ"]; -DayZ_RestingAnims = ["amovpsitmstpsnonwpstdnon_ground","amovpsitmstpsnonwpstdnon_smoking","amovpsitmstpsraswrfldnon_weaponcheck1","amovpsitmstpsraswrfldnon"]; -dayz_typedBags = ["bloodTester","bloodBagANEG","bloodBagAPOS","bloodBagBNEG","bloodBagBPOS","bloodBagABNEG","bloodBagABPOS","bloodBagONEG","bloodBagOPOS","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]; -dayz_playerAchievements = []; //[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] -dayz_plant = ["pumpkin.p3d","p_helianthus.p3d","p_fiberplant_ep1.p3d"]; -dayz_trees = ["ind_timbers.p3d","t_picea2s_snow.p3d","t_quercus3s.p3d","t_larix3s.p3d","t_pyrus2s.p3d","str_briza_kriva.p3d","dd_borovice.p3d","les_singlestrom_b.p3d","les_singlestrom.p3d","smrk_velky.p3d","smrk_siroky.p3d","smrk_maly.p3d","les_buk.p3d","str krovisko vysoke.p3d","str_fikovnik_ker.p3d","str_fikovnik.p3d","str vrba.p3d","hrusen2.p3d","str dub jiny.p3d","str lipa.p3d","str briza.p3d","p_akat02s.p3d","jablon.p3d","p_buk.p3d","str_topol.p3d","str_topol2.p3d","p_osika.p3d","t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fagus2s.p3d","t_fagus2f.p3d","t_betula1f.p3d","t_betula2f.p3d","t_betula2s.p3d","t_betula2w.p3d","t_alnus2s.p3d","t_acer2s.p3d","t_populus3s.p3d","t_quercus2f.p3d","t_sorbus2s.p3d","t_malus1s.p3d","t_salix2s.p3d","t_picea1s_w.p3d","t_picea2s_w.p3d","t_ficusb2s_ep1.p3d","t_populusb2s_ep1.p3d","t_populusf2s_ep1.p3d","t_amygdalusc2s_ep1.p3d","t_pistacial2s_ep1.p3d","t_pinuse2s_ep1.p3d","t_pinuss3s_ep1.p3d","t_prunuss2s_ep1.p3d","t_pinusn2s.p3d","t_pinusn1s.p3d","t_pinuss2f.p3d","t_poplar2f_dead_pmc.p3d","misc_torzotree_pmc.p3d","misc_burnspruce_pmc.p3d","brg_cocunutpalm8.p3d","brg_umbrella_acacia01b.p3d","brg_jungle_tree_canopy_1.p3d","brg_jungle_tree_canopy_2.p3d","brg_cocunutpalm4.p3d","brg_cocunutpalm3.p3d","palm_01.p3d","palm_02.p3d","palm_03.p3d","palm_04.p3d","palm_09.p3d","palm_10.p3d","brg_cocunutpalm2.p3d","brg_jungle_tree_antiaris.p3d","brg_cocunutpalm1.p3d","str habr.p3d","brg_bird_1.p3d","brg_bird_2.p3d","brg_bird_3.p3d","brg_umbrella_acacia02b.p3d","brg_africandoumpalm_1.p3d","brg_umbrella_acacia04b.p3d","brg_datepalm_4.p3d","brg_datepalm_1.p3d","brg_umbrella_acacia03b.p3d","brg_bottle_4.p3d","brg_aloe1.p3d","brg_umbrella_acacia03.p3d","brg_umbrella_acacia01.p3d","brg_umbrella_acacia04.p3d","brg_aloe2.p3d","brg_umbrella_acacia02.p3d","brg_aloe3.p3d","brg_bottle_1.p3d","brg_datepalm_3.p3d","brg_datepalm_2.p3d","brg_baobab_1.p3d","brg_bottle_2.p3d","brg_bottle_3.p3d","t_fraxinus2s.p3d","t_carpinus2s.p3d"]; - -Dayz_meatraw = -[ - "FoodBeefRaw", - "FoodMuttonRaw", - "FoodChickenRaw", - "FoodRabbitRaw", - "FoodBaconRaw", - "FoodGoatRaw", - "FoodDogRaw", - "FishRawTrout", - "FishRawSeaBass", - "FishRawTuna" -]; - -Dayz_meatcooked = -[ - "FoodBeefCooked", - "FoodMuttonCooked", - "FoodChickenCooked", - "FoodRabbitCooked", - "FoodBaconCooked", - "FoodGoatCooked", - "FoodDogCooked", - "FishCookedTrout", - "FishCookedSeaBass", - "FishCookedTuna" -]; - -boil_tin_cans = -[ - "TrashTinCan", - "FoodCanGriffEmpty", - "FoodCanBadguyEmpty", - "FoodCanBoneboyEmpty", - "FoodCanCornEmpty", - "FoodCanCurgonEmpty", - "FoodCanDemonEmpty", - "FoodCanFraggleosEmpty", - "FoodCanHerpyEmpty", - "FoodCanDerpyEmpty", - "FoodCanOrlokEmpty", - "FoodCanPowellEmpty", - "FoodCanTylersEmpty", - "FoodCanUnlabeledEmpty", - "FoodCanRusUnlabeledEmpty", - "FoodCanRusStewEmpty", - "FoodCanRusPorkEmpty", - "FoodCanRusPeasEmpty", - "FoodCanRusMilkEmpty", - "FoodCanRusCornEmpty", - "ItemSodaEmpty", - "ItemSodaClaysEmpty", - "ItemSodaDrwasteEmpty", - "ItemSodaFrankaEmpty", - "ItemSodaGrapeDrinkEmpty", - "ItemSodaLemonadeEmpty", - "ItemSodaLirikEmpty", - "ItemSodaLvgEmpty", - "ItemSodaMtngreenEmpty", - "ItemSodaMzlyEmpty", - "ItemSodaPeppsyEmpty", - "ItemSodaR4z0rEmpty", - "ItemSodaRabbitEmpty", - "ItemSodaRocketFuelEmpty", - "ItemSodaSacriteEmpty", - //"ItemSodaSherbetEmpty", - "ItemSodaSmashtEmpty", - "FoodCanPotatoesEmpty", - "FoodCanBeefEmpty" -]; - -canPickup = false; -pickupInit = false; -mouseOverCarry = false; //for carry slot since determining mouse pos doesn't work right -dayZ_partClasses = ["PartFueltank","PartWheel","PartEngine"]; //No need to add PartGeneric, it is default for everything -dayZ_explosiveParts = ["palivo","motor"]; -if (isNil "infectedWaterHoles") then {infectedWaterHoles = [];}; //Needed for non-cherno maps - -//Survival Variables -SleepFood = 2160; //minutes (48 hours) -SleepWater = 1440; //minutes (24 hours) -SleepTemperatur = 90 / 100; //First value = Minutes until player reaches the coldest point at night (without other effects! night factor expected to be -1) //TeeChange - -//Server Variables -allowConnection = false; -dayz_serverObjectMonitor = []; - -//GUI -Dayz_GUI_R = 0.38; // 0.7 .38 -Dayz_GUI_G = 0.63; // -0.63 -Dayz_GUI_B = 0.26; // -0.26 - -//actions blockers -a_player_cooking = false; -a_player_boil = false; - -//Player self-action handles -dayz_resetSelfActions = { - s_player_equip_carry = -1; - s_player_fire = -1; - s_player_cook = -1; - s_player_boil = -1; - s_player_packtent = -1; - s_player_packtentinfected = -1; - s_player_fillfuel = -1; - s_player_grabflare = -1; - s_player_removeflare = -1; - s_player_studybody = -1; - s_player_deleteBuild = -1; - s_player_flipveh = -1; - s_player_sleep = -1; - s_player_fillfuel210 = -1; - s_player_fillfuel20 = -1; - s_player_fillfuel5 = -1; - s_player_siphonfuel = -1; - s_player_repair_crtl = -1; - s_player_fishing = -1; - s_player_fishing_veh = -1; - s_player_gather = -1; - s_player_destroytent = -1; - s_player_attach_bomb = -1; - s_player_upgradestorage = -1; - s_player_Drinkfromhands = -1; - /*s_player_lockhouse = -1; //Vanilla base building currently not used in Epoch - s_player_unlockhouse = -1; - s_player_openGate = -1; - s_player_CloseGate = -1; - s_player_breakinhouse = -1; - s_player_setCode = -1; - s_player_BuildUnLock = -1; - s_player_BuildLock = -1;*/ - - // EPOCH ADDITIONS - s_player_packvault = -1; - s_player_lockvault = -1; - s_player_unlockvault = -1; - s_player_attack = -1; - s_player_callzombies = -1; - s_player_showname = -1; - s_player_pzombiesattack = -1; - s_player_pzombiesvision = -1; - s_player_pzombiesfeed = -1; - s_player_tamedog = -1; - s_player_parts_crtl = -1; - s_player_movedog = -1; - s_player_speeddog = -1; - s_player_calldog = -1; - s_player_feeddog = -1; - s_player_waterdog = -1; - s_player_staydog = -1; - s_player_trackdog = -1; - s_player_barkdog = -1; - s_player_warndog = -1; - s_player_followdog = -1; - s_player_information = -1; - s_player_fuelauto = -1; - s_player_fuelauto2 = -1; - s_player_fillgen = -1; - s_player_upgrade_build = -1; - s_player_maint_build = -1; - s_player_downgrade_build = -1; - s_player_towing = -1; - s_halo_action = -1; - s_player_SurrenderedGear = -1; - s_player_maintain_area = -1; - s_player_maintain_area_force = -1; - s_player_maintain_area_preview = -1; - s_player_heli_lift = -1; - s_player_heli_detach = -1; - s_player_lockUnlock_crtl = -1; - s_player_lockUnlockInside_ctrl = -1; - s_player_toggleSnap = -1; - s_player_toggleSnapSelect = -1; - s_player_toggleSnapSelectPoint = []; - snapActions = -1; - s_player_plot_boundary = -1; - s_player_plotManagement = -1; - s_player_toggleDegree = -1; - s_player_toggleDegrees=[]; - degreeActions = -1; - s_player_toggleVector = -1; - s_player_toggleVectors=[]; - vectorActions = -1; - s_player_manageDoor = -1; - s_player_hide_body = -1; -}; -call dayz_resetSelfActions; - -//Engineering variables -s_player_repairActions = []; - -//Initialize Medical Variables -force_dropBody = false; -r_interrupt = false; -r_doLoop = false; -r_drag_sqf = false; -r_action = false; -r_action_unload = false; -r_player_handler = false; -r_player_unconsciousInProgress = false; -r_player_unconsciousInputDisabled = false; -r_player_dead = false; -r_player_unconscious = false; -r_player_infected = false; -//infection from hits -r_player_Sepsis = [false, 0]; -r_player_injured = false; -r_player_inpain = false; -r_player_loaded = false; -r_player_cardiac = false; -r_fracture_legs = false; -r_fracture_arms = false; -r_player_vehicle = player; -r_player_blood = 12000; -r_player_bloodregen = 0; -r_player_bloodgainpersec = 0; -r_player_bloodlosspersec = 0; -r_player_bloodpersec = 0; //Blood Per Sec (gain - loss) -r_player_foodstack = 1; -//player skill -r_player_lowblood = false; -r_player_timeout = 0; -r_player_bloodTotal = r_player_blood; -r_player_actions = []; -r_handlerCount = 0; -r_action_targets = []; -r_pitchWhine = false; -dayz_DisplayGenderSelect = true; -//blood test vars -r_A_watered = false; -r_B_watered = false; -r_D_watered = false; -r_control_watered = false; -r_canClick_resultsCard = false; -r_resultsCard_Clicked = false; -r_water_clicked = false; -r_needleclicked = 0; -r_needleReset = false; -r_control_done = false; -r_antiA_done = false; -r_antiB_done = false; -r_antiD_done = false; -carryClick = false; -dayz_actionInProgress = false; -gear_done = false; - -//player warming up vars -//heatpack -r_player_warming_heatpack = [false, 0]; -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; - -//ammo routine -r_player_actions2 = []; -r_action2 = false; -r_player_lastVehicle = objNull; -r_player_lastSeat = []; -r_player_removeActions2 = { - if (!isNull r_player_lastVehicle) then { - { - r_player_lastVehicle removeAction _x; - } count r_player_actions2; - r_player_actions2 = []; - r_action2 = false; - }; -}; - -USEC_woundHit = ["","body","hands","legs","head_hit"]; // limbs hit given by arma engine when fnc_usec_damageHandler is called -DAYZ_woundHit = [["body","hands","legs","head_hit"],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]]; -DAYZ_woundHit_ok = [["body","hands","legs"],[0,0,0,0,0,1,1,1,2,2]]; -USEC_MinorWounds = ["hands","legs"]; -USEC_woundPoint = [ // translation table USEC_woundHit -> SV suffixes - ["Pelvis","aimpoint"], - ["aimpoint"], //,"RightShoulder","LeftShoulder" - ["lelbow","relbow"], - ["RightFoot","LeftFoot"], - ["neck","pilot"] -]; -USEC_typeOfWounds = [ // used by player_sumMedical, should contains all limbs described in USEC_woundPoint. These limbs statuses are saved by server_playerSync in HIVE if they are bleeding (medical select 8) - "Pelvis", - "aimpoint", - "lelbow","relbow", - "RightFoot","LeftFoot", - "neck","pilot" -]; - -//Initialize Zombie Variables -dayz_zombieTargetList = [["SoldierWB",50],["Air",500],["LandVehicle",200]]; -PVDZ_obj_Publish = []; // Used for eventhandler to spawn a mirror of players tent -PVCDZ_obj_HideBody = objNull; - -//DayZ settings -dayz_lastHumanityChange = diag_tickTime; -dayz_maxAnimals = 5; -dayz_maxPlants = 3; -dayz_animalDistance = 600; -dayz_plantDistance = 600; - -dayz_maxMaxModels = 80; // max quantity of Man models (player or Z, dead or alive) around players. Below this limit we can spawn Z // max quantity of loot piles around players. Below this limit we can spawn some loot -dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks -dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players -dayz_canDelete = 350; // Z, further than this distance from its "owner", will be deleted -dayz_traps_active = []; -dayz_traps_trigger = []; - -//Settings Not under dayz_settings -if(isNil "dayz_attackRange") then { - dayz_attackRange = 3; -}; -if(isNil "dayz_DamageMultiplier") then { - dayz_DamageMultiplier = 1; -}; -if(isNil "dayz_quickSwitch") then { - dayz_quickSwitch = false; //Enable quick weapon switch, -}; -//Will be moved to map -if(isNil "dayz_infectiouswaterholes") then { - dayz_infectiouswaterholes = true; //Enable infected waterholes -}; -if(isNil "dayz_POIs") then { - dayz_POIs = true; //Enable POIs -}; -if(isNil "dayz_ForcefullmoonNights") then { - dayz_ForcefullmoonNights = false; // Forces night time to be full moon. -}; -if(isNil "dayz_randomMaxFuelAmount") then { - dayz_randomMaxFuelAmount = 500; //Puts a random amount of fuel in all fuel stations. -}; -if(isNil "dayz_townGenerator") then { - dayz_townGenerator = true; // Spawn map junk -}; -if(isNil "dayz_townGeneratorBlackList") then { - dayz_townGeneratorBlackList = []; // Town generator will not spawn junk within 150m of these positions. -}; - -if (toLower worldName != "chernarus") then { - //Currently only compatible with Chernarus - dayz_infectiousWaterholes = false; - dayz_POIs = false; - dayz_townGenerator = false; -}; - -//Replace server individual settings with ranked settings -if(isNil "dayz_presets") then { dayz_presets = "Vanilla"; }; - -switch (dayz_presets) do { - 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; }; - if(isNil "dayz_spawncarepkgs_clutterCutter") then { dayz_spawncarepkgs_clutterCutter = 0; }; - if(isNil "dayz_spawnCrashSite_clutterCutter") then { dayz_spawnCrashSite_clutterCutter = 0; }; - if(isNil "dayz_spawnInfectedSite_clutterCutter") then { dayz_spawnInfectedSite_clutterCutter = 0; }; - if(isNil "dayz_bleedingeffect") then { dayz_bleedingeffect = 2; }; - if(isNil "dayz_OpenTarget_TimerTicks") then { dayz_OpenTarget_TimerTicks = 60 * 10; }; - if(isNil "dayz_temperature_override") then { dayz_temperature_override = true; }; - if(isNil "dayz_nutritionValuesSystem") then { dayz_nutritionValuesSystem = false; }; - if(isNil "dayz_classicBloodBagSystem") then { dayz_classicBloodBagSystem = false; }; - if(isNil "dayz_enableFlies") then { dayz_enableFlies = true; }; - }; - case "Classic": { //Classic - dayz_enableGhosting = false; //Enable disable the ghosting system. - dayz_ghostTimer = 120; //Sets how long in seconds a player must be dissconnected before being able to login again. - 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_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. - dayz_nutritionValuesSystem = false; //Enables nutrition system - dayz_classicBloodBagSystem = true; //Enables one type of bloodbag - dayz_enableFlies = true; //Enables flies spawning on death - }; - case "Elite": { //Elite - dayz_enableGhosting = true; //Enable disable the ghosting system. - dayz_ghostTimer = 90; //Sets how long in seconds a player must be dissconnected before being able to login again. - 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_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. - dayz_nutritionValuesSystem = true; //Enables nutrition system - dayz_classicBloodBagSystem = false; //Enables one type of bloodbag - dayz_enableFlies = true; //Enables flies spawning on death - }; - default { //Vanilla - dayz_enableGhosting = true; //Enable disable the ghosting system. - dayz_ghostTimer = 60; //Sets how long in seconds a player must be disconnected before being able to login again. - 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_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. - dayz_nutritionValuesSystem = true; //Enables nutrition system - dayz_classicBloodBagSystem = false; //Enables one type of bloodbag - dayz_enableFlies = true; //Enables flies spawning on death - }; -}; - -respawn_west_original = getMarkerPos "respawn_west"; //Prevent problems caused by cheaters moving respawn_west marker with setMarkerPos or deleteMarker - -switch (toLower worldName) do { - case "napf"; - case "ruegen"; - case "sauerland" : {dayz_minpos = -1000; dayz_maxpos = 26000;}; - case "tavi" : {dayz_minpos = -26000; dayz_maxpos = 26000;}; - case "chernarus" : {dayz_minpos = -1; dayz_maxpos = 16000;}; - case default {dayz_minpos = -20000; dayz_maxpos = 20000;}; -}; - -//start achievements_init -//call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\achievements_init.sqf"; - -// EPOCH ADDITIONS -keypadCancel = false; //Brute force fix -keyPadReset = {uiSleep 2; keypadCancel = false;}; -canbuild = true; -dayz_activeInvites = []; -dayz_combination = ""; -dayz_disallowedVault = ["TentStorage","BuiltItems","ModularItems","DZE_Base_Object","Generator_DZ"]; -// These work with just a running generator -dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_smd_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"]; -dayz_humanitytarget = ""; -dayz_selectedVault = objNull; -dayz_selectedDoor = objNull; -DAYZ_woundHit_dog = [["body","hands","legs"],[0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2]]; -DZE_fueltruckarray = ["KamazRefuel_DZ","UralRefuel_TK_EP1_DZ","MtvrRefuel_DES_EP1_DZ","V3S_Refuel_TK_GUE_EP1_DZ","MtvrRefuel_DZ","KamazRefuel_DZE1","KamazRefuel_DZE2","KamazRefuel_DZE3","KamazRefuel_DZE4"]; -DZE_Lock_Door = ""; -DZE_HeliAllowTowFrom = ["CH_47F_EP1_DZE","CH_47F_EP1_DZ","CH_47F_BAF","CH_47F_EP1","BAF_Merlin_DZE","CH53_DZE"]; -DZE_HeliAllowToTow = ["hilux1_civil_1_open","HMMWV_Base","Lada_base","Offroad_DSHKM_base","Pickup_PK_base","SkodaBase","tractor","VWGolf","Volha_TK_CIV_Base_EP1","S1203_TK_CIV_EP1","SUV_Base_EP1","ArmoredSUV_Base_PMC","UAZ_Base","LandRover_Base","Ship"]; -DZE_REPLACE_WEAPONS = [["Crossbow","DMR","M14_EP1","SVD","SVD_CAMO"],["Crossbow_DZ","DMR_DZ","M14_CCO_DZ","SVD_DZ","SVD_Gh_DZ"]]; -DZE_replaceMagazines = [["vil_20Rnd_762x51_G3"],["vil_20Rnd_762x51_G3"]]; -DZE_LockableStorage = ["VaultStorage","VaultStorageLocked","LockboxStorageLocked","LockboxStorage"]; -DZE_LockedStorage = ["VaultStorageLocked","LockboxStorageLocked"]; -DZE_UnLockedStorage = ["VaultStorage","LockboxStorage"]; -DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Generator_DZ","DZ_buildables","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ","M240Nest_DZ","GunRack_DZ","WoodCrate_DZ","OutHouse_DZ","StorageShed_DZ","WoodShack_DZ","Wooden_shed_DZ"]; -DZE_DoorsLocked = ["Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ"]; -DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; -DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame","Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck","Land_ammo_supply_wreck"]; -DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"]; -DZE_isDestroyableStorage = ["OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"]; -DZE_itemKeys = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; -DZE_keyColors = ["Green","Red","Blue","Yellow","Black"]; -helperDetach = false; -DZE_snapExtraRange = 0; -DZE_tradeVehicle = ["trade_any_vehicle","trade_any_vehicle_free","trade_any_vehicle_old","trade_any_bicycle","trade_any_bicycle_old","trade_any_boat","trade_any_boat_old"]; -DZE_tradeVehicleKeyless = ["trade_any_bicycle","trade_any_bicycle_old","trade_any_vehicle_free"]; -DZE_tradeObject = DZE_tradeVehicle + ["trade_backpacks"]; -DZE_GearCheckBypass = false; -isInTraderCity = false; -inTraderCity = "Unknown Trader"; -PlayerDeaths = []; -PVDZE_obj_Trade = []; // For all traders increment qty -PVDZE_plr_DeathB = []; -if (!DZE_ConfigTrader) then { - PVDZE_plr_TradeMenu = []; // For all traders -}; -snapGizmos = []; -snapGizmosNearby = []; -s_player_combi = []; -s_player_lockunlock = []; -s_player_lockUnlockInside = []; -s_player_parts = []; -if (isNil "DZE_GodModeBase") then {DZE_GodModeBase = false;}; -if (isNil "dayz_paraSpawn") then {dayz_paraSpawn = false;}; -if (isNil "DZE_BuildingLimit") then {DZE_BuildingLimit = 150;}; -if (isNil "DZE_BuildOnRoads") then {DZE_BuildOnRoads = false;}; -if (isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;}; -if (isNil "DZE_selfTransfuse_Values") then {DZE_selfTransfuse_Values = [12000,15,120];}; -if (isNil "DZE_PlotPole") then {DZE_PlotPole = [30,45];}; -DZE_maintainRange = ((DZE_PlotPole select 0)+20); - -if (isServer) then { - dayz_serverPUIDArray = []; - dayz_serverClientKeys = []; - dayz_traps = []; - 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 - //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"]; - DayZ_WoodenGates = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"]; - DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"]; - //[10416.695, 4198.4634],[7982.2563, 1419.8256],[10795.93, 1419.8263],[7966.083, 4088.7463],[9259.7266, 2746.1985],[5200.5234, 3915.3274],[6494.1665, 2572.7798],[5216.6968, 1246.407],[2564.7244, 3915.3296],[3858.3674, 2572.782],[2580.8977, 1246.4092],[13398.995, 4400.5874],[12242.025, 2948.3196],[13551.842, 1832.2257],[14870.512, 3009.5117],[-178.19415, 1062.4478],[1099.2754, 2388.8206],[-194.36755, 3731.3679],[10394.215, 8322.1719],[7959.7759, 5543.5342],[10773.449, 5543.5342], - dayz_grid =[[7943.6025, 8212.4551],[9237.2461, 6869.9063],[5178.043, 8039.0361],[6471.686, 6696.4883],[5194.2163, 5370.1152],[2542.2439, 8039.0381],[3835.887, 6696.4902],[2558.4172, 5370.1172],[13376.514, 8524.2969],[12219.544, 7072.0273],[13529.361, 5955.9336],[14848.032, 7133.2197],[-200.67474, 5186.1563],[1076.7949, 6512.5283],[-216.84814, 7855.0771],[10293.751, 12197.736],[7859.312, 9419.0996],[10672.988, 9419.0996],[7843.1387, 12088.021],[9136.7822, 10745.474],[5077.5791, 11914.601],[6371.2222, 10572.052],[5093.7524, 9245.6816],[2441.78, 11914.604],[3735.4231, 10572.055],[2457.9534, 9245.6816],[13276.053, 12399.861],[12119.08, 10947.596],[13428.897, 9831.501],[14747.566, 11008.786],[-301.13867, 9061.7207],[976.33112, 10388.096],[-317.31201, 11730.642],[10271.271, 16321.429],[7836.8315, 13542.813],[10650.506, 13542.813],[7820.6582, 16211.718],[9114.3018, 14869.175],[5055.0986, 16038.3],[6348.7417, 14695.758],[5071.272, 13369.392],[2419.2996, 16038.305],[3712.9426, 14695.76],[2435.4729, 13369.392],[13253.568, 16523.553],[12096.6, 15071.295],[13406.416, 13955.209],[14725.089, 15132.486],[-323.61914, 13185.43],[953.85059, 14511.8],[-339.79248, 15854.346]]; - dayz_choppedTrees = []; - dayz_ghostPlayers = []; - dayz_activePlayers = []; - dayz_died = []; - - // EPOCH ADDITIONS - DZE_safeVehicle = ["ParachuteWest","ParachuteC"]; - if (isNil "EpochUseEvents") then {EpochUseEvents = false;}; - if (isNil "EpochEvents") then {EpochEvents = [];}; - if (isNil "MaxDynamicDebris") then {MaxDynamicDebris = 100;}; - if (isNil "MaxVehicleLimit") then {MaxVehicleLimit = 50;}; - if (isNil "spawnArea") then {spawnArea = 1400;}; - if (isNil "spawnShoremode") then {spawnShoremode = 1;}; -}; - -if (!isDedicated) then { - dayz_authKey = ""; - DZE_LastPingResp = diag_tickTime; - dayz_buildingBubbleMonitor = []; - DayZ_fuelCans = ["ItemJerrycan","ItemFuelcan","ItemFuelBarrel"]; - DayZ_fuelCansEmpty = ["ItemJerrycanEmpty","ItemFuelcanEmpty","ItemFuelBarrelEmpty"]; - DayZ_fuelSources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","Land_smd_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"]; - dayz_plantOutput = ["FoodPumpkin","FoodSunFlowerSeed","ItemKiloHemp"]; - 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 - dayz_temperaturmax = 42; //TeeChange - dayz_temperaturmin = 27; //TeeChange - - //player special variables - dayz_bloodBagHumanity = 300; - dayz_HarvestingChance = [0.09]; - dayz_lastCheckBit = 0; - dayz_lastDamageSourceNull = false; - dayz_lastDamageSource = "none"; - dayz_lastDamageTime = 0; - dayz_lastMedicalSource = "none"; - dayz_lastMedicalTime = 0; - dayz_lastClothesChange = 0; - dayZ_lastPlayerUpdate = 0; - dayz_lastSelfTransfusion = -(DZE_selfTransfuse_Values select 2); - dayz_lastTransfusion = 0; - dayz_playerName = "unknown"; - dayz_hunger = 0; - dayz_thirst = 0; - dayz_nutrition = 0; - dayz_preloadFinished = true; - dayz_soundMuted = false; - dayz_disAudial = 0; - dayz_disVisual = 0; - dayz_firedCooldown = 0; - dayz_damageCounter = time; - dayz_lastSave = diag_tickTime; - dayz_isSwimming = true; - dayz_currentDay = 0; - dayz_hasLight = false; - dayz_surfaceNoise = 0; - dayz_surfaceType = "None"; - dayz_noPenalty = []; - dayz_heavenCooldown = 0; - deathHandled = false; - dayz_firstGroup = group player; - dayz_originalPlayer = player; - dayz_sourceBleeding = objNull; - dayz_clientPreload = false; - dayz_authed = false; - dayz_panicCooldown = 0; - dayz_areaAffect = 3.5; - dayz_monitorPeriod = 0.6; // number of seconds between each player_zombieCheck calls - dayz_heartBeat = false; - dayz_spawnZombies = 0; // Current local - dayz_swarmSpawnZombies = 0; - dayz_maxLocalZombies = 15; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z - dayz_CurrentNearByZombies = 0; - dayz_maxNearByZombies = 30; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z - dayz_currentGlobalZombies = 0; // Current total - if(isNil "dayz_maxGlobalZeds") then { - dayz_maxGlobalZeds = 1000; - }; - //Animals - dayz_currentGlobalAnimals = 0; - dayz_maxGlobalAnimals = 50; - //Plants - dayz_currentGlobalPlants = 0; - dayz_maxGlobalPlants = 500; - //Loot - r_player_divideinvehicle = 0; - dayz_currentWeaponHolders = 0; - dayz_maxMaxWeaponHolders = 80; - dayz_inVehicle = false; - dayz_unsaved = false; - dayz_scaleLight = 0; - dayz_onBack = ""; - dayz_fishingInprogress = false; - lastSpawned = diag_tickTime; - lastSepsis = 0; - NORRN_dropAction = -1; - dayz_dodge = false; - Dayz_constructionContext = []; - Dayz_freefall = [ time, 0, 0.1 ]; - dayz_getoutTime = 0; - dayz_hitByTime = 0; - skipGearSound = false; - TimeOutDisplayed = false; - playerHumanityCHK = 0; - voice_actions = ["voiceOverNet","PushToTalk","PushToTalkAll","PushToTalkCommand","PushToTalkDirect","PushToTalkGroup","PushToTalkSide","PushToTalkVehicle"]; - - // EPOCH ADDITIONS - s_player_lastTarget = objNull; - if (isNil "DZE_BackpackAntiTheft") then {DZE_BackpackAntiTheft = false;}; - if (isNil "DZE_requireplot") then {DZE_requireplot = 1;}; - if (isNil "DZE_StaticConstructionCount") then {DZE_StaticConstructionCount = 0;}; - if (toLower DZE_DeathMsgChat in ["global","side"]) then {enableRadio true;}; //Needed for scripted global chat to show, doesn't seem to have any adverse effects - dayz_autoRun = false; - DZE_AntiWallCounter = 0; - DZE_myHaloVehicle = objNull; - dayz_myLiftVehicle = objNull; - DZE_Friends = []; - DZE_Q = false; - DZE_Z = false; - DZE_Q_alt = false; - DZE_Z_alt = false; - DZE_Q_ctrl = false; - DZE_Z_ctrl = false; - DZE_4 = false; - DZE_5 = false; - DZE_6 = false; - DZE_F = false; - DZE_cancelBuilding = false; - DZE_TEMP_treedmg = 1; - DZE_Surrender = false; - DZE_Quarantine = false; - DZE_InRadiationZone = false; - DZE_myVehicle = objNull; - dayz_groupNameTags = (profileNamespace getVariable ["streamerMode",0] == 0); //If streamer mode is on then hide name tags at startup. Toggle with Windows key. - dayz_minusDownTime = 0; - dayz_lastCodeFail = 0; -}; +disableSerialization; + +/**************Variables Compiled on Both Client and Server**************/ + +Dayz_plants = ["Dayz_Plant1","Dayz_Plant2","Dayz_Plant3"]; +DayZ_SafeObjects = ["Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"]; +DayZ_GearedObjects = ["Car","Helicopter","Motorcycle","Ship","TentStorage_base","StashSmall_base","StashMedium_base","Plane","Tank","VaultStorage","LockboxStorage","TentStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ","Scaffolding_DZ","Generator_DZ"]; +dayz_typedBags = ["bloodTester","bloodBagANEG","bloodBagAPOS","bloodBagBNEG","bloodBagBPOS","bloodBagABNEG","bloodBagABPOS","bloodBagONEG","bloodBagOPOS","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]; +dayz_plant = ["pumpkin.p3d","p_helianthus.p3d","p_fiberplant_ep1.p3d"]; +dayz_trees = ["ind_timbers.p3d","t_picea2s_snow.p3d","b_corylus.p3d","t_quercus3s.p3d","t_larix3s.p3d","t_pyrus2s.p3d","str_briza_kriva.p3d","dd_borovice.p3d","les_singlestrom_b.p3d","les_singlestrom.p3d","smrk_velky.p3d","smrk_siroky.p3d","smrk_maly.p3d","les_buk.p3d","str krovisko vysoke.p3d","str_fikovnik_ker.p3d","str_fikovnik.p3d","str vrba.p3d","hrusen2.p3d","str dub jiny.p3d","str lipa.p3d","str briza.p3d","p_akat02s.p3d","jablon.p3d","p_buk.p3d","str_topol.p3d","str_topol2.p3d","p_osika.p3d","t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fagus2s.p3d","t_fagus2f.p3d","t_betula1f.p3d","t_betula2f.p3d","t_betula2s.p3d","t_betula2w.p3d","t_alnus2s.p3d","t_acer2s.p3d","t_populus3s.p3d","t_quercus2f.p3d","t_sorbus2s.p3d","t_malus1s.p3d","t_salix2s.p3d","t_picea1s_w.p3d","t_picea2s_w.p3d","t_ficusb2s_ep1.p3d","t_populusb2s_ep1.p3d","t_populusf2s_ep1.p3d","t_amygdalusc2s_ep1.p3d","t_pistacial2s_ep1.p3d","t_pinuse2s_ep1.p3d","t_pinuss3s_ep1.p3d","t_prunuss2s_ep1.p3d","t_pinusn2s.p3d","t_pinusn1s.p3d","t_pinuss2f.p3d","t_poplar2f_dead_pmc.p3d","misc_torzotree_pmc.p3d","misc_burnspruce_pmc.p3d","brg_cocunutpalm8.p3d","brg_umbrella_acacia01b.p3d","brg_jungle_tree_canopy_1.p3d","brg_jungle_tree_canopy_2.p3d","brg_cocunutpalm4.p3d","brg_cocunutpalm3.p3d","palm_01.p3d","palm_02.p3d","palm_03.p3d","palm_04.p3d","palm_09.p3d","palm_10.p3d","brg_cocunutpalm2.p3d","brg_jungle_tree_antiaris.p3d","brg_cocunutpalm1.p3d","str habr.p3d","brg_bird_1.p3d","brg_bird_2.p3d","brg_bird_3.p3d","brg_umbrella_acacia02b.p3d","brg_africandoumpalm_1.p3d","brg_umbrella_acacia04b.p3d","brg_datepalm_4.p3d","brg_datepalm_1.p3d","brg_umbrella_acacia03b.p3d","brg_bottle_4.p3d","brg_aloe1.p3d","brg_umbrella_acacia03.p3d","brg_umbrella_acacia01.p3d","brg_umbrella_acacia04.p3d","brg_aloe2.p3d","brg_umbrella_acacia02.p3d","brg_aloe3.p3d","brg_bottle_1.p3d","brg_datepalm_3.p3d","brg_datepalm_2.p3d","brg_baobab_1.p3d","brg_bottle_2.p3d","brg_bottle_3.p3d","t_fraxinus2s.p3d","t_carpinus2s.p3d"]; +dayZ_explosiveParts = ["palivo","motor"]; +dayz_traps_active = []; +dayz_traps_trigger = []; + +// Used by player_sumMedical, should contains all limbs described in USEC_woundPoint. These limbs statuses are saved by server_playerSync in HIVE if they are bleeding (medical select 8) +USEC_typeOfWounds = ["Pelvis","aimpoint","lelbow","relbow","RightFoot","LeftFoot","neck","pilot"]; + +// Player classes +AllPlayers = ["Survivor_DZ","Survivor1_DZ","SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWsequishaD_DZ","SurvivorWsequisha_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","Bandit2_DZ","BanditW2_DZ","Soldier_Crew_PMC","Rocket_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_CO_DZ","GUE_Soldier_2_DZ","TK_Special_Forces_MG_EP1_DZ","TK_Soldier_Sniper_EP1_DZ","TK_Commander_EP1_DZ","RU_Soldier_Crew_DZ","INS_Lopotev_DZ","INS_Soldier_AR_DZ","INS_Soldier_CO_DZ","INS_Bardak_DZ","INS_Worker2_DZ","USMC_Soldier_Officer_DZ","USMC_Soldier_MG_DZ","USMC_Soldier_Pilot_DZ","FR_TL_DZ","FR_R_DZ","FR_Marksman_DZ","FR_Assault_R_DZ","RU_Soldier_DZ","RU_Soldier_Officer_DZ","RUS_Soldier1_DZ","RUS_Commander_DZ","MVD_Soldier_DZ","Ins_Soldier_2_DZ","Ins_Commander_DZ","Ins_Soldier_Crew_DZ","CDF_Soldier_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","TK_INS_Soldier_AR_EP1_DZ","TK_GUE_Soldier_EP1_DZ","CZ_Soldier_SL_DES_EP1_DZ","US_Soldier_EP1_DZ","UN_CDF_Soldier_Guard_EP1_DZ","UN_CDF_Soldier_EP1_DZ","GER_Soldier_TL_EP1_DZ","BAF_Soldier_Officer_MTP_DZ","BAF_Soldier_N_MTP_DZ","FR_Sapper_DZ"]; + +// Epoch Additions +dayz_activeInvites = []; +DZE_DoorsLocked = ["Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ"]; +DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame","Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck","Land_ammo_supply_wreck"]; +DZE_LockedStorage = ["VaultStorageLocked","LockboxStorageLocked"]; +DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; + +if (isNil "dayz_POIs") then {dayz_POIs = true;}; //Enable POI's +if (isNil "dayz_ForcefullmoonNights") then {dayz_ForcefullmoonNights = false;}; // Forces night time to be full moon. +if (isNil "dayz_townGenerator") then {dayz_townGenerator = true;}; // Spawn map junk. Currently only compatible with Chernarus. Need to add coordinates for other maps. +if (isNil "dayz_townGeneratorBlackList") then {dayz_townGeneratorBlackList = [];}; // Town generator will not spawn junk within 150m of these positions. +if (isNil "infectedWaterHoles") then {infectedWaterHoles = [];}; //Needed for non-cherno maps. +if (isNil "DZE_GodModeBase") then {DZE_GodModeBase = false;}; // Disables damage handler from base objects so they can't be destroyed. +if (isNil "dayz_presets") then {dayz_presets = "Vanilla";}; //Replace server individual settings with ranked settings + +call { // Custom DayZ preset variables are also located in the mission init file. + if (dayz_presets == "Custom") exitWith { + if (isNil "dayz_enableGhosting") then {dayz_enableGhosting = false;}; + if (isNil "dayz_ghostTimer") then {dayz_ghostTimer = 120;}; + if (isNil "dayz_spawnselection") then {dayz_spawnselection = 0;}; + if (isNil "dayz_spawncarepkgs_clutterCutter") then {dayz_spawncarepkgs_clutterCutter = 0;}; + if (isNil "dayz_spawnCrashSite_clutterCutter") then {dayz_spawnCrashSite_clutterCutter = 0;}; + if (isNil "dayz_spawnInfectedSite_clutterCutter") then {dayz_spawnInfectedSite_clutterCutter = 0;}; + if (isNil "dayz_bleedingeffect") then {dayz_bleedingeffect = 2;}; + if (isNil "dayz_OpenTarget_TimerTicks") then {dayz_OpenTarget_TimerTicks = 60 * 10;}; + if (isNil "dayz_temperature_override") then {dayz_temperature_override = true;}; + if (isNil "dayz_nutritionValuesSystem") then {dayz_nutritionValuesSystem = false;}; + if (isNil "dayz_classicBloodBagSystem") then {dayz_classicBloodBagSystem = false;}; + if (isNil "dayz_enableFlies") then {dayz_enableFlies = true;}; + }; + if (dayz_presets == "Classic") exitWith { + dayz_enableGhosting = false; //Enable disable the ghosting system. + dayz_ghostTimer = 120; //Sets how long in seconds a player must be dissconnected before being able to login again. + 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_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. + dayz_nutritionValuesSystem = false; //Enables nutrition system + dayz_classicBloodBagSystem = true; //Enables one type of bloodbag + dayz_enableFlies = true; //Enables flies spawning on death + }; + if (dayz_presets == "Elite") exitWith { + dayz_enableGhosting = true; //Enable disable the ghosting system. + dayz_ghostTimer = 90; //Sets how long in seconds a player must be dissconnected before being able to login again. + 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_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. + dayz_nutritionValuesSystem = true; //Enables nutrition system + dayz_classicBloodBagSystem = false; //Enables one type of bloodbag + dayz_enableFlies = true; //Enables flies spawning on death + }; + // Default - Vanilla + dayz_enableGhosting = true; //Enable disable the ghosting system. + dayz_ghostTimer = 60; //Sets how long in seconds a player must be disconnected before being able to login again. + 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_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. + dayz_nutritionValuesSystem = true; //Enables nutrition system + dayz_classicBloodBagSystem = false; //Enables one type of bloodbag + dayz_enableFlies = true; //Enables flies spawning on death +}; + +respawn_west_original = getMarkerPos "respawn_west"; //Prevent problems caused by cheaters moving respawn_west marker with setMarkerPos or deleteMarker + +switch (toLower worldName) do { + case "napf"; + case "ruegen"; + case "sauerland" : {dayz_minpos = -1000; dayz_maxpos = 26000;}; + case "tavi" : {dayz_minpos = -26000; dayz_maxpos = 26000;}; + case "chernarus" : {dayz_minpos = -1; dayz_maxpos = 16000;}; + case default {dayz_minpos = -20000; dayz_maxpos = 20000;}; +}; + +/**************Variables Compiled on the Server Only**************/ + +if (isServer) then { + dayz_serverPUIDArray = []; + dayz_serverClientKeys = []; + dayz_traps = []; + dead_bodyCleanup = []; + needUpdate_objects = []; + needUpdate_FenceObjects = []; + dayz_choppedTrees = []; + dayz_ghostPlayers = []; + dayz_activePlayers = []; + dayz_died = []; + allowConnection = false; + dayz_serverObjectMonitor = []; + PlayerDeaths = []; + + //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"]; + DayZ_WoodenGates = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"]; + DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"]; + + // Epoch Additions + DZE_safeVehicle = ["ParachuteWest","ParachuteC"]; + if (isNil "EpochUseEvents") then {EpochUseEvents = false;}; + if (isNil "EpochEvents") then {EpochEvents = [];}; + if (isNil "MaxDynamicDebris") then {MaxDynamicDebris = 100;}; + if (isNil "MaxVehicleLimit") then {MaxVehicleLimit = 50;}; + if (isNil "spawnArea") then {spawnArea = 1400;}; + if (isNil "spawnShoremode") then {spawnShoremode = 1;}; +}; + +/**************Variables Compiled on Clients Only**************/ + +if (!isDedicated) then { + + // Rolling Msg system + Message_1 = ""; + Message_2 = ""; + Message_3 = ""; + Message_1_time = 0; + Message_2_time = 0; + Message_3_time = 0; + + // Kill Feed + death_1 = ""; + death_2 = ""; + death_3 = ""; + death_4 = ""; + death_1_time = 0; + death_2_time = 0; + death_3_time = 0; + death_4_time = 0; + + // Initialize Medical Variables + r_drag_sqf = false; + r_action = false; + r_action_unload = false; + r_player_handler = false; + r_player_unconsciousInProgress = false; + r_player_unconsciousInputDisabled = false; + r_player_dead = false; + r_player_unconscious = false; + r_player_infected = false; + + // Infection from hits + r_player_Sepsis = [false, 0]; + r_player_injured = false; + r_player_inpain = false; + r_player_loaded = false; + r_player_cardiac = false; + r_fracture_legs = false; + r_fracture_arms = false; + r_player_vehicle = player; + r_player_blood = 12000; + r_player_bloodregen = 0; + r_player_bloodgainpersec = 0; + r_player_bloodlosspersec = 0; + r_player_bloodpersec = 0; //Blood Per Sec (gain - loss) + r_player_foodstack = 1; + + // Player skill + r_player_lowblood = false; + r_player_timeout = 0; + r_player_bloodTotal = r_player_blood; + r_player_actions = []; + r_action_targets = []; + + // Blood test vars + r_A_watered = false; + r_B_watered = false; + r_D_watered = false; + r_control_watered = false; + r_canClick_resultsCard = false; + r_resultsCard_Clicked = false; + r_water_clicked = false; + r_needleclicked = 0; + r_needleReset = false; + r_control_done = false; + r_antiA_done = false; + r_antiB_done = false; + r_antiD_done = false; + + //Player self-action handles - this function gets called by player_humanityMorph + dayz_resetSelfActions = { + s_player_equip_carry = -1; + s_player_fire = -1; + s_player_cook = -1; + s_player_boil = -1; + s_player_packtent = -1; + s_player_packtentinfected = -1; + s_player_fillfuel = -1; + s_player_grabflare = -1; + s_player_removeflare = -1; + s_player_studybody = -1; + s_player_deleteBuild = -1; + s_player_flipveh = -1; + s_player_sleep = -1; + s_player_fillfuel210 = -1; + s_player_fillfuel20 = -1; + s_player_fillfuel5 = -1; + s_player_siphonfuel = -1; + s_player_repair_crtl = -1; + s_player_fishing = -1; + s_player_fishing_veh = -1; + s_player_gather = -1; + s_player_destroytent = -1; + s_player_attach_bomb = -1; + s_player_upgradestorage = -1; + s_player_Drinkfromhands = -1; + /*s_player_lockhouse = -1; //Vanilla base building currently not used in Epoch + s_player_unlockhouse = -1; + s_player_openGate = -1; + s_player_CloseGate = -1; + s_player_breakinhouse = -1; + s_player_setCode = -1; + s_player_BuildUnLock = -1; + s_player_BuildLock = -1;*/ + + // Epoch Additions + s_player_packvault = -1; + s_player_lockvault = -1; + s_player_unlockvault = -1; + s_player_attack = -1; + s_player_callzombies = -1; + s_player_showname = -1; + s_player_pzombiesattack = -1; + s_player_pzombiesvision = -1; + s_player_pzombiesfeed = -1; + s_player_tamedog = -1; + s_player_parts_crtl = -1; + s_player_movedog = -1; + s_player_speeddog = -1; + s_player_calldog = -1; + s_player_feeddog = -1; + s_player_waterdog = -1; + s_player_staydog = -1; + s_player_trackdog = -1; + s_player_barkdog = -1; + s_player_warndog = -1; + s_player_followdog = -1; + s_player_information = -1; + s_player_fuelauto = -1; + s_player_fuelauto2 = -1; + s_player_fillgen = -1; + s_player_upgrade_build = -1; + s_player_maint_build = -1; + s_player_downgrade_build = -1; + s_player_towing = -1; + s_halo_action = -1; + s_player_SurrenderedGear = -1; + s_player_maintain_area = -1; + s_player_maintain_area_force = -1; + s_player_maintain_area_preview = -1; + s_player_heli_lift = -1; + s_player_heli_detach = -1; + s_player_lockUnlock_crtl = -1; + s_player_lockUnlockInside_ctrl = -1; + s_player_toggleSnap = -1; + s_player_toggleSnapSelect = -1; + snapActions = -1; + s_player_plot_boundary = -1; + s_player_plotManagement = -1; + s_player_toggleDegree = -1; + degreeActions = -1; + s_player_toggleVector = -1; + vectorActions = -1; + s_player_manageDoor = -1; + }; + call dayz_resetSelfActions; + + // These self action variables only need to be set once + s_player_toggleSnapSelectPoint = []; + s_player_toggleDegrees=[]; + s_player_toggleVectors=[]; + s_player_combi = []; + s_player_lockunlock = []; + s_player_lockUnlockInside = []; + s_player_parts = []; + s_player_repairActions = []; + + //actions blockers + a_player_cooking = false; + a_player_boil = false; + + // General Variables + OpenTarget_Time = 0; + dayz_actionInProgress = false; + dayz_DisplayGenderSelect = true; + carryClick = false; + gear_done = false; + force_dropBody = false; + r_interrupt = false; + r_doLoop = false; + r_pitchWhine = false; + dayz_authKey = ""; + DZE_LastPingResp = diag_tickTime; + dayz_humanitytarget = ""; + dayz_selectedVault = objNull; + dayz_selectedDoor = objNull; + DZE_Lock_Door = ""; + DZE_GearCheckBypass = false; + isInTraderCity = false; + inTraderCity = "Unknown Trader"; + canPickup = false; + pickupInit = false; + mouseOverCarry = false; //for carry slot since determining mouse pos doesn't work right + dayz_currentGlobalAnimals = 0; + r_player_divideinvehicle = 0; + dayz_currentWeaponHolders = 0; + dayz_unsaved = false; + dayz_scaleLight = 0; + dayz_onBack = ""; + dayz_fishingInprogress = false; + NORRN_dropAction = -1; + dayz_dodge = false; + Dayz_constructionContext = []; + Dayz_freefall = [ time, 0, 0.1 ]; + dayz_getoutTime = 0; + dayz_hitByTime = 0; + skipGearSound = false; + TimeOutDisplayed = false; + playerHumanityCHK = 0; + helperDetach = false; + + // Arrays + voice_actions = ["voiceOverNet","PushToTalk","PushToTalkAll","PushToTalkCommand","PushToTalkDirect","PushToTalkGroup","PushToTalkSide","PushToTalkVehicle"]; + Dayz_meatraw = ["FoodBeefRaw","FoodMuttonRaw","FoodChickenRaw","FoodRabbitRaw","FoodBaconRaw","FoodGoatRaw","FoodDogRaw","FishRawTrout","FishRawSeaBass","FishRawTuna"]; + Dayz_meatcooked = ["FoodBeefCooked","FoodMuttonCooked","FoodChickenCooked","FoodRabbitCooked","FoodBaconCooked","FoodGoatCooked","FoodDogCooked","FishCookedTrout","FishCookedSeaBass","FishCookedTuna"]; + boil_tin_cans = ["TrashTinCan","FoodCanGriffEmpty","FoodCanBadguyEmpty","FoodCanBoneboyEmpty","FoodCanCornEmpty","FoodCanCurgonEmpty","FoodCanDemonEmpty","FoodCanFraggleosEmpty","FoodCanHerpyEmpty","FoodCanDerpyEmpty","FoodCanOrlokEmpty","FoodCanPowellEmpty","FoodCanTylersEmpty","FoodCanUnlabeledEmpty","FoodCanRusUnlabeledEmpty","FoodCanRusStewEmpty","FoodCanRusPorkEmpty","FoodCanRusPeasEmpty","FoodCanRusMilkEmpty","FoodCanRusCornEmpty","ItemSodaEmpty","ItemSodaClaysEmpty","ItemSodaDrwasteEmpty","ItemSodaFrankaEmpty","ItemSodaGrapeDrinkEmpty","ItemSodaLemonadeEmpty","ItemSodaLirikEmpty","ItemSodaLvgEmpty","ItemSodaMtngreenEmpty","ItemSodaMzlyEmpty","ItemSodaPeppsyEmpty","ItemSodaR4z0rEmpty","ItemSodaRabbitEmpty","ItemSodaRocketFuelEmpty","ItemSodaSacriteEmpty","ItemSodaSherbetEmpty","ItemSodaSmashtEmpty","FoodCanPotatoesEmpty","FoodCanBeefEmpty"]; + MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails","MeleeFishingPole","MeleeSledge"]; + MeleeMagazines = ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing"]; + MeleeAmmo = ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo","Bat_Swing_Ammo","BatBarbed_Swing_Ammo","BatNailed_Swing_Ammo","Fishing_Swing_Ammo","Sledge_Swing_Ammo","Chainsaw_Swing_Ammo"]; + Dayz_Gutting = ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1","ItemKnifeBlunt"]; + DayZ_Ignitors = ["ItemMatchbox","Item5Matchbox","Item4Matchbox","Item3Matchbox","Item2Matchbox","Item1Matchbox"]; + dayz_disallowedVault = ["TentStorage","BuiltItems","ModularItems","DZE_Base_Object","Generator_DZ"]; + dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_smd_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"]; + DayZ_fuelCans = ["ItemJerrycan","ItemFuelcan","ItemFuelBarrel"]; + DayZ_fuelCansEmpty = ["ItemJerrycanEmpty","ItemFuelcanEmpty","ItemFuelBarrelEmpty"]; + DayZ_fuelSources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","Land_smd_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"]; + dayz_plantOutput = ["FoodPumpkin","FoodSunFlowerSeed","ItemKiloHemp"]; + dayz_plantTypes = ["","MAP_pumpkin","MAP_p_Helianthus","fiberplant"]; + DZE_LockableStorage = ["VaultStorage","VaultStorageLocked","LockboxStorageLocked","LockboxStorage"]; + DZE_UnLockedStorage = ["VaultStorage","LockboxStorage"]; + DZE_REPLACE_WEAPONS = [["Crossbow","DMR","M14_EP1","SVD","SVD_CAMO"],["Crossbow_DZ","DMR_DZ","M14_CCO_DZ","SVD_DZ","SVD_Gh_DZ"]]; + DZE_replaceMagazines = [["vil_20Rnd_762x51_G3"],["vil_20Rnd_762x51_G3"]]; + DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Generator_DZ","DZ_buildables","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ","M240Nest_DZ"]; + DZE_fueltruckarray = ["KamazRefuel_DZ","UralRefuel_TK_EP1_DZ","MtvrRefuel_DES_EP1_DZ","V3S_Refuel_TK_GUE_EP1_DZ","MtvrRefuel_DZ","KamazRefuel_DZE1","KamazRefuel_DZE2","KamazRefuel_DZE3","KamazRefuel_DZE4"]; + DZE_HeliAllowToTow = ["hilux1_civil_1_open","HMMWV_Base","Lada_base","Offroad_DSHKM_base","Pickup_PK_base","SkodaBase","tractor","VWGolf","Volha_TK_CIV_Base_EP1","S1203_TK_CIV_EP1","SUV_Base_EP1","ArmoredSUV_Base_PMC","UAZ_Base","LandRover_Base","Ship"]; + DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"]; + DZE_isDestroyableStorage = ["OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"]; + DZE_tradeVehicle = ["trade_any_vehicle","trade_any_vehicle_free","trade_any_vehicle_old","trade_any_bicycle","trade_any_bicycle_old","trade_any_boat","trade_any_boat_old"]; + DZE_tradeVehicleKeyless = ["trade_any_bicycle","trade_any_bicycle_old","trade_any_vehicle_free"]; + DZE_tradeObject = DZE_tradeVehicle + ["trade_backpacks"]; + //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"]; + DayZ_DropDrageeObjects = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","StickFence_DZ","SandNest_DZ","MetalPanel_DZ","WorkBench_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","WoodFloorHalf_DZ","WoodFloor_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","MetalFloor_DZ","WoodRamp_DZ"]; + Dayz_fishingItems = ["MeleeFishingPole"]; + dayz_playerAchievements = []; //[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + snapGizmos = []; // may not need this + snapGizmosNearby = []; // may not need this + dayz_buildingBubbleMonitor = []; + + //temperature variables + dayz_temperatur = 36; //TeeChange + dayz_temperaturnormal = 36; //TeeChange + dayz_temperaturmax = 42; //TeeChange + dayz_temperaturmin = 27; //TeeChange + + //player special variables + dayz_bloodBagHumanity = 300; + dayz_HarvestingChance = [0.09]; + dayz_lastCheckBit = 0; + dayz_lastDamageSourceNull = false; + dayz_lastDamageSource = "none"; + dayz_lastDamageTime = 0; + dayz_lastMedicalSource = "none"; + dayz_lastMedicalTime = 0; + dayz_lastClothesChange = 0; + dayZ_lastPlayerUpdate = 0; + dayz_lastSelfTransfusion = -(DZE_selfTransfuse_Values select 2); + dayz_lastTransfusion = 0; + dayz_playerName = "unknown"; + dayz_hunger = 0; + dayz_thirst = 0; + dayz_nutrition = 0; + dayz_preloadFinished = true; + dayz_soundMuted = false; + dayz_disAudial = 0; + dayz_disVisual = 0; + dayz_firedCooldown = 0; + dayz_damageCounter = time; + dayz_lastSave = diag_tickTime; + dayz_isSwimming = true; + dayz_currentDay = 0; + dayz_hasLight = false; + dayz_surfaceNoise = 0; + dayz_surfaceType = "None"; + deathHandled = false; + dayz_firstGroup = group player; + dayz_originalPlayer = player; + dayz_sourceBleeding = objNull; + dayz_clientPreload = false; + dayz_authed = false; + dayz_panicCooldown = 0; + dayz_areaAffect = 3.5; + dayz_monitorPeriod = 0.6; // number of seconds between each player_zombieCheck calls + dayz_heartBeat = false; + dayz_spawnZombies = 0; // Current local + dayz_swarmSpawnZombies = 0; + dayz_CurrentNearByZombies = 0; + dayz_currentGlobalZombies = 0; // Current total + + if(isNil "dayz_maxGlobalZeds") then { + dayz_maxGlobalZeds = 1000; // Maximum allowed zeds on the map + }; + if(isNil "dayz_quickSwitch") then { + dayz_quickSwitch = false; //Enable quick weapon switch, + }; + if (isNil "dayz_paraSpawn") then { + dayz_paraSpawn = false; // Helo jump spawn + }; + if (isNil "DZE_BuildOnRoads") then { + DZE_BuildOnRoads = false; // Allow building on roads + }; + if (isNil "DZE_SelfTransfuse") then { + DZE_SelfTransfuse = false; // Allow players to give themselves blood transfusions + }; + if (isNil "DZE_selfTransfuse_Values") then { + DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] + }; + if (isNil "DZE_PlotPole") then { + DZE_PlotPole = [30,45]; // Plot radius, minimum distance between plots + }; + if (isNil "DZE_BuildingLimit") then { + DZE_BuildingLimit = 150; // Maximum allowed objects per plot + }; + if(isNil "dayz_DamageMultiplier") then { + dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks + }; + if(isNil "dayz_infectiouswaterholes") then { + dayz_infectiouswaterholes = true; //Enable infected waterholes + }; + if(isNil "dayz_randomMaxFuelAmount") then { + dayz_randomMaxFuelAmount = 500; //Puts a random amount of fuel in all fuel stations. + }; + if (isNil "DZE_BackpackAntiTheft") then { + DZE_BackpackAntiTheft = false; // Prevents accessing backpack gear of non-friendly players in trader cities + }; + if (isNil "DZE_requireplot") then { + DZE_requireplot = 1; // Players require a plot to build + }; + if (isNil "DZE_StaticConstructionCount") then { + DZE_StaticConstructionCount = 0; // Number of animations required for building an object. Leaving set at zero will default to the construction count in the configs for each object. + }; + + DZE_maintainRange = ((DZE_PlotPole select 0)+20); // Default: maintain building objects within plot radius + 20 meters. + dayz_maxGlobalAnimals = 50; // Maximum number of animals allowed on the map simultaneously. + dayz_maxGlobalPlants = 500; // Maximum number of plants to be spawned on the map. + dayz_maxMaxWeaponHolders = 80; // Maximum number of loot piles that can spawn within 200 meters of a player. + dayz_maxLocalZombies = 15; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z + dayz_maxNearByZombies = 30; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z + dayz_maxAnimals = 5; // Used to calculate the max number of animals to spawn per player. + dayz_animalDistance = 600; // Used to calculate the distance from players that animals should spawn and be deleted. + + // Epoch Additions + dayz_combination = ""; + keypadCancel = false; //Brute force fix + keyPadReset = {uiSleep 2; keypadCancel = false;}; + canbuild = true; + DZE_HeliAllowTowFrom = ["CH_47F_EP1_DZE","CH_47F_EP1_DZ","CH_47F_BAF","CH_47F_EP1","BAF_Merlin_DZE","CH53_DZE"]; + DZE_itemKeys = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; + DZE_keyColors = ["Green","Red","Blue","Yellow","Black"]; + s_player_lastTarget = objNull; + if (toLower DZE_DeathMsgChat in ["global","side"]) then {enableRadio true;}; //Needed for scripted global chat to show, doesn't seem to have any adverse effects + dayz_autoRun = false; + DZE_AntiWallCounter = 0; + DZE_myHaloVehicle = objNull; + dayz_myLiftVehicle = objNull; + DZE_Friends = []; + DZE_Q = false; + DZE_Z = false; + DZE_Q_alt = false; + DZE_Z_alt = false; + DZE_Q_ctrl = false; + DZE_Z_ctrl = false; + DZE_4 = false; + DZE_5 = false; + DZE_6 = false; + DZE_F = false; + DZE_cancelBuilding = false; + DZE_TEMP_treedmg = 1; + DZE_Surrender = false; + DZE_InRadiationZone = false; + DZE_myVehicle = objNull; + dayz_groupNameTags = (profileNamespace getVariable ["streamerMode",0] == 0); //If streamer mode is on then hide name tags at startup. Toggle with Windows key. + dayz_minusDownTime = 0; + dayz_lastCodeFail = 0; + dayz_lastHumanityChange = diag_tickTime; + dayz_canDelete = 350; // Z, further than this distance from its "owner", will be deleted + + // Survival Variables + SleepFood = 2160; //minutes (48 hours) + SleepWater = 1440; //minutes (24 hours) + SleepTemperatur = 90 / 100; //First value = Minutes until player reaches the coldest point at night (without other effects! night factor expected to be -1) //TeeChange + + // GUI + Dayz_GUI_R = 0.38; // 0.7 .38 + Dayz_GUI_G = 0.63; // -0.63 + Dayz_GUI_B = 0.26; // -0.26 + + // Heatpack + r_player_warming_heatpack = [false, 0]; + 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; + + // Ammo Routine + r_player_actions2 = []; + r_action2 = false; + r_player_lastVehicle = objNull; + r_player_lastSeat = []; + r_player_removeActions2 = { + if (!isNull r_player_lastVehicle) then { + { + r_player_lastVehicle removeAction _x; + } count r_player_actions2; + r_player_actions2 = []; + r_action2 = false; + }; + }; + + USEC_woundHit = ["","body","hands","legs","head_hit"]; // limbs hit given by arma engine when fnc_usec_damageHandler is called + DAYZ_woundHit = [["body","hands","legs","head_hit"],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]]; + DAYZ_woundHit_ok = [["body","hands","legs"],[0,0,0,0,0,1,1,1,2,2]]; + USEC_MinorWounds = ["hands","legs"]; + USEC_woundPoint = [ // translation table USEC_woundHit -> SV suffixes + ["Pelvis","aimpoint"], + ["aimpoint"], //,"RightShoulder","LeftShoulder" + ["lelbow","relbow"], + ["RightFoot","LeftFoot"], + ["neck","pilot"] + ]; + + DZE_Quarantine = false; // used in player_spawn_2.sqf, but for no reason. There is no function that alters this variable. +}; \ No newline at end of file From 12bb378ea528fd3aa0de217b82c5c99d61e488aa Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 10:01:46 +0100 Subject: [PATCH 54/60] Streamline water bottle strings by @seelenapparat Water bottles are sorted by the object model in the gear now. Remove old canteen configs since it is in under pet waterbottle now. --- .../CfgMagazines/DZE/PlasticWaterbottle.hpp | 99 ++++--- .../Configs/CfgMagazines/Items/Canteen.hpp | 21 -- .../Configs/CfgMagazines/Items/Items.hpp | 1 - SQF/dayz_code/stringtable.xml | 280 ++++++++++++++---- 4 files changed, 269 insertions(+), 132 deletions(-) delete mode 100644 SQF/dayz_code/Configs/CfgMagazines/Items/Canteen.hpp diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp index 429b3133d..73a4cadcb 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp @@ -6,8 +6,8 @@ class ItemPlasticWaterbottleUnfilled : CA_Magazine 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; + displayName = $STR_EQUIP_NAME_WBPET_01; + descriptionShort = $STR_EQUIP_DESC_WBPET_01; containerWater = "ItemPlasticWaterbottle"; containerWaterSafe = "ItemPlasticWaterbottleSafe"; @@ -30,9 +30,9 @@ class ItemPlasticWaterbottleDmg : CA_Magazine 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; + picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottleDamaged.paa"; + displayName = $STR_EQUIP_NAME_WBPET_02; + descriptionShort = $STR_EQUIP_DESC_WBPET_02; class ItemActions { @@ -48,7 +48,8 @@ class ItemPlasticWaterBottle : ItemWaterBottle { scope = public; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; - + displayName = $STR_EQUIP_NAME_WBPET_03; + descriptionShort = $STR_EQUIP_DESC_WBPET_03; Nutrition[] = {0,0,1000,0}; infectionChance = 0.3; @@ -61,7 +62,8 @@ class ItemPlasticWaterBottleInfected : ItemWaterBottle model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; infectionChance = 1; - + displayName = $STR_EQUIP_NAME_WBPET_03; + descriptionShort = $STR_EQUIP_DESC_WBPET_03; consumeOutput = "ItemPlasticWaterbottleUnfilled"; containerEmpty = "ItemPlasticWaterbottleUnfilled"; }; @@ -71,7 +73,8 @@ class ItemPlasticWaterBottleSafe : ItemWaterBottle model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle10oz.paa"; infectionChance = 0; - + displayName = $STR_EQUIP_NAME_WBPET_03; + descriptionShort = $STR_EQUIP_DESC_WBPET_03; consumeOutput = "ItemPlasticWaterbottleUnfilled"; containerEmpty = "ItemPlasticWaterbottleUnfilled"; }; @@ -80,8 +83,8 @@ 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; + displayName = $STR_EQUIP_NAME_WBPET_04; + descriptionShort = $STR_EQUIP_DESC_WBPET_04; infectionChance = 0; consumeOutput = "ItemPlasticWaterbottleUnfilled"; @@ -92,8 +95,8 @@ 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; + displayName = $STR_EQUIP_NAME_WBPET_05; + descriptionShort = $STR_EQUIP_DESC_WBPET_05; infectionChance = -0.5; consumeOutput = "ItemPlasticWaterbottleUnfilled"; @@ -101,8 +104,8 @@ class ItemPlasticWaterBottleHerbal : ItemWaterBottle }; class ItemPlasticWaterbottle1oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE1OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE1OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE1OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE1OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle1oz.paa"; wateroz = 1; @@ -131,8 +134,8 @@ class ItemPlasticWaterbottle1oz : ItemWaterBottle { }; }; class ItemPlasticWaterbottle2oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE2OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE2OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE2OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE2OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle2oz.paa"; wateroz = 2; @@ -162,8 +165,8 @@ class ItemPlasticWaterbottle2oz : ItemWaterBottle { }; class ItemPlasticWaterbottle3oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE3OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE3OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE3OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE3OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle3oz.paa"; wateroz = 3; @@ -193,8 +196,8 @@ class ItemPlasticWaterbottle3oz : ItemWaterBottle { }; class ItemPlasticWaterbottle4oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE4OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE4OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE4OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE4OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle4oz.paa"; wateroz = 4; @@ -224,8 +227,8 @@ class ItemPlasticWaterbottle4oz : ItemWaterBottle { }; class ItemPlasticWaterbottle5oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE5OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE5OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE5OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE5OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle5oz.paa"; wateroz = 5; @@ -255,8 +258,8 @@ class ItemPlasticWaterbottle5oz : ItemWaterBottle { }; class ItemPlasticWaterbottle6oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE6OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE6OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE6OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE6OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle6oz.paa"; wateroz = 6; @@ -286,8 +289,8 @@ class ItemPlasticWaterbottle6oz : ItemWaterBottle { }; class ItemPlasticWaterbottle7oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE7OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE7OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE7OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE7OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle7oz.paa"; wateroz = 7; @@ -316,8 +319,8 @@ class ItemPlasticWaterbottle7oz : ItemWaterBottle { }; }; class ItemPlasticWaterbottle8oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE8OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE8OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE8OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE8OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle8oz.paa"; wateroz = 8; @@ -347,8 +350,8 @@ class ItemPlasticWaterbottle8oz : ItemWaterBottle { }; class ItemPlasticWaterbottle9oz : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE9OZ; - descriptionShort = $STR_EPOCH_WATERBOTTLE9OZ_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE9OZ; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE9OZ_DESC; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle9oz.paa"; wateroz = 9; @@ -378,8 +381,8 @@ class ItemPlasticWaterbottle9oz : ItemWaterBottle { }; //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; + displayName = $STR_EPOCH_PET_WATERBOTTLE1OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE1OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle1oz.paa"; @@ -408,8 +411,8 @@ class ItemPlasticWaterbottle1ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle2ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE2OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE2OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE2OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE2OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle2oz.paa"; @@ -438,8 +441,8 @@ class ItemPlasticWaterbottle2ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle3ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE3OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE3OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE3OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE3OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle3oz.paa"; @@ -468,8 +471,8 @@ class ItemPlasticWaterbottle3ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle4ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE4OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE4OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE4OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE4OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle4oz.paa"; @@ -498,8 +501,8 @@ class ItemPlasticWaterbottle4ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle5ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE5OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE5OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE5OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE5OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle5oz.paa"; @@ -528,8 +531,8 @@ class ItemPlasticWaterbottle5ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle6ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE6OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE6OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE6OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE6OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle6oz.paa"; @@ -558,8 +561,8 @@ class ItemPlasticWaterbottle6ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle7ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE7OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE7OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE7OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE7OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle7oz.paa"; @@ -588,8 +591,8 @@ class ItemPlasticWaterbottle7ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle8ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE8OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE8OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE8OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE8OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle8oz.paa"; @@ -618,8 +621,8 @@ class ItemPlasticWaterbottle8ozBoiled : ItemWaterBottle { }; }; class ItemPlasticWaterbottle9ozBoiled : ItemWaterBottle { - displayName = $STR_EPOCH_WATERBOTTLE9OZBOILED; - descriptionShort = $STR_EPOCH_WATERBOTTLE9OZBOILED_DESC; + displayName = $STR_EPOCH_PET_WATERBOTTLE9OZBOILED; + descriptionShort = $STR_EPOCH_PET_WATERBOTTLE9OZBOILED_DESC; infectionChance = 0; model = "z\addons\dayz_communityassets\models\waterbottle.p3d"; picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottle9oz.paa"; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Canteen.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Canteen.hpp deleted file mode 100644 index 0fd7a474f..000000000 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Canteen.hpp +++ /dev/null @@ -1,21 +0,0 @@ -class ItemCanteenEmpty : CA_Magazine -{ - scope = public; - count = 1; - type = WeaponSlotItem; - - model = "\dayz_equip\models\waterbottle_gear.p3d"; - picture = "\dayz_equip\textures\equip_waterbottle_empty_ca.paa"; - displayName = $STR_ITEM_CANTEEN_EMPTY_NAME; - descriptionShort = $STR_ITEM_CANTEEN_DESC; - - //TODO - /*class ItemActions - { - class Fill - { - text = $STR_ACTIONS_FILL_W; - script = "spawn player_fillWater;"; - }; - };*/ -}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Items.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Items.hpp index 334a24854..2d1a165f7 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Items.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Items.hpp @@ -23,5 +23,4 @@ #include "equip_brick.hpp" #include "equip_lever.hpp" #include "WaterBottle.hpp" -//#include "Canteen.hpp" #include "Explosives.hpp" \ No newline at end of file diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index dd65b4996..fb52251f9 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -3537,7 +3537,7 @@ A bottle of water that has been filled and can be consumed. - Eine Flasche, gefüllt mit Trinkwasser. + Eine Flasche gefüllt mit Trinkwasser. Наполненная водой пластиковая бутылка. Вода сомнительного качества. Una botella de agua llena que puede consumirse. Bouteille (pleine) @@ -3545,7 +3545,7 @@ Water Bottle (Empty) - Leere Wasserflasche + Wasserflasche (Leer) Бутылка (пустая) Cantimplora (Vacía) Bouteille (vide) @@ -3557,7 +3557,7 @@ Ausleeren - A bottle of water that is Empty. It might be useful to fill it with water again. + A bottle of water that is empty. It might be useful to fill it with water again. Eine leere Wasserflasche. Sie könnte nützlich sein, um sie wieder mit Wasser zu füllen. Пустая бутылка, которую можно наполнить водой. Una botella de agua vacía. Puede ser útil si se la llena con agua de nuevo. @@ -5027,39 +5027,9 @@ Un Bar cuit (valeur:1400). Ein gebratener Wolfsbarsch, welcher reich an Eiweiß und Omega-3-Fettsäuren ist. - - Canteen - Котелок - Feldflasche - - - A sturdy military canteen used to hold liquids for consumption. - Армейский котелок для хранения жидкостей и еды. - Eine stabile Feldflasche, um Wasser zu transportieren. - - - Empty - Пустой - Ausleeren - - - Canteen (empty) - Котелок (Пустой) - Feldflasche (leer) - - - Canteen (boiled) - Котелок (Прокипяченый) - Feldflasche (abgekocht) - - - Canteen (herbal drink) - Котелок (Травяной напиток) - Feldflasche (Kräutertrunk) - Water Bottle (Boiled) - Wasserflasche (abgekocht) + Wasserflasche (Abgekocht) Бутылка (чистая вода) Cantimplora con Agua Hervida Bouteille (Eau bouillie) @@ -5075,7 +5045,7 @@ Water Bottle (Broken) - Wasserflasche (undicht) + Wasserflasche (Undicht) Бутылка (испорчена) Láhev na vodu (děravá) @@ -14996,92 +14966,92 @@ Water Bottle (Boiled 1oz) - Wasserflasche (abgekocht 100ml) + Wasserflasche (Abgek. 100ml) Бутылка (чистая вода 1 унция) - Water Bottle with 1oz of water (Boiled). - Wasserflasche mit 100ml Wasser (abgekocht). + Water Bottle with 1oz of boiled water. + Wasserflasche mit 100ml abgekochtem Wasser. Бутылка с 1 унцией чистой кипяченой воды. Water Bottle (Boiled 2oz) - Wasserflasche (abgekocht 200ml) + Wasserflasche (Abgek. 200ml) Бутылка (чистая вода 2 унции) - Water Bottle with 2oz of water (Boiled). - Wasserflasche mit 200ml Wasser (abgekocht). + Water Bottle with 2oz of boiled water. + Wasserflasche mit 200ml abgekochtem Wasser. Бутылка с 2 унциями чистой кипяченой воды. Water Bottle (Boiled 3oz) - Wasserflasche (abgekocht 300ml) + Wasserflasche (Abgek. 300ml) Бутылка (чистая вода 3 унции) - Water Bottle with 3oz of water (Boiled). - Wasserflasche mit 300ml Wasser (abgekocht). + Water Bottle with 3oz of boiled water. + Wasserflasche mit 300ml abgekochtem Wasser. Бутылка с 3 унциями чистой кипяченой воды. Water Bottle (Boiled 4oz) - Wasserflasche (abgekocht 400ml) + Wasserflasche (Abgek. 400ml) Бутылка (чистая вода 4 унции) - Water Bottle with 4oz of water (Boiled). - Wasserflasche mit 400ml Wasser (abgekocht). + Water Bottle with 4oz of boiled water. + Wasserflasche mit 400ml abgekochtem Wasser. Бутылка с 4 унциями чистой кипяченой воды. Water Bottle (Boiled 5oz) - Wasserflasche (abgekocht 500ml) + Wasserflasche (Abgek. 500ml) Бутылка (чистая вода 5 унций) - Water Bottle with 5oz of water (Boiled). - Wasserflasche mit 500ml Wasser (abgekocht). + Water Bottle with 5oz of boiled water. + Wasserflasche mit 500ml abgekochtem Wasser. Бутылка с 5 унциями чистой кипяченой воды. Water Bottle (Boiled 6oz) - Wasserflasche (abgekocht 600ml) + Wasserflasche (Abgek. 600ml) Бутылка (чистая вода 6 унций) - Water Bottle with 6oz of water (Boiled). - Wasserflasche mit 600ml Wasser (abgekocht). + Water Bottle with 6oz of boiled water. + Wasserflasche mit 600ml abgekochtem Wasser. Бутылка с 6 унциями чистой кипяченой воды. Water Bottle (Boiled 7oz) - Wasserflasche (abgekocht 700ml) + Wasserflasche (Abgek. 700ml) Бутылка (чистая вода 7 унций) - Water Bottle with 7oz of water (Boiled). - Wasserflasche mit 700ml Wasser (abgekocht). + Water Bottle with 7oz of boiled water. + Wasserflasche mit 700ml abgekochtem Wasser. Бутылка с 7 унциями чистой кипяченой воды. Water Bottle (Boiled 8oz) - Wasserflasche (abgekocht 800ml) + Wasserflasche (Abgek. 800ml) Бутылка (чистая вода 8 унций) - Water Bottle with 8oz of water (Boiled). - Wasserflasche mit 800ml Wasser (abgekocht). + Water Bottle with 8oz of boiled water. + Wasserflasche mit 800ml abgekochtem Wasser. Бутылка с 8 унциями чистой кипяченой воды. Water Bottle (Boiled 9oz) - Wasserflasche (abgekocht 900ml) + Wasserflasche (Abgek. 900ml) Бутылка (чистая вода 9 унций) - Water Bottle with 9oz of water (Boiled). - Wasserflasche mit 900ml Wasser (abgekocht). + Water Bottle with 9oz of boiled water. + Wasserflasche mit 900ml abgekochtem Wasser. Бутылка с 9 унциями чистой кипяченой воды. @@ -17357,6 +17327,192 @@ АК-107 ГП-25 ПСО-1 + + + Water Bottle PET (Empty) + Wasserflasche PET (Leer) + + + A PET bottle of water that is empty. It might be useful to fill it with water again. + Eine leere Plastik-Wasserflasche. Sie könnte nützlich sein, um sie wieder mit Wasser zu füllen. + + + Water Bottle PET (Broken) + Wasserflasche PET (Undicht) + + + Broken PET Water Bottle that might be repairable. + Eine undichte Plastik-Wasserflasche, die repariert werden kann. + + + Water Bottle PET + Wasserflasche PET + + + A PET bottle of water that has been filled and can be consumed. + Eine Plastik-Wasserflasche, gefüllt mit nicht abgekochtem Wasser. + + + Water Bottle PET (Boiled) + Wasserflasche PET (Abgekocht) + + + A PET bottle of boiled water that has been filled and can be consumed. + Eine Plastik-Wasserflasche gefüllt mit abgekochtem Wasser. + + + Herbal Drink (PET) + Kräutertrunk (PET) + + + A drink mixed with herbs that may help heal infection. + Ein Getränk aus Kräutern, welches bei Infektionen helfen könnte. + + + Water Bottle PET (1oz) + Wasserflasche PET (100ml) + + + Water Bottle PET with 1oz of water. + Wasserflasche PET mit 100ml Wasser. + + + Water Bottle PET (2oz) + Wasserflasche PET (200ml) + + + Water Bottle PET with 2oz of water. + Wasserflasche PET mit 200ml Wasser. + + + Water Bottle PET (3oz) + Wasserflasche PET (300ml) + + + Water Bottle PET with 3oz of water. + Wasserflasche PET mit 300ml Wasser. + + + Water Bottle PET (4oz) + Wasserflasche PET (400ml) + + + Water Bottle PET with 4oz of water. + Wasserflasche PET mit 400ml Wasser. + + + Water Bottle PET (5oz) + Wasserflasche PET (500ml) + + + Water Bottle PET with 5oz of water. + Wasserflasche PET mit 500ml Wasser. + + + Water Bottle PET (6oz) + Wasserflasche PET (600ml) + + + Water Bottle PET with 6oz of water. + Wasserflasche PET mit 600ml Wasser. + + + Water Bottle PET (7oz) + Wasserflasche PET (700ml) + + + Water Bottle PET with 7oz of water. + Wasserflasche PET mit 700ml Wasser. + + + Water Bottle PET (8oz) + Wasserflasche PET (800ml) + + + Water Bottle PET with 8oz of water. + Wasserflasche PET mit 800ml Wasser. + + + Water Bottle PET (9oz) + Wasserflasche PET (900ml) + + + Water Bottle PET with 9oz of water. + Wasserflasche PET mit 900ml Wasser. + + + Water Bottle PET (Boiled 1oz) + Wasserflasche PET (Abgek. 100ml) + + + Water Bottle PET with 1oz of boiled water. + Wasserflasche PET mit 100ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 2oz) + Wasserflasche PET (Abgek. 200ml) + + + Water Bottle PET with 2oz of boiled water. + Wasserflasche PET mit 200ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 3oz) + Wasserflasche PET (Abgek. 300ml) + + + Water Bottle PET with 3oz of boiled water. + Wasserflasche PET mit 300ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 4oz) + Wasserflasche PET (Abgek. 400ml) + + + Water Bottle PET with 4oz of boiled water. + Wasserflasche PET mit 400ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 5oz) + Wasserflasche PET (Abgek. 500ml) + + + Water Bottle PET with 5oz of boiled water. + Wasserflasche PET mit 500ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 6oz) + Wasserflasche PET (Abgek. 600ml) + + + Water Bottle PET with 6oz of boiled water. + Wasserflasche PET mit 600ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 7oz) + Wasserflasche PET (Abgek. 700ml) + + + Water Bottle PET with 7oz of boiled water. + Wasserflasche PET mit 700ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 8oz) + Wasserflasche PET (Abgek. 800ml) + + + Water Bottle PET with 8oz of boiled water. + Wasserflasche PET mit 800ml abgekochtem Wasser. + + + Water Bottle PET (Boiled 9oz) + Wasserflasche PET (Abgek. 900ml) + + + Water Bottle PET with 9oz of boiled water. + Wasserflasche PET mit 900ml abgekochtem Wasser. + + Winter Ghillie Suit From cc51eb730077b7b037544e61414121960c350f19 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 10:04:26 +0100 Subject: [PATCH 55/60] Fix mistake from 4accdee s_player_hide_body got deleted. --- SQF/dayz_code/init/variables.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 949bbb6b2..25f0d3a06 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -291,6 +291,7 @@ if (!isDedicated) then { s_player_toggleVector = -1; vectorActions = -1; s_player_manageDoor = -1; + s_player_hide_body; }; call dayz_resetSelfActions; From c75d90bf4242889e27a76af75853c6c2f624daf1 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 10:07:18 +0100 Subject: [PATCH 56/60] Update Collaborators & Contributors --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a210c92cb..bd0e59f06 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ GitHub Collaborators (In order of most commits) * Zupa - https://github.com/Windmolders * oiad - https://github.com/oiad * AirwavesMan - https://github.com/AirwavesMan +* Seelenapparat - https://github.com/seelenapparat -------------------------- GitHub Contributors (In order of most commits) @@ -119,6 +120,7 @@ GitHub Contributors (In order of most commits) * ndavalos - https://github.com/ndavalos * SmokeyBR - https://github.com/SmokeyBR * DeVloek - https://github.com/DeVloek +* worldwidesorrow - https://github.com/worldwidesorrow -------------------------- Special thanks From ba31c67bcb2f658d88fa3012bf5e524959ede857 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 10:15:42 +0100 Subject: [PATCH 57/60] Add display names for heli wrecks by @seelenapparat --- .../Configs/CfgVehicles/CrashSite.hpp | 4 ++++ SQF/dayz_code/stringtable.xml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/SQF/dayz_code/Configs/CfgVehicles/CrashSite.hpp b/SQF/dayz_code/Configs/CfgVehicles/CrashSite.hpp index 7f6122f73..88020142d 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/CrashSite.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/CrashSite.hpp @@ -24,18 +24,21 @@ class CrashSite : House class CrashSite_RU : CrashSite { scope = public; + displayname = $STR_EPOCH_CRASHSITE1; model = "\z\addons\dayz_communityassets\crashsite\mi8\mi8_ru.p3d"; lootParams[] = {{0.6, -4.5, 0}, 7, 2.5, 5, 7}; }; class CrashSite_UN : CrashSite_RU { + displayname = $STR_EPOCH_CRASHSITE2; model = "\z\addons\dayz_communityassets\crashsite\mi8\mi8_un.p3d"; }; class CrashSite_US : CrashSite { scope = public; + displayname = $STR_EPOCH_CRASHSITE3; model = "\ca\air2\uh1y\uh1y_crashed.p3d"; hiddenSelections[] = {"zasleh"}; smoke[] = {-0.8,-2.3,2}; @@ -45,6 +48,7 @@ class CrashSite_US : CrashSite class CrashSite_EU : CrashSite { scope = public; + displayname = $STR_EPOCH_CRASHSITE4; model = "\z\addons\dayz_communityassets\crashsite\hc3\hc3.p3d"; lootParams[] = {{-0.4, -0.5, 0}, 4, 2.5, 7.5, 7}; }; \ No newline at end of file diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index fb52251f9..e04d01e61 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -17513,6 +17513,24 @@ Wasserflasche PET mit 900ml abgekochtem Wasser. + + + Mi-8 Wreck (Military) + Mi-8 Wrack (Militär) + + + Mi-8 Wreck (Civil) + Mi-8 Wrack (Zivil) + + + UH-1Y Wreck + UH-1Y Wrack + + + HC3 Merlin Wreck + HC3 Merlin Wrack + + Winter Ghillie Suit From 52c20fd512824f26a34d101eef90e0713cc7d285 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 10:59:06 +0100 Subject: [PATCH 58/60] Move fix bottle to epoch crafting --- .../CfgMagazines/DZE/PlasticWaterbottle.hpp | 12 +++++--- .../CfgMagazines/Items/WaterBottle.hpp | 10 +++++-- SQF/dayz_code/actions/player_fixBottle.sqf | 30 ------------------- SQF/dayz_code/init/compiles.sqf | 1 - SQF/dayz_code/stringtable.xml | 16 ---------- 5 files changed, 15 insertions(+), 54 deletions(-) delete mode 100644 SQF/dayz_code/actions/player_fixBottle.sqf diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp index 73a4cadcb..845c1ea39 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp @@ -33,13 +33,17 @@ class ItemPlasticWaterbottleDmg : CA_Magazine picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottleDamaged.paa"; displayName = $STR_EQUIP_NAME_WBPET_02; descriptionShort = $STR_EQUIP_DESC_WBPET_02; + sfx = "bandage"; class ItemActions { - class Repair - { - text = $STR_ACTIONS_FIX_W; - script = "spawn player_fixBottle;"; + class Crafting { + text = $STR_ACTIONS_FIX_W; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemPlasticWaterbottleUnfilled",1}}; + input[] = {{"ItemPlasticWaterbottleDmg",1},{"equip_duct_tape",1}}; }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp index 3ec9d7782..7abbf1ec6 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp @@ -33,13 +33,17 @@ class ItemWaterBottleDmg : CA_Magazine //We don't have a damaged canteen image/m picture = "\dayz_equip\textures\equip_waterbottle_empty_ca.paa"; displayName = $STR_ITEMWATERBOTTLEDMG_CODE_NAME; descriptionShort = $STR_ITEMWATERBOTTLEDMG_CODE_DESC; + sfx = "bandage"; class ItemActions { - class Repair - { + class Crafting { text = $STR_ACTIONS_FIX_W; - script = "spawn player_fixBottle;"; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemWaterbottleUnfilled",1}}; + input[] = {{"ItemWaterBottleDmg",1},{"equip_duct_tape",1}}; }; }; }; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_fixBottle.sqf b/SQF/dayz_code/actions/player_fixBottle.sqf deleted file mode 100644 index 6deb22455..000000000 --- a/SQF/dayz_code/actions/player_fixBottle.sqf +++ /dev/null @@ -1,30 +0,0 @@ -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 = ["ItemPlasticWaterbottleUnfilled", "ItemWaterBottleUnfilled"] select (_bottle == "ItemWaterbottleDmg"); - -call gear_ui_init; -closeDialog 0; - -// Check if the player has the tape -if (_tape in magazines player) then { - [player,"bandage",0,false] call dayz_zombieSpeak; - _finished = ["Medic",1] call fn_loopAction; - if (!_finished) exitWith {}; - - // Check again to make sure player didn't drop item - if (_tape in magazines player) then { - player removeMagazine _bottle; - player removeMagazine _tape; - player addMagazine _fixedBottle; - localize "str_fix_water_bottle" call dayz_rollingMessages; - }; -} else { //If the player doesn't have the tape - localize "str_fix_water_bottle_fail" call dayz_rollingMessages; -}; - -dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 022fde7f1..8d5ceb231 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -116,7 +116,6 @@ if (!isDedicated) then { call compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_switchWeapon.sqf"; //player_goFishing = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_goFishing.sqf"; player_gather = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_gather.sqf"; - player_fixBottle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_fixBottle.sqf"; player_tearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_tearClothes.sqf"; //object_remove = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\remove.sqf"; player_fixHatchet = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_fixTools.sqf"; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index e04d01e61..7f86342c4 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -1311,22 +1311,6 @@ Vous avez bu quelque chose. Du hast etwas getrunken. - - You have successfully fixed a water bottle! - Вы успешно починили бутылку с водой! - Usted ha resuelto con éxito una botella de agua! - Úspěšně jste spravili láhev na vodu! - Vous avez bien réparé la bouteille d'eau! - Du hast die Wasserflasche erfolgreich repariert! - - - You think you need Duct Tape to fix the bottle. - Похоже, нужен скотч, чтобы починить бутылку. - Usted cree que necesita cinta para conductos para fijar la botella. - Ke spravení láhve bude zřejmě třeba lepící páska. - Vous pensez que vous avez besoin de ruban adhésif pour réparer la bouteille. - Du könntest Klebeband gebrauchen, um die Flasche zu reparieren. - Tear Clothes Kleidung zerreißen From a25e85e3d42682fef88908d2be03aa186af8b957 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 11:02:48 +0100 Subject: [PATCH 59/60] Fix s_player_hide_body fix --- SQF/dayz_code/init/variables.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 25f0d3a06..9429178f3 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -291,7 +291,7 @@ if (!isDedicated) then { s_player_toggleVector = -1; vectorActions = -1; s_player_manageDoor = -1; - s_player_hide_body; + s_player_hide_body = -1; }; call dayz_resetSelfActions; From 3d8fa91c1dbae4d61b804ad0d1e856b5697c95d8 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 4 Nov 2019 11:10:39 +0100 Subject: [PATCH 60/60] Move arrows to epoch crafting only --- SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp | 2 +- SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp b/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp index 3a6a2b92e..652466898 100644 --- a/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp +++ b/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp @@ -18,7 +18,7 @@ class CfgCrafting { #include "Recipes\Medical\woodensplint.hpp" #include "Recipes\Medical\HerbalDrink.hpp" //ammo - #include "Recipes\Ammo\WoodenArrow.hpp" + //#include "Recipes\Ammo\WoodenArrow.hpp" //other #include "Recipes\Other\woodencrate.hpp" #include "Recipes\Other\nails.hpp" diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp index dabbf6d64..e8fef6baa 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp @@ -86,8 +86,8 @@ class PartWoodPile : CA_Magazine script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; requiretools[] = {"ItemKnife"}; - output[] = {{"1Rnd_Arrow_Wood",3}}; - input[] = {{"PartWoodPile",1},{"ItemTrashRazor",1}}; + output[] = {{"1Rnd_Arrow_Wood",5}}; + input[] = {{"PartWoodPile",1},{"equip_feathers",2}}; }; class Crafting2