mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Add stat for capabilities of pointer attachments (#9499)
* Arsenal - Add stat for illuminator//pointer attachments * Update fnc_statTextStatement_illuminators.sqf * Update fnc_statTextStatement_illuminators.sqf
This commit is contained in:
parent
f45b67222b
commit
dd0838b2d7
@ -152,4 +152,13 @@ class GVAR(stats) {
|
|||||||
textStatement = QUOTE(call FUNC(statTextStatement_magCount));
|
textStatement = QUOTE(call FUNC(statTextStatement_magCount));
|
||||||
tabs[] = {{}, {4}};
|
tabs[] = {{}, {4}};
|
||||||
};
|
};
|
||||||
|
class ACE_illuminators: statBase {
|
||||||
|
scope = 2;
|
||||||
|
priority = 1;
|
||||||
|
stats[] = {};
|
||||||
|
displayName = CSTRING(statIlluminators);
|
||||||
|
showText = 1;
|
||||||
|
textStatement = QUOTE(call FUNC(statTextStatement_illuminators));
|
||||||
|
tabs[] = {{}, {1}};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -93,6 +93,7 @@ PREP(statBarStatement_impact);
|
|||||||
PREP(statBarStatement_rateOfFIre);
|
PREP(statBarStatement_rateOfFIre);
|
||||||
PREP(statTextStatement_accuracy);
|
PREP(statTextStatement_accuracy);
|
||||||
PREP(statTextStatement_explosionTime);
|
PREP(statTextStatement_explosionTime);
|
||||||
|
PREP(statTextStatement_illuminators);
|
||||||
PREP(statTextStatement_magCount);
|
PREP(statTextStatement_magCount);
|
||||||
PREP(statTextStatement_mass);
|
PREP(statTextStatement_mass);
|
||||||
PREP(statTextStatement_rateOfFire);
|
PREP(statTextStatement_rateOfFire);
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: PabstMirror
|
||||||
|
* Text statement for the pointer slot capabilites.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Not used
|
||||||
|
* 1: Item config path <CONFIG>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Stat Text <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [[], configFile >> "CfgWeapons" >> "acc_pointer_IR"] call ace_arsenal_fnc_statTextStatement_illuminators
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["", "_config"];
|
||||||
|
TRACE_1("statTextStatement_illuminators",_config);
|
||||||
|
|
||||||
|
private _allModes = [];
|
||||||
|
private _allItems = [configName _config] call CBA_fnc_switchableAttachments;
|
||||||
|
if (_allItems isEqualTo []) then { _allItems = [configName _config] };
|
||||||
|
|
||||||
|
{
|
||||||
|
private _xCfg = configFile >> "CfgWeapons" >> _x >> "ItemInfo";
|
||||||
|
private _laser = (getText (_xCfg >> "Pointer" >> "irLaserPos")) != "";
|
||||||
|
private _illum = (getNumber (_xCfg >> "Flashlight" >> "intensity")) > 0;
|
||||||
|
private _isIR = (_laser && {([_xCfg >> "Pointer" >> "isIR", "NUMBER", 1] call CBA_fnc_getConfigEntry) == 1})
|
||||||
|
|| {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}};
|
||||||
|
|
||||||
|
private _text = switch (true) do { // shorthand roughly based on PEQ-15
|
||||||
|
case (_laser && _illum): { if (_isIR) then { "IR-DUAL" } else { "VIS-DUAL" } };
|
||||||
|
case (_laser): { if (_isIR) then { "IR-AIM" } else { "VIS-AIM" } }; // AIM
|
||||||
|
case (_illum): { if (_isIR) then { "IR-ILM" } else { "VIS-ILM" } }; // ILLUMIATION
|
||||||
|
default { "_" }; // there are some purely cosmetic attachements
|
||||||
|
};
|
||||||
|
_allModes pushBackUnique _text;
|
||||||
|
} forEach _allItems;
|
||||||
|
|
||||||
|
_allModes joinString ", "
|
@ -1593,6 +1593,9 @@
|
|||||||
<German>Munitionszahl</German>
|
<German>Munitionszahl</German>
|
||||||
<Korean>장탄 수</Korean>
|
<Korean>장탄 수</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_statIlluminators">
|
||||||
|
<English>Illuminators</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_defaultToFavoritesSetting">
|
<Key ID="STR_ACE_Arsenal_defaultToFavoritesSetting">
|
||||||
<English>Default to Favorites</English>
|
<English>Default to Favorites</English>
|
||||||
<Japanese>お気に入りをデフォルト</Japanese>
|
<Japanese>お気に入りをデフォルト</Japanese>
|
||||||
|
Loading…
Reference in New Issue
Block a user