mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
show virtual load in inventory menu
This commit is contained in:
parent
be99d4b3d7
commit
f738b17db7
@ -17,6 +17,7 @@
|
||||
params [["_unit", objNull, [objNull]], ["_container", objNull, [objNull]], ["_virtualLoadToAdd", 0, [0]]];
|
||||
|
||||
if !(_container in [
|
||||
_unit,
|
||||
uniformContainer _unit,
|
||||
vestContainer _unit,
|
||||
backpackContainer _unit
|
||||
|
@ -17,7 +17,18 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _weight = loadAbs _unit * 0.1;
|
||||
private _virtualLoad = 0;
|
||||
|
||||
{
|
||||
_virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
|
||||
} forEach [
|
||||
_unit,
|
||||
uniformContainer _unit,
|
||||
vestContainer _unit,
|
||||
backpackContainer _unit
|
||||
];
|
||||
|
||||
private _weight = (loadAbs _unit + _virtualLoad) * 0.1;
|
||||
|
||||
if (GVAR(useImperial)) then {
|
||||
_weight = format ["%1lb", (round (_weight * 100)) / 100];
|
||||
|
@ -20,6 +20,7 @@ private _virtualLoad = 0;
|
||||
{
|
||||
_virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
|
||||
} forEach [
|
||||
_unit,
|
||||
uniformContainer _unit,
|
||||
vestContainer _unit,
|
||||
backpackContainer _unit
|
||||
|
Loading…
Reference in New Issue
Block a user