mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
18 lines
383 B
Plaintext
18 lines
383 B
Plaintext
|
// by commy2
|
||
|
|
||
|
#define FACTOR_POUND_TO_KILOGRAMM 1/2.2046
|
||
|
|
||
|
private ["_unit", "_weight"];
|
||
|
|
||
|
_unit = _this select 0;
|
||
|
|
||
|
_weight = loadAbs _unit * 0.1;
|
||
|
|
||
|
if (profileNamespace getVariable ["AGM_useImperial", false]) then {
|
||
|
_weight = format ["%1lb", (round (_weight * 100)) / 100];
|
||
|
} else {
|
||
|
_weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100];
|
||
|
};
|
||
|
|
||
|
_weight
|