From 99d9f12add02838f294f44e70538f15af73d9ccf Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 7 Apr 2016 20:32:34 -0400 Subject: [PATCH] Add back R3F weight text in object_monitorGear The size of control 1001 was shortened in 1.8.7, so it is better to set it on control 156. The initial text is always blank for that control when cursorTarget isNull. Showing the weight carried when looking at an object or vehicle is not necessary. It cuts off with long vehicle names anyway. --- SQF/dayz_code/compile/object_monitorGear.sqf | 8 ++++++++ .../R3F_Realism/R3F_Weight/R3F_DoWeight.sqf | 10 ++-------- .../R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf | 2 +- SQF/dayz_code/stringtable.xml | 14 +++++++------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/SQF/dayz_code/compile/object_monitorGear.sqf b/SQF/dayz_code/compile/object_monitorGear.sqf index 45aa9645e..017a07d6d 100644 --- a/SQF/dayz_code/compile/object_monitorGear.sqf +++ b/SQF/dayz_code/compile/object_monitorGear.sqf @@ -103,5 +103,13 @@ if (!(isNull (findDisplay 106))) then { (_display displayCtrl (_imageIDCs select _i)) ctrlShow false; (_display displayCtrl (_valueIDCs select _i)) ctrlShow false; }; + if (isNull _object) then { + while {!(isNull (findDisplay 106))} do { + R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight; + _control = _display displayCtrl 156; + _control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",R3F_Weight]; + uiSleep 1; + }; + }; }; }; diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf index 068e8e9ec..aff6a2ed1 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf @@ -31,14 +31,8 @@ while {true} do _gearbox_visible = false; #endif - if(_gearbox_visible) then { - R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight; - if(_initial_text == "") then { - _control = _display displayCtrl ARMA2_CAPTIONGEARBOX; - _initial_text = ctrlText _control ; - }; - _control = _display displayCtrl ARMA2_CAPTIONGEARBOX; - _control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight]; + if (_gearbox_visible) then { + //Moved code to object_monitorGear.sqf _n = 0; }else{ if( _n > R3F_WEIGHT_LONG_DELAY) then { diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index d04d7a798..c55cb42e4 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -53,7 +53,7 @@ R3F_WEIGHT_FNCT_GetItemWeight = { _total_weight = _total_weight + _weight; } else { // log only if not found - diag_log format["No R3F weight config for: %1", _x]; + //diag_log format["No R3F weight config for: %1", _x]; }; }; }; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 76a794b2b..c6d998397 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -13773,13 +13773,13 @@ Opustili jste %1 - %1 | Weight carried : %2 lb - %1 | Getragenes Gewicht : %2 Kg - %1 | Переносимый вес : %2 Кг - %1 | Weight carried : %2 Kg - %1 | Dragend gewicht : %2 Kg - %1 | Poids transporté : %2 Kg - %1 | Nesená váha : %2 Kg + Weight carried : %1 lb + Getragenes Gewicht : %1 Kg + Переносимый вес : %1 Кг + Weight carried : %1 Kg + Dragend gewicht : %1 Kg + Poids transporté : %1 Kg + Nesená váha : %1 Kg lb