New config variable dayz_toolBreaking

Tool breaking is disabled by default.

Also made all scripts use Epoch sledge, which is a different model from
vanilla sledge.

PK_DZ was a duplicate of the new PKM_DZ.
This commit is contained in:
ebaydayz
2016-04-03 16:34:14 -04:00
parent d07d31983b
commit e69364991c
37 changed files with 323 additions and 231 deletions

View File

@@ -643,20 +643,21 @@ dayz_inflame = {
_hasTool = false;
{
if (_x in items player) exitWith {
_matches = getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "matches");
_qtyRemaining = getText(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "qtyRemaining");
//diag_log format["%1[%2,%3]",_x,_matches,_qtyRemaining];
if (_matches == -1) then {
if ([getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "chance")] call fn_chance) then {
if (dayz_matchboxCount) then {
_matches = getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "matches");
_qtyRemaining = getText(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "qtyRemaining");
//diag_log format["%1[%2,%3]",_x,_matches,_qtyRemaining];
if (_matches == -1) then {
if ([getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "chance")] call fn_chance) then {
player removeWeapon _x;
player addWeapon _qtyRemaining;
};
} else {
// remove a match
player removeWeapon _x;
player addWeapon _qtyRemaining;
};
} else {
// remove a match
player removeWeapon _x;
player addWeapon _qtyRemaining;
};
_hasTool = true;
};
@@ -705,20 +706,22 @@ dayz_inflame_other = {
_hasTool = false;
{
if (_x in items player) exitWith {
_matches = getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "matches");
_qtyRemaining = getText(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "qtyRemaining");
//diag_log format["%1[%2,%3]",_x,_matches,_qtyRemaining];
if (dayz_matchboxCount) then {
_matches = getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "matches");
_qtyRemaining = getText(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "qtyRemaining");
//diag_log format["%1[%2,%3]",_x,_matches,_qtyRemaining];
if (_matches == -1) then {
if ([getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "chance")] call fn_chance) then {
if (_matches == -1) then {
if ([getNumber(configfile >> "cfgWeapons" >> _x >> "Ignators" >> "chance")] call fn_chance) then {
player removeWeapon _x;
player addWeapon _qtyRemaining;
};
} else {
// remove a match
player removeWeapon _x;
player addWeapon _qtyRemaining;
};
} else {
// remove a match
player removeWeapon _x;
player addWeapon _qtyRemaining;
};
_hasTool = true;
};