mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-27 18:21:50 +03:00
Localization updates
Some localization updates and some code optimization.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
private ["_objclass","_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig",
|
||||
"_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis",
|
||||
"_sfx","_ownerID","_objectID","_objectUID","_alreadyupgrading","_dir","_weapons","_magazines","_backpacks",
|
||||
"_object","_objWpnTypes","_objWpnQty","_countr","_itemName","_msg","_vector"];
|
||||
"_object","_objWpnTypes","_objWpnQty","_countr","_itemName","_vector"];
|
||||
|
||||
_cursorTarget = _this select 0;
|
||||
|
||||
@@ -59,12 +59,7 @@ _isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
_upgradeParts = [];
|
||||
_startUpgrade = true;
|
||||
|
||||
if(_isWater or _onLadder) exitWith {
|
||||
//localize "str_CannotUpgrade" call dayz_rollingMessages;
|
||||
_msg = localize "str_CannotUpgrade";
|
||||
_msg call dayz_rollingMessages;
|
||||
//systemchat[localize "str_CannotUpgrade"];
|
||||
};
|
||||
if(_isWater or _onLadder) exitWith { localize "str_CannotUpgrade" call dayz_rollingMessages; };
|
||||
|
||||
// lets check player has requiredTools for upgrade
|
||||
{
|
||||
@@ -72,8 +67,7 @@ if(_isWater or _onLadder) exitWith {
|
||||
_missingPartsConfig = configFile >> "CfgVehicles" >> _x;
|
||||
_textMissingParts = getText (_missingPartsConfig >> "displayName");
|
||||
//systemChat format["Missing %1 to upgrade storage.", _textMissingParts];
|
||||
_msg = format [localize "Missing %1 to upgrade storage.", _textMissingParts];
|
||||
_msg call dayz_rollingMessages;
|
||||
format [localize "STR_EPOCH_PLAYER_325", _textMissingParts] call dayz_rollingMessages;
|
||||
_startUpgrade = false;
|
||||
};
|
||||
} count _requiredTools;
|
||||
@@ -84,8 +78,7 @@ if(_isWater or _onLadder) exitWith {
|
||||
_missingPartsConfig = configFile >> "CfgMagazines" >> _x;
|
||||
_textMissingParts = getText (_missingPartsConfig >> "displayName");
|
||||
//systemChat format["Missing %1 to upgrade storage.", _textMissingParts];
|
||||
_msg = format [localize "Missing %1 to upgrade storage.", _textMissingParts];
|
||||
_msg call dayz_rollingMessages;
|
||||
format [localize "STR_EPOCH_PLAYER_325", _textMissingParts] call dayz_rollingMessages;
|
||||
_startUpgrade = false;
|
||||
};
|
||||
if (_x IN magazines player) then {
|
||||
@@ -114,11 +107,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
//Upgrade
|
||||
_alreadyupgrading = _cursorTarget getVariable["alreadyupgrading",0];
|
||||
|
||||
if (_alreadyupgrading == 1) exitWith {
|
||||
//localize "str_upgradeInProgress" call dayz_rollingMessages;
|
||||
_msg = localize "str_upgradeInProgress";
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if (_alreadyupgrading == 1) exitWith { localize "str_upgradeInProgress" call dayz_rollingMessages; };
|
||||
|
||||
_cursorTarget setVariable["alreadyupgrading",1];
|
||||
|
||||
@@ -184,11 +173,9 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
publicVariableServer "PVDZ_obj_Publish";
|
||||
diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish];
|
||||
|
||||
//localize "str_upgradeDone" call dayz_rollingMessages;
|
||||
_msg = localize "str_upgradeDone";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_upgradeDone" call dayz_rollingMessages;
|
||||
/*
|
||||
} else {
|
||||
"Object has no upgrade option." call dayz_rollingMessages;
|
||||
localize "str_upgradeNoOption" call dayz_rollingMessages;
|
||||
*/
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user