mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Show load stat's actual value (#9833)
* Arsenal - Show load stat's actual value * Update addons/arsenal/functions/fnc_statTextStatement_load.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
a3b9c53fd8
commit
9bb9fae85c
@ -123,7 +123,9 @@ class GVAR(stats) {
|
||||
stats[] = {"maximumLoad"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_load";
|
||||
showBar = 1;
|
||||
showText = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0,_this select 1,[ARR_3([ARR_2(0,500)],[ARR_2(0.01,1)],false)])] call FUNC(statBarStatement_default));
|
||||
textStatement = QUOTE(call FUNC(statTextStatement_load));
|
||||
tabs[] = {{3,4,5}, {}};
|
||||
};
|
||||
class ACE_smokeChemTTL: statBase {
|
||||
|
@ -98,6 +98,7 @@ PREP(statBarStatement_rateOfFIre);
|
||||
PREP(statTextStatement_accuracy);
|
||||
PREP(statTextStatement_explosionTime);
|
||||
PREP(statTextStatement_illuminators);
|
||||
PREP(statTextStatement_load);
|
||||
PREP(statTextStatement_magCount);
|
||||
PREP(statTextStatement_mass);
|
||||
PREP(statTextStatement_rateOfFire);
|
||||
|
26
addons/arsenal/functions/fnc_statTextStatement_load.sqf
Normal file
26
addons/arsenal/functions/fnc_statTextStatement_load.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Text statement for the load stat.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Stats <ARRAY>
|
||||
* 1: Item config path <CONFIG>
|
||||
*
|
||||
* Return Value:
|
||||
* Stat Text <STRING>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_stats", "_config"];
|
||||
TRACE_2("statTextStatement_load",_stats,_config);
|
||||
|
||||
if (!isNull (_config >> "ItemInfo" >> "containerClass")) then { // Uniform/Vest
|
||||
_config = configfile >> "CfgVehicles" >> getText (_config >> "ItemInfo" >> "containerClass");
|
||||
};
|
||||
|
||||
private _load = getNumber (_config >> (_stats # 0));
|
||||
|
||||
if (_load <= 0) exitWith { LELSTRING(common,none) };
|
||||
format ["%1kg (%2lb)", (_load * 0.1 * (1 / 2.2046)) toFixed 2, (_load * 0.1) toFixed 2]
|
Loading…
Reference in New Issue
Block a user