mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 03:16:27 +03:00
Localization updates
Some localization updates and some code optimization.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private ["_bottletext","_tin1text","_tin2text","_tintext","_hasbottleitem","_hastinitem","_qty","_dis","_sfx","_bottleInfected","_msg"];
|
||||
private ["_bottletext","_tin1text","_tin2text","_tintext","_hasbottleitem","_hastinitem","_qty","_dis","_sfx","_bottleInfected"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_22" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -50,20 +50,14 @@ if (_hasbottleitem and _hastinitem) then {
|
||||
if (dayz_waterBottleBreaking && {[0.1] call fn_chance}) then {
|
||||
player addMagazine "ItemWaterBottleDmg";
|
||||
//systemChat (localize ("str_waterbottle_broke"));
|
||||
_msg = localize "str_waterbottle_broke";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_waterbottle_broke" call dayz_rollingMessages;
|
||||
} else {
|
||||
player addMagazine "ItemWaterBottleBoiled";
|
||||
};
|
||||
};
|
||||
//format[localize "str_player_boiledwater",_qty] call dayz_rollingMessages;
|
||||
_msg = format [localize "str_player_boiledwater",_qty];
|
||||
_msg call dayz_rollingMessages;
|
||||
format [localize "str_player_boiledwater",_qty] call dayz_rollingMessages;
|
||||
} else {
|
||||
//localize "str_player_02" call dayz_rollingMessages;
|
||||
_msg = format [localize "str_player_boiledwater",_qty];
|
||||
_msg = localize "str_player_02";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_player_02" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
a_player_boil = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_item","_type","_hasHarvested","_config","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_dis","_sfx","_sharpnessRemaining","_qty","_chance","_msg","_string"];
|
||||
private ["_item","_type","_hasHarvested","_config","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_dis","_sfx","_sharpnessRemaining","_qty","_chance","_string"];
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_29" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
@@ -71,9 +71,8 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
|
||||
player removeWeapon _activeKnife;
|
||||
player addWeapon _sharpnessRemaining;
|
||||
|
||||
//systemChat (localize "str_info_bluntknife");
|
||||
_msg = localize "str_info_bluntknife";
|
||||
_msg call dayz_rollingMessages;
|
||||
//systemChat (localize "str_info_bluntknife");
|
||||
localize "str_info_bluntknife" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
case "ItemKnifeBlunt" : {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_item","_type","_hasHarvested","_config","_knifeArray","_playerNear","_isListed","_activeKnife","_text","_sharpnessRemaining","_qty","_chance","_msg","_string"];
|
||||
private ["_item","_type","_hasHarvested","_config","_knifeArray","_playerNear","_isListed","_activeKnife","_text","_sharpnessRemaining","_qty","_chance","_string"];
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_31" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
@@ -56,9 +56,8 @@ if ((count _knifeArray > 0) && !_hasHarvested) then {
|
||||
player removeWeapon _activeKnife;
|
||||
player addWeapon _sharpnessRemaining;
|
||||
|
||||
//systemChat (localize "str_info_bluntknife");
|
||||
_msg = localize "str_info_bluntknife";
|
||||
_msg call dayz_rollingMessages;
|
||||
//systemChat (localize "str_info_bluntknife");
|
||||
localize "str_info_bluntknife" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
case "ItemKnifeBlunt" : {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_cursorTarget","_onLadder","_isWater","_alreadyRemoving","_characterID","_objectID","_objectUID","_ownerArray","_dir",
|
||||
"_realObjectStillThere","_upgrade","_entry","_parent","_requiredParts","_requiredTools","_model","_toolsOK","_displayname",
|
||||
"_whpos","_i","_wh","_object","_msg","_vector","_dis","__FILE__","_puid","_variables"];
|
||||
"_whpos","_i","_wh","_object","_vector","_dis","__FILE__","_puid","_variables"];
|
||||
|
||||
|
||||
_cursorTarget = _this select 3;
|
||||
@@ -11,11 +11,7 @@ if ((isNil "_cursorTarget") or {(isNull _cursorTarget)}) then {
|
||||
_cursorTarget = if (count _cursorTarget == 0) then { objNull } else { _cursorTarget select 0 };
|
||||
};
|
||||
|
||||
if(isNull _cursorTarget) exitWith {
|
||||
//localize "str_disassembleNoOption" call dayz_rollingMessages;
|
||||
_msg = localize "str_disassembleNoOption";
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if(isNull _cursorTarget) exitWith { localize "str_disassembleNoOption" call dayz_rollingMessages; };
|
||||
|
||||
//Remove action Menu
|
||||
player removeAction s_player_disassembly;
|
||||
@@ -24,16 +20,10 @@ s_player_disassembly = -1;
|
||||
//Normal blocked stuff
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
if(_isWater or _onLadder) exitWith {
|
||||
_msg = localize "str_disassembleInProgress";
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if(_isWater or _onLadder) exitWith { localize "str_disassemble_cant_do" call dayz_rollingMessages; };
|
||||
|
||||
_alreadyRemoving = _cursorTarget getVariable["ObjectLocked",0];
|
||||
if (_alreadyRemoving == 1) exitWith {
|
||||
_msg = localize "str_disassembleInProgress";
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if (_alreadyRemoving == 1) exitWith { localize "str_disassembleInProgress" call dayz_rollingMessages; };
|
||||
|
||||
_cursorTarget setVariable["ObjectLocked",1,true];
|
||||
_characterID = _cursorTarget getVariable ["characterID","0"];
|
||||
@@ -64,11 +54,7 @@ for "_i" from 1 to 20 do {
|
||||
if (!(_x IN items player)) exitWith { _toolsOK = false; };
|
||||
} count _requiredTools;
|
||||
|
||||
if (!_toolsOK) exitWith {
|
||||
//format[localize "str_disassembleMissingTool",getText (configFile >> "CfgWeapons" >> _x >> "displayName"),_displayname] call dayz_rollingMessages;//["Missing %1 to disassemble %2."
|
||||
_msg = format [localize "str_disassembleMissingTool",getText (configFile >> "CfgWeapons" >> _x >> "displayName"),_displayname];
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if (!_toolsOK) exitWith { format [localize "str_disassembleMissingTool",getText (configFile >> "CfgWeapons" >> _x >> "displayName"),_displayname] call dayz_rollingMessages; };
|
||||
|
||||
if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "disableWeapons") == 0) then {
|
||||
player playActionNow "Medic";
|
||||
@@ -167,9 +153,7 @@ if (!_realObjectStillThere) then {
|
||||
};
|
||||
};
|
||||
|
||||
_msg = localize "str_disassembleDone";
|
||||
_msg call dayz_rollingMessages;
|
||||
//localize "str_disassembleDone" call dayz_rollingMessages;
|
||||
localize "str_disassembleDone" call dayz_rollingMessages;
|
||||
|
||||
_cursorTarget setVariable["ObjectLocked",0,true];
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ _tools = getArray (configFile >> "CfgVehicles" >> (typeOf _object) >> "dismantle
|
||||
|
||||
{
|
||||
private ["_end"];
|
||||
if ((_x select 0) in items player) then {_end = false;} else { format["Missing tool %1 to dismantle",(_x select 0)] call dayz_rollingMessages; _end = true; _proceed = false; };
|
||||
if ((_x select 0) in items player) then {_end = false;} else { format [localize "STR_EPOCH_DISMANTLE_MISSING",(_x select 0)] call dayz_rollingMessages; _end = true; _proceed = false; };
|
||||
|
||||
if (_end) exitwith { _exit = true; };
|
||||
} foreach _tools;
|
||||
@@ -46,10 +46,7 @@ if (_exit) exitwith {};
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
|
||||
if(_isWater or _onLadder) exitWith {
|
||||
//"unable to upgrade at this time" call dayz_rollingMessages;
|
||||
localize "str_CannotUpgrade" call dayz_rollingMessages;
|
||||
};
|
||||
if(_isWater or _onLadder) exitWith { localize "str_CannotUpgrade" call dayz_rollingMessages; };
|
||||
|
||||
//Start loop
|
||||
_isOk = true;
|
||||
@@ -60,7 +57,7 @@ while {_isOk} do {
|
||||
//Check if we have the tools to start
|
||||
{
|
||||
private ["_end"];
|
||||
if ((_x select 0) in items player) then {_end = false;} else { format["Missing tool %1 to dismantle",_x] call dayz_rollingMessages; _end = true; _proceed = false; };
|
||||
if ((_x select 0) in items player) then {_end = false;} else { format [localize "STR_EPOCH_DISMANTLE_MISSING",_x] call dayz_rollingMessages; _end = true; _proceed = false; };
|
||||
|
||||
if (_end) exitwith { _exit = true; };
|
||||
}foreach _tools;
|
||||
@@ -133,7 +130,7 @@ while {_isOk} do {
|
||||
if ([(_x select 1)] call fn_chance) then {
|
||||
player removeWeapon (_x select 0);
|
||||
player addWeapon (_x select 2);
|
||||
"Your tool has been damaged." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_DISMANTLE_DAMAGED" call dayz_rollingMessages;
|
||||
};
|
||||
}foreach _tools;
|
||||
};
|
||||
@@ -145,7 +142,7 @@ while {_isOk} do {
|
||||
_proceed = true;
|
||||
};
|
||||
|
||||
format["Dismantle attempt (%1 of %2).",_counter,_limit] call dayz_rollingMessages;
|
||||
format [localize "STR_EPOCH_DISMANTLE_ATTEMPT",_counter,_limit] call dayz_rollingMessages;
|
||||
uiSleep 0.10;
|
||||
};
|
||||
|
||||
@@ -155,7 +152,7 @@ if (_proceed) then {
|
||||
|
||||
if (_claimedBy != _playerID) exitWith { format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; };
|
||||
|
||||
format["Dismantled, (%1).",typeOf _object] call dayz_rollingMessages;
|
||||
format [localize "STR_EPOCH_DISMANTLED",typeOf _object] call dayz_rollingMessages;
|
||||
|
||||
_activatingPlayer = player;
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID, _activatingPlayer];
|
||||
|
||||
@@ -16,7 +16,7 @@ if ((isNil "_cursorTarget") or {(isNull _cursorTarget)}) then {
|
||||
};
|
||||
|
||||
if(isNull _cursorTarget) exitWith {
|
||||
"No maintenance options" call dayz_rollingMessages;
|
||||
localize "str_maintenanceNoOption" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
//Remove action Menu
|
||||
@@ -46,7 +46,7 @@ _upgradeParts = [];
|
||||
_startMaintenance = true;
|
||||
|
||||
if(_isWater or _onLadder) exitWith {
|
||||
"Unable to proceed" call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_PLAYER_326" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
// lets check player has requiredTools for upgrade
|
||||
|
||||
@@ -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;
|
||||
*/
|
||||
};
|
||||
};
|
||||
@@ -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;
|
||||
*/
|
||||
};
|
||||
};
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
private ["_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate",
|
||||
"_upgradeClass","_msg","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID",
|
||||
"_upgradeClass","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID",
|
||||
"_ownerArray","_ownerPasscode","_dir","_vector","_object","_puid","_clanArray","_wh","_variables"];
|
||||
|
||||
//systemchat str _this;
|
||||
@@ -43,19 +43,11 @@ if (isArray(configFile >> "CfgVehicles" >> _type >> "Upgrade" >> "randomcreate")
|
||||
};
|
||||
|
||||
_upgradeClass = configFile >> "CfgVehicles" >> _upgradeType;
|
||||
if (!isClass _upgradeClass) exitWith {
|
||||
//localize "str_upgradeNoOption" call dayz_rollingMessages;
|
||||
_msg = localize "str_upgradeNoOption";
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if (!isClass _upgradeClass) exitWith { localize "str_upgradeNoOption" call dayz_rollingMessages; };
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
if(_isWater or _onLadder) exitWith {
|
||||
//systemchat[localize "str_CannotUpgrade"];
|
||||
_msg = localize "str_CannotUpgrade";
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if(_isWater or _onLadder) exitWith { localize "str_disassemble_cant_do" call dayz_rollingMessages; };
|
||||
|
||||
// lets check player has requiredTools for upgrade
|
||||
_ok = true;
|
||||
@@ -67,11 +59,7 @@ _missing = "";
|
||||
_ok = false;
|
||||
};
|
||||
} count _requiredTools;
|
||||
if (!_ok) exitWith {
|
||||
//systemChat format[localize "str_upgradeMissingTool", _missing]; //"Missing %1 to upgrade building."
|
||||
_msg = format [localize "str_upgradeMissingTool", _missing];
|
||||
_msg call dayz_rollingMessages;
|
||||
};
|
||||
if (!_ok) exitWith { format [localize "str_upgradeMissingTool", _missing] call dayz_rollingMessages; };
|
||||
|
||||
// lets check player has requiredParts for upgrade
|
||||
_ok = true;
|
||||
@@ -88,17 +76,13 @@ _upgradeParts = [];
|
||||
} count _requiredParts;
|
||||
if (!_ok) exitWith {
|
||||
{ player addMagazine _x; } foreach _upgradeParts;
|
||||
//systemChat format[localize "str_upgradeMissingPart", _missing]; //"Missing %1 to upgrade building."
|
||||
_msg = format [localize "str_upgradeMissingPart", _missing];
|
||||
_msg call dayz_rollingMessages;
|
||||
format [localize "str_upgradeMissingPart", _missing] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
//Upgrade Started
|
||||
if ((player getVariable["alreadyBuilding",0]) == 1) exitWith {
|
||||
{ player addMagazine _x; } foreach _upgradeParts;
|
||||
//localize "str_upgradeInProgress" call dayz_rollingMessages;
|
||||
_msg = localize "str_upgradeInProgress";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_upgradeInProgress" call dayz_rollingMessages;
|
||||
};
|
||||
player setVariable["alreadyBuilding",1];
|
||||
|
||||
@@ -178,7 +162,4 @@ player reveal _object;
|
||||
|
||||
//Make sure its unlocked
|
||||
player setVariable["alreadyBuilding",0];
|
||||
//localize "str_upgradeDone" call dayz_rollingMessages;
|
||||
|
||||
_msg = localize "str_upgradeDone";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_upgradeDone" call dayz_rollingMessages;
|
||||
@@ -26,7 +26,7 @@ _attachment = _this select 0;
|
||||
if (!(_attachment in magazines player)) exitWith
|
||||
{
|
||||
closeDialog 0;
|
||||
"You seem to have misplaced the attachment." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_PLAYER_330" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
//Get player's primary weapon or sidearm
|
||||
|
||||
@@ -9,12 +9,12 @@ _hasSledgeHammer = "ItemSledge" in items player;
|
||||
_hasCrowbar = "ItemCrowbar" in items player;
|
||||
|
||||
if (!_hasSledgeHammer) exitWith {
|
||||
"You need a SledgeHammer to break into this compound" call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_NEED_SLEDGE" call dayz_rollingMessages;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
if (!_hasCrowbar) exitWith {
|
||||
"You need a crowbar to break into this compound." call dayz_rollingMessages;
|
||||
if (!_hasCrowbar) exitWith {
|
||||
localize "STR_EPOCH_BREAKIN_NEED_CROWBAR" call dayz_rollingMessages;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
@@ -30,13 +30,13 @@ while {_isOk} do {
|
||||
|
||||
if (!_hasSledgeHammer) exitWith {
|
||||
_proceed = nil;
|
||||
"You need a sledge hammer to break into a gate." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_NEED_SLEDGE" call dayz_rollingMessages;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
if (!_hasCrowbar) exitWith {
|
||||
_proceed = nil;
|
||||
"You need a crowbar to break into a gate." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_NEED_CROWBAR" call dayz_rollingMessages;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
@@ -106,13 +106,13 @@ while {_isOk} do {
|
||||
player removeWeapon "ItemSledge";
|
||||
player addMagazine "ItemSledgeHandle";
|
||||
player addMagazine "ItemSledgeHead";
|
||||
"Your SledgeHammer handle has snapped." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_BROKEN_SLEDGE" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
if ([0.04] call fn_chance) then {
|
||||
player removeWeapon "ItemCrowbar";
|
||||
player addWeapon "ItemCrowbarBent";
|
||||
"Your crowbar has bent." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_BENT_CROWBAR" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -123,7 +123,7 @@ while {_isOk} do {
|
||||
_proceed = true;
|
||||
};
|
||||
|
||||
format["Breaking into compound, attempt (%1 of %2).", _counter,_limit] call dayz_rollingMessages;
|
||||
format [localize "STR_EPOCH_BREAKIN", _counter,_limit] call dayz_rollingMessages;
|
||||
uiSleep 0.03;
|
||||
};
|
||||
//Tool issues
|
||||
@@ -136,7 +136,7 @@ if (!_proceed) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
"Break in cancelled." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_CANCELLED" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
// Working-Factor for chopping wood.
|
||||
@@ -144,11 +144,11 @@ if (!_proceed) then {
|
||||
|
||||
//Completed but no success.
|
||||
if (_proceed and !_brokein) then {
|
||||
format["Break in attempt completed with little success", _counter,_limit] call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_COMPLETE_FAIL" call dayz_rollingMessages;
|
||||
};
|
||||
//Completed and successful
|
||||
if (_proceed and _brokein) then {
|
||||
"Break in attempt successful." call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_BREAKIN_COMPLETE" call dayz_rollingMessages;
|
||||
|
||||
//Open Gate.
|
||||
_target animate ["DoorR", 1];
|
||||
|
||||
@@ -4,7 +4,7 @@ private ["_classType","_item","_action","_missingTools","_missingItem","_emergin
|
||||
"_o","_offset","_rot","_r","_p","_bn","_bb","_h","_bx","_by","_minElevation","_maxElevation","_insideCheck","_building",
|
||||
"_unit","_bbb","_ubb","_check","_min","_max","_myX","_myY","_checkBuildingCollision","_objColliding","_inside","_checkOnRoad",
|
||||
"_roadCollide","_checkBeam2Magnet","_a","_beams","_best","_b","_d","_checkNotBuried","_elevation","_position","_delta","_overElevation",
|
||||
"_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild","_byPassChecks","_keepOnSlope","_msg",
|
||||
"_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild","_byPassChecks","_keepOnSlope",
|
||||
"_ok","_missing","_upgradeParts","_ownerID","_posReference"];
|
||||
/*
|
||||
Needs a full rewrite to keep up with the demand of everything we plan to add.
|
||||
@@ -48,9 +48,7 @@ _isWater = {(surfaceIsWater (getPosATL _object)) or dayz_isSwimming};
|
||||
|
||||
if (0 != count Dayz_constructionContext) then {
|
||||
r_action_count = 0;
|
||||
//localize "str_already_building" call dayz_rollingMessages;
|
||||
_msg = localize "str_already_building";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_already_building" call dayz_rollingMessages;
|
||||
diag_log [ diag_ticktime, __FILE__, 'already building, exiting', Dayz_constructionContext, typeName Dayz_constructionContext];
|
||||
};
|
||||
|
||||
@@ -61,9 +59,7 @@ if (isClass (configFile >> _isClass >> _item)) then {
|
||||
case (_item isKindOf "Land_A_tent"): {"str_player_31_pitch"};
|
||||
default {"str_player_31_build"};
|
||||
};
|
||||
//format[localize "str_player_31",_text,(localize _string)] call dayz_rollingMessages;
|
||||
_msg = format [localize "str_player_31",_text,(localize _string)];
|
||||
_msg call dayz_rollingMessages;
|
||||
format[localize "str_player_31",_text,(localize _string)] call dayz_rollingMessages;
|
||||
//diag_log(format["player_build: item:%1 require:%2 Player items:%3 magazines:%4", _item, _requiredTools, (items player), (magazines player)]);
|
||||
};
|
||||
};
|
||||
@@ -81,9 +77,7 @@ _missing = "";
|
||||
|
||||
if (!_ok) exitWith {
|
||||
r_action_count = 0;
|
||||
//format[localize "str_player_31_missingtools",_text,_missing] call dayz_rollingMessages;
|
||||
_msg = format [localize "str_player_31_missingtools",_text,_missing];
|
||||
_msg call dayz_rollingMessages;
|
||||
format[localize "str_player_31_missingtools",_text,_missing] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
_posReference = [player] call FNC_GetPos;
|
||||
@@ -106,14 +100,10 @@ _upgradeParts = [];
|
||||
if (!_ok) exitWith {
|
||||
{ player addMagazine _x; } foreach _upgradeParts;
|
||||
r_action_count = 0;
|
||||
// format[localize "str_player_31", _missing, localize "str_player_31_build"] call dayz_rollingMessages;
|
||||
_msg = format [localize "str_player_31", _missing, localize "str_player_31_build"];
|
||||
_msg call dayz_rollingMessages;
|
||||
format[localize "str_player_31", _missing, localize "str_player_31_build"] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
//localize "str_player_build_rotate" call dayz_rollingMessages;
|
||||
_msg = localize "str_player_build_rotate";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "str_player_build_rotate" call dayz_rollingMessages;
|
||||
|
||||
//Get fence beams based on model
|
||||
_getBeams = {
|
||||
|
||||
@@ -31,11 +31,7 @@ if ((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState p
|
||||
};
|
||||
|
||||
//player doesn't have the consumable item
|
||||
if (!(_this in magazines player)) exitWith
|
||||
{
|
||||
//TODO move to stringtable
|
||||
"You seem to have misplaced the container." call dayz_rollingMessages;
|
||||
};
|
||||
if (!(_this in magazines player)) exitWith { localize "STR_EPOCH_PLAYER_329" call dayz_rollingMessages; };
|
||||
|
||||
//Remove container
|
||||
player removeMagazine _this;
|
||||
|
||||
@@ -5,7 +5,7 @@ _item = _this;
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
|
||||
if(dayz_workingInprogress) exitWith { "Mining already in progress!" call dayz_rollingMessages;};
|
||||
if(dayz_workingInprogress) exitWith { localize "STR_MINING_IN_PROGRESS" call dayz_rollingMessages; };
|
||||
dayz_workingInprogress = true;
|
||||
|
||||
// allowed rocks list move this later
|
||||
|
||||
@@ -32,14 +32,14 @@ _fn_Lockold = {
|
||||
_target animate ["DoorR", 0];
|
||||
_target animate ["DoorL", 0];
|
||||
_target setVariable ["isOpen", "0", true];
|
||||
"Gates locked." call dayz_rollingMessages;
|
||||
localize "STR_BLD_GATES_LOCKED" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
_fn_UnLockold = {
|
||||
if (typeOf _target in ["WoodenGate_2","WoodenGate_3","WoodenGate_4"]) then {
|
||||
_target setVariable ["isOpen", "1", true];
|
||||
"Gates Unlocked." call dayz_rollingMessages;
|
||||
localize "STR_BLD_GATES_UNLOCKED" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ _fn_Open = {
|
||||
if (typeOf _target in ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"]) then {
|
||||
_target animate ["DoorR", 1];
|
||||
_target animate ["DoorL", 1];
|
||||
"Gates Opened." call dayz_rollingMessages;
|
||||
localize "STR_BLD_GATES_OPENED" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ _fn_Closed = {
|
||||
if (typeOf _target in ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"]) then {
|
||||
_target animate ["DoorR", 0];
|
||||
_target animate ["DoorL", 0];
|
||||
"Gates Closed." call dayz_rollingMessages;
|
||||
localize "STR_BLD_GATES_CLOSED" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ _newWeaponConfig = configFile >> "CfgWeapons" >> _newWeapon >> "Attachments";
|
||||
if (!isClass(_newWeaponConfig) || {getText(_newWeaponConfig >> _attachment) != _weapon}) exitWith
|
||||
{
|
||||
closeDialog 0;
|
||||
"Cannot remove attachment." call dayz_rollingMessages;
|
||||
localize "str_Attachmentcantremove" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
_weaponInUse = (currentWeapon player == _weapon);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_item","_use","_repair","_waterUsed","_displayName","_msg"];
|
||||
private ["_item","_use","_repair","_waterUsed","_displayName"];
|
||||
|
||||
//['ItemKnifeBlunt','ItemKnife']
|
||||
_item = _this select 0; //Item to be sharpened
|
||||
@@ -17,15 +17,13 @@ closeDialog 1;
|
||||
// item is missing or tools are missing
|
||||
if (isNil "_waterUsed") exitWith {
|
||||
//_displayName = getText (configFile >> "CfgMagazines" >> _use >> "displayName");
|
||||
_msg = "Missing Water";
|
||||
_msg call dayz_rollingMessages;
|
||||
localize "STR_EPOCH_PLAYER_327" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
// item is missing or tools are missing
|
||||
if (!(_item IN items player)) exitWith {
|
||||
_displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName");
|
||||
_msg = format["Missing %1",_displayName];
|
||||
_msg call dayz_rollingMessages;
|
||||
format [localize "str_cannotCraft",_displayName] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
if (player hasWeapon _item) then {
|
||||
@@ -46,6 +44,5 @@ if (player hasWeapon _item) then {
|
||||
//Remove Later
|
||||
player removeMagazine "equip_brick";
|
||||
|
||||
_msg = format ["%1 has been Sharpened",_displayName];
|
||||
_msg call dayz_rollingMessages;
|
||||
format [localize "STR_EPOCH_PLAYER_328",_displayName] call dayz_rollingMessages;
|
||||
};
|
||||
@@ -18,7 +18,7 @@ if(player distance _vehicle < 10) then {
|
||||
publicVariable "PVDZE_veh_Lock";
|
||||
};
|
||||
|
||||
format["%1 used to unlock vehicle.",_key] call dayz_rollingMessages;
|
||||
format["STR_EPOCH_PLAYER_331",_key] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
s_player_lockUnlock_crtl = -1;
|
||||
|
||||
Reference in New Issue
Block a user