mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Add stat for scope magnification (#6150)
This commit is contained in:
parent
5bb27a28a7
commit
741407f6e1
@ -66,6 +66,14 @@ class GVAR(stats) {
|
||||
barStatement = QUOTE([ARR_3(_this select 0, _this select 1, [ARR_3([ARR_2(0, 3.2)], [ARR_2(-1, 1100)], 2006)])] call FUNC(statBarStatement_impact));
|
||||
tabs[] = {{0,1,2}, {}};
|
||||
};
|
||||
class ACE_scopeMagnification: statBase {
|
||||
scope = 2;
|
||||
priority = 2;
|
||||
displayName = CSTRING(statMagnification);
|
||||
showText = 1;
|
||||
textStatement = QUOTE(call FUNC(statTextStatement_scopeMag));
|
||||
tabs[] = {{}, {0}};
|
||||
};
|
||||
class ACE_ballisticProtection: statBase {
|
||||
scope = 2;
|
||||
priority = 5;
|
||||
|
@ -52,6 +52,7 @@ PREP(statBarStatement_impact);
|
||||
PREP(statTextStatement_accuracy);
|
||||
PREP(statTextStatement_mass);
|
||||
PREP(statTextStatement_rateOfFire);
|
||||
PREP(statTextStatement_scopeMag);
|
||||
PREP(updateCamPos);
|
||||
PREP(updateRightPanel);
|
||||
PREP(updateUniqueItemsList);
|
||||
|
26
addons/arsenal/functions/fnc_statTextStatement_scopeMag.sqf
Normal file
26
addons/arsenal/functions/fnc_statTextStatement_scopeMag.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
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]
|
@ -686,6 +686,22 @@
|
||||
<English>Potassium levels</English>
|
||||
<French>Taux de potassium</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_statMagnification">
|
||||
<English>Magnification</English>
|
||||
<Chinese>放大倍率</Chinese>
|
||||
<French>Grossissement</French>
|
||||
<Spanish>Aumento</Spanish>
|
||||
<Italian>Ingrandimento</Italian>
|
||||
<Polish>Powiększenie</Polish>
|
||||
<Russian>Увеличение</Russian>
|
||||
<German>Vergrößerung</German>
|
||||
<Czech>Zvětšení</Czech>
|
||||
<Portuguese>Aumentox</Portuguese>
|
||||
<Korean>배율</Korean>
|
||||
<Chinesesimp>放大倍数</Chinesesimp>
|
||||
<Japanese>拡大</Japanese>
|
||||
<Turkish>Büyütme</Turkish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_page">
|
||||
<English>Page</English>
|
||||
<French>Page</French>
|
||||
|
Loading…
Reference in New Issue
Block a user