Update and localize player_combineMags.sqf

This commit is contained in:
A Man
2020-04-07 16:34:56 +02:00
parent 2b98eb1fd5
commit 99f69079f3
2 changed files with 46 additions and 30 deletions

View File

@@ -1,21 +1,21 @@
private ["_create","_config","_create_magsize","_type","_magCount","_slotstart","_slotend","_dialog","_qty_total_ammo","_control","_mag","_qtynew_create_mags_full","_qtynew_create_ammo_rest","_magFull","_magFullSingular","_magAmmunition","_i"]; if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
dayz_actionInProgress = true;
private ["_config","_create","_name","_create_magsize","_type","_magCount","_slotstart","_slotend","_dialog","_qty_total_ammo","_control","_mag","_qtynew_create_mags_full","_qtynew_create_ammo_rest","_magFull","_magFullSingular","_magAmmunition","_i"];
disableSerialization; disableSerialization;
call gear_ui_init; call gear_ui_init;
closeDialog 0; closeDialog 0;
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
dayz_actionInProgress = true;
_create = _this; _create = _this;
if (!(_create in magazines player)) exitWith {dayz_actionInProgress = false;}; if (!(_create in magazines player)) exitWith {dayz_actionInProgress = false;};
_config = configFile >> "CfgMagazines" >> _create;
player playActionNow "PutDown"; player playActionNow "PutDown";
_create_magsize = getNumber(configFile >> "CfgMagazines" >> _create >> "count"); _config = configFile >> "CfgMagazines" >> _create;
_type = getNumber(configFile >> "CfgMagazines" >> _create >> "type"); _create_magsize = getNumber(_config >> "count");
_name = getText(configFile >> "CfgMagazines" >> _create >> "displayName"); _type = getNumber(_config >> "type");
_name = getText(_config >> "displayName");
_magCount = {_x == _create} count magazines player; _magCount = {_x == _create} count magazines player;
if (_magCount == 1) exitWith { if (_magCount == 1) exitWith {
@@ -26,7 +26,7 @@ if (_magCount == 1) exitWith {
//primary/secondary mags? //primary/secondary mags?
_slotstart = 0; _slotstart = 0;
_slotend = 0; _slotend = 0;
if ((_type == 256) or (_type == 256*2)) then { if ((_type == 256) || {_type == 256*2}) then {
_slotstart = 109; _slotstart = 109;
_slotend = 120; _slotend = 120;
}; };
@@ -58,28 +58,27 @@ for "_i" from 1 to _qtynew_create_mags_full do {
if (_qtynew_create_ammo_rest != 0) then { if (_qtynew_create_ammo_rest != 0) then {
player addMagazine [_create,_qtynew_create_ammo_rest]; player addMagazine [_create,_qtynew_create_ammo_rest];
}; };
// Check if quiver // Check if quiver
if(_create == "Quiver") then { if(_create == "Quiver") then {
_magFull = "quivers"; _magFull = localize "str_combineQuivers";
_magFullSingular = "quiver"; _magFullSingular = localize "str_combineQuiver";
_magAmmunition = "arrows"; _magAmmunition = localize "str_combineArrows";
} else { } else {
_magFull = "magazines"; _magFull = localize "str_combineMagazines";
_magFullSingular = "magazine"; _magFullSingular = localize "str_combineMagazine";
_magAmmunition = "bullets"; _magAmmunition = localize "str_combineBullets";
}; };
switch true do { call {
case (_qtynew_create_ammo_rest == 0) : { if (_qtynew_create_ammo_rest == 0) exitwith {
format[localize "str_combineDoneFull",_magCount, _name, _qtynew_create_mags_full,_magFull] call dayz_rollingMessages; format[localize "str_combineDoneFull",_magCount, _name, _qtynew_create_mags_full,_magFull] call dayz_rollingMessages;
}; };
case (_qtynew_create_mags_full == 0) : { if (_qtynew_create_mags_full == 0) exitwith {
[format[localize "str_combineDonePartialOne",_magCount, _name, _qtynew_create_ammo_rest,_magAmmunition],1] call dayz_rollingMessages; [format[localize "str_combineDonePartialOne",_magCount, _name, _qtynew_create_ammo_rest,_magAmmunition],1] call dayz_rollingMessages;
};
default {
[format[localize "str_combineDonePartial",_magCount, _name, _qtynew_create_mags_full, _qtynew_create_ammo_rest,_magAmmunition,_magFullSingular,_magFull],1] call dayz_rollingMessages;
}; };
[format[localize "str_combineDonePartial",_magCount, _name, _qtynew_create_mags_full, _qtynew_create_ammo_rest,_magAmmunition,_magFullSingular,_magFull],1] call dayz_rollingMessages;
}; };
uiSleep 1; uiSleep 1;
dayz_actionInProgress = false; dayz_actionInProgress = false;

View File

@@ -1630,6 +1630,30 @@
<Czech>Zkombinovali jste %1x neúplný %2 dohromady.&lt;br/&gt;Zbývá vám ještě %3x %4.</Czech> <Czech>Zkombinovali jste %1x neúplný %2 dohromady.&lt;br/&gt;Zbývá vám ještě %3x %4.</Czech>
<German>Du hast %1 teilweise gefüllte %2 zu einem kombiniert und hast %3 %4 übrig.</German> <German>Du hast %1 teilweise gefüllte %2 zu einem kombiniert und hast %3 %4 übrig.</German>
</Key> </Key>
<Key ID="str_combineQuiver">
<English>quiver</English>
<German>Köcher</German>
</Key>
<Key ID="str_combineQuivers">
<English>quivers</English>
<German>Köcher</German>
</Key>
<Key ID="str_combineArrows">
<English>arrows</English>
<German>Pfeile</German>
</Key>
<Key ID="str_combineMagazines">
<English>magazines</English>
<German>Magazine</German>
</Key>
<Key ID="str_combineMagazine">
<English>magazine</English>
<German>Magazin</German>
</Key>
<Key ID="str_combineBullets">
<English>bullets</English>
<German>Kugeln</German>
</Key>
<Key ID="str_sleepStats"> <Key ID="str_sleepStats">
<English>Blood regenerated: %1, Blood: %2</English> <English>Blood regenerated: %1, Blood: %2</English>
<Russian>Крови восстановлено: %1, Кровь: %2</Russian> <Russian>Крови восстановлено: %1, Кровь: %2</Russian>
@@ -4141,7 +4165,7 @@
<Spanish>Pila de Leña</Spanish> <Spanish>Pila de Leña</Spanish>
<French>Tas de bois</French> <French>Tas de bois</French>
<Czech>Hromádka dřeva</Czech> <Czech>Hromádka dřeva</Czech>
</Key> </Key>
<Key ID="STR_EQUIP_DESC_40"> <Key ID="STR_EQUIP_DESC_40">
<English>A small pile of freshly chopped wood that can be used for making a fireplace and various other things.</English> <English>A small pile of freshly chopped wood that can be used for making a fireplace and various other things.</English>
<German>Ein kleiner Stapel frisch gehacktes Holz, welches unter anderem dazu verwendet werden kann, ein Feuer zu machen.</German> <German>Ein kleiner Stapel frisch gehacktes Holz, welches unter anderem dazu verwendet werden kann, ein Feuer zu machen.</German>
@@ -9849,13 +9873,6 @@
<Czech>Hrubá neohoblovaná prkna</Czech> <Czech>Hrubá neohoblovaná prkna</Czech>
<German>Eine zurechtgesägte Holzplanke, welche zum Herstellen von Objekten genutzt werden kann.</German> <German>Eine zurechtgesägte Holzplanke, welche zum Herstellen von Objekten genutzt werden kann.</German>
</Key> </Key>
<Key ID="STR_BLD_craft_ItemPlank">
<English>Wood Piles</English>
<Russian>Поленья</Russian>
<French>Couper en petits bois</French>
<Czech>Rozštípat</Czech>
<German>Holzpfähle</German>
</Key>
<Key ID="STR_BLD_name_ItemMetalSheet"> <Key ID="STR_BLD_name_ItemMetalSheet">
<English>Corrugated Sheet</English> <English>Corrugated Sheet</English>
<Russian>Волнистый лист</Russian> <Russian>Волнистый лист</Russian>