2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2018-02-18 01:32:19 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Text statement for the scope magnification stat.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: not used
|
|
|
|
* 1: item config path (CONFIG)
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* String to display
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["", "_config"];
|
|
|
|
TRACE_1("statTextStatement_scopeMag",_config);
|
|
|
|
|
|
|
|
private _minZoom = 999; // FOV, so smaller is more zoomed in
|
|
|
|
{
|
|
|
|
_minZoom = _minZoom min (getNumber (_x >> "opticsZoomMin"));
|
|
|
|
} forEach configProperties [_config >> "ItemInfo" >> "OpticsModes"];
|
|
|
|
|
|
|
|
if (_minZoom in [0, 999]) exitWith {"?"};
|
|
|
|
|
|
|
|
format ["%1x", (0.25/_minZoom) toFixed 1]
|