mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
@@ -28,6 +28,10 @@ class ItemAntibiotic : ItemAntibiotic_base
|
||||
text = $STR_TAKE_ANTIBIOTIC;
|
||||
script = "spawn player_useMeds;";
|
||||
};
|
||||
class Combine {
|
||||
text = $STR_ANTIBIOTICS_COMBINE;
|
||||
script = "spawn player_combineAntibiotics;";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
21
SQF/dayz_code/actions/player_combineAntibiotics.sqf
Normal file
21
SQF/dayz_code/actions/player_combineAntibiotics.sqf
Normal file
@@ -0,0 +1,21 @@
|
||||
private ["_total", "_full", "_remain", "_amount"];
|
||||
_total = 0;
|
||||
{
|
||||
if(configName inheritsFrom (configfile >> "CfgMagazines" >> _x) == "ItemAntibiotic") 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 "ItemAntibiotic6";
|
||||
};
|
||||
|
||||
if(_remain > 0 ) then {
|
||||
player addMagazine "ItemAntibiotic" + str(_remain);
|
||||
};
|
||||
@@ -107,6 +107,7 @@ if (!isDedicated) then {
|
||||
//player_flipvehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_flipvehicle.sqf";
|
||||
//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_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";
|
||||
|
||||
@@ -6647,6 +6647,12 @@
|
||||
<Czech>Tato sada obsahuje tětivu a lučiště. Součást nutná pro výrobu kuše.</Czech>
|
||||
<German>Ein Armbrust-Selbstbau-Kit zum Herstellen einer Armbrust.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ANTIBIOTICS_COMBINE">
|
||||
<English>Combine</English>
|
||||
<Russian>Объединить</Russian>
|
||||
<Czech>Kombinovat</Czech>
|
||||
<German>Vereinigen</German>
|
||||
</Key>
|
||||
</Package>
|
||||
<Package name="feedback">
|
||||
<Key ID="str_pulse_extremely_weak">
|
||||
|
||||
Reference in New Issue
Block a user