mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into BFT
This commit is contained in:
commit
3b181cb1b0
30
.travis.yml
30
.travis.yml
@ -1,30 +0,0 @@
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- release
|
||||
language: python
|
||||
python:
|
||||
- '3.5'
|
||||
before_script:
|
||||
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||
pip install pygithub;
|
||||
pip install pygithub3;
|
||||
fi
|
||||
script:
|
||||
- python3 tools/sqf_validator.py
|
||||
- python3 tools/config_style_checker.py
|
||||
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||
python3 tools/deploy.py;
|
||||
fi
|
||||
env:
|
||||
global:
|
||||
- secure: cdxkn5cAx+s1C9Ne5m+odEhde1uuSg6XGMDgepN4DwSAJwtMnUv3ZmDebd5YJC1raZJdep+n09Cj0GoTNICQRkco50DxHKHYNad41wetY0tn0cs9gmPYzyFE5q4vuWiQ47dlGhQQ7IJDyX0nU++gG5E50/PhlZfebdedGSprN/4=
|
||||
notifications:
|
||||
slack:
|
||||
rooms:
|
||||
- secure: byZMNBl8PMlgjT9NA1WmhgCdGfX4b3g1kA0vEiwfm+IFNlx7BiM4J/5rp6zV/jV470xl/epAejx2tsa5SdTyFbO87NH63ILJSt5QnjUZjRuGKSutFs9WE671DtZkPRSJXHS4N6x802PRkyBz/84/lsc34FWvHvjwOuYAtOcJRFk=
|
||||
- secure: V22TNaLWV+yUNWqR7c6HVvIxkRDz7Dyz9xqa43FY8iFgvNL4Q/X69h5DYHU/ILNFM00tx8OBjtPRbcjWQ+F6eY8Sje/A2axJAU+qNurAvoyiTahXUprdUUpPdkgXWuSRTZ9kALxOq5e11RC8XUietghoMcl8zPcqdrZCOOKgoEM=
|
||||
on_success: change
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
@ -99,16 +99,19 @@ legman <juicemelon@msn.com>
|
||||
Legolasindar "Viper" <legolasindar@gmail.com>
|
||||
licht-im-Norden87 <lichtimnorden87@gmail.com>
|
||||
looter <looter222@gmail.com>
|
||||
Lugubrious Hatchling <thunderbra@gmail.com>
|
||||
Luigi "Luigium" Myrini <luigium@outlook.fr>
|
||||
Macusercom <macusercom@gmail.com>
|
||||
MarcBook
|
||||
meat <p.humberdroz@gmail.com>
|
||||
mharis001 <mhariszakar@gmail.com>
|
||||
Michail Nikolaev
|
||||
MikeMatrix <m.braun92@gmail.com>
|
||||
nic547 <nic547@outlook.com>
|
||||
nikolauska <nikolauska1@gmail.com>
|
||||
nomisum <nomisum@gmail.com>
|
||||
OnkelDisMaster <onkeldismaster@gmail.com>
|
||||
Orbis2358 <mgkid3310@naver.com>
|
||||
oscarmolinadev
|
||||
PaxJaromeMalues <seemax1991@gmail.com>
|
||||
Phyma <sethramstrom@gmail.com>
|
||||
@ -128,6 +131,7 @@ System98
|
||||
SzwedzikPL <szwedzikpl@gmail.com>
|
||||
Tachi <zaveruha007@gmail.com>
|
||||
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
|
||||
Timi007 <timi007@gmx.net>
|
||||
Toaster <jonathan.pereira@gmail.com>
|
||||
Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||
<img src="https://img.shields.io/badge/Version-3.12.1-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.12.3-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -15,7 +16,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_muzzleVelocityShiftTable", "_temperature"];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -18,7 +19,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_ballisticCoefficient", "_temperature"/*in C*/, "_pressure"/*in hPa*/, "_relativeHumidity"/*as ratio 0-1*/, "_atmosphereModel"/*"ICAO" or "ASM"*/];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg, MikeMatrix, joko // Jonas
|
||||
*
|
||||
@ -17,7 +18,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
|
||||
TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -16,7 +17,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Source: GNU Exterior Ballistics
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -20,7 +21,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"];
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: esteldunedain
|
||||
*
|
||||
@ -15,8 +17,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _diagnoseStartTime = diag_tickTime;
|
||||
#ifdef DEBUG_INIT_SPEEDS
|
||||
@ -33,9 +33,7 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
|
||||
if (isClass _weaponConfig) then {
|
||||
private _weapon = configName _weaponConfig;
|
||||
private _weaponType = getNumber (_weaponConfig >> "Type");
|
||||
if (_weaponType in [1, 2]) then {
|
||||
// The weapon is a primary weapon or a handgun weapon
|
||||
|
||||
if (_weaponType in [TYPE_WEAPON_PRIMARY, TYPE_WEAPON_HANDGUN]) then {
|
||||
private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed");
|
||||
private _magazines = getArray (_weaponConfig >> "magazines");
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define __dsp (uiNamespace getVariable "RscProtractor")
|
||||
#define __ctrl1 (__dsp displayCtrl 132950)
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Glowbal, Ruthberg, joko // Jonas
|
||||
* Handle the PFH for Bullets
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
{
|
||||
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Glowbal, Ruthberg
|
||||
*
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
||||
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Glowbal, Ruthberg
|
||||
* Module for adjusting the advanced ballistics settings
|
||||
@ -15,7 +16,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_logic","_units", "_activated"];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Initializes the advanced ballistics dll extension with terrain data
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -25,7 +26,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
TRACE_1("Reading Ammo Config",_this);
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
@ -16,7 +17,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
<Hungarian>Széladatok mutatása</Hungarian>
|
||||
<Czech>Zobrazit údaje o větru</Czech>
|
||||
<Portuguese>Mostrar Informação do Vento</Portuguese>
|
||||
<Japanese>風の情報を表示</Japanese>
|
||||
<Japanese>風の情報を表示する</Japanese>
|
||||
<Korean>바람의 정보를 표시</Korean>
|
||||
<Chinese>顯示風況</Chinese>
|
||||
<Chinesesimp>显示风况</Chinesesimp>
|
||||
@ -28,7 +28,7 @@
|
||||
<Hungarian>Szögmérő mutatása</Hungarian>
|
||||
<Czech>Zobrazit úhloměr</Czech>
|
||||
<Portuguese>Mostrar Transferidor</Portuguese>
|
||||
<Japanese>分度器を表示</Japanese>
|
||||
<Japanese>分度器を表示する</Japanese>
|
||||
<Korean>각도기 표시</Korean>
|
||||
<Chinese>顯示量角器</Chinese>
|
||||
<Chinesesimp>显示量角器</Chinesesimp>
|
||||
@ -76,7 +76,7 @@
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику</Russian>
|
||||
<Italian>Abilita Balistica Avanzata</Italian>
|
||||
<Japanese>アドバンスド バリスティックス</Japanese>
|
||||
<Japanese>アドバンスド バリスティックスを有効化します。</Japanese>
|
||||
<Korean>고급 탄도학을 적용합니다</Korean>
|
||||
<Chinese>啟用先進彈道系統</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统</Chinesesimp>
|
||||
@ -84,14 +84,22 @@
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_DisplayName">
|
||||
<English>Enable Muzzle Velocity Variation</English>
|
||||
<German>Variation der Mündungsgeschwindigkeit aktivieren</German>
|
||||
<Japanese>銃口初速の変化</Japanese>
|
||||
<Japanese>銃口初速の変動を有効化する</Japanese>
|
||||
<Italian>Abilita Variazione Velocità Volata</Italian>
|
||||
<Korean>총구속도 변화적용</Korean>
|
||||
<Chinese>啟用槍口初速變化</Chinese>
|
||||
<Chinesesimp>启用枪口初速变化</Chinesesimp>
|
||||
<French>Activer les variations de la vitesse initiale</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_Description">
|
||||
<English>Simulates slight variations in muzzle velocity between each shot</English>
|
||||
<German>Simuliert leichte Variationen der Mündungsgeschwindigkeit zwischen jedem Schuss.</German>
|
||||
<Japanese>発射毎に僅かな銃口初速の変化をシミュレートします。</Japanese>
|
||||
<Japanese>発射毎の銃口初速の変動をシミュレートします。</Japanese>
|
||||
<Italian>Simula lievi variazioni della velocità della volata tra un colpo e l'altro</Italian>
|
||||
<Korean>각 사격 사이에 총구속도 변화를 시뮬레이션 합니다.</Korean>
|
||||
<Chinese>模擬每發子彈的槍口初速都略有不同</Chinese>
|
||||
<Chinesesimp>模拟每发子弹的枪口初速都略有不同</Chinesesimp>
|
||||
<French>Simule les légères variations</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||
<English>Enable Ammo Temperature Simulation</English>
|
||||
@ -104,7 +112,7 @@
|
||||
<Hungarian>Lőszer-hő szimuláció engedélyezése</Hungarian>
|
||||
<Russian>Симуляция температуры для боеприпасов</Russian>
|
||||
<Italian>Abilita simulazione della temperatura delle munizioni</Italian>
|
||||
<Japanese>弾薬温度シミュレーション</Japanese>
|
||||
<Japanese>弾薬温度のシミュレーションを有効化する</Japanese>
|
||||
<Korean>탄약 온도 구현 적용</Korean>
|
||||
<Chinese>啟用彈藥溫度模擬系統</Chinese>
|
||||
<Chinesesimp>启用弹药温度模拟系统</Chinesesimp>
|
||||
@ -120,7 +128,7 @@
|
||||
<Hungarian>A kezdősebesség a lőszer hőmérsékletétől függően változó</Hungarian>
|
||||
<Russian>Начальная скорость пули зависит от температуры</Russian>
|
||||
<Italian>La velocità dello sparo varia a seconda della temperatura delle munizioni</Italian>
|
||||
<Japanese>弾薬の温度により銃口初速を変化させます</Japanese>
|
||||
<Japanese>弾薬の温度により銃口初速を変動させます。</Japanese>
|
||||
<Korean>탄약 온도에 비례해 총구 속도가 달라집니다</Korean>
|
||||
<Chinese>子彈初速將隨彈藥溫度而有所變化</Chinese>
|
||||
<Chinesesimp>子弹初速将随弹药温度而有所变化</Chinesesimp>
|
||||
@ -136,7 +144,7 @@
|
||||
<Hungarian>Csőhossz-szimuláció engedélyezése</Hungarian>
|
||||
<Russian>Симуляция длины ствола</Russian>
|
||||
<Italian>Abilita simulazione della lunghezza della canna</Italian>
|
||||
<Japanese>銃身長シミュレーション</Japanese>
|
||||
<Japanese>銃身長のシミュレーションを有効化する</Japanese>
|
||||
<Korean>총열 길이 구현 적용</Korean>
|
||||
<Chinese>啟用槍管長度模擬系統</Chinese>
|
||||
<Chinesesimp>启用枪管长度模拟系统</Chinesesimp>
|
||||
@ -152,7 +160,7 @@
|
||||
<Hungarian>A kezdősebesség a cső hosszától függően változó</Hungarian>
|
||||
<Russian>Начальная скорость пули зависит от длины ствола</Russian>
|
||||
<Italian>La velocità di sparo varia a seconda della lunghezza della canna</Italian>
|
||||
<Japanese>銃身長により銃口初速を変化させます</Japanese>
|
||||
<Japanese>銃身長により銃口初速を変動させます。</Japanese>
|
||||
<Korean>총구 속도가 총열에 비례해 달라집니다</Korean>
|
||||
<Chinese>子彈初速將隨槍管長度而有所變化</Chinese>
|
||||
<Chinesesimp>子弹初速将随枪管长度而有所变化</Chinesesimp>
|
||||
@ -168,7 +176,7 @@
|
||||
<Hungarian>Nyomkövető-effekt engedélyezése</Hungarian>
|
||||
<Russian>Следы пуль</Russian>
|
||||
<Italian>Abilita effetto dei Proiettili Traccianti</Italian>
|
||||
<Japanese>弾丸の痕跡表示</Japanese>
|
||||
<Japanese>弾丸の軌跡エフェクトを有効化する</Japanese>
|
||||
<Korean>예광탄 효과 적용</Korean>
|
||||
<Chinese>啟用曳光彈效果</Chinese>
|
||||
<Chinesesimp>启用曳光弹效果</Chinesesimp>
|
||||
@ -184,7 +192,7 @@
|
||||
<Hungarian>Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható)</Hungarian>
|
||||
<Russian>Включает эффект следов пуль для больших калибров (видны только через мощную оптику)</Russian>
|
||||
<Italian>Abilita effetto dei proiettili traccianti di alto calibro (visibile solo attraverso ottiche ad alto potenziale)</Italian>
|
||||
<Japanese>大口径の銃弾による弾丸の痕跡表示を有効化します (高倍率スコープを介してでしか見れません)</Japanese>
|
||||
<Japanese>大口径弾の軌跡エフェクトを有効化します。 (高性能光学機器を介してのみ見ることができます)</Japanese>
|
||||
<Korean>대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다)</Korean>
|
||||
<Chinese>啟用曳光彈效果給大口徑子彈 (只有透過高倍率光學瞄鏡才能看到)</Chinese>
|
||||
<Chinesesimp>启用曳光弹效果给大口径子弹 (只有透过高倍率光学瞄镜才能看到)</Chinesesimp>
|
||||
@ -200,7 +208,7 @@
|
||||
<Hungarian>Szimuláció intervalluma</Hungarian>
|
||||
<Russian>Интервал симуляции</Russian>
|
||||
<Italian>Intervallo Simulazione</Italian>
|
||||
<Japanese>シミュレーション間隔</Japanese>
|
||||
<Japanese>シミュレーションの間隔</Japanese>
|
||||
<Korean>구현 간격</Korean>
|
||||
<Chinese>模擬間隔</Chinese>
|
||||
<Chinesesimp>模拟间隔</Chinesesimp>
|
||||
@ -216,7 +224,7 @@
|
||||
<Hungarian>Meghatározza a számítási lépések közötti időintervallumot</Hungarian>
|
||||
<Russian>Определяет временной интервал между вычислениями</Russian>
|
||||
<Italian>Definisce l'intervallo tra ogni step di calcolo</Italian>
|
||||
<Japanese>各計算ごとの間隔を定義します</Japanese>
|
||||
<Japanese>各計算毎の間隔を定義します。</Japanese>
|
||||
<Korean>각 계산 단위의 간격을 정의합니다</Korean>
|
||||
<Chinese>定義每個模擬計算之間的時間間隔</Chinese>
|
||||
<Chinesesimp>定义每个模拟计算之间的时间间隔</Chinesesimp>
|
||||
@ -232,7 +240,7 @@
|
||||
<Hungarian>Szimuláció hatóköre</Hungarian>
|
||||
<Russian>Радиус симуляции</Russian>
|
||||
<Italian>Raggio Simulazione</Italian>
|
||||
<Japanese>シミュレーション適用範囲</Japanese>
|
||||
<Japanese>シミュレーションの範囲</Japanese>
|
||||
<Korean>구현 범위</Korean>
|
||||
<Chinese>模擬半徑</Chinese>
|
||||
<Chinesesimp>模拟半径</Chinesesimp>
|
||||
@ -248,7 +256,7 @@
|
||||
<Hungarian>Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak</Hungarian>
|
||||
<Russian>Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам</Russian>
|
||||
<Italian>Definisce il raggio attorno al giocatore (in metri) per cui la Balistica Avanzata è applicata ai proiettili</Italian>
|
||||
<Japanese>プレイヤーの周囲にアドバンスド バリスティックスによる弾道を適用させる範囲を半径で定義します (メートル)</Japanese>
|
||||
<Japanese>アドバンスド バリスティックスの適用半径範囲 (プレイヤー中心、メートル単位) を定義します。</Japanese>
|
||||
<Korean>플레이어 주위의 발사체를 고급 탄도학으로 정의하는 범위를 정합니다(미터)</Korean>
|
||||
<Chinese>以玩家的半徑距離(公尺)定義先進彈道系統啟用範圍</Chinese>
|
||||
<Chinesesimp>以玩家的半径距离(公尺)定义先进弹道系统启用范围</Chinesesimp>
|
||||
@ -264,7 +272,7 @@
|
||||
<Russian>Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел.</Russian>
|
||||
<Spanish>Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada.</Spanish>
|
||||
<Italian>Questo modulo abilita la simulazione della Balistica Avanzata - cioè la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata</Italian>
|
||||
<Japanese>このモジュールはアドバンスド バリスティックスを有効化します。弾道は気温や気圧、湿度、重力、弾薬の種類、発射する武器から影響を受けるようになります。</Japanese>
|
||||
<Japanese>アドバンスド バリスティックスのシミュレーションを有効化します。 弾道は気温・気圧・湿度・重力・弾薬の種類・発射する武器などの変化による影響を受けるようになります。</Japanese>
|
||||
<Korean>이 모듈은 고급 탄도학을 적용시킵니다 - 이는 발사체의 궤적이 기온, 대기압, 습도, 중력, 탄환의 종류와 어느 무기에서 발사되는지에 따라 영향을 받습니다.</Korean>
|
||||
<Chinese>該模塊實現先進的彈道仿真 - 這意味著子彈的軌跡是由空氣溫度、大氣壓力、濕度、重力、彈藥類型以及射擊的武器所影響</Chinese>
|
||||
<Chinesesimp>该模块实现先进的弹道仿真 - 这意味着子弹的轨迹是由空气温度、大气压力、湿度、重力、弹药类型以及射击的武器所影响</Chinesesimp>
|
||||
|
@ -1,49 +1,20 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(enabled) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(Enabled);
|
||||
description = CSTRING(Enabled_Description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
movedToSQF = 1;
|
||||
};
|
||||
class GVAR(enableStaminaBar) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(EnableStaminaBar);
|
||||
description = CSTRING(EnableStaminaBar_Description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
isClientSettable = 1;
|
||||
movedToSQF = 1;
|
||||
};
|
||||
class GVAR(performanceFactor) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(PerformanceFactor);
|
||||
description = CSTRING(PerformanceFactor_Description);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
sliderSettings[] = {0, 5, 1, 1};
|
||||
movedToSQF = 1;
|
||||
};
|
||||
class GVAR(recoveryFactor) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(RecoveryFactor);
|
||||
description = CSTRING(RecoveryFactor_Description);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
sliderSettings[] = {0, 5, 1, 1};
|
||||
movedToSQF = 1;
|
||||
};
|
||||
class GVAR(loadFactor) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(LoadFactor);
|
||||
description = CSTRING(LoadFactor_Description);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
sliderSettings[] = {0, 5, 1, 1};
|
||||
movedToSQF = 1;
|
||||
};
|
||||
class GVAR(terrainGradientFactor) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(TerrainGradientFactor);
|
||||
description = CSTRING(TerrainGradientFactor_Description);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
sliderSettings[] = {0, 5, 1, 1};
|
||||
movedToSQF = 1;
|
||||
};
|
||||
};
|
||||
|
@ -47,13 +47,3 @@ if (!hasInterface) exitWith {};
|
||||
// - Add main loop at 1 second interval -------------------------------------------------------------
|
||||
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_settingChanged", {
|
||||
params ["_name", "_value"];
|
||||
|
||||
if (_name == QGVAR(enableStaminaBar) && {!_value}) then {
|
||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||
_staminaBarContainer ctrlSetFade 1;
|
||||
_staminaBarContainer ctrlCommit 0;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -5,7 +5,8 @@ ADDON = false;
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
//#include "initSettings.sqf"
|
||||
|
||||
#include "initSettings.sqf"
|
||||
|
||||
GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
|
||||
GVAR(dutyList) = [[], []];
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Adds a duty factor.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params [["_id", "", [""]], ["_factor", 1, [0, {}]]];
|
||||
if (_id == "" || {_factor isEqualTo 1}) exitWith {};
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Creates the stamina bar.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_display"];
|
||||
|
||||
private _staminaBar = _display ctrlCreate [QGVAR(StaminaBarContainer), -1];
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Calculates the duty of the current animation.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit", "_animName"];
|
||||
|
||||
private _duty = 1;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Calculates the current metabolic costs for a unit.
|
||||
@ -15,7 +16,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit", "_velocity"];
|
||||
|
||||
private _gearMass = ((_unit getVariable [QEGVAR(movement,totalLoad), loadAbs _unit]) / 22.046) * GVAR(loadFactor);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Handles any audible, visual and physical effects of fatigue.
|
||||
@ -16,7 +17,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit", "_fatigue", "_speed", "_overexhausted"];
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
@ -90,12 +90,12 @@ if (_overexhausted) then {
|
||||
|
||||
switch (stance _unit) do {
|
||||
case ("CROUCH"): {
|
||||
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 0.1);
|
||||
[_unit, QUOTE(ADDON), (1.0 + _fatigue ^ 2 * 0.1) * GVAR(swayFactor)] call EFUNC(common,setAimCoef);
|
||||
};
|
||||
case ("PRONE"): {
|
||||
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 2.0);
|
||||
[_unit, QUOTE(ADDON), (1.0 + _fatigue ^ 2 * 2.0) * GVAR(swayFactor)] call EFUNC(common,setAimCoef);
|
||||
};
|
||||
default {
|
||||
_unit setCustomAimCoef (1.5 + _fatigue ^ 2 * 3.0);
|
||||
[_unit, QUOTE(ADDON), (1.5 + _fatigue ^ 2 * 3.0) * GVAR(swayFactor)] call EFUNC(common,setAimCoef);
|
||||
};
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Handles switching units (once on init and afterwards via Zeus).
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_newUnit", "_oldUnit"];
|
||||
TRACE_2("unit changed",_newUnit,_oldUnit);
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Handles visual changes of the stamina bar.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_stamina"];
|
||||
|
||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Main looping function that updates fatigue values.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
|
||||
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
|
||||
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Initializes the module settings.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_logic"];
|
||||
|
||||
[_logic, QGVAR(enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Removes a duty factor.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params [["_id", "", [""]]];
|
||||
|
||||
GVAR(dutyList) params ["_idList", "_factorList"];
|
||||
|
@ -2,7 +2,7 @@
|
||||
QGVAR(enabled),
|
||||
"CHECKBOX",
|
||||
[LSTRING(Enabled), LSTRING(Enabled_Description)],
|
||||
"ACE3 Advanced Fatigue",
|
||||
LSTRING(DisplayName),
|
||||
true,
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
@ -11,7 +11,7 @@
|
||||
QGVAR(enableStaminaBar),
|
||||
"CHECKBOX",
|
||||
[LSTRING(EnableStaminaBar), LSTRING(EnableStaminaBar_Description)],
|
||||
"ACE3 Advanced Fatigue",
|
||||
LSTRING(DisplayName),
|
||||
true,
|
||||
true, {
|
||||
if (!_this) then {
|
||||
@ -26,8 +26,8 @@
|
||||
QGVAR(performanceFactor),
|
||||
"SLIDER",
|
||||
[LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)],
|
||||
"ACE3 Advanced Fatigue",
|
||||
[0, 2, 1, 1],
|
||||
LSTRING(DisplayName),
|
||||
[0, 5, 1, 1],
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
QGVAR(recoveryFactor),
|
||||
"SLIDER",
|
||||
[LSTRING(RecoveryFactor), LSTRING(RecoveryFactor_Description)],
|
||||
"ACE3 Advanced Fatigue",
|
||||
[0, 2, 1, 1],
|
||||
LSTRING(DisplayName),
|
||||
[0, 5, 1, 1],
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
|
||||
@ -44,8 +44,8 @@
|
||||
QGVAR(loadFactor),
|
||||
"SLIDER",
|
||||
[LSTRING(LoadFactor), LSTRING(LoadFactor_Description)],
|
||||
"ACE3 Advanced Fatigue",
|
||||
[0, 2, 1, 1],
|
||||
LSTRING(DisplayName),
|
||||
[0, 5, 1, 1],
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
|
||||
@ -53,7 +53,16 @@
|
||||
QGVAR(terrainGradientFactor),
|
||||
"SLIDER",
|
||||
[LSTRING(TerrainGradientFactor), LSTRING(TerrainGradientFactor_Description)],
|
||||
"ACE3 Advanced Fatigue",
|
||||
[0, 2, 1, 1],
|
||||
LSTRING(DisplayName),
|
||||
[0, 5, 1, 1],
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
|
||||
[
|
||||
QGVAR(swayFactor),
|
||||
"SLIDER",
|
||||
[LSTRING(SwayFactor), LSTRING(SwayFactor_Description)],
|
||||
LSTRING(DisplayName),
|
||||
[0, 5, 1, 1],
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
|
@ -2,18 +2,18 @@
|
||||
<Project name="ACE">
|
||||
<Package name="Advanced_Fatigue">
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
|
||||
<English>Advanced Fatigue</English>
|
||||
<German>Erweiterte Ausdauer</German>
|
||||
<Chinese>進階疲勞</Chinese>
|
||||
<Chinesesimp>进阶疲劳</Chinesesimp>
|
||||
<Japanese>アドバンスド疲労</Japanese>
|
||||
<Italian>Fatica Avanzata</Italian>
|
||||
<Korean>고급 피로도</Korean>
|
||||
<English>ACE Advanced Fatigue</English>
|
||||
<German>ACE Erweiterte Ausdauer</German>
|
||||
<Chinese>ACE 進階疲勞</Chinese>
|
||||
<Chinesesimp>ACE 进阶疲劳</Chinesesimp>
|
||||
<Japanese>ACE アドバンスド ファティーグ</Japanese>
|
||||
<Italian>ACE Fatica Avanzata</Italian>
|
||||
<Korean>ACE 고급 피로도</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
|
||||
<English>Performance Factor</English>
|
||||
<German>Leistungsfaktor</German>
|
||||
<Japanese>パフォーマンス要因</Japanese>
|
||||
<Japanese>パフォーマンス因数</Japanese>
|
||||
<Polish>Współczynnik wydolności</Polish>
|
||||
<Korean>성능 요인</Korean>
|
||||
<French>Facteur de performance</French>
|
||||
@ -24,7 +24,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_Description">
|
||||
<English>Influences the overall performance of all players with no custom factor. Higher means better.</English>
|
||||
<German>Beinflusst die Leistungsfähigkeit aller Spieler ohne eigenen Leistungsfaktor. Ein höherer Wert bedeutet bessere Leistung.</German>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど良い効果があります。</Japanese>
|
||||
<Japanese>個別の因数を設定されていない、全てのプレイヤーのあらゆるパフォーマンスに影響を与えます。 値が高ければ高いほど、良い効果が得られます。</Japanese>
|
||||
<Polish>Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej.</Polish>
|
||||
<Korean>모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances.</French>
|
||||
@ -35,7 +35,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_EdenDescription">
|
||||
<English>Influences the overall performance of this unit. Higher means better.</English>
|
||||
<German>Beinflusst die Leistungsfähigkeit dieser Einheit. Ein höherer Wert bedeutet bessere Leistung.</German>
|
||||
<Japanese>このユニットの全体的な動作に影響させます。高いほど良い効果があります。</Japanese>
|
||||
<Japanese>このユニットのあらゆるパフォーマンスに影響を与えます。 値が高ければ高いほど、良い効果が得られます。</Japanese>
|
||||
<Polish>Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej.</Polish>
|
||||
<Korean>모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances.</French>
|
||||
@ -46,7 +46,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor">
|
||||
<English>Recovery Factor</English>
|
||||
<German>Erholungsfaktor</German>
|
||||
<Japanese>回復要因</Japanese>
|
||||
<Japanese>回復因数</Japanese>
|
||||
<Polish>Współczynnik regeneracji</Polish>
|
||||
<Korean>회복 요인</Korean>
|
||||
<French>Facteur de récupération</French>
|
||||
@ -57,7 +57,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor_Description">
|
||||
<English>Changes how fast the player recovers when resting. Higher is faster.</English>
|
||||
<German>Ändert, wie schnell ein Spieler Ausdauer regeneriert. Ein höherer Wert bedeutet eine schnellere Regeneration.</German>
|
||||
<Japanese>休憩時はプレイヤーが早く回復します。高いほど早くなります。</Japanese>
|
||||
<Japanese>プレイヤーが休憩をとる際に、どのくらいの速度でスタミナ回復するかを設定します。 値が高ければ高いほど、早くなります。</Japanese>
|
||||
<Polish>Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej.</Polish>
|
||||
<Korean>얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide.</French>
|
||||
@ -68,7 +68,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor">
|
||||
<English>Load Factor</English>
|
||||
<German>Gewichtsfaktor</German>
|
||||
<Japanese>負荷要因</Japanese>
|
||||
<Japanese>重量因数</Japanese>
|
||||
<Polish>Współczynnik masy ekwipunku</Polish>
|
||||
<Korean>부담 요인</Korean>
|
||||
<French>Facteur d'encombrement</French>
|
||||
@ -79,7 +79,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor_Description">
|
||||
<English>Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence.</English>
|
||||
<German>Erhöht oder verringert, wie viel Einfluss das Ausrüstungsgewicht auf die Leistung hat. Null heißt, dass es keinen Einfluss hat.</German>
|
||||
<Japanese>重量の増減によりプレイヤーの動作へ影響を与えます。装備を持っていない場合、影響はしません。</Japanese>
|
||||
<Japanese>装備重量がプレイヤーのパフォーマンスにもたらす影響を増減させます。 値をゼロに設定した場合、装備重量はパフォーマンスに影響を与えません。</Japanese>
|
||||
<Polish>Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność.</Polish>
|
||||
<Korean>플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다.</Korean>
|
||||
<French>Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence sur les performances.</French>
|
||||
@ -90,7 +90,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor">
|
||||
<English>Terrain Gradient Factor</English>
|
||||
<German>Terrainsteigungsfaktor</German>
|
||||
<Japanese>地形の勾配による要因</Japanese>
|
||||
<Japanese>地形勾配因数</Japanese>
|
||||
<Polish>Współczynnik terenu</Polish>
|
||||
<Korean>지형 경사도 요인</Korean>
|
||||
<French>Facteur d'inclinaison du terrain</French>
|
||||
@ -101,7 +101,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor_Description">
|
||||
<English>Sets how much steep terrain increases stamina loss. Higher means higher stamina loss.</English>
|
||||
<German>Beeinflusst, wie stark Steigungen den Ausdauerverbrauch erhöhen. Ein höherer Wert erhöht den Ausdauerverbrauch.</German>
|
||||
<Japanese>地形によって影響する体力の消費量を決定します。高数値ではより体力を消費します。</Japanese>
|
||||
<Japanese>急勾配の地形がどれだけスタミナ消費を増大させるかを設定します。 値が高ければ高いほど、スタミナ消費が大きくなります。</Japanese>
|
||||
<Polish>Wpływa na to w jakim stopniu stromy teren wpływa na utratę wytrzymałości. Więcej oznacza szybszą utratę wytrzymałości.</Polish>
|
||||
<Korean>경사도에 따라 얼마나 피로해지는지를 정합니다. 값이 클수록 더 많은 피로를 유발합니다.</Korean>
|
||||
<French>Configure l'influence de l'inclinaison du terrain sur la perte d'endurance. Une valeur plus élevée implique une perte d'endurance plus importante.</French>
|
||||
@ -109,10 +109,22 @@
|
||||
<Chinese>設定陡峭的地形將會影響多少體力的流失,值越高代表體力流失越快</Chinese>
|
||||
<Chinesesimp>设定陡峭的地形将会影响多少体力的流,失值越高代表体力流失越快</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor">
|
||||
<English>Sway factor</English>
|
||||
<Japanese>手ぶれ因数</Japanese>
|
||||
<Chinesesimp>抖动因数</Chinesesimp>
|
||||
<Chinese>抖動因素</Chinese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
|
||||
<English>Influences the amount of weapon sway. Higher means more sway.</English>
|
||||
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
|
||||
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害.</Chinesesimp>
|
||||
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
|
||||
<English>Enabled</English>
|
||||
<German>Aktiv</German>
|
||||
<Japanese>有効化</Japanese>
|
||||
<Japanese>アドバンスド ファティーグを有効化する</Japanese>
|
||||
<Polish>Włączone</Polish>
|
||||
<Korean>활성화</Korean>
|
||||
<French>Activé</French>
|
||||
@ -123,7 +135,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_Enabled_Description">
|
||||
<English>Enables/disables Advanced Fatigue.</English>
|
||||
<German>Aktiviert/deaktiviert Advanced Fatigue.</German>
|
||||
<Japanese>アドバンスド疲労の有効化と無効化</Japanese>
|
||||
<Japanese>アドバンスド ファティーグを有効化します。</Japanese>
|
||||
<Polish>Włącza/wyłącza zaawansowaną wytrzymałość</Polish>
|
||||
<Korean>고급 피로도 활성화/비활성화</Korean>
|
||||
<French>Active/désactive la fatigue avancée.</French>
|
||||
@ -134,7 +146,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar">
|
||||
<English>Show stamina bar</English>
|
||||
<German>Zeige Ausdauerleiste</German>
|
||||
<Japanese>体力バーを表示</Japanese>
|
||||
<Japanese>スタミナバーを表示する</Japanese>
|
||||
<Polish>Pokaż pasek wytrzymałości</Polish>
|
||||
<Korean>피로도 막대</Korean>
|
||||
<French>Afficher la barre d'endurance</French>
|
||||
@ -145,7 +157,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar_Description">
|
||||
<English>Shows the stamina bar.</English>
|
||||
<German>Zeigt die Ausdauerleiste an.</German>
|
||||
<Japanese>体力バーを表示します。</Japanese>
|
||||
<Japanese>スタミナバーを表示します。</Japanese>
|
||||
<Polish>Pokazuje pasek wytrzymałości.</Polish>
|
||||
<Korean>피로도 막대를 보여줍니다.</Korean>
|
||||
<French>Affiche la barre d'endurance.</French>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Checks if a throwable can be prepared.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", ["_ignoreLastThrownTime", false]];
|
||||
|
||||
@ -35,4 +35,5 @@ GVAR(enabled) &&
|
||||
{[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
|
||||
{_unit call CBA_fnc_canUseWeapon} && // Disable in non-FFV seats due to surface detection issues
|
||||
{"" == currentWeapon _unit || {currentWeapon _unit != secondaryWeapon _unit}} &&
|
||||
{0 >= _unit getVariable [QEGVAR(common,effect_blockThrow), 0]}
|
||||
{0 >= _unit getVariable [QEGVAR(common,effect_blockThrow), 0]} &&
|
||||
{isNull (ACE_controlledUAV select 0)}
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Checks if a throwable can be thrown.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Zapat, Dslyecxi, Jonpas
|
||||
* Draws throw arc.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Disable drawing when intersecting with the vehicle
|
||||
if !([ACE_player] call FUNC(canThrow)) exitWith {
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas, SilentSpike
|
||||
* Handles drawing the currently selected or cooked throwable.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player, true] call FUNC(canPrepare))}) exitWith {
|
||||
[ACE_player, "In dialog or no throwable in hand or cannot prepare throwable"] call FUNC(exitThrowMode);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Exits throw mode.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_reason"];
|
||||
TRACE_2("params",_unit,_reason);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Retrieve muzzle name from config.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_magazineClassname"];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Initializes the Advanced Throwing module.
|
||||
@ -15,7 +16,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Key down event.
|
||||
@ -17,7 +18,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Mouse button down event.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Mouse scroll wheel changed event.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {};
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Picks up a throwable from the ground.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_helper", "_unit"];
|
||||
TRACE_2("params",_helper,_unit);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Prepares throwable or selects the next.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
TRACE_1("params",_unit);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Primes the throwable, creates global throwable vehicle and throws Fired XEH.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", ["_showHint", false]];
|
||||
TRACE_2("params",_unit,_showHint);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror, Jonpas
|
||||
* When interact_menu starts rendering (from "interact_keyDown" event).
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
[{
|
||||
params ["_args", "_idPFH"];
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dslyecxi, Jonpas
|
||||
* Throw selected throwable.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
TRACE_1("params",_unit);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: CBA Team
|
||||
* Throws Fired XEH.
|
||||
@ -19,7 +20,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
TRACE_1("Fired",_this);
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Updates controls hints based on current state.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!GVAR(showMouseControls)) exitWith {};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Category">
|
||||
<English>Advanced Throwing</English>
|
||||
<Russian>Улучшенный бросок гранат</Russian>
|
||||
<Japanese>アドバンスド投てき</Japanese>
|
||||
<Japanese>アドバンスド スローイング</Japanese>
|
||||
<Polish>Zaawansowane rzucanie</Polish>
|
||||
<German>Erweitertes Wurfsystem</German>
|
||||
<Korean>고급 투척</Korean>
|
||||
@ -16,7 +16,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Module_Description">
|
||||
<English>Allows changing advanced throwing behaviour.</English>
|
||||
<Russian>Позволяет настраивать поведение улучшенного броска гранат.</Russian>
|
||||
<Japanese>アドバンスド投てきの挙動変更を許可します。</Japanese>
|
||||
<Japanese>アドバンスド スローイングの動作挙動を変更します。</Japanese>
|
||||
<Polish>Zezwala na zmianę zachowania zaawansowanego trybu rzucania.</Polish>
|
||||
<German>Erlaubt es, das Verhalten des erweiterten Wurfsystems zu ändern.</German>
|
||||
<Korean>고급 투척 행위를 허가합니다</Korean>
|
||||
@ -28,7 +28,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Enable_DisplayName">
|
||||
<English>Enable Advanced Throwing</English>
|
||||
<Russian>Включить улучшенный бросок</Russian>
|
||||
<Japanese>アドバンスド投てき</Japanese>
|
||||
<Japanese>アドバンスド スローイングを有効化する</Japanese>
|
||||
<Polish>Aktywuj zaawansowane rzucanie</Polish>
|
||||
<German>Aktiviere erweitertes Wurfsystem</German>
|
||||
<Korean>고급 투척 활성화 </Korean>
|
||||
@ -40,7 +40,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Enable_Description">
|
||||
<English>Enables advanced throwing system.</English>
|
||||
<Russian>Включает систему улучшенного броска.</Russian>
|
||||
<Japanese>アドバンスド投てきシステムを有効化</Japanese>
|
||||
<Japanese>アドバンスド スローイングを有効化します。</Japanese>
|
||||
<Polish>Aktywuje system zaawansowanego rzucania.</Polish>
|
||||
<German>Aktiviert das erweiterte Wurfsystem.</German>
|
||||
<Korean>고급 투척을 활성화 합니다</Korean>
|
||||
@ -52,7 +52,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_ShowThrowArc_DisplayName">
|
||||
<English>Show Throw Arc</English>
|
||||
<Russian>Показать траекторию броска</Russian>
|
||||
<Japanese>軌道を表示</Japanese>
|
||||
<Japanese>投てき軌道を表示する</Japanese>
|
||||
<Polish>Pokaż trasę lotu</Polish>
|
||||
<German>Zeige Wurfbogen</German>
|
||||
<Korean>투척 궤적 표시</Korean>
|
||||
@ -64,7 +64,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_ShowThrowArc_Description">
|
||||
<English>Enables visualization of the throw arc (where throwable will fly).</English>
|
||||
<Russian>Включает визуализацию траектории броска (как полетит граната).</Russian>
|
||||
<Japanese>投てき物の予測軌道の表示を有効化します。</Japanese>
|
||||
<Japanese>投てき軌道 (投てき物がどこに飛ぶか) の表示を有効化します。</Japanese>
|
||||
<Polish>Wyświetla wizualizację trasy przelotu granatu.</Polish>
|
||||
<German>Aktiviert die Visualisierung des Wurfbogens (wohin das Objekt geworfen werden wird).</German>
|
||||
<Korean>투척 궤도를 시각화 합니다(투척물이 어디로 갈지)</Korean>
|
||||
@ -76,7 +76,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_ShowMouseControls_DisplayName">
|
||||
<English>Show Throwing Mouse Controls</English>
|
||||
<Russian>Показывать управление мышью</Russian>
|
||||
<Japanese>投てきのマウス操作を表示</Japanese>
|
||||
<Japanese>投てきのマウス操作を表示する</Japanese>
|
||||
<Polish>Pokaż podpowiedzi sterowania myszą</Polish>
|
||||
<German>Zeige Maussteuerung beim Werfen</German>
|
||||
<Korean>마우스 조작 표시</Korean>
|
||||
@ -88,7 +88,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_ShowMouseControls_Description">
|
||||
<English>Enables visual cues for mouse controls when throwable is prepared.</English>
|
||||
<Russian>Включает отображение подсказок по управлению мышью, когда граната подготовлена.</Russian>
|
||||
<Japanese>投てき物を投げるとき、マウス操作の説明表示を有効化します。</Japanese>
|
||||
<Japanese>投てき物を構える時、マウス操作の説明表示を有効化します。</Japanese>
|
||||
<Polish>Wyświetla podpowiedzi sterowania myszą kiedy obiekt miotany jest w ręku.</Polish>
|
||||
<German>Aktiviert visuelle Hinweise zur Maussteuerung, wenn ein Objekt zum Werfen vorbereitet wird.</German>
|
||||
<Korean>투척물을 준비시 마우스 조작을 시각화해서 보여줍니다</Korean>
|
||||
@ -100,7 +100,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_DisplayName">
|
||||
<English>Enable Throwables Pick Up</English>
|
||||
<Russian>Включить подбор гранат</Russian>
|
||||
<Japanese>投てき物の拾い上げ</Japanese>
|
||||
<Japanese>投てき物の拾い上げを有効化する</Japanese>
|
||||
<Polish>Zezwól na podnoszenie obiektów miotanych</Polish>
|
||||
<German>Aktiviere Aufheben von Wurfobjekten</German>
|
||||
<Korean>투척물 줍기 활성화</Korean>
|
||||
@ -112,7 +112,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_Description">
|
||||
<English>Enables ability to pick up throwables from the ground.</English>
|
||||
<Russian>Включает возможность подбирать гранаты с земли.</Russian>
|
||||
<Japanese>地面に落ちている投てき物の拾い上げ動作を有効化します。</Japanese>
|
||||
<Japanese>地面に落ちている投てき物を拾い上げる機能を有効化します。</Japanese>
|
||||
<Polish>Umożliwia podnoszenie obiektów miotanych z ziemi.</Polish>
|
||||
<German>Aktiviert die Möglichkeit, geworfene Objekte wieder vom Boden aufzuheben.</German>
|
||||
<Korean>땅에 떨어진 투척물을 주울 수 있게 해줍니다.</Korean>
|
||||
@ -124,7 +124,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_DisplayName">
|
||||
<English>Enable Attached Throwables Pick Up</English>
|
||||
<Russian>Включить подбор прикрепленных гранат</Russian>
|
||||
<Japanese>拾った投てき物の取り付け</Japanese>
|
||||
<Japanese>取り付けられた投てき物の拾い上げを有効化する</Japanese>
|
||||
<Polish>Zezwól na podnoszenie przyczepionych obiektów miotanych</Polish>
|
||||
<German>Aktiviere erneute Aufnahme befestigter Wurfobjekte</German>
|
||||
<Korean>부착 투척물 줍기 활성화</Korean>
|
||||
@ -136,7 +136,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_Description">
|
||||
<English>Enables ability to pick up throwables from attached objects.</English>
|
||||
<Russian>Включает возможность подбирать гранаты, прикрепленные к объектам.</Russian>
|
||||
<Japanese>オブジェクトに取り付けられていた投てき物を拾い上げられるようにします。</Japanese>
|
||||
<Japanese>取り付けられた投てき物を、取り付け先から拾い上げる機能を有効化します。</Japanese>
|
||||
<Polish>Umożliwia podnoszenie obiektów miotanych przyczepionych do innych obiektów.</Polish>
|
||||
<German>Aktiviert die Möglichkeit, befestigte Wurfobjekte erneut aufzunehmen.</German>
|
||||
<Korean>부착된 투척물을 주울 수 있게 해줍니다.</Korean>
|
||||
@ -160,7 +160,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_dropModeHold">
|
||||
<English>Throwable Drop Mode (Hold)</English>
|
||||
<Russian>Режим броска гранаты (удерживать)</Russian>
|
||||
<Japanese>投てきモード (押しっぱ)</Japanese>
|
||||
<Japanese>投てきモード (押している間)</Japanese>
|
||||
<Polish>Tryb upuszczania ob. miotanego (przytrzymaj)</Polish>
|
||||
<German>Wurfobjekt Fallmodus (halten)</German>
|
||||
<Korean>투척물 떨어뜨리기 모드(꾹눌러서)</Korean>
|
||||
@ -172,7 +172,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_DropModeToggle">
|
||||
<English>Throwable Drop Mode (Toggle)</English>
|
||||
<Russian>Режим броска гранаты (переключить)</Russian>
|
||||
<Japanese>投てきモード (切替)</Japanese>
|
||||
<Japanese>投てきモード (切り替え)</Japanese>
|
||||
<Polish>Tryb upuszczania ob. miotanego (przełącz)</Polish>
|
||||
<German>Wurfobjekt Fallmodus (umschalten)</German>
|
||||
<Korean>투척물 떨어뜨리기 모드(토글)</Korean>
|
||||
@ -184,7 +184,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Primed">
|
||||
<English>Primed</English>
|
||||
<Russian>Подготовлена</Russian>
|
||||
<Japanese>作動させた</Japanese>
|
||||
<Japanese>点火</Japanese>
|
||||
<Polish>Odbezpieczony</Polish>
|
||||
<German>Scharf gemacht</German>
|
||||
<Korean>뇌관 작동</Korean>
|
||||
@ -220,7 +220,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Extend">
|
||||
<English>(Scroll) Extend</English>
|
||||
<Russian>(Скролл) Увеличить</Russian>
|
||||
<Japanese>(スクロール) 遠くに</Japanese>
|
||||
<Japanese>(スクロール) 腕を伸ばす</Japanese>
|
||||
<Polish>(Kółko m.) przedłuż</Polish>
|
||||
<German>(Scrollen) Erweitern</German>
|
||||
<Korean>(마우스 휠) 연장</Korean>
|
||||
@ -232,7 +232,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Cook">
|
||||
<English>(Click) Cook</English>
|
||||
<Russian>(Клик) Подготовить</Russian>
|
||||
<Japanese>(クリック) 起爆</Japanese>
|
||||
<Japanese>(クリック) 点火する</Japanese>
|
||||
<Polish>(Kliknięcie) Odbezpiecz</Polish>
|
||||
<German>(Klicken) Abkochen</German>
|
||||
<Korean>(클릭) 예열</Korean>
|
||||
|
@ -7,50 +7,75 @@
|
||||
{
|
||||
if (_bool) then {
|
||||
_x enableAI _section;
|
||||
LOG_3("%1 enableAI %2 | ID: %3",_x,_section,clientOwner);
|
||||
} else {
|
||||
_x disableAI _section;
|
||||
LOG_3("%1 disableAI %2 | ID: %3",_x,_section,clientOwner);
|
||||
};
|
||||
LOG(format [ARR_4("XEH_postInit: %1 disableAI %2 | ID %3", _x, _section, clientOwner)]);
|
||||
} foreach (_units select {local _x});
|
||||
} foreach _sections
|
||||
} forEach (_units select {local _x});
|
||||
} forEach _sections;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(doMove), {
|
||||
params ["_unitsArray"];
|
||||
{
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
//_unit doFollow leader _unit;
|
||||
_unit setDestination [_pos, "LEADER PLANNED", true];
|
||||
_unit doMove _pos;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 doMove %2 | ID %3", _unit, _pos, clientOwner)]);
|
||||
} foreach _unitsArray
|
||||
LOG_3("%1 doMove %2 | ID: %3",_unit,_pos,clientOwner);
|
||||
} forEach _unitsArray;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(setBehaviour), {
|
||||
params ["_groupsArray", "_behaviour"];
|
||||
{
|
||||
_x params ["_group"];
|
||||
_group setBehaviour _behaviour;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 setBehaviour %2 | ID %3", _group, _behaviour, clientOwner)]);
|
||||
} foreach _groupsArray
|
||||
{
|
||||
_x setBehaviour _behaviour;
|
||||
LOG_3("%1 setBehaviour %2 | ID: %3",_x,_behaviour,clientOwner);
|
||||
} forEach _groupsArray;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(enableAttack), {
|
||||
params ["_unitsArray", "_mode"];
|
||||
{
|
||||
_x params ["_unit"];
|
||||
_unit enableAttack _mode;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 enableAttack %2 | ID %3", _unit, _mode, clientOwner)]);
|
||||
} foreach _unitsArray
|
||||
_x enableAttack _mode;
|
||||
LOG_3("%1 enableAttack %2 | ID: %3",_x,_mode,clientOwner);
|
||||
} forEach _unitsArray;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(setUnitPos), {
|
||||
params ["_unit", "_mode"];
|
||||
_unit setUnitPos _mode;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(setSpeedMode), {
|
||||
params ["_unit", "_mode"];
|
||||
_unit setSpeedMode _mode;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(setCombatMode), {
|
||||
params ["_unit", "_mode"];
|
||||
_unit setCombatMode _mode;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(allowFleeing), {
|
||||
params ["_unit", "_cowardice"];
|
||||
_unit allowFleeing _cowardice;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(enableGunLights), {
|
||||
params ["_unit", "_mode"];
|
||||
_unit enableGunLights _mode;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
addMissionEventHandler ["Draw3D", {
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
|
||||
switch true do {
|
||||
switch (true) do {
|
||||
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
||||
@ -79,6 +104,6 @@
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||
};
|
||||
};
|
||||
} foreach _unitMoveList;
|
||||
} forEach _unitMoveList;
|
||||
}];
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Garrison function used to garrison AI inside buildings.
|
||||
@ -19,7 +20,6 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]]], ["_unitsArray", [], [[]]], ["_fillingRadius", 50, [0]], ["_fillingType", 0, [0]], ["_topDownFilling", false, [true]], ["_teleport", false, [true]]];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.
|
||||
@ -15,7 +16,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [ ["_unitMoveList", nil, [[]]] ];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Used to un-garrison units.
|
||||
@ -14,7 +15,6 @@
|
||||
* Public: Yes
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_units", [], [[]]]];
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
#define COMPONENT_BEAUTIFIED AI
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
//#define DEBUG_MODE_FULL
|
||||
//#define DISABLE_COMPILE_CACHE
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_AI
|
||||
|
@ -6,7 +6,7 @@
|
||||
<French>Position invalide fourni</French>
|
||||
<Japanese>位置が無効です。</Japanese>
|
||||
<Italian>Posizione invalida fornita.</Italian>
|
||||
<Chinese>提供的位置無效。</Chinese>
|
||||
<Chinese>提供的位置無效</Chinese>
|
||||
<Chinesesimp>提供的位置无效。</Chinesesimp>
|
||||
<Korean>위치가 잘못되었습니다.</Korean>
|
||||
</Key>
|
||||
@ -15,7 +15,7 @@
|
||||
<French>Aucune unité fourni</French>
|
||||
<Japanese>ユニットがありません。</Japanese>
|
||||
<Italian>Nessuna unità fornita.</Italian>
|
||||
<Chinese>找不到可用的單位。</Chinese>
|
||||
<Chinese>找不到可用的單位</Chinese>
|
||||
<Chinesesimp>找不到可用的单位。</Chinesesimp>
|
||||
<Korean>병력이 없습니다.</Korean>
|
||||
</Key>
|
||||
@ -24,7 +24,7 @@
|
||||
<French>Il n'y a pas assez de positions pour placer toutes les unités</French>
|
||||
<Japanese>全ユニットを置くために十分な位置がありません。</Japanese>
|
||||
<Italian>Non ci sono abbastanza posizioni per piazzare tutte le unità.</Italian>
|
||||
<Chinese>沒有足夠的位置能擺放所有單位。</Chinese>
|
||||
<Chinese>沒有足夠的位置能擺放所有單位</Chinese>
|
||||
<Chinesesimp>没有足够的位置能摆放所有单位。</Chinesesimp>
|
||||
<Korean>모든 병력을 배치 할 공간이 없습니다.</Korean>
|
||||
</Key>
|
||||
@ -33,7 +33,7 @@
|
||||
<French>Aucun bâtiment trouvé</French>
|
||||
<Japanese>建物がありません。</Japanese>
|
||||
<Italian>Nessun edificio trovato.</Italian>
|
||||
<Chinese>沒找到建築物。</Chinese>
|
||||
<Chinese>沒找到建築物</Chinese>
|
||||
<Chinesesimp>没找到建筑物。</Chinesesimp>
|
||||
<Korean>건물이 없습니다.</Korean>
|
||||
</Key>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dystopian
|
||||
* Check if Eject action can be shown.
|
||||
@ -14,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define FULLCREW_UNIT 0
|
||||
#define FULLCREW_ROLE 1
|
||||
@ -23,6 +23,7 @@
|
||||
params ["_unit", "_vehicle"];
|
||||
|
||||
_vehicle == vehicle _unit
|
||||
&& {2 > locked _vehicle}
|
||||
&& {
|
||||
private _ejectVarName = "";
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dystopian
|
||||
* Add Eject action to vehicle if needed.
|
||||
@ -13,7 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
|
104
addons/arsenal/ACE_Arsenal_Stats.hpp
Normal file
104
addons/arsenal/ACE_Arsenal_Stats.hpp
Normal file
@ -0,0 +1,104 @@
|
||||
class GVAR(stats) {
|
||||
class statBase {
|
||||
scope = 1;
|
||||
priority = 0;
|
||||
stats[] = {};
|
||||
displayName = "";
|
||||
showBar = 0;
|
||||
showText = 0;
|
||||
barStatement = "";
|
||||
textStatement = "";
|
||||
condition = "true";
|
||||
tabs[] = {{}, {}};
|
||||
};
|
||||
class ACE_bananaPotassium: statBase {
|
||||
scope = 2;
|
||||
displayName= CSTRING(statPotassium);
|
||||
showBar = 1;
|
||||
barStatement = "1";
|
||||
condition = QUOTE((configName (_this select 1)) == 'ACE_Banana');
|
||||
tabs[] = {{}, {7}};
|
||||
};
|
||||
class ACE_mass: statBase {
|
||||
scope = 2;
|
||||
displayName= "$STR_a3_rscdisplayarsenal_stat_weight";
|
||||
showText = 1;
|
||||
textStatement = QUOTE([ARR_2(_this select 0, _this select 1)] call FUNC(statTextStatement_mass));
|
||||
tabs[] = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}, {0,1,2,3,4,5,6,7}};
|
||||
};
|
||||
class ACE_rateOfFire: statBase {
|
||||
scope = 2;
|
||||
priority = 5;
|
||||
stats[] = {"reloadTime"};
|
||||
displayName= "$STR_a3_rscdisplayarsenal_stat_rof";
|
||||
showBar = 1;
|
||||
showText = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_2([ARR_2(-1.4, 0.31)], [ARR_2(1, 0.01)])])] call FUNC(statBarStatement_rateOfFIre));
|
||||
textStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_2([ARR_2(-1.4, 0.31)], false)])] call FUNC(statTextStatement_rateOfFire));
|
||||
tabs[] = {{0,1}, {}};
|
||||
};
|
||||
class ACE_accuracy: statBase {
|
||||
scope = 2;
|
||||
priority = 4;
|
||||
stats[] = {"dispersion"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_dispersion";
|
||||
showBar = 1;
|
||||
showText = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(-4, -1.7)], [ARR_2(1, 0.01)], true)])] call FUNC(statBarStatement_accuracy));
|
||||
textStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_2([ARR_2(-4, -1.7)], false)])] call FUNC(statTextStatement_accuracy));
|
||||
tabs[] = {{0,1}, {}};
|
||||
};
|
||||
class ACE_maxZeroing: statBase {
|
||||
scope = 2;
|
||||
priority = 3;
|
||||
stats[] = {"maxZeroing"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_range";
|
||||
showBar = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 2500)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default));
|
||||
tabs[] = {{0,1,2}, {}};
|
||||
};
|
||||
class ACE_impact: statBase {
|
||||
scope = 2;
|
||||
priority = 2;
|
||||
stats[] = {"hit", "initSpeed"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_impact";
|
||||
showBar = 1;
|
||||
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;
|
||||
stats[] = {"passthrough"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_passthrough";
|
||||
showBar = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 0.63)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default));
|
||||
tabs[] = {{3,4,6}, {}};
|
||||
};
|
||||
class ACE_explosiveResistance: statBase {
|
||||
scope = 2;
|
||||
priority = 4;
|
||||
stats[] = {"armor"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_armor";
|
||||
showBar = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 0.80)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default));
|
||||
tabs[] = {{3,4,6}, {}};
|
||||
};
|
||||
class ACE_load: statBase {
|
||||
scope = 2;
|
||||
priority = 3;
|
||||
stats[] = {"maximumLoad"};
|
||||
displayName = "$STR_a3_rscdisplayarsenal_stat_load";
|
||||
showBar = 1;
|
||||
barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 500)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default));
|
||||
tabs[] = {{3,4,5}, {}};
|
||||
};
|
||||
};
|
188
addons/arsenal/Cfg3DEN.hpp
Normal file
188
addons/arsenal/Cfg3DEN.hpp
Normal file
@ -0,0 +1,188 @@
|
||||
class Cfg3DEN {
|
||||
class Mission {
|
||||
class GVAR(DummyCategory) {
|
||||
displayName = "Dummy attribute, should never show up";
|
||||
class AttributeCategories {
|
||||
class ACE3_Arsenal {
|
||||
class Attributes {
|
||||
class GVAR(DefaultLoadoutsListAttribute) {
|
||||
property = QGVAR(DefaultLoadoutsListAttribute);
|
||||
value = 0;
|
||||
expression = QUOTE(if (!is3DEN) then {GVAR(defaultLoadoutsList) = _value};);
|
||||
defaultValue = "[]";
|
||||
validate = "none";
|
||||
wikiType = "[[Array]]";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class Attributes {
|
||||
class GVAR(attribute): ctrlControlsGroupNoScrollbars {
|
||||
idc = -1;
|
||||
// onLoad fixes attributeLoad not happening on multiple selection with different attribute
|
||||
onLoad = QUOTE(private _objects = get3DENSelected 'object'; if (count _objects > 1) then {[ARR_2(_this select 0,((_objects select 0) get3DENAttribute QQGVAR(attribute)) select 0)] call FUNC(attributeLoad)});
|
||||
x = QUOTE(0);
|
||||
y = QUOTE(0);
|
||||
w = QUOTE(130 * ATTRIBUTE_W);
|
||||
h = QUOTE(106.83 * ATTRIBUTE_H);
|
||||
attributeLoad = QUOTE([ARR_2(_this,+_value)] call FUNC(attributeLoad));
|
||||
attributeSave = QUOTE(uiNamespace getVariable [ARR_2(QQGVAR(attributeValue),[ARR_2([], 0)])]);
|
||||
class controls {
|
||||
class ModeTitle: ctrlStatic {
|
||||
idc = -1;
|
||||
text = CSTRING(Mode);
|
||||
x = QUOTE(5 * ATTRIBUTE_W);
|
||||
y = QUOTE(0);
|
||||
w = QUOTE(125 * ATTRIBUTE_W);
|
||||
h = QUOTE(5 * ATTRIBUTE_H);
|
||||
};
|
||||
class Mode: ctrlToolbox {
|
||||
idc = IDC_ATTRIBUTE_MODE;
|
||||
onToolBoxSelChanged = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0), _this select 1)] call FUNC(attributeMode));
|
||||
x = QUOTE(5 * ATTRIBUTE_W);
|
||||
y = QUOTE(5 * ATTRIBUTE_H);
|
||||
w = QUOTE(125 * ATTRIBUTE_W);
|
||||
h = QUOTE(5 * ATTRIBUTE_H);
|
||||
rows = 1;
|
||||
columns = 2;
|
||||
strings[] = {CSTRING(Whitelist), CSTRING(Blacklist)};
|
||||
};
|
||||
class ItemsTitle: ModeTitle {
|
||||
text = CSTRING(Items);
|
||||
y = QUOTE(10 * ATTRIBUTE_H);
|
||||
};
|
||||
class Category: ctrlToolboxPictureKeepAspect {
|
||||
idc = IDC_ATTRIBUTE_CATEGORY;
|
||||
onToolBoxSelChanged = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeAddItems));
|
||||
x = QUOTE(5 * ATTRIBUTE_W);
|
||||
y = QUOTE(15 * ATTRIBUTE_H);
|
||||
w = QUOTE(125 * ATTRIBUTE_W);
|
||||
h = QUOTE(20.83 * ATTRIBUTE_H);
|
||||
rows = 2;
|
||||
columns = 12;
|
||||
strings[] = {
|
||||
"\a3\Ui_F_Curator\Data\RscCommon\RscAttributeInventory\filter_0_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\PrimaryWeapon_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\SecondaryWeapon_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Handgun_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemOptic_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemAcc_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemMuzzle_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemBipod_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMagAll_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Headgear_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Uniform_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Vest_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Backpack_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Goggles_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\NVGs_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Binoculars_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Map_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Compass_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Radio_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Watch_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\GPS_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoThrow_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoPut_ca.paa",
|
||||
"\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMisc_ca.paa"
|
||||
};
|
||||
};
|
||||
class ListBackground: ctrlStatic {
|
||||
idc = -1;
|
||||
x = QUOTE(5 * ATTRIBUTE_W);
|
||||
y = QUOTE(35.83 * ATTRIBUTE_H);
|
||||
w = QUOTE(125 * ATTRIBUTE_W);
|
||||
h = QUOTE(65 * ATTRIBUTE_H);
|
||||
colorBackground[] = {1, 1, 1, 0.1};
|
||||
};
|
||||
class List: ctrlListNBox {
|
||||
idc = IDC_ATTRIBUTE_LIST;
|
||||
idcLeft = IDC_ATTRIBUTE_LIST_LEFT;
|
||||
idcRight = IDC_ATTRIBUTE_LIST_RIGHT;
|
||||
onLBDblClick = QUOTE(_this call FUNC(attributeDblClick));
|
||||
x = QUOTE(5 * ATTRIBUTE_W);
|
||||
y = QUOTE(35.83 * ATTRIBUTE_H);
|
||||
w = QUOTE(125 * ATTRIBUTE_W);
|
||||
h = QUOTE(65 * ATTRIBUTE_H);
|
||||
drawSideArrows = 1;
|
||||
disableOverflow = 1;
|
||||
columns[] = {0.05, 0.15, 0.85};
|
||||
};
|
||||
class ArrowLeft: ctrlButton {
|
||||
idc = IDC_ATTRIBUTE_LIST_LEFT;
|
||||
onButtonClick = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0),false)] call FUNC(attributeSelect));
|
||||
text = SYMBOL_ITEM_NONE;
|
||||
font = "RobotoCondensedBold";
|
||||
x = QUOTE(-1);
|
||||
y = QUOTE(-1);
|
||||
w = QUOTE(5 * ATTRIBUTE_W);
|
||||
H = QUOTE(5 * ATTRIBUTE_H);
|
||||
};
|
||||
class ArrowRight: ArrowLeft {
|
||||
idc = IDC_ATTRIBUTE_LIST_RIGHT;
|
||||
onButtonClick = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0),true)] call FUNC(attributeSelect));
|
||||
text = SYMBOL_ITEM_VIRTUAL;
|
||||
};
|
||||
class SearchButton: ctrlButtonPicture {
|
||||
idc = IDC_ATTRIBUTE_SEARCH_BUTTON;
|
||||
onButtonClick = QUOTE(((ctrlParentControlsGroup (_this select 0)) controlsGroupCtrl IDC_ATTRIBUTE_SEARCHBAR) ctrlSetText ''; [ctrlParentControlsGroup (_this select 0)] call FUNC(attributeAddItems));
|
||||
text = "\a3\Ui_f\data\GUI\RscCommon\RscButtonSearch\search_start_ca.paa";
|
||||
x = QUOTE(5 * ATTRIBUTE_W);
|
||||
y = QUOTE(101.83 * ATTRIBUTE_H);
|
||||
w = QUOTE(5 * ATTRIBUTE_W);
|
||||
h = QUOTE(5 * ATTRIBUTE_H);
|
||||
colorBackground[] = {0, 0, 0, 0.5};
|
||||
};
|
||||
class SearchBar: ctrlEdit {
|
||||
idc = IDC_ATTRIBUTE_SEARCHBAR;
|
||||
onKeyUp = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeAddItems));
|
||||
x = QUOTE(11 * ATTRIBUTE_W);
|
||||
y = QUOTE(101.83 * ATTRIBUTE_H);
|
||||
w = QUOTE(55 * ATTRIBUTE_W);
|
||||
h = QUOTE(5 * ATTRIBUTE_H);
|
||||
};
|
||||
class ClearButton: ctrlButton {
|
||||
idc = IDC_ATTRIBUTE_CLEAR_BUTTON;
|
||||
onButtonClick = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeClear));
|
||||
text = "$STR_disp_arcmap_clear";
|
||||
x = QUOTE(105 * ATTRIBUTE_W);
|
||||
y = QUOTE(101.83 * ATTRIBUTE_H);
|
||||
w = QUOTE(25 * ATTRIBUTE_W);
|
||||
h = QUOTE(5 * ATTRIBUTE_H);
|
||||
colorBackground[] = {0, 0, 0, 0.6};
|
||||
};
|
||||
class ExportButton: ClearButton {
|
||||
idc = IDC_ATTRIBUTE_EXPORT_BUTTON;
|
||||
onButtonClick = QUOTE(copyToClipboard str ((uiNamespace getVariable [ARR_2(QQGVAR(attributeValue),[ARR_2([],0)])]) select 0));
|
||||
text = CSTRING(buttonExportText);
|
||||
tooltip = CSTRING(AttributeExport_Tooltip);
|
||||
x = QUOTE(79 * ATTRIBUTE_W);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class Object {
|
||||
class AttributeCategories {
|
||||
class ADDON {
|
||||
displayName = CSTRING(Mission);
|
||||
collapsed = 1;
|
||||
class Attributes {
|
||||
class ADDON {
|
||||
property = QGVAR(attribute);
|
||||
control = QGVAR(attribute);
|
||||
displayName = CSTRING(Mission);
|
||||
tooltip = "";
|
||||
expression = QUOTE(if (!is3DEN) then {[ARR_2(_this,+_value)] call FUNC(attributeInit)});
|
||||
defaultValue = "[[], 0]";
|
||||
condition = "1 - objectControllable";
|
||||
wikiType = "[[Array]]";
|
||||
validate = "none";
|
||||
value = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,5 +1,14 @@
|
||||
PREP(addDefaultLoadout);
|
||||
PREP(addListBoxItem);
|
||||
PREP(addStat);
|
||||
PREP(addVirtualItems);
|
||||
PREP(attributeAddItems);
|
||||
PREP(attributeClear);
|
||||
PREP(attributeDblClick);
|
||||
PREP(attributeInit);
|
||||
PREP(attributeLoad);
|
||||
PREP(attributeMode);
|
||||
PREP(attributeSelect);
|
||||
PREP(buttonCargo);
|
||||
PREP(buttonClearAll);
|
||||
PREP(buttonExport);
|
||||
@ -10,7 +19,10 @@ PREP(buttonLoadoutsLoad);
|
||||
PREP(buttonLoadoutsRename);
|
||||
PREP(buttonLoadoutsSave);
|
||||
PREP(buttonLoadoutsShare);
|
||||
PREP(buttonStats);
|
||||
PREP(buttonStatsPage);
|
||||
PREP(clearSearchbar);
|
||||
PREP(compileStats);
|
||||
PREP(fillLeftPanel);
|
||||
PREP(fillLoadoutsList);
|
||||
PREP(fillRightPanel);
|
||||
@ -18,6 +30,7 @@ PREP(handleLoadoutsSearchbar);
|
||||
PREP(handleMouse);
|
||||
PREP(handleScrollWheel);
|
||||
PREP(handleSearchbar);
|
||||
PREP(handleStats);
|
||||
PREP(initBox);
|
||||
PREP(itemInfo);
|
||||
PREP(loadoutsChangeTab);
|
||||
@ -37,10 +50,19 @@ PREP(open3DEN);
|
||||
PREP(openBox);
|
||||
PREP(portVALoadouts);
|
||||
PREP(removeBox);
|
||||
PREP(removeStat);
|
||||
PREP(removeVirtualItems);
|
||||
PREP(scanConfig);
|
||||
PREP(showItem);
|
||||
PREP(sortPanel);
|
||||
PREP(statBarStatement_accuracy);
|
||||
PREP(statBarStatement_default);
|
||||
PREP(statBarStatement_impact);
|
||||
PREP(statBarStatement_rateOfFIre);
|
||||
PREP(statTextStatement_accuracy);
|
||||
PREP(statTextStatement_mass);
|
||||
PREP(statTextStatement_rateOfFire);
|
||||
PREP(statTextStatement_scopeMag);
|
||||
PREP(updateCamPos);
|
||||
PREP(updateRightPanel);
|
||||
PREP(updateUniqueItemsList);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "defines.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
@ -12,10 +13,51 @@ GVAR(modList) = ["","curator","kart","heli","mark","expansion","expansionpremium
|
||||
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init;
|
||||
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
|
||||
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init;
|
||||
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
|
||||
|
||||
|
||||
// Arsenal loadouts
|
||||
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
|
||||
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
|
||||
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_Settings_fnc_init;
|
||||
|
||||
[QGVAR(statsToggle), {
|
||||
params ["_display", "_showStats"];
|
||||
|
||||
private _statsCtrlGroupCtrl = _display displayCtrl IDC_statsBox;
|
||||
private _statsPreviousPageCtrl = _display displayCtrl IDC_statsPreviousPage;
|
||||
private _statsNextPageCtrl = _display displayCtrl IDC_statsNextPage;
|
||||
private _statsCurrentPageCtrl = _display displayCtrl IDC_statsCurrentPage;
|
||||
|
||||
private _statsButtonCtrl = _display displayCtrl IDC_statsButton;
|
||||
private _statsButtonCloseCtrl = _display displayCtrl IDC_statsButtonClose;
|
||||
|
||||
{
|
||||
_x ctrlShow (GVAR(showStats) && {_showStats});
|
||||
} forEach [
|
||||
_statsCtrlGroupCtrl,
|
||||
_statsPreviousPageCtrl,
|
||||
_statsNextPageCtrl,
|
||||
_statsCurrentPageCtrl,
|
||||
_statsButtonCloseCtrl
|
||||
];
|
||||
|
||||
_statsButtonCtrl ctrlShow (!GVAR(showStats) && {_showStats})
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(statsButton), {
|
||||
_this call FUNC(buttonStats);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(statsChangePage), {
|
||||
_this call FUNC(buttonStatsPage);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
|
||||
[QGVAR(displayStats), {
|
||||
_this call FUNC(handleStats);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
call FUNC(compileStats);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -8,34 +8,14 @@ class CfgPatches {
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"alganthe"};
|
||||
authors[] = {"alganthe", "mharis001"};
|
||||
url = ECSTRING(main,URL);
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class Cfg3DEN {
|
||||
class Mission {
|
||||
class GVAR(DummyCategory) {
|
||||
displayName="Dummy attribute, should never show up";
|
||||
class AttributeCategories {
|
||||
class ACE3_Arsenal {
|
||||
class Attributes {
|
||||
class GVAR(DefaultLoadoutsListAttribute) {
|
||||
property = QGVAR(DefaultLoadoutsListAttribute);
|
||||
value=0;
|
||||
expression="if !(is3DEN) then {ace_arsenal_defaultLoadoutsList = _value};";
|
||||
defaultValue="[]";
|
||||
validate="none";
|
||||
wikiType="[[Array]]";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "ui\RscAttributes.hpp"
|
||||
#include "Cfg3DEN.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "RscDisplayMain.hpp"
|
||||
#include "ACE_Arsenal_Stats.hpp"
|
||||
|
@ -23,6 +23,10 @@
|
||||
#define IDC_message 9
|
||||
#define IDC_menuBar 10
|
||||
#define IDC_menuBarClose 1001
|
||||
#define IDC_buttonHide 1002
|
||||
#define IDC_buttonLoadouts 1003
|
||||
#define IDC_buttonExport 1004
|
||||
#define IDC_buttonImport 1005
|
||||
#define IDC_infoBox 11
|
||||
#define IDC_infoBackground 1101
|
||||
#define IDC_infoName 1102
|
||||
@ -100,6 +104,32 @@
|
||||
#define IDC_buttonMisc 38
|
||||
#define IDC_buttonRemoveAllSelected 39
|
||||
#define IDC_buttonRemoveAll 40
|
||||
#define IDC_statsBox 51
|
||||
#define IDC_statsTitle1 5101
|
||||
#define IDC_statsBackground1 5102
|
||||
#define IDC_statsBar1 5103
|
||||
#define IDC_statsText1 5104
|
||||
#define IDC_statsTitle2 5105
|
||||
#define IDC_statsBackground2 5106
|
||||
#define IDC_statsBar2 5107
|
||||
#define IDC_statsText2 5108
|
||||
#define IDC_statsTitle3 5109
|
||||
#define IDC_statsBackground3 5110
|
||||
#define IDC_statsBar3 5111
|
||||
#define IDC_statsText3 5112
|
||||
#define IDC_statsTitle4 5113
|
||||
#define IDC_statsBackground4 5114
|
||||
#define IDC_statsBar4 5115
|
||||
#define IDC_statsText4 5116
|
||||
#define IDC_statsTitle5 5117
|
||||
#define IDC_statsBackground5 5118
|
||||
#define IDC_statsBar5 5119
|
||||
#define IDC_statsText5 5120
|
||||
#define IDC_statsPreviousPage 52
|
||||
#define IDC_statsNextPage 53
|
||||
#define IDC_statsCurrentPage 54
|
||||
#define IDC_statsButton 55
|
||||
#define IDC_statsButtonClose 56
|
||||
|
||||
#define IDD_loadouts_display 1127002
|
||||
#define IDC_centerBox 3
|
||||
@ -119,6 +149,24 @@
|
||||
#define IDC_buttonSharedLoadoutsBackground 405
|
||||
#define IDC_buttonSharedLoadouts 406
|
||||
|
||||
// 3DEN Attribute
|
||||
#define ATTRIBUTE_W (pixelW * pixelGrid * 0.5)
|
||||
#define ATTRIBUTE_H (pixelH * pixelGrid * 0.5)
|
||||
|
||||
#define IDC_ATTRIBUTE_MODE 8100
|
||||
#define IDC_ATTRIBUTE_CATEGORY 8101
|
||||
#define IDC_ATTRIBUTE_LIST 8102
|
||||
#define IDC_ATTRIBUTE_LIST_LEFT 8103
|
||||
#define IDC_ATTRIBUTE_LIST_RIGHT 8104
|
||||
#define IDC_ATTRIBUTE_SEARCH_BUTTON 8105
|
||||
#define IDC_ATTRIBUTE_SEARCHBAR 8106
|
||||
#define IDC_ATTRIBUTE_CLEAR_BUTTON 8107
|
||||
#define IDC_ATTRIBUTE_EXPORT_BUTTON 8108
|
||||
|
||||
#define SYMBOL_ITEM_NONE "−"
|
||||
#define SYMBOL_ITEM_REMOVE "×"
|
||||
#define SYMBOL_ITEM_VIRTUAL "∞"
|
||||
|
||||
#define FADE_DELAY 0.15
|
||||
#define CAM_DIS_MAX 5
|
||||
|
||||
@ -196,6 +244,19 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
||||
IDC_rightTabContentListnBox,\
|
||||
RIGHT_PANEL_ITEMS_BACKGROUND_IDCS,\
|
||||
IDC_buttonRemoveAll\
|
||||
];\
|
||||
{\
|
||||
_x = _display displayCtrl _x;\
|
||||
_x ctrlSetPosition [\
|
||||
safezoneX + safezoneW - 93 * GRID_W,\
|
||||
safezoneY + 14 * GRID_H,\
|
||||
80 * GRID_W,\
|
||||
safezoneH - 28 * GRID_H\
|
||||
];\
|
||||
_x ctrlCommit 0;\
|
||||
} foreach [\
|
||||
IDC_blockRightFrame,\
|
||||
IDC_blockRighttBackground\
|
||||
];
|
||||
|
||||
#define TOGGLE_RIGHT_PANEL_CONTAINER\
|
||||
@ -228,6 +289,19 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
||||
IDC_buttonCurrentMag2,\
|
||||
IDC_iconBackgroundCurrentMag,\
|
||||
IDC_iconBackgroundCurrentMag2\
|
||||
];\
|
||||
{\
|
||||
_x = _display displayCtrl _x;\
|
||||
_x ctrlSetPosition [\
|
||||
safezoneX + safezoneW - 93 * GRID_W,\
|
||||
safezoneY + 14 * GRID_H,\
|
||||
80 * GRID_W,\
|
||||
safezoneH - 34 * GRID_H\
|
||||
];\
|
||||
_x ctrlCommit 0;\
|
||||
} foreach [\
|
||||
IDC_blockRightFrame,\
|
||||
IDC_blockRighttBackground\
|
||||
];
|
||||
|
||||
#define TOGGLE_RIGHT_PANEL_HIDE\
|
||||
@ -279,27 +353,27 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
||||
]
|
||||
|
||||
#define CHECK_WEAPON_OR_ACC\
|
||||
_item in (_weaponsArray select 0) ||\
|
||||
{_item in (_weaponsArray select 1)} ||\
|
||||
{_item in (_weaponsArray select 2)} ||\
|
||||
{_item in (GVAR(virtualItems) select 9)} ||\
|
||||
{_item in (_accsArray select 0)} ||\
|
||||
{_item in (_accsArray select 1)} ||\
|
||||
{_item in (_accsArray select 2)} ||\
|
||||
{_item in (_accsArray select 3)}
|
||||
(_weaponsArray select 0) findIf {_x == _item} > -1 ||\
|
||||
{(_weaponsArray select 1) findIf {_x == _item} > -1} ||\
|
||||
{(_weaponsArray select 2) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 9) findIf {_x == _item} > -1} ||\
|
||||
{(_accsArray select 0) findIf {_x == _item} > -1} ||\
|
||||
{(_accsArray select 1 findIf {_x == _item} > -1)} ||\
|
||||
{(_accsArray select 2) findIf {_x == _item} > -1} ||\
|
||||
{(_accsArray select 3) findIf {_x == _item} > -1}
|
||||
|
||||
#define CHECK_ASSIGNED_ITEMS\
|
||||
_item in (GVAR(virtualItems) select 10) ||\
|
||||
{_item in (GVAR(virtualItems) select 11)} ||\
|
||||
{_item in (GVAR(virtualItems) select 12)} ||\
|
||||
{_item in (GVAR(virtualItems) select 13)} ||\
|
||||
{_item in (GVAR(virtualItems) select 14)} ||\
|
||||
{_item in (GVAR(virtualItems) select 8)}
|
||||
(GVAR(virtualItems) select 10) findIf {_x == _item} > -1 ||\
|
||||
{(GVAR(virtualItems) select 11) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 12) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 13) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 14) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 8) findIf {_x == _item} > -1}
|
||||
|
||||
#define CHECK_CONTAINER\
|
||||
_item in (GVAR(virtualItems) select 4) ||\
|
||||
{_item in (GVAR(virtualItems) select 5)} ||\
|
||||
{_item in (GVAR(virtualItems) select 6)}
|
||||
(GVAR(virtualItems) select 4) findIf {_x == _item} > -1 ||\
|
||||
{(GVAR(virtualItems) select 5) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 6) findIf {_x == _item} > -1}
|
||||
|
||||
#define CLASS_CHECK_ITEM\
|
||||
isClass (_weaponCfg >> _item) ||\
|
||||
@ -308,24 +382,24 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\
|
||||
{isClass (_magCfg >> _item)}
|
||||
|
||||
#define CHECK_CONTAINER_ITEMS\
|
||||
_item in (GVAR(virtualItems) select 3) ||\
|
||||
{_item in (_accsArray select 0)} ||\
|
||||
{_item in (_accsArray select 1)} ||\
|
||||
{_item in (_accsArray select 2)} ||\
|
||||
{_item in (_accsArray select 3)} ||\
|
||||
{_item in (GVAR(virtualItems) select 4)} ||\
|
||||
{_item in (GVAR(virtualItems) select 5)} ||\
|
||||
{_item in (GVAR(virtualItems) select 6)} ||\
|
||||
{_item in (GVAR(virtualItems) select 7)} ||\
|
||||
{_item in (GVAR(virtualItems) select 8)} ||\
|
||||
{_item in (GVAR(virtualItems) select 10)} ||\
|
||||
{_item in (GVAR(virtualItems) select 11)} ||\
|
||||
{_item in (GVAR(virtualItems) select 12)} ||\
|
||||
{_item in (GVAR(virtualItems) select 13)} ||\
|
||||
{_item in (GVAR(virtualItems) select 14)} ||\
|
||||
{_item in (GVAR(virtualItems) select 15)} ||\
|
||||
{_item in (GVAR(virtualItems) select 16)} ||\
|
||||
{_item in (GVAR(virtualItems) select 17)}
|
||||
(GVAR(virtualItems) select 3) findIf {_x == _item} > -1 ||\
|
||||
{(_accsArray select 0) findIf {_x == _item} > -1} ||\
|
||||
{(_accsArray select 1) findIf {_x == _item} > -1} ||\
|
||||
{(_accsArray select 2) findIf {_x == _item} > -1} ||\
|
||||
{(_accsArray select 3) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 4) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 5) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 6) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 7) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 8) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 10) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 11) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 12) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 13) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 14) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 15) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 16) findIf {_x == _item} > -1} ||\
|
||||
{(GVAR(virtualItems) select 17) findIf {_x == _item} > -1}
|
||||
|
||||
#define ADD_LOADOUTS_LIST_PICTURES\
|
||||
_contentPanelCtrl lnbSetPicture [[_newRow, 2], getText (configFile >> "cfgWeapons" >> ((_loadout select 0) select 0) >> "picture")];\
|
||||
|
31
addons/arsenal/functions/fnc_addDefaultLoadout.sqf
Normal file
31
addons/arsenal/functions/fnc_addDefaultLoadout.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: 654wak654
|
||||
* Adds a loadout to the "Default Loadouts" list.
|
||||
* If a loadout with the same name exists, it is overwritten.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name of loadout <STRING>
|
||||
* 1: getUnitLoadout array <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* ["Squad Leader", getUnitLoadout sql1] call ace_arsenal_fnc_addDefaultLoadout
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
params [["_name", "", [""]], ["_loadout", [], [[]], 10]];
|
||||
|
||||
if (isNil QGVAR(defaultLoadoutsList)) then {
|
||||
GVAR(defaultLoadoutsList) = [];
|
||||
};
|
||||
|
||||
private _loadoutIndex = (+(GVAR(defaultLoadoutsList))) findIf {(_x select 0) == _name};
|
||||
if (_loadoutIndex == -1) then {
|
||||
GVAR(defaultLoadoutsList) pushBack [_name, _loadout];
|
||||
} else {
|
||||
GVAR(defaultLoadoutsList) set [_loadoutIndex, [_name, _loadout]];
|
||||
};
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Dedmen
|
||||
* Add a listbox row.
|
||||
@ -13,8 +14,6 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]];
|
||||
|
||||
private _cacheNamespace = _ctrlPanel; //For better readability.
|
||||
|
99
addons/arsenal/functions/fnc_addStat.sqf
Normal file
99
addons/arsenal/functions/fnc_addStat.sqf
Normal file
@ -0,0 +1,99 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Add a stat to ACE Arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Tabs to add the stat to (ARRAY of ARRAYS)
|
||||
* 0.1: Left tab indexes (ARRAY of NUMBERS)
|
||||
* 0.2 Right tab indexes (ARRAY of NUMBERS)
|
||||
* 1: Stat class (STRING) (A unique string for each stat)
|
||||
* 2: Config entries to pass (ARRAY of STRINGS)
|
||||
* 3: Title (STRING)
|
||||
* 4: Show bar / show text bools (ARRAY of BOOLS)
|
||||
* 4.1 Show bar (BOOL)
|
||||
* 4.2 Show text (BOOL)
|
||||
* 5: Array of statements (ARRAY of ARRAYS)
|
||||
* 5.1: Bar code (CODE)
|
||||
* 5.2 Text code (CODE)
|
||||
* 5.3 Condition code (CODE)
|
||||
* 6: Priority (NUMBER) (Optional)
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Array of IDs (ARRAY of STRINGS)
|
||||
*
|
||||
* Example:
|
||||
* [[[0,1,2], [7]], "scopeStat", ["scope"], "Scope", [false, true], [{}, {
|
||||
params ["_statsArray", "_itemCfg"];
|
||||
getNumber (_itemCfg >> _statsArray select 0)
|
||||
}, {true}]] call ACE_arsenal_fnc_addStat
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
params [
|
||||
["_tabs", [[], []], [[]], 2],
|
||||
["_class", "", [""]],
|
||||
["_stats", [], [[]]],
|
||||
["_title", "", [""]],
|
||||
["_bools", [false, false], [[]], 2],
|
||||
["_statements", [{}, {}, {true}], [[]], 3],
|
||||
["_priority", 0, [0]]
|
||||
];
|
||||
|
||||
_tabs params [
|
||||
["_leftTabs", [], [[]]],
|
||||
["_rightTabs", [], [[]]]
|
||||
];
|
||||
|
||||
_bools params [["_showBar", false, [false]], ["_showText", false, [false]]];
|
||||
|
||||
_statements params [
|
||||
["_barStatement", {}, [{}]],
|
||||
["_textStatement", {}, [{}]],
|
||||
["_condition", {true}, [{}]]
|
||||
];
|
||||
|
||||
call FUNC(compileStats);
|
||||
|
||||
private _returnArray = [];
|
||||
|
||||
private _fnc_addToTabs = {
|
||||
params ["_tabsList", "_tabsToAddTo", "_sideString", "_returnIndex"];
|
||||
{
|
||||
private _currentTab = _tabsList select _x;
|
||||
|
||||
private _finalID = [_class, _sideString, [str _x, format ["0%1", _x]] select (_x < 10)] joinString "";
|
||||
|
||||
if ({{_x select 0 == _finalID} count _x > 0} count _currentTab > 0) then {
|
||||
TRACE_1("A stat with this ID already exists", _finalID);
|
||||
} else {
|
||||
|
||||
private _arrayToSave = +_finalArray;
|
||||
_arrayToSave set [0, _finalID];
|
||||
_returnArray pushBack _finalID;
|
||||
|
||||
// Add to existing page if there's enough space, otherwise create a new page
|
||||
if ({count _x < 5} count _currentTab > 0) then {
|
||||
{
|
||||
if (count _x < 5) exitWith {
|
||||
(_currentTab select _forEachIndex) append [_arrayToSave];
|
||||
};
|
||||
} foreach _currentTab;
|
||||
} else {
|
||||
_currentTab pushBack [_arrayToSave];
|
||||
};
|
||||
};
|
||||
} foreach _tabsToAddTo;
|
||||
};
|
||||
|
||||
private _finalArray = ["", _stats, _title, [_showBar, _showText], [_barStatement, _textStatement, _condition], _priority];
|
||||
|
||||
if (count _leftTabs > 0) then {
|
||||
[GVAR(statsListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
|
||||
};
|
||||
|
||||
if (count _rightTabs > 0) then {
|
||||
[GVAR(statsListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs;
|
||||
};
|
||||
|
||||
_returnArray
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe, Dedmen
|
||||
* Add virtual items to the provided target.
|
||||
@ -16,8 +18,6 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params [["_object", objNull, [objNull]], ["_items", [], [true, []]], ["_global", false, [false]]];
|
||||
|
||||
@ -81,37 +81,37 @@ if (_items isEqualType true) then {
|
||||
/* Weapon acc */
|
||||
case (
|
||||
isClass (_configItemInfo) &&
|
||||
{(getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302]} &&
|
||||
{(getNumber (_configItemInfo >> "type")) in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} &&
|
||||
{!(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}
|
||||
): {
|
||||
switch (getNumber (_configItemInfo >> "type")) do {
|
||||
case 201: {
|
||||
case TYPE_OPTICS: {
|
||||
(_cargo select 1) select 0 pushBackUnique _x;
|
||||
};
|
||||
case 301: {
|
||||
case TYPE_FLASHLIGHT: {
|
||||
(_cargo select 1) select 1 pushBackUnique _x;
|
||||
};
|
||||
case 101: {
|
||||
case TYPE_MUZZLE: {
|
||||
(_cargo select 1) select 2 pushBackUnique _x;
|
||||
};
|
||||
case 302: {
|
||||
case TYPE_BIPOD: {
|
||||
(_cargo select 1) select 3 pushBackUnique _x;
|
||||
};
|
||||
};
|
||||
};
|
||||
/* Headgear */
|
||||
case (isClass (_configItemInfo) &&
|
||||
{getNumber (_configItemInfo >> "type") == 605}): {
|
||||
{getNumber (_configItemInfo >> "type") == TYPE_HEADGEAR}): {
|
||||
(_cargo select 3) pushBackUnique _x;
|
||||
};
|
||||
/* Uniform */
|
||||
case (isClass (_configItemInfo) &&
|
||||
{getNumber (_configItemInfo >> "type") == 801}): {
|
||||
{getNumber (_configItemInfo >> "type") == TYPE_UNIFORM}): {
|
||||
(_cargo select 4) pushBackUnique _x;
|
||||
};
|
||||
/* Vest */
|
||||
case (isClass (_configItemInfo) &&
|
||||
{getNumber (_configItemInfo >> "type") == 701}): {
|
||||
{getNumber (_configItemInfo >> "type") == TYPE_VEST}): {
|
||||
(_cargo select 5) pushBackUnique _x;
|
||||
};
|
||||
/* NVgs */
|
||||
@ -120,7 +120,7 @@ if (_items isEqualType true) then {
|
||||
};
|
||||
/* Binos */
|
||||
case (_simulationType == "Binocular" ||
|
||||
{(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == 4096)}}): {
|
||||
{(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == TYPE_BINOCULAR_AND_NVG)}}): {
|
||||
(_cargo select 9) pushBackUnique _x;
|
||||
};
|
||||
/* Map */
|
||||
@ -145,20 +145,20 @@ if (_items isEqualType true) then {
|
||||
};
|
||||
/* UAV terminals */
|
||||
case (isClass (_configItemInfo) &&
|
||||
{getNumber (_configItemInfo >> "type") == 621}): {
|
||||
{getNumber (_configItemInfo >> "type") == TYPE_UAV_TERMINAL}): {
|
||||
(_cargo select 14) pushBackUnique _x;
|
||||
};
|
||||
/* Weapon, at the bottom to avoid adding binos */
|
||||
case (isClass (_configCfgWeapons >> _x >> "WeaponSlotsInfo") &&
|
||||
{getNumber (_configCfgWeapons >> _x >> 'type') != 4096}): {
|
||||
{getNumber (_configCfgWeapons >> _x >> 'type') != TYPE_BINOCULAR_AND_NVG}): {
|
||||
switch (getNumber (_configCfgWeapons >> _x >> "type")) do {
|
||||
case 1: {
|
||||
case TYPE_WEAPON_PRIMARY: {
|
||||
(_cargo select 0) select 0 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
||||
};
|
||||
case 2: {
|
||||
case TYPE_WEAPON_HANDGUN: {
|
||||
(_cargo select 0) select 2 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
||||
};
|
||||
case 4: {
|
||||
case TYPE_WEAPON_SECONDARY: {
|
||||
(_cargo select 0) select 1 pushBackUnique ([_x] call bis_fnc_baseWeapon);
|
||||
};
|
||||
};
|
||||
@ -166,9 +166,9 @@ if (_items isEqualType true) then {
|
||||
/* Misc items */
|
||||
case (
|
||||
isClass (_configItemInfo) &&
|
||||
((getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302] &&
|
||||
((getNumber (_configItemInfo >> "type")) in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD] &&
|
||||
{(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) ||
|
||||
{(getNumber (_configItemInfo >> "type")) in [401, 619, 620]} ||
|
||||
{(getNumber (_configItemInfo >> "type")) in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} ||
|
||||
{(getText (_configCfgWeapons >> _x >> "simulation")) == "ItemMineDetector"}
|
||||
): {
|
||||
(_cargo select 17) pushBackUnique _x;
|
||||
@ -193,7 +193,7 @@ if (_items isEqualType true) then {
|
||||
switch true do {
|
||||
// Rifle, handgun, secondary weapons mags
|
||||
case (
|
||||
(getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [256,512,1536,16]) &&
|
||||
(getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) &&
|
||||
{!(_x in _grenadeList)} &&
|
||||
{!(_x in _putList)}
|
||||
): {
|
||||
@ -210,7 +210,7 @@ if (_items isEqualType true) then {
|
||||
};
|
||||
};
|
||||
case (isClass (configFile >> "CfgVehicles" >> _x)): {
|
||||
if (getText (configFile >> "CfgVehicles" >> _x >> "vehicleClass") == "Backpacks") then {
|
||||
if (getNumber (configFile >> "CfgVehicles" >> _x >> "isBackpack") == 1) then {
|
||||
(_cargo select 6) pushBackUnique _x;
|
||||
};
|
||||
};
|
||||
|
122
addons/arsenal/functions/fnc_attributeAddItems.sqf
Normal file
122
addons/arsenal/functions/fnc_attributeAddItems.sqf
Normal file
@ -0,0 +1,122 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Populates 3DEN attribute listbox with items of given category.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Attribute controls group <CONTROL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [CONTROL, 0] call ace_arsenal_fnc_attributeAddItems
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_controlsGroup"];
|
||||
|
||||
private _category = lbCurSel (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_CATEGORY) - 1;
|
||||
private _filter = toLower ctrlText (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_SEARCHBAR);
|
||||
private _configItems = +(uiNamespace getVariable [QGVAR(configItems), []]);
|
||||
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||
TRACE_3("Populating list",_category,_filter,_attributeValue);
|
||||
|
||||
_attributeValue params ["_attributeItems", "_attributeMode"];
|
||||
private _modeSymbol = [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode;
|
||||
|
||||
// Clear listbox
|
||||
private _listbox = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST;
|
||||
lnbClear _listbox;
|
||||
|
||||
// Exit with current items (no specific category)
|
||||
if (_category == -1) exitWith {
|
||||
{
|
||||
// Get appropriate config for each item (different since items can be from any category)
|
||||
private _config = switch (true) do {
|
||||
case (_x in (_configItems select 2));
|
||||
case (_x in (_configItems select 15));
|
||||
case (_x in (_configItems select 16)): {
|
||||
configFile >> "CfgMagazines" >> _x;
|
||||
};
|
||||
case (_x in (_configItems select 6)): {
|
||||
configFile >> "CfgVehicles" >> _x;
|
||||
};
|
||||
case (_x in (_configItems select 7)): {
|
||||
configFile >> "CfgGlasses" >> _x;
|
||||
};
|
||||
default {
|
||||
configFile >> "CfgWeapons" >> _x;
|
||||
};
|
||||
};
|
||||
|
||||
// Add item if not filtered
|
||||
private _displayName = getText (_config >> "displayName");
|
||||
if (toLower _displayName find _filter > -1) then {
|
||||
private _picture = getText (_config >> "picture");
|
||||
private _index = _listbox lnbAddRow ["", _displayName, _modeSymbol];
|
||||
_listbox lnbSetData [[_index, 1], _x];
|
||||
_listbox lnbSetPicture [[_index, 0], _picture];
|
||||
_listbox lbSetTooltip [_index * (count lnbGetColumnsPosition _listbox), _x];
|
||||
};
|
||||
} forEach _attributeItems;
|
||||
|
||||
_listbox lnbSort [1];
|
||||
};
|
||||
|
||||
// Get list of category items
|
||||
private _categoryItems = switch (true) do {
|
||||
case (_category < 3): {
|
||||
_configItems select 0 select _category;
|
||||
};
|
||||
case (_category < 7): {
|
||||
_configItems select 1 select (_category - 3);
|
||||
};
|
||||
default {
|
||||
_configItems select (_category - 5);
|
||||
};
|
||||
};
|
||||
|
||||
// Get config for current category
|
||||
private _config = switch (true) do {
|
||||
case (_category in [7, 20, 21]): {
|
||||
configFile >> "CfgMagazines";
|
||||
};
|
||||
case (_category == 11): {
|
||||
configFile >> "CfgVehicles";
|
||||
};
|
||||
case (_category == 12): {
|
||||
configFile >> "CfgGlasses";
|
||||
};
|
||||
default {
|
||||
configFile >> "CfgWeapons";
|
||||
};
|
||||
};
|
||||
|
||||
// Populate listbox with category items
|
||||
{
|
||||
// Add item if not filtered
|
||||
private _displayName = getText (_config >> _x >> "displayName");
|
||||
if (toLower _displayName find _filter > -1) then {
|
||||
private _picture = getText (_config >> _x >> "picture");
|
||||
private _symbol = SYMBOL_ITEM_NONE;
|
||||
private _alpha = 0.5;
|
||||
|
||||
// Change symbol and alpha if item already selected
|
||||
if (_x in _attributeItems) then {
|
||||
_symbol = _modeSymbol;
|
||||
_alpha = 1;
|
||||
};
|
||||
|
||||
private _index = _listbox lnbAddRow ["", _displayName, _symbol];
|
||||
_listbox lnbSetData [[_index, 1], _x];
|
||||
_listbox lnbSetPicture [[_index, 0], _picture];
|
||||
_listbox lbSetTooltip [_index * (count lnbGetColumnsPosition _listbox), _x];
|
||||
_listbox lnbSetColor [[_index, 1], [1, 1, 1, _alpha]];
|
||||
_listbox lnbSetColor [[_index, 2], [1, 1, 1, _alpha]];
|
||||
};
|
||||
} forEach _categoryItems;
|
||||
|
||||
_listbox lnbSort [1];
|
46
addons/arsenal/functions/fnc_attributeClear.sqf
Normal file
46
addons/arsenal/functions/fnc_attributeClear.sqf
Normal file
@ -0,0 +1,46 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Clears all items from current category in 3DEN attribute.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Attribute controls group <CONTROL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [CONTROL] call ace_arsenal_fnc_attributeClear
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_controlsGroup"];
|
||||
|
||||
private _category = lbCurSel (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_CATEGORY) - 1;
|
||||
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||
TRACE_1("Handling clear button",_category);
|
||||
|
||||
// Remove all if no specific category
|
||||
if (_category == -1) then {
|
||||
_attributeValue set [0, []];
|
||||
} else {
|
||||
// Find category items and remove from list
|
||||
private _configItems = +(uiNamespace getVariable [QGVAR(configItems), []]);
|
||||
private _categoryItems = switch (true) do {
|
||||
case (_category < 3): {
|
||||
_configItems select 0 select _category;
|
||||
};
|
||||
case (_category < 7): {
|
||||
_configItems select 1 select (_category - 3);
|
||||
};
|
||||
default {
|
||||
_configItems select (_category - 5);
|
||||
};
|
||||
};
|
||||
_attributeValue set [0, (_attributeValue select 0) - _categoryItems];
|
||||
};
|
||||
|
||||
// Refresh the list after clear
|
||||
[_controlsGroup] call FUNC(attributeAddItems);
|
26
addons/arsenal/functions/fnc_attributeDblClick.sqf
Normal file
26
addons/arsenal/functions/fnc_attributeDblClick.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Handles double clicking a row in 3DEN attribute listbox.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Listbox <CONTROL>
|
||||
* 1: Row index <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [CONTROL, 0] call ace_arsenal_fnc_attributeDblClick
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_listbox", "_currentRow"];
|
||||
TRACE_1("Double click toggle",_currentRow);
|
||||
|
||||
// Get toggle mode (add or remove item)
|
||||
private _itemClassname = _listbox lnbData [_currentRow, 1];
|
||||
private _addItem = !(_itemClassname in ((uiNamespace getVariable [QGVAR(attributeValue), [[], 0]]) select 0));
|
||||
|
||||
[ctrlParentControlsGroup _listbox, _addItem] call FUNC(attributeSelect);
|
33
addons/arsenal/functions/fnc_attributeInit.sqf
Normal file
33
addons/arsenal/functions/fnc_attributeInit.sqf
Normal file
@ -0,0 +1,33 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Initializes the objects 3DEN attribute at scenario start.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Attribute target <OBJECT>
|
||||
* 1: Attribute value <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [box, [[], 1]] call ace_arsenal_fnc_attributeInit
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_object", "_value"];
|
||||
_value params ["_items", "_mode"];
|
||||
TRACE_2("Initializing object with attribute",_object,_value);
|
||||
|
||||
if (_mode > 0) then {
|
||||
// Blacklist: all full arsenal and take items away
|
||||
[_object, true, true] call FUNC(initBox);
|
||||
[_object, _items, true] call FUNC(removeVirtualItems);
|
||||
} else {
|
||||
// Exit on whitelist mode with no items
|
||||
if (_items isEqualTo []) exitWith {};
|
||||
|
||||
// Whitelist: add only selected items
|
||||
[_object, _items, true] call FUNC(initBox);
|
||||
};
|
32
addons/arsenal/functions/fnc_attributeLoad.sqf
Normal file
32
addons/arsenal/functions/fnc_attributeLoad.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Initializes the 3DEN attribute.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Attribute controls group <CONTROL>
|
||||
* 1: Attribute value <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [CONTROL, [[], 0]] call ace_arsenal_fnc_attributeLoad
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_controlsGroup", "_value"];
|
||||
TRACE_1("Initializing 3DEN attribute",_value);
|
||||
|
||||
// Store working attribute value
|
||||
uiNamespace setVariable [QGVAR(attributeValue), _value];
|
||||
|
||||
// Handle selected mode
|
||||
if (_value select 1 > 0) then {
|
||||
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_MODE) lbSetCurSel 1;
|
||||
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST_RIGHT) ctrlSetText SYMBOL_ITEM_REMOVE;
|
||||
};
|
||||
|
||||
[_controlsGroup] call FUNC(attributeAddItems);
|
29
addons/arsenal/functions/fnc_attributeMode.sqf
Normal file
29
addons/arsenal/functions/fnc_attributeMode.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Handles changing the mode in 3DEN attribute.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Attribute controls group <CONTROL>
|
||||
* 1: Mode <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [CONTROL, 0] call ace_arsenal_fnc_attributeMode
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_controlsGroup", "_mode"];
|
||||
TRACE_1("Changing attribute mode",_mode);
|
||||
|
||||
// Store mode change
|
||||
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||
_attributeValue set [1, _mode];
|
||||
|
||||
// Change right list button and refresh list items with new mode
|
||||
(_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST_RIGHT) ctrlSetText ([SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _mode);
|
||||
[_controlsGroup] call FUNC(attributeAddItems);
|
49
addons/arsenal/functions/fnc_attributeSelect.sqf
Normal file
49
addons/arsenal/functions/fnc_attributeSelect.sqf
Normal file
@ -0,0 +1,49 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Handles adding/removing an item from 3DEN attribute list.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Attribute controls group <CONTROL>
|
||||
* 1: Add (true) or remove (false) item <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [CONTROL, true] call ace_arsenal_fnc_attributeSelect
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_controlsGroup", "_addItem"];
|
||||
|
||||
// Get item class from listbox
|
||||
private _listbox = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_LIST;
|
||||
private _currentRow = lnbCurSelRow _listbox;
|
||||
private _itemClassname = _listbox lnbData [_currentRow, 1];
|
||||
TRACE_2("Handling item selection",_itemClassname,_addItem);
|
||||
|
||||
private _attributeValue = uiNamespace getVariable [QGVAR(attributeValue), [[], 0]];
|
||||
_attributeValue params ["_attributeItems", "_attributeMode"];
|
||||
|
||||
private _findItem = _attributeItems find _itemClassname;
|
||||
|
||||
// Add item if not already in list
|
||||
if (_addItem && {_findItem < 0}) exitWith {
|
||||
_attributeItems pushBack _itemClassname;
|
||||
// Change symbol and increase alpha
|
||||
_listbox lnbSetText [[_currentRow, 2], [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode];
|
||||
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 1]];
|
||||
_listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
// Remove item if in list
|
||||
if (!_addItem && {_findItem > -1}) exitWith {
|
||||
_attributeItems deleteAt _findItem;
|
||||
// Change symbol and reduce alpha
|
||||
_listbox lnbSetText [[_currentRow, 2], SYMBOL_ITEM_NONE];
|
||||
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 0.5]];
|
||||
_listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 0.5]];
|
||||
};
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Add or remove item(s) when the + or - button is pressed in the right panel.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_addOrRemove"];
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Clear the current container.
|
||||
@ -10,8 +12,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display"];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Export current loadout / default loadouts list to clipboard.
|
||||
@ -10,7 +11,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_display"];
|
||||
|
||||
@ -49,3 +49,5 @@ if (GVAR(shiftState)) then {
|
||||
|
||||
[_display, localize LSTRING(exportCurrent)] call FUNC(message);
|
||||
};
|
||||
|
||||
[QGVAR(loadoutExported), [_display, GVAR(shiftState)]] call CBA_fnc_localEvent;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Hide / show arsenal interface.
|
||||
@ -10,8 +12,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display"];
|
||||
|
||||
@ -48,5 +48,12 @@ private _showToggle = !ctrlShown (_display displayCtrl IDC_menuBar);
|
||||
IDC_buttonCurrentMag,
|
||||
IDC_buttonCurrentMag2,
|
||||
IDC_iconBackgroundCurrentMag,
|
||||
IDC_iconBackgroundCurrentMag2
|
||||
IDC_iconBackgroundCurrentMag2,
|
||||
IDC_statsButton,
|
||||
IDC_statsPreviousPage,
|
||||
IDC_statsNextPage,
|
||||
IDC_statsCurrentPage,
|
||||
IDC_statsButtonClose
|
||||
];
|
||||
|
||||
[QGVAR(statsToggle), [_display, _showToggle]] call CBA_fnc_localEvent;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Import loadout / default loadouts list from clipboard.
|
||||
@ -10,8 +12,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display"];
|
||||
|
||||
@ -31,16 +31,7 @@ if (GVAR(shiftState) && {is3DEN}) then {
|
||||
{_x select 1 isEqualType []} &&
|
||||
{count (_x select 1) == 10}
|
||||
) then {
|
||||
|
||||
_x params ["_loadoutName", "_loadout"];
|
||||
|
||||
private _sameNameLoadoutsList = GVAR(defaultLoadoutsList) select {_x select 0 == _loadoutName};
|
||||
|
||||
if (count _sameNameLoadoutsList == 0) then {
|
||||
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _loadout];
|
||||
} else {
|
||||
GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), _loadoutName, _loadout];
|
||||
};
|
||||
_x call FUNC(addDefaultLoadout);
|
||||
};
|
||||
} foreach _data;
|
||||
|
||||
@ -109,3 +100,5 @@ if (GVAR(shiftState) && {is3DEN}) then {
|
||||
[_display, localize LSTRING(importedCurrent)] call FUNC(message);
|
||||
};
|
||||
};
|
||||
|
||||
[QGVAR(loadoutImported), [_display, (GVAR(shiftState) && {is3DEN})]] call CBA_fnc_localEvent;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Delete / unshare loadout currently selected.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Load selected loadout.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
@ -76,10 +76,17 @@ for "_index" from 0 to 15 do {
|
||||
};
|
||||
{
|
||||
private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation");
|
||||
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType));
|
||||
|
||||
GVAR(currentItems) set [_index, _x];
|
||||
} foreach (assignedItems GVAR(center));
|
||||
if (_simulationType != "NVGoggles") then {
|
||||
if (_simulationType == "ItemGps" || _simulationType == "Weapon") then {
|
||||
GVAR(currentItems) set [14, _x];
|
||||
} else {
|
||||
|
||||
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType));
|
||||
GVAR(currentItems) set [_index, _x];
|
||||
};
|
||||
};
|
||||
} forEach (assignedItems GVAR(center));
|
||||
|
||||
call FUNC(updateUniqueItemsList);
|
||||
|
||||
@ -88,3 +95,5 @@ call FUNC(updateUniqueItemsList);
|
||||
[GVAR(center), GVAR(currentInsignia)] call bis_fnc_setUnitInsignia;
|
||||
|
||||
[(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutLoaded), _loadoutName] joinString " "] call FUNC(message);
|
||||
|
||||
[QGVAR(onLoadoutLoad), [_loadout, _loadoutName]] call CBA_fnc_localEvent;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Rename selected loadout.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Save selected loadout.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
@ -33,7 +33,7 @@ private _loadoutName = _contentPanelCtrl lnbText [_cursSelRow, 1];
|
||||
private _curSelLoadout = (_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) select 0;
|
||||
private _loadout = getUnitLoadout GVAR(center);
|
||||
|
||||
private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent};
|
||||
private _loadoutIndex = _data findIf {(_x select 0) == _editBoxContent};
|
||||
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);
|
||||
|
||||
// Make sure the loadout isn't yours (public tab) or being shared (my loadouts tab)
|
||||
@ -124,10 +124,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
||||
};
|
||||
};
|
||||
|
||||
if (count _sameNameLoadoutsList == 0) then {
|
||||
if (_loadoutIndex == -1) then {
|
||||
_data pushBack [_editBoxContent, _loadout];
|
||||
} else {
|
||||
_data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
};
|
||||
|
||||
// Delete "old" loadout row
|
||||
@ -155,7 +155,7 @@ switch (GVAR(currentLoadoutsTab)) do {
|
||||
|
||||
if (is3DEN) then {
|
||||
|
||||
private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent};
|
||||
private _loadoutIndex = _data findIf {(_x select 0) == _editBoxContent};
|
||||
|
||||
for "_dataIndex" from 0 to 10 do {
|
||||
switch (_dataIndex) do {
|
||||
@ -232,10 +232,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
||||
};
|
||||
};
|
||||
|
||||
if (count _sameNameLoadoutsList == 0) then {
|
||||
if (_loadoutIndex == -1) then {
|
||||
GVAR(defaultLoadoutsList) pushBack [_editBoxContent, _loadout];
|
||||
} else {
|
||||
GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
GVAR(defaultLoadoutsList) set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
};
|
||||
|
||||
for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do {
|
||||
@ -258,10 +258,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
||||
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
||||
} else {
|
||||
|
||||
if (count _sameNameLoadoutsList == 0) then {
|
||||
if (_loadoutIndex == -1) then {
|
||||
_data pushBack [_editBoxContent, _curSelLoadout];
|
||||
} else {
|
||||
_data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]];
|
||||
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]];
|
||||
_contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_curSelLoadout] call FUNC(verifyLoadout)];
|
||||
};
|
||||
|
||||
@ -273,10 +273,10 @@ switch (GVAR(currentLoadoutsTab)) do {
|
||||
|
||||
_loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_cursSelRow, 0]) + (_contentPanelCtrl lnbText [_cursSelRow, 1]))) select 2;
|
||||
|
||||
if (count _sameNameLoadoutsList == 0) then {
|
||||
if (_loadoutIndex == -1) then {
|
||||
_data pushBack [_editBoxContent, _loadout];
|
||||
} else {
|
||||
_data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
_data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]];
|
||||
_contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_loadout] call FUNC(verifyLoadout)];
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Share selected loadout.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
|
31
addons/arsenal/functions/fnc_buttonStats.sqf
Normal file
31
addons/arsenal/functions/fnc_buttonStats.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Toggle the stats control group
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Button control <CONTROL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_display"];
|
||||
|
||||
(_display displayCtrl IDC_statsButton) ctrlShow GVAR(showStats);
|
||||
GVAR(showStats) = !GVAR(showStats);
|
||||
|
||||
{
|
||||
(_display displayCtrl _x) ctrlShow GVAR(showStats);
|
||||
} foreach [
|
||||
IDC_statsBox,
|
||||
IDC_statsPreviousPage,
|
||||
IDC_statsNextPage,
|
||||
IDC_statsCurrentPage,
|
||||
IDC_statsButtonClose
|
||||
];
|
||||
|
29
addons/arsenal/functions/fnc_buttonStatsPage.sqf
Normal file
29
addons/arsenal/functions/fnc_buttonStatsPage.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles the previous / next page buttons for stats
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Previous or next <BOOL> (false = previous, true = next)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_display", "_control", "_nextPage"];
|
||||
|
||||
TRACE_1("control enabled", ctrlEnabled _control);
|
||||
if !(ctrlEnabled _control) exitWith {};
|
||||
|
||||
GVAR(statsInfo) params ["_isLeftPanel", "_statsIndex", "_panelControl", "_curSel", "_itemCfg"];
|
||||
|
||||
private _pageList = [GVAR(statsPagesRight), GVAR(statsPagesLeft)] select (_isLeftPanel);
|
||||
private _newPageNumber = [(_pageList select _statsIndex) - 1, (_pageList select _statsIndex) + 1] select _nextPage;
|
||||
|
||||
_pageList set [_statsIndex, _newPageNumber];
|
||||
|
||||
[QGVAR(displayStats), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Clear the provided searchbar.
|
||||
@ -12,8 +14,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control", "_rightButton"];
|
||||
|
||||
|
135
addons/arsenal/functions/fnc_compileStats.sqf
Normal file
135
addons/arsenal/functions/fnc_compileStats.sqf
Normal file
@ -0,0 +1,135 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Create the internal stats arrays when needed for the first time
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
if (!isNil QGVAR(statsListLeftPanel)) exitWith {};
|
||||
|
||||
private _fnc_addToTabs = {
|
||||
params ["_tabsList", "_tabsToAddTo", "_sideString"];
|
||||
{
|
||||
private _currentTab = _tabsList select _x;
|
||||
private _availablePagesCount = {count _x < 5} count _currentTab;
|
||||
|
||||
private _arrayToSave = +_finalArray;
|
||||
_arrayToSave set [0, ([_class, _sideString, [str _x, format ["0%1", _x]] select (_x < 10)] joinString "")];
|
||||
|
||||
if (_availablePagesCount > 0) then {
|
||||
|
||||
{
|
||||
if (count _x < 5) exitWith {
|
||||
(_currentTab select _forEachIndex) append [_arrayToSave];
|
||||
};
|
||||
} foreach _currentTab;
|
||||
} else {
|
||||
_currentTab pushBack [_arrayToSave];
|
||||
};
|
||||
} foreach _tabsToAddTo;
|
||||
};
|
||||
|
||||
private _fnc_sortLists = {
|
||||
params ["_tabsList"];
|
||||
|
||||
{
|
||||
private _page = _x;
|
||||
{
|
||||
{
|
||||
reverse _x;
|
||||
} foreach _x;
|
||||
|
||||
_x sort false;
|
||||
|
||||
{
|
||||
reverse _x;
|
||||
} foreach _x;
|
||||
} foreach _page;
|
||||
} foreach _tabsList;
|
||||
};
|
||||
|
||||
private _statsListLeftPanel = [
|
||||
[[]], // Primary 0
|
||||
[[]], // Handgun 1
|
||||
[[]], // Launcher 2
|
||||
[[]], // Uniform 3
|
||||
[[]], // Vests 4
|
||||
[[]], // Backpacks 5
|
||||
[[]], // Headgear 6
|
||||
[[]], // Goggles 7
|
||||
[[]], // NVGs 8
|
||||
[[]], // Binoculars 9
|
||||
[[]], // Map 10
|
||||
[[]], // GPS 11
|
||||
[[]], // Radio 12
|
||||
[[]], // Compass 13
|
||||
[[]] // Watch 14
|
||||
];
|
||||
|
||||
private _statsListRightPanel = [
|
||||
[[]], // Optics 0
|
||||
[[]], // Side accs 1
|
||||
[[]], // Muzzle 2
|
||||
[[]], // Bipod 3
|
||||
[[]], // Mag 4
|
||||
[[]], // Throw 5
|
||||
[[]], // Put 6
|
||||
[[]] // Misc 7
|
||||
];
|
||||
|
||||
//------------------------- Config handling
|
||||
private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (configFile >> QGVAR(stats));
|
||||
|
||||
{
|
||||
private _finalArray = [];
|
||||
|
||||
private _class = configName _x;
|
||||
private _stats = getArray (_x >> "stats");
|
||||
private _displayName = getText (_x >> "displayName");
|
||||
private _showBar = getNumber (_x >> "showBar") == 1;
|
||||
private _showText = getNumber (_x >> "showText") == 1;
|
||||
private _condition = getText (_x >> "condition");
|
||||
private _priority = getNumber (_x >> "priority");
|
||||
(getArray (_x >> "tabs")) params ["_leftTabsList", "_rightTabsList"];
|
||||
|
||||
if (_condition != "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
_finalArray = ["", _stats, _displayName, [_showBar, _showText], [{}, {}, _condition], _priority];
|
||||
|
||||
if (_showBar) then {
|
||||
private _barStatement = compile (getText (_x >> "barStatement"));
|
||||
(_finalArray select 4) set [0, _barStatement];
|
||||
};
|
||||
|
||||
if (_showText) then {
|
||||
private _textStatement = compile (getText (_x >> "textStatement"));
|
||||
(_finalArray select 4) set [1, _textStatement];
|
||||
};
|
||||
|
||||
TRACE_3("stats array", _finalArray, _leftTabsList, _rightTabsList);
|
||||
|
||||
if (count _leftTabsList > 0) then {
|
||||
[_statsListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
|
||||
};
|
||||
|
||||
if (count _rightTabsList > 0) then {
|
||||
[_statsListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs;
|
||||
};
|
||||
} foreach _configEntries;
|
||||
|
||||
[_statsListLeftPanel] call _fnc_sortLists;
|
||||
[_statsListRightPanel] call _fnc_sortLists;
|
||||
|
||||
//------------------------- Config Handling
|
||||
|
||||
missionNamespace setVariable [QGVAR(statsListLeftPanel), _statsListLeftPanel];
|
||||
missionNamespace setVariable [QGVAR(statsListRightPanel), _statsListRightPanel];
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Fill left panel.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
@ -29,6 +29,12 @@ private _ctrlPanel = _display displayCtrl IDC_leftTabContent;
|
||||
_ctrlBackground ctrlSetFade 0;
|
||||
_ctrlBackground ctrlCommit FADE_DELAY;
|
||||
|
||||
// Force a "refresh" animation of the panel
|
||||
_ctrlPanel ctrlSetFade 1;
|
||||
_ctrlPanel ctrlCommit 0;
|
||||
_ctrlPanel ctrlSetFade 0;
|
||||
_ctrlPanel ctrlCommit FADE_DELAY;
|
||||
|
||||
_ctrlPanel lbSetCurSel -1;
|
||||
|
||||
// Handle icons and filling
|
||||
@ -156,6 +162,16 @@ switch true do {
|
||||
{
|
||||
["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem);
|
||||
} foreach ("true" configClasses (configFile >> "CfgUnitInsignia"));
|
||||
|
||||
{
|
||||
private _displayName = getText (_x >> "displayName");
|
||||
private _className = configName _x;
|
||||
private _lbAdd = _ctrlPanel lbAdd _displayName;
|
||||
|
||||
_ctrlPanel lbSetData [_lbAdd, _className];
|
||||
_ctrlPanel lbSetPicture [_lbAdd, getText (_x >> "texture")];
|
||||
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];
|
||||
} foreach ("true" configClasses (missionConfigFile >> "CfgUnitInsignia"));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Fill loadouts list.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
@ -22,6 +22,12 @@ _textEditBoxCtrl ctrlSetText "";
|
||||
private _sharingEnabled = (GVAR(allowSharedLoadouts) && {isMultiplayer});
|
||||
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);
|
||||
|
||||
// Force a "refresh" animation of the panel
|
||||
_contentPanelCtrl ctrlSetFade 1;
|
||||
_contentPanelCtrl ctrlCommit 0;
|
||||
_contentPanelCtrl ctrlSetFade 0;
|
||||
_contentPanelCtrl ctrlCommit FADE_DELAY;
|
||||
|
||||
_contentPanelCtrl lnbSetCurSelRow -1;
|
||||
lnbClear _contentPanelCtrl;
|
||||
|
||||
@ -115,4 +121,6 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
||||
} foreach (_sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x});
|
||||
};
|
||||
|
||||
[QGVAR(loadoutsListFilled), [_display, _control]] call CBA_fnc_localEvent;
|
||||
|
||||
_contentPanelCtrl lnbSort [1, false];
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Fill right panel.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
@ -80,15 +80,17 @@ private _compatibleMagazines = [[[], []], [[], []], [[], []]];
|
||||
{
|
||||
private _subIndex = _forEachIndex;
|
||||
{
|
||||
// Magazine group
|
||||
if !(isClass (configFile >> "CfgMagazines" >> _x)) then {
|
||||
private _magazineGroups = uiNamespace getVariable [QGVAR(magazineGroups),["#CBA_HASH#",[],[],[]]];
|
||||
private _magArray = [_magazineGroups, _x] call CBA_fnc_hashGet;
|
||||
{((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x} forEach _magArray;
|
||||
} else {
|
||||
((_compatibleMagazines select _index) select _subIndex) pushBackUnique (configName (configFile >> "CfgMagazines" >> _x))
|
||||
}
|
||||
((_compatibleMagazines select _index) select _subIndex) pushBackUnique (configName (configFile >> "CfgMagazines" >> _x))
|
||||
} foreach ([getArray (_weaponConfig >> _x >> "magazines"), getArray (_weaponConfig >> "magazines")] select (_x == "this"));
|
||||
|
||||
// Magazine groups
|
||||
{
|
||||
private _magazineGroups = uiNamespace getVariable [QGVAR(magazineGroups),["#CBA_HASH#",[],[],[]]];
|
||||
private _magArray = [_magazineGroups, toLower _x] call CBA_fnc_hashGet;
|
||||
{((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x} forEach _magArray;
|
||||
} foreach ([getArray (_weaponConfig >> _x >> "magazineWell"), getArray (_weaponConfig >> "magazineWell")] select (_x == "this"));
|
||||
|
||||
|
||||
} foreach getArray (_weaponConfig >> "muzzles");
|
||||
};
|
||||
} foreach [primaryWeapon GVAR(center), handgunWeapon GVAR(center), secondaryWeapon GVAR(center)];
|
||||
@ -134,6 +136,12 @@ switch (GVAR(currentLeftPanel)) do {
|
||||
};
|
||||
};
|
||||
|
||||
// Force a "refresh" animation of the panel
|
||||
_ctrlPanel ctrlSetFade 1;
|
||||
_ctrlPanel ctrlCommit 0;
|
||||
_ctrlPanel ctrlSetFade 0;
|
||||
_ctrlPanel ctrlCommit FADE_DELAY;
|
||||
|
||||
_itemsToCheck = _itemsToCheck apply {toLower _x};
|
||||
_compatibleItems = _compatibleItems apply {toLower _x};
|
||||
|
||||
@ -280,9 +288,7 @@ switch (_ctrlIDC) do {
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(currentRightPanel) != _ctrlIDC) then {
|
||||
(_display displayCtrl IDC_rightSearchbar) ctrlSetText "";
|
||||
};
|
||||
(_display displayCtrl IDC_rightSearchbar) ctrlSetText "";
|
||||
|
||||
GVAR(currentRightPanel) = _ctrlIDC;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles keyboard inputs inside the searchbars text boxes.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Karel Moricky, modified by Alganthe
|
||||
* Update the camera position and pitch/bank.
|
||||
@ -15,8 +17,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["", "_args"];
|
||||
|
||||
@ -44,11 +44,6 @@ if (count _LMB > 0) then {
|
||||
|
||||
_helperPos set [2,(_helperPos select 2) max ((boundingboxreal GVAR(center) select 0 select 2) + 0.2)];
|
||||
|
||||
//--- Do not let target go below ground
|
||||
private _posZmin = 0.1;
|
||||
private _targetWorldPosZ = (GVAR(center) modeltoworldvisual _helperPos) select 2;
|
||||
if (_targetWorldPosZ < _posZmin) then {_helperPos set [2,(_helperPos select 2) - _targetWorldPosZ + _posZmin];};
|
||||
|
||||
GVAR(cameraPosition) set [3,_helperPos];
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handle the mouse wheel.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["", "_args"];
|
||||
_args params ["", "_zPos"];
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles keyboard inputs inside the searchbars text boxes.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
|
244
addons/arsenal/functions/fnc_handleStats.sqf
Normal file
244
addons/arsenal/functions/fnc_handleStats.sqf
Normal file
@ -0,0 +1,244 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles the stats control group
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Current panel control <CONTROL>
|
||||
* 2: Current panel selection <SCALAR>
|
||||
* 3: Item config entry <CONFIG>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_display", "_control", "_curSel", "_itemCfg"];
|
||||
|
||||
private _statsBoxCtrl = _display displayCtrl IDC_statsBox;
|
||||
private _statsPreviousPageCtrl = _display displayCtrl IDC_statsPreviousPage;
|
||||
private _statsNextPageCtrl = _display displayCtrl IDC_statsNextPage;
|
||||
private _statsCurrentPageCtrl = _display displayCtrl IDC_statsCurrentPage;
|
||||
|
||||
private _hideUnusedFnc = {
|
||||
params ["_numbers"];
|
||||
|
||||
{
|
||||
private _statsTitleCtrl = _display displayCtrl (5101 + ((_x - 1) * 4));
|
||||
private _statsTitleIDC = ctrlIDC _statsTitleCtrl;
|
||||
|
||||
private _statsBackgroundCtrl = _display displayCtrl (_statsTitleIDC + 1);
|
||||
private _statsBarCtrl = _display displayCtrl (_statsTitleIDC + 2);
|
||||
private _statsTextCtrl = _display displayCtrl (_statsTitleIDC + 3);
|
||||
|
||||
{
|
||||
_x ctrlSetFade 1;
|
||||
_x ctrlCommit 0;
|
||||
} forEach [
|
||||
_statsTitleCtrl,
|
||||
_statsBackgroundCtrl,
|
||||
_statsBarCtrl,
|
||||
_statsTextCtrl
|
||||
];
|
||||
} forEach _numbers;
|
||||
};
|
||||
|
||||
if !(isNil "_itemCfg") then {
|
||||
|
||||
private _handleStatsFnc = {
|
||||
params ["_statsIndex", "_leftPanel"];
|
||||
|
||||
// Get the proper list and page
|
||||
if (_leftPanel) then {
|
||||
[true, (GVAR(statsListLeftPanel)) select _statsIndex, GVAR(statsPagesLeft) select _statsIndex]
|
||||
} else {
|
||||
[false, (GVAR(statsListRightPanel)) select _statsIndex, GVAR(statsPagesRight) select _statsIndex]
|
||||
} params ["_isLeftPanel", "_statsArray", "_currentPage"];
|
||||
|
||||
private _statsList = _statsArray select _currentPage;
|
||||
|
||||
private _statsCount = 0;
|
||||
|
||||
// Handle titles, bars and text
|
||||
_statsList = _statsList select [0, 5];
|
||||
if !(_statsList isEqualTo []) then {
|
||||
{
|
||||
_x params ["_ID", "_configEntry", "_title", "_bools", "_statements"];
|
||||
_bools params ["_showBar", "_showText"];
|
||||
_statements params [["_barStatement", {}, [{}]], ["_textStatement", {}, [{}]], ["_condition", {true}, [{}]]];
|
||||
|
||||
private _statsTitleCtrl = _display displayCtrl (5101 + _forEachIndex * 4);
|
||||
private _statsTitleIDC = ctrlIDC _statsTitleCtrl;
|
||||
private _statsBackgroundCtrl = _display displayCtrl (_statsTitleIDC + 1);
|
||||
private _statsBarCtrl = _display displayCtrl (_statsTitleIDC + 2);
|
||||
private _statsTextCtrl = _display displayCtrl (_statsTitleIDC + 3);
|
||||
|
||||
_statsCount = _statsCount + 1;
|
||||
_statsTitleCtrl ctrlSetText _title;
|
||||
_statsTitleCtrl ctrlSetFade 0;
|
||||
|
||||
// Handle bars
|
||||
if (_showBar) then {
|
||||
_statsBarCtrl progressSetPosition ([_configEntry, _itemCfg] call _barStatement);
|
||||
|
||||
_statsBackgroundCtrl ctrlSetFade 0;
|
||||
_statsBarCtrl ctrlSetFade 0;
|
||||
} else {
|
||||
_statsBackgroundCtrl ctrlSetFade 1;
|
||||
_statsBarCtrl ctrlSetFade 1;
|
||||
};
|
||||
|
||||
// Handle text entries
|
||||
if (_showText) then {
|
||||
private _textStatementResult = [_configEntry, _itemCfg] call _textStatement;
|
||||
|
||||
if (_textStatementResult isEqualtype "") then {
|
||||
_statsTextCtrl ctrlSetText _textStatementResult;
|
||||
} else {
|
||||
_statsTextCtrl ctrlSetText (str _textStatementResult);
|
||||
};
|
||||
_statsTextCtrl ctrlSetTextColor ([[1,1,1,1], [0,0,0,1]] select (_showBar));
|
||||
|
||||
_statsTextCtrl ctrlSetFade 0;
|
||||
} else {
|
||||
_statsTextCtrl ctrlSetFade 1;
|
||||
};
|
||||
|
||||
{
|
||||
_x ctrlCommit 0;
|
||||
} forEach [
|
||||
_statsTitleCtrl,
|
||||
_statsBackgroundCtrl,
|
||||
_statsBarCtrl,
|
||||
_statsTextCtrl
|
||||
];
|
||||
} forEach (_statsList select {
|
||||
_x params ["_ID","_configEntry", "_title", "_bools", "_statements"];
|
||||
_statements params [["_barStatement", {}, [{}]], ["_textStatement", {}, [{}]], ["_condition", {true}, [{}]]];
|
||||
|
||||
([_configEntry, _itemCfg] call _condition)
|
||||
});
|
||||
};
|
||||
|
||||
// Resize the window
|
||||
[[1, 2, 3, 4, 5] select [_statsCount, 5]] call _hideUnusedFnc;
|
||||
_statsBoxCtrl ctrlSetPosition [
|
||||
(0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP,
|
||||
safezoneY + 1.8 * GRID_H,
|
||||
47 * GRID_W,
|
||||
([11, (10 * _statsCount) + 5] select (_statsCount > 0)) * GRID_H
|
||||
];
|
||||
_statsBoxCtrl ctrlCommit 0;
|
||||
|
||||
GVAR(statsInfo) = [_isLeftPanel, _statsIndex, _control, _curSel, _itemCfg];
|
||||
|
||||
// Toggle page buttons
|
||||
_statsPreviousPageCtrl ctrlEnable !(_currentPage == 0);
|
||||
_statsNextPageCtrl ctrlEnable !(_currentPage + 1 >= count _statsArray);
|
||||
_statsCurrentPageCtrl ctrlSetText ([localize LSTRING(page), str (_currentPage + 1)] joinString " ");
|
||||
|
||||
{
|
||||
_x ctrlSetFade 0;
|
||||
_x ctrlCommit 0;
|
||||
} forEach [
|
||||
_statsPreviousPageCtrl,
|
||||
_statsNextPageCtrl,
|
||||
_statsCurrentPageCtrl
|
||||
];
|
||||
};
|
||||
|
||||
if (ctrlIDC _control == IDC_leftTabContent) then {
|
||||
|
||||
if ([IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsigna] find GVAR(currentLeftPanel) > -1) then {
|
||||
|
||||
[[1, 2, 3, 4, 5]] call _hideUnusedFnc;
|
||||
_statsBoxCtrl ctrlSetPosition [
|
||||
(0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP,
|
||||
safezoneY + 1.8 * GRID_H,
|
||||
47 * GRID_W,
|
||||
11 * GRID_H
|
||||
];
|
||||
_statsBoxCtrl ctrlCommit 0;
|
||||
|
||||
{
|
||||
_x ctrlSetFade 1;
|
||||
_x ctrlCommit 0;
|
||||
} forEach [
|
||||
_statsPreviousPageCtrl,
|
||||
_statsNextPageCtrl,
|
||||
_statsCurrentPageCtrl
|
||||
];
|
||||
} else {
|
||||
[[
|
||||
IDC_buttonPrimaryWeapon,
|
||||
IDC_buttonHandgun,
|
||||
IDC_buttonSecondaryWeapon,
|
||||
IDC_buttonUniform,
|
||||
IDC_buttonVest,
|
||||
IDC_buttonBackpack,
|
||||
IDC_buttonHeadgear,
|
||||
IDC_buttonGoggles,
|
||||
IDC_buttonNVG,
|
||||
IDC_buttonBinoculars,
|
||||
IDC_buttonMap,
|
||||
IDC_buttonGPS,
|
||||
IDC_buttonRadio,
|
||||
IDC_buttonCompass,
|
||||
IDC_buttonWatch
|
||||
] find GVAR(currentLeftPanel), true] call _handleStatsFnc;
|
||||
};
|
||||
} else {
|
||||
|
||||
switch (GVAR(currentRightPanel)) do {
|
||||
case IDC_buttonOptic: {
|
||||
[0, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonItemAcc: {
|
||||
[1, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonMuzzle: {
|
||||
[2, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonBipod: {
|
||||
[3, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonCurrentMag;
|
||||
case IDC_buttonCurrentMag2;
|
||||
case IDC_buttonMag;
|
||||
case IDC_buttonMagALL: {
|
||||
[4, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonThrow: {
|
||||
[5, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonPut: {
|
||||
[6, false] call _handleStatsFnc;
|
||||
};
|
||||
case IDC_buttonMisc: {
|
||||
[7, false] call _handleStatsFnc;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
|
||||
[[1, 2, 3, 4, 5]] call _hideUnusedFnc;
|
||||
_statsBoxCtrl ctrlSetPosition [
|
||||
(0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP,
|
||||
safezoneY + 1.8 * GRID_H,
|
||||
47 * GRID_W,
|
||||
11 * GRID_H
|
||||
];
|
||||
_statsBoxCtrl ctrlCommit 0;
|
||||
|
||||
{
|
||||
_x ctrlSetFade 1;
|
||||
_x ctrlCommit 0;
|
||||
} forEach [
|
||||
_statsPreviousPageCtrl,
|
||||
_statsNextPageCtrl,
|
||||
_statsCurrentPageCtrl
|
||||
];
|
||||
};
|
@ -1,3 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Initialize a box / object for arsenal.
|
||||
@ -16,7 +17,6 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_object", objNull, [objNull]], ["_items", true, [[], true]], ["_global", true, [true]]];
|
||||
|
||||
@ -49,7 +49,7 @@ if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0})
|
||||
{
|
||||
params ["_target", "_player"];
|
||||
|
||||
[_player, _target, ["isNotSwimming", "isNotCarrying", "isNotDragging", "notOnMap", "isNotEscorting", "isNotOnLadder"]] call EFUNC(common,canInteractWith)
|
||||
[_player, _target] call EFUNC(common,canInteractWith)
|
||||
},
|
||||
{},
|
||||
[]
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Update arsenal's info box.
|
||||
@ -13,8 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control", "_curSel" ,"_itemCfg"];
|
||||
|
||||
@ -25,6 +25,8 @@ if (isClass _itemCfg) then {
|
||||
_ctrlInfo ctrlSetFade 0;
|
||||
_ctrlInfo ctrlCommit FADE_DELAY;
|
||||
|
||||
[QGVAR(displayStats), [_display, _control, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|
||||
|
||||
// Name + author
|
||||
private _ctrlInfoName = _display displayCtrl IDC_infoName;
|
||||
_ctrlInfoName ctrlSetText ([_control lbText _curSel, _control lnbText [_curSel, 1]] select (ctrlType _control == 102));
|
||||
@ -70,6 +72,8 @@ if (isClass _itemCfg) then {
|
||||
_ctrlDLCBackground ctrlcommit 0;
|
||||
|
||||
} else {
|
||||
[QGVAR(displayStats), [_display, _control, -1, nil]] call CBA_fnc_localEvent;
|
||||
|
||||
_ctrlInfo ctrlSetFade 1;
|
||||
_ctrlInfo ctrlCommit FADE_DELAY;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles tab changing for the loadouts display.
|
||||
@ -11,8 +13,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "..\defines.hpp"
|
||||
|
||||
params ["_display", "_control"];
|
||||
|
||||
@ -74,4 +74,6 @@ switch (ctrlIDC _control) do {
|
||||
|
||||
GVAR(currentLoadoutsTab) = ctrlIDC _control;
|
||||
|
||||
[QGVAR(loadoutsTabChanged), [_display, _control]] call CBA_fnc_localEvent;
|
||||
|
||||
[_display, _control] call FUNC(fillLoadoutsList);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user