Localization updates

Some localization updates and some code optimization.
This commit is contained in:
oiad
2016-07-17 22:23:25 +12:00
parent d47d887a66
commit 3d75c67574
23 changed files with 188 additions and 179 deletions

View File

@@ -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"];
"_objWpnTypes","_objWpnQty","_countr","_itemName","_vector"];
_objclass = _this;
_cursorTarget = _this select 3;
@@ -53,11 +53,7 @@ _isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
_upgradeParts = [];
_startUpgrade = true;
if(_isWater or _onLadder) exitWith {
//"unable to upgrade at this time" call dayz_rollingMessages;
_msg = localize "str_CannotUpgrade";
_msg call dayz_rollingMessages;
};
if(_isWater or _onLadder) exitWith { localize "str_CannotUpgrade" call dayz_rollingMessages; };
// lets check player has requiredTools for upgrade
{
@@ -65,8 +61,7 @@ if(_isWater or _onLadder) exitWith {
_missingPartsConfig = configFile >> "CfgWeapons" >> _x;
_textMissingParts = getText (_missingPartsConfig >> "displayName");
_msg = format ["Missing %1 to upgrade storage.", _textMissingParts];
_msg call dayz_rollingMessages;
format [localize "STR_EPOCH_PLAYER_325", _textMissingParts] call dayz_rollingMessages;
_startUpgrade = false;
};
@@ -78,8 +73,7 @@ if(_isWater or _onLadder) exitWith {
_missingPartsConfig = configFile >> "CfgMagazines" >> _x;
_textMissingParts = getText (_missingPartsConfig >> "displayName");
_msg = format ["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 {
@@ -108,11 +102,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];
@@ -143,9 +133,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
PVDZ_obj_Destroy = [_objectID,_objectUID, _activatingPlayer];
publicVariableServer "PVDZ_obj_Destroy";
if (isServer) then {
PVDZ_obj_Destroy call server_deleteObj;
};
if (isServer) then { PVDZ_obj_Destroy call server_deleteObj; };
deleteVehicle _cursorTarget;
// remove parts from players inventory before creation of new tent.
@@ -203,11 +191,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;
*/
};
};