From 2ca7bf59c737e448584afe7f624557f49909d5a8 Mon Sep 17 00:00:00 2001 From: oiad Date: Sun, 24 Jul 2016 16:20:39 +1200 Subject: [PATCH] Tidyness changes This changes a few functions that were being used to use the already defined variables instead Fixed a few string issues with Advanced trading and plot managment. --- SQF/dayz_code/actions/modular_build.sqf | 4 ++-- SQF/dayz_code/actions/player_build.sqf | 6 ++--- SQF/dayz_code/actions/player_upgrade.sqf | 8 ++++--- SQF/dayz_code/stringtable.xml | 30 ++++++++++++------------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index d4347c5e1..9239fef30 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -532,7 +532,7 @@ if (_canBuild select 0) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []]; if (_lockable == 3) then { - _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _friendsArr = [[_playerUID,(name player)]]; _tmpbuilt setVariable ["doorfriends", _friendsArr, true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr]; }; @@ -553,7 +553,7 @@ if (_canBuild select 0) then { if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; if (_canBuild select 1) then { - _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _friendsArr = [[_playerUID,(name player)]]; _tmpbuilt setVariable ["plotfriends", _friendsArr, true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr]; } else { diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 30f98df9c..c0ec31152 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -440,7 +440,7 @@ if (_canBuild select 0) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname]; if (_lockable == 3) then { - _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _friendsArr = [[_playerUID,(name player)]]; _tmpbuilt setVariable ["doorfriends", _friendsArr, true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr]; }; @@ -461,7 +461,7 @@ if (_canBuild select 0) then { if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; if (_canBuild select 1) then { - _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _friendsArr = [[_playerUID,(name player)]]; _tmpbuilt setVariable ["plotfriends", _friendsArr, true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_friendsArr]; } else { @@ -477,7 +477,6 @@ if (_canBuild select 0) then { deleteVehicle _tmpbuilt; localize "str_epoch_player_46" call dayz_rollingMessages; }; - } else { r_interrupt = false; if (vehicle player == player) then { @@ -489,7 +488,6 @@ if (_canBuild select 0) then { localize "str_epoch_player_46" call dayz_rollingMessages; }; - } else { format[localize "str_epoch_player_47",_text,_reason] call dayz_rollingMessages; }; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 08c58217b..10381c436 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -2,7 +2,7 @@ DayZ Base Building Upgrades Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_ownerID"]; +private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_ownerID","_playerUID"]; if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;}; DZE_ActionInProgress = true; @@ -19,6 +19,8 @@ _objectID = _obj getVariable ["ObjectID","0"]; // Find objectUID _objectUID = _obj getVariable ["ObjectUID","0"]; +_playerUID = [player] call FNC_GetPlayerUID; + if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;}; // Get classname @@ -126,10 +128,10 @@ if ((count _upgrade) > 0) then { }; if (DZE_permanentPlot) then { _ownerID = _obj getVariable["ownerPUID","0"]; - if (_ownerID == "0") then { _ownerID = [player] call FNC_GetPlayerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership. + if (_ownerID == "0") then { _ownerID = _playerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership. _object setVariable ["ownerPUID",_ownerID,true]; if (_lockable == 3) then { - _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _friendsArr = [[_playerUID,(name player)]]; _object setVariable ["doorfriends", _friendsArr, true]; PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player,_friendsArr]; } else { diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index b865b2593..5958a04e6 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -16196,23 +16196,23 @@ Вы можете купить в снаряжение: оружия-%1, пистолетов-%2, инструментов-%3. - You can only buy %1 magazines in your gear. + You can only buy %1 magazines into your gear. Вы можете купить предметов в снаряжение: %1. - You can only buy %1 backpacks in your gear. + You can only buy %1 backpacks into your gear. Вы можете купить рюкзаков в снаряжение: %1. - You can only buy %1 weapons in your vehicle. + You can only buy %1 weapons into your vehicle. Вы можете купить оружия в ваш автомобиль: %1. - You can only buy %1 magazines in your vehicle. + You can only buy %1 magazines into your vehicle. Вы можете купить предметов в ваш автомобиль: %1. - You can only buy %1 backpacks in your vehicle. + You can only buy %1 backpacks into your vehicle. Вы можете купить рюкзаков в ваш транспорт: %1. @@ -16223,15 +16223,15 @@ Total backpack space exceeded. - Only %1 weapons fit in the backpack. + Only %1 weapons will fit into your backpack. В рюкзак поместится оружия: %1. - Only %1 mags fit in the backpack. + Only %1 mags will fit into your backpack. В рюкзак поместится предметов: %1. - Only %1 bags fit in the backpack. + Only %1 bags will fit into your backpack. В рюкзак поместится рюкзаков: %1. @@ -16257,19 +16257,19 @@ Продажа завершена. - Trade successfull, paid:%1. + Trade successfull, you paid:%1. Продано! С вас %1. - Trade successfull, received:%1. + Trade successfull, you received:%1. Продажа завершена. Получено:%1 - Trade successfull, paid %1 %2. + Trade successfull, you paid %1 %2. Продано! С вас %1 %2. - Trade successfull, received %1 %2 + Trade successfull, you received %1 %2 Продажа завершена. Получено %1 %2 @@ -16307,7 +16307,7 @@ Выбрано: %1 - Buying in %1. + Buying into %1. Покупка в %1. @@ -16343,12 +16343,12 @@ ОШИБКА: Требуется денег: %1 %2 ! - Already on the list + That user is already on the list Уже в списке друзей Schon auf der Liste - Only %1 friends allowed + Only %1 friends are allowed Можно добавить друзей: %1 Nur %1 Freunde erlaubt