Update Painkillers and Antibiotics

- Painkillers are in different pill counts available now, same as antibiotics
- the strings of painkillers and antibiotics have the pill count displayed in the name
This commit is contained in:
A Man
2020-04-06 20:03:14 +02:00
parent 9aeceebb6f
commit b4b8860cf0
12 changed files with 456 additions and 104 deletions

View File

@@ -0,0 +1,29 @@
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) == "ItemPainkiller") then {
_amount = getNumber(configFile >> "CfgMagazines" >> _x >> "medical" >> "amount");
if(_amount > 0) then {
_total = _total + _amount;
player removeMagazine _x;
};
};
} count (magazines player);
_full = floor(_total / 6);
_remain = _total % 6;
for "_i" from 1 to _full do
{
player addMagazine "ItemPainkiller6";
};
if(_remain > 0 ) then {
player addMagazine "ItemPainkiller" + str(_remain);
};
dayz_actionInProgress = false;

View File

@@ -16,13 +16,19 @@ if (!_hasmeditem) exitWith {format[localize "str_player_31",_text,localize "str_
call {
if (_item == "ItemBandage") exitWith {[0,0,0,[player,"ItemBandage"]] execVM "\z\addons\dayz_code\medical\bandage.sqf";};
if (_item == "ItemMorphine") exitWith {[0,0,0,[player,"ItemMorphine"]] execVM "\z\addons\dayz_code\medical\brokeBones.sqf";};
if (_item == "ItemPainkiller") exitWith {[0,0,0,[player]] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemAntibiotic") exitWith {[player,"ItemAntibiotic"] execVM "\z\addons\dayz_code\medical\antibiotics.sqf";};
if (_item == "ItemPainkiller") exitWith {[player,"ItemPainkiller"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemPainkiller6") exitWith {[player,"ItemPainkiller6"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemPainkiller5") exitWith {[player,"ItemPainkiller5"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemPainkiller4") exitWith {[player,"ItemPainkiller4"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemPainkiller3") exitWith {[player,"ItemPainkiller3"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemPainkiller2") exitWith {[player,"ItemPainkiller2"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemPainkiller1") exitWith {[player,"ItemPainkiller1"] execVM "\z\addons\dayz_code\medical\painkiller.sqf";};
if (_item == "ItemBloodbag") exitWith {[player,"ItemBloodbag"] execVM "\z\addons\dayz_code\medical\selfbloodbag.sqf";};
if (_item == "ItemAntibacterialWipe") exitWith {[0,0,0,[player]] execVM "\z\addons\dayz_code\medical\wipes.sqf";};
if (_item == "ItemHeatPack") exitWith {player removeMagazine "ItemHeatPack"; r_player_warming_heatpack = [true, diag_tickTime]; localize "str_player_27" call dayz_rollingMessages;}; //dayz_temperatur = (dayz_temperatur + 5) min dayz_temperaturmax;
if (_item == "equip_woodensplint") exitWith {[0,0,0,[player,"equip_woodensplint"]] execVM "\z\addons\dayz_code\medical\brokeBones.sqf";};
if (_item == "ItemSepsisBandage") exitWith {[0,0,0,[player,"ItemSepsisBandage"]] execVM "\z\addons\dayz_code\medical\bandage.sqf";};
if (_item == "ItemAntibiotic") exitWith {[player,"ItemAntibiotic"] execVM "\z\addons\dayz_code\medical\antibiotics.sqf";};
if (_item == "ItemAntibiotic1") exitWith {[player,"ItemAntibiotic1"] execVM "\z\addons\dayz_code\medical\antibiotics.sqf";};
if (_item == "ItemAntibiotic2") exitWith {[player,"ItemAntibiotic2"] execVM "\z\addons\dayz_code\medical\antibiotics.sqf";};
if (_item == "ItemAntibiotic3") exitWith {[player,"ItemAntibiotic3"] execVM "\z\addons\dayz_code\medical\antibiotics.sqf";};