diff --git a/SQF/dayz_code/actions/object_upgradeStorage.sqf b/SQF/dayz_code/actions/object_upgradeStorage.sqf
index f89fce7e5..f7a5d2f54 100644
--- a/SQF/dayz_code/actions/object_upgradeStorage.sqf
+++ b/SQF/dayz_code/actions/object_upgradeStorage.sqf
@@ -1,13 +1,10 @@
/*
- This script is not part of dayz permission must be given to use. r4z0r49@gmail.com or skype me R4Z0R49.
-
Simple class system to use this script.
class Upgrade {
requiredTools[] = {"ItemToolbox"};
requiredParts[] = {"equip_crate","PartWoodPile"};
create = "TentStorage1";
- };
-
+ };
*/
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
dayz_actionInProgress = true;
@@ -19,6 +16,17 @@ private ["_cursorTarget","_item","_classname","_requiredTools","_requiredParts",
_cursorTarget = _this select 3;
+//get ownerID from old tent.
+_ownerID = _cursorTarget getVariable ["characterID","0"];
+_objectID = _cursorTarget getVariable ["ObjectID","0"];
+_objectUID = _cursorTarget getVariable ["ObjectUID","0"];
+
+//make sure the player is still looking at something to get the cursorTarget and UID
+if (isNil "_cursorTarget" or {isNull _cursorTarget} or {_objectUID == "0" && (_objectID == "0")}) exitWith {
+ localize "str_cursorTargetNotFound" call dayz_rollingMessages;
+ dayz_actionInProgress = false;
+};
+
_item = typeof _cursorTarget;
//diag_log (str(_item));
@@ -57,10 +65,6 @@ _startUpgrade = true;
if(_isWater or _onLadder) exitWith {dayz_actionInProgress = false; localize "str_CannotUpgrade" call dayz_rollingMessages;};
-// Make sure you are the closest player to the object
-_playerNear = _cursorTarget call dze_isnearest_player;
-if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
-
// Make sure no other players are nearby
_playerNear = {isPlayer _x} count (([_cursorTarget] call FNC_GetPos) nearEntities ["CAManBase",10]) > 1;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
@@ -104,11 +108,6 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
// Added Nutrition-Factor for work
["Working",0,[100,15,5,0]] call dayz_NutritionSystem;
- //get ownerID from old tent.
- _ownerID = _cursorTarget getVariable ["characterID","0"];
- _objectID = _cursorTarget getVariable ["ObjectID","0"];
- _objectUID = _cursorTarget getVariable ["ObjectUID","0"];
-
//Upgrade
_alreadyupgrading = _cursorTarget getVariable["alreadyupgrading",0];
@@ -126,9 +125,9 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
_cursorTarget setDir 0;
_pos = getPosATL _cursorTarget;
- diag_log [ "dir/angle/pos", _dir, _vector, _pos];
+ //diag_log [ "dir/angle/pos", _dir, _vector, _pos];
if (abs(((_vector select 1) select 2) - 1) > 0.001) then { _pos set [2,0]; };
- diag_log [ "dir/angle/pos - reset elevation if angle is straight", _dir, _vector, _pos];
+ //diag_log [ "dir/angle/pos - reset elevation if angle is straight", _dir, _vector, _pos];
//get contents
_weapons = getWeaponCargo _cursorTarget;
diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml
index 6e696a674..17d72718f 100644
--- a/SQF/dayz_code/stringtable.xml
+++ b/SQF/dayz_code/stringtable.xml
@@ -1611,7 +1611,13 @@
Na tomto objektu nelze provádět údržbu.
Dieses Objekt muss nicht gewartet werden.
-
+
+ You must be looking at the item to interact with it.
+ Вы должны смотреть на предмет, тоже взаимодействующий с ним.
+ Vous devez également regarder l'élément avec lui.
+ Musíte se dívat na tento produkt příliš komunikovat s ním.
+ Sie müssen sich das Produkt anschauen, das auch mit ihm interagiert.
+
Unable to upgrade at this time
Невозможно улучшить в данный момент