mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 23:32:53 +03:00
0.92
+ formatting for damage percentage for repair and salvage. + Chance to break part when salvaging damaged parts. + Potential fix for purchased vehicle damage handler. + added check when cracking vault to exit when toolbox is broken + Potential fix for glitched extra crack vault options and no delay. + 1.7.5.1
This commit is contained in:
@@ -217,12 +217,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
|
||||
if (_ownerID == dayz_playerUID) then {
|
||||
if (s_player_unlockvault < 0) then {
|
||||
s_player_unlockvault = player addAction ["Unlock Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
};
|
||||
} else {
|
||||
if(_hasToolbox) then{
|
||||
if (s_player_unlockvault < 0) then {
|
||||
s_player_unlockvault = player addAction ["Crack Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_unlockvault;
|
||||
s_player_unlockvault = -1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
private["_item","_qty","_type","_meat","_loop"];
|
||||
_item = _this select 0;
|
||||
private["_animalbody","_qty","_rawfoodtype","_ehLoc"];
|
||||
_animalbody = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_type = typeOf _item;
|
||||
_meat = 0;
|
||||
_loop = true;
|
||||
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> _type >> "rawfoodtype");
|
||||
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> typeOf _animalbody >> "rawfoodtype");
|
||||
|
||||
if (local _item) then {
|
||||
if (local _animalbody) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
_item addMagazine _rawfoodtype;
|
||||
_animalbody addMagazine _rawfoodtype;
|
||||
};
|
||||
sleep 2;
|
||||
_timer = time;
|
||||
while {_loop} do {
|
||||
_meat = count magazines _item;
|
||||
if (_meat == 0) then {_loop = false};
|
||||
if ((time - _timer) > 300) then {_loop = false};
|
||||
sleep 1;
|
||||
|
||||
sleep 1;
|
||||
|
||||
[time, _animalbody] spawn {
|
||||
private ["_timer", "_body"];
|
||||
_timer = _this select 0;
|
||||
_body = _this select 1;
|
||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||
sleep 5;
|
||||
};
|
||||
["dayzHideBody",_body] call broadcastRpcCallAll;
|
||||
sleep 5;
|
||||
deleteVehicle _body;
|
||||
true;
|
||||
};
|
||||
["dayzHideBody",_item] call broadcastRpcCallAll;
|
||||
sleep 10;
|
||||
deleteVehicle _item;
|
||||
|
||||
} else {
|
||||
_ehLoc = "client";
|
||||
if (isServer) then { _ehLoc = "server"; };
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
|
||||
};
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_animalbody)];
|
||||
};
|
||||
@@ -9,6 +9,7 @@ _objectUID = _obj getVariable["ObjectUID","0"];
|
||||
player playActionNow "Medic";
|
||||
|
||||
player removeAction s_player_unlockvault;
|
||||
s_player_unlockvault = 1;
|
||||
|
||||
_item = "ItemToolbox";
|
||||
_hasToolbox = _item in items player;
|
||||
@@ -29,8 +30,10 @@ if (_ownerID == dayz_playerUID) then {
|
||||
// Chance to break toolbox randomly
|
||||
if(floor (random 15) == 1) then {
|
||||
player removeWeapon _item;
|
||||
cutText ["Your toolbox is now broken, you will need to find another one.", "PLAIN DOWN"];
|
||||
titleText ["Your toolbox is now broken, you will need to find another one.", "PLAIN"];
|
||||
};
|
||||
} else {
|
||||
if (!_hasToolbox) exitWith {cutText ["Cannot crack vault, you do not have a Tool Box." , "PLAIN"]};
|
||||
};
|
||||
|
||||
};
|
||||
@@ -101,7 +104,7 @@ if(_allowunlock) then {
|
||||
} forEach _objWpnTypes;
|
||||
};
|
||||
|
||||
cutText ["This vault has been unlocked", "PLAIN DOWN"];
|
||||
cutText ["Vault has been unlocked.", "PLAIN DOWN"];
|
||||
} else {
|
||||
player playActionNow "Medic";
|
||||
sleep 3;
|
||||
@@ -111,4 +114,4 @@ if(_allowunlock) then {
|
||||
cutText ["Combination incorrect, vault is still locked.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
s_player_unlockvault = -1;
|
||||
s_player_unlockvault = -1;
|
||||
|
||||
Reference in New Issue
Block a user