Merge branch 'master' into coldHeartedOrb

This commit is contained in:
PabstMirror 2021-10-18 23:44:18 -05:00
commit 0dc48780fc
1719 changed files with 32859 additions and 8877 deletions

10
.gitattributes vendored
View File

@ -2,3 +2,13 @@
*.png binary
*.jpg binary
*.paa binary
# Change GitHub language categorization
addons/**/*.cpp linguist-language=SQF
addons/**/*.hpp linguist-language=SQF
optionals/**/*.cpp linguist-language=SQF
optionals/**/*.hpp linguist-language=SQF
# Do not count hemtt includes in language usage stats
include/* linguist-vendored

View File

@ -4,23 +4,37 @@ about: Create a report to help us improve
title: ''
labels: kind/bug
assignees: ''
---
<!--
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template or parts of it and go my own path, the team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the team may close my issue without further explanation or engagement.
3. If I write an issue that has duplicates, the team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the team may close my issue without further explanation or engagement.
6. If I file an issue without collecting logs (RPT file, etc...), the team may close my issue without further explanation or engagement.
All good? Then proceed and fill out the items below.
-->
**Mods (complete and add to the following information):**
- **Arma 3:** `x.xx` [e.g. 1.00 stable, rc, dev]
- **CBA:** `3.x.x` [e.g. 3.0.0 stable, commit hash]
- **ACE3:** `3.x.x` [eg. 3.0.0 stable, commit hash]
_Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission!_
<!-- Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission! -->
**Description:**
A clear and concise description of what the bug is.
**Steps to reproduce:**
- _Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_
- Go to ...
- Click ...
- See ...
_Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_
1. _Go to ..._
2. _Click ..._
3. _See ..._
**Expected behavior:**
A clear and concise description of what you expected to happen.

View File

@ -27,6 +27,7 @@ categories:
exclude-labels:
- 'ignore changelog'
- 'dependencies'
change-template: '- $TITLE (#$NUMBER)'
template: |

View File

@ -3,11 +3,7 @@ name: Extensions
on:
pull_request:
paths:
- 'extensions/*'
- 'extensions/*/*'
- 'extensions/*/*/*'
- 'extensions/*/*/*/*'
- 'extensions/*/*/*/*/*'
- 'extensions/**'
jobs:
build:
@ -22,7 +18,9 @@ jobs:
- name: Build
shell: cmd
run: |
cd extensions/build
cd extensions
mkdir build
cd build
cmake .. && cmake --build .
- name: Upload Artifact
uses: actions/upload-artifact@master

82
.github/workflows/pboproject.yml vendored Normal file
View File

@ -0,0 +1,82 @@
name: pboProject
on:
push:
branches:
- master
pull_request_target:
jobs:
pboproject:
runs-on: windows-2019
steps:
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Install Mikero Tools
uses: arma-actions/mikero-tools@2021-04-10
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip
Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip
Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip
Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip
$files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip")
ForEach ($file in $files) {
Extract-7Zip -Path $file -DestinationPath .
Remove-Item $file
}
env:
ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }}
RHSGREF_URL: ${{ secrets.RHSGREF_URL }}
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v2
with:
path: x\cba
ref: master
repository: CBATeam/CBA_A3.git
- name: Checkout ACE3
uses: actions/checkout@v2
with:
path: z\ace
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v2
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r z\ace\addons\
rm -r z\ace\optionals\
xcopy /e /h /q pullrequest\addons z\ace\addons\
xcopy /e /h /q pullrequest\optionals z\ace\optionals\
- name: Setup build environment
run: |
subst P: .
pboproject -P
xcopy /e /h /q z\ace\tools\pDummies\A3\ui_f_enoch a3\ui_f_enoch\
xcopy /e /h /q z\ace\tools\pDummies\gm gm\
xcopy /e /h /q z\ace\tools\pDummies\vn vn\
- name: Build
run: py P:\z\ace\tools\make.py ci
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @ace
uses: actions/upload-artifact@v2
with:
name: '@ace3-${{ github.sha }}'
path: z\ace\release\@ace

6
.gitignore vendored
View File

@ -2,6 +2,9 @@
*.zip
release/*
releases/*
extensions/vcproj32/*
extensions/vcproj64/*
.vscode/*
hemtt
hemtt.exe
tools/temp
@ -13,3 +16,6 @@ texHeaders.bin
*.biprivatekey
Thumbs.db
CHANGELOG.md
sqfvm.exe
ArmaScriptCompiler.exe
*.sqfc

View File

@ -9,6 +9,7 @@
Brandon (TCVM) <brandondanyluk366@gmail.com>
bux578 <github@jonathandavid.de>
commy2
Dahlgren
esteldunedain <nicolas.d.badano@gmail.com>
Felix Wiegand <koffeinflummi@gmail.com>
Garth "L-H" de Wet <garthofhearts@gmail.com>
@ -30,9 +31,10 @@ VKing <kauestad@gmail.com>
Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
[BIG]Bull
10Dozen a.k.a Dusin
11RDP-LoupVert <loupvert@11rdp.fr>
654wak654 <ozanegitmen@gmail.com>
[BIG]Bull
ACCtomeek <tomeek99@gmail.com>
adam3adam <br.ada@seznam.cz>
Adanteh
@ -43,9 +45,10 @@ Aleksey EpMAK Yermakov <epmak777@gmail.com>
Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com>
Arcanum417 <lubos.len@gmail.com>
Anton
Arcanum417 <lubos.len@gmail.com>
Arkhir <wonsz666@gmail.com >
ARV187 aka Spark23
Asgar Serran <piechottaf@web.de>
BaerMitUmlaut
Bamse <bamsis@gmail.com>
@ -54,25 +57,28 @@ Bla1337
BlackPixxel <blackpixxel96@gmail.com>
BlackQwar
Brakoviejo
Brett Mayson
Brisse <brisse@outlook.com>
Brostrom.A | Evul <andreas.brostrom.ce@gmail.com>
BullHorn <bullhorn7@gmail.com>
C0kkie
chris579 <github@klemm.one>
classicarma
Clon1998 <ps.patti1998@gmail.com>
Codingboy
Coren <coren4@gmail.com>
Crusty
C0kkie
dabako <dabako@dabakoworld.de>
dgibso29 <gibson@earringpranks.com>
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.es>
diwako
dixon13 <dixonbegay@gmail.com>
Drift_91
Drill <drill87@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Drofseh <drofseh@gmail.com>
Dslyecxi <dslyecxi@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Eclipser <jms@modeemi.fi>
Elgin675
ElTyranos
@ -87,7 +93,9 @@ FFAAMOD <modffaa@gmail.com>
Filip Basara <filip.basara93@googlemail.com>
fr89k <kaschitoku@web.de>
Fragment
Frank <frankplow@protonmail.com>
FreeZbe <freeseb@gmail.com>
Fyuran <dankemedic@hotmail.com>
geraldbolso1899
Ghost
Gianmarco Varriale (TeamNuke) <admin@forhost.org>
@ -102,7 +110,9 @@ havena <silveredenis@gmail.com>
Hawkins
Head <brobergsebastian@gmail.com>
Hybrid V
JasperRab <jasper@jasperrab.eu>
john681611 <john681611@hotmail.com>
JoramD
Karneck <dschultz26@hotmail.com>
Kavinsky <nmunozfernandez@gmail.com>
Keithen <Keithen.Neu@gmail.com>
@ -128,8 +138,8 @@ Orbis2358 <mgkid3310@naver.com>
oscarmolinadev
Panisher (Tushino Serious Games) <panisher333@gmail.com>
PaxJaromeMalues <seemax1991@gmail.com>
PiZZADOX <509thParachuteInfantry@gmail.com>
Phyma <sethramstrom@gmail.com>
PiZZADOX <509thParachuteInfantry@gmail.com>
pokertour
Professor <lukas.trneny@wo.cz>
Pterolatypus <pterolatypus@gmail.com>
@ -156,11 +166,13 @@ Toaster <jonathan.pereira@gmail.com>
Tonic
Tourorist <tourorist@gmail.com>
Tuupertunut
TyroneMF <TyroneMF@hotmail.com>
Valentin Torikian <valentin.torikian@gmail.com>
voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Walthzer <walthzer.69@gmail.com>
Winter <simon@agius-muscat.net>
wizpig64
xrufix
Zakant <Zakant@gmx.de>
zGuba
Fyuran <dankemedic@hotmail.com>

View File

@ -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.13.4-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.13.6-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">
@ -76,7 +76,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
## Getting started
ACE3 requires Arma 3 and the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. See the following pages for help and information on how to get started with ACE3:
ACE3 requires Arma 3 and the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. See the following pages for help and information on how to get started with ACE3:
- [Installation guide](https://ace3mod.com/wiki/user/installation-guide.html)
- [Information center](https://ace3mod.com/wiki/user/information-center.html)
@ -87,7 +87,7 @@ You can help out with the ongoing development by looking for potential bugs in o
### Contribution guidelines
To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. Remember to add yourself to the author array of any PBO you will be editing and the [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) file; including a valid email address.
To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. See [the pull request guidelines](https://ace3mod.com/wiki/development/merging-pull-requests.html) for further information on this process.
### Submitting issues and requesting features
@ -121,7 +121,7 @@ To help us test the latest development changes, download our master branch ([dir
<tr>
<td><a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">Bohemia Forum</a></td>
<td>We have a dedicated thread on the Bohemia Forums for the ACE3 project</td>
</tr>
</tr>
</table>
## License

Binary file not shown.

Binary file not shown.

View File

@ -1,45 +1,20 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(enabled_DisplayName);
description = CSTRING(enabled_Description);
typeName = "BOOL";
value = 0;
movedToSQF = 1;
};
class GVAR(muzzleVelocityVariationEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName);
description = CSTRING(muzzleVelocityVariationEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(ammoTemperatureEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
description = CSTRING(ammoTemperatureEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(barrelLengthInfluenceEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
description = CSTRING(barrelLengthInfluenceEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(bulletTraceEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(bulletTraceEnabled_DisplayName);
description = CSTRING(bulletTraceEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(simulationInterval) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "SCALAR";
value = 0.05;
sliderSettings[] = {0, 0.2, 0.05, 2};
movedToSQF = 1;
};
};

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,10 +2,3 @@ ace_advanced_ballistics
===============
The Advanced Ballistics module introduces advanced external- and internal ballistics to the game.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Ruthberg](http://github.com/Ulteq)

View File

@ -47,7 +47,7 @@ class RscTitles {
sizeEx=0.027;
text="";
};
class RscProtractorMarker : RscProtractorBase {
class RscProtractorMarker: RscProtractorBase {
idc=132951;
};
};

View File

@ -11,7 +11,7 @@ GVAR(currentGrid) = 0;
if (!hasInterface) exitWith {};
["ace_settingsInitialized", {
["CBA_settingsInitialized", {
//If not enabled, dont't add PFEH
if (!GVAR(enabled)) exitWith {};

View File

@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.sqf"
ADDON = true;

View File

@ -60,8 +60,8 @@ private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
private _inheritedBarrelConfig = (_muzzleVelocityTable isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (_ammoTempMuzzleVelocityShifts isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
@ -73,7 +73,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
private _linearMuliplier = _typicalSpeed / _parentSpeed;
if (_inheritedBarrelConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
} else {
@ -82,7 +82,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
};
if (_inheritedTempConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
} else {

View File

@ -0,0 +1,49 @@
private _category = format ["ACE %1", localize LSTRING(DisplayName)];
[
QGVAR(enabled), "CHECKBOX",
[LSTRING(enabled_DisplayName), LSTRING(enabled_Description)],
_category,
false,
1
] call CBA_fnc_addSetting;
[
QGVAR(muzzleVelocityVariationEnabled), "CHECKBOX",
[LSTRING(muzzleVelocityVariationEnabled_DisplayName), LSTRING(muzzleVelocityVariationEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(ammoTemperatureEnabled), "CHECKBOX",
[LSTRING(ammoTemperatureEnabled_DisplayName), LSTRING(ammoTemperatureEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(barrelLengthInfluenceEnabled), "CHECKBOX",
[LSTRING(barrelLengthInfluenceEnabled_DisplayName), LSTRING(barrelLengthInfluenceEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(bulletTraceEnabled), "CHECKBOX",
[LSTRING(bulletTraceEnabled_DisplayName), LSTRING(bulletTraceEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(simulationInterval), "SLIDER",
[LSTRING(simulationInterval_DisplayName), LSTRING(simulationInterval_Description)],
_category,
[0, 0.2, 0.05, 2],
1
] call CBA_fnc_addSetting;

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,9 +2,3 @@ ace_advanced_fatigue
==========
An in depth stamina and fatigue simulation.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [BaerMitUmlaut](https://github.com/BaerMitUmlaut)

View File

@ -19,7 +19,7 @@ if (!hasInterface) exitWith {};
};
}] call EFUNC(common,arithmeticSetSource);
["ace_settingsInitialized", {
["CBA_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
// - Post process effect ------------------------------------------------------

View File

@ -13,7 +13,7 @@
[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)
},
true // Needs mission restart
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(enableStaminaBar),
@ -28,7 +28,7 @@
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(fadeStaminaBar),
@ -43,7 +43,7 @@
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(performanceFactor),
@ -52,7 +52,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(recoveryFactor),
@ -61,7 +61,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(loadFactor),
@ -70,7 +70,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(terrainGradientFactor),
@ -79,7 +79,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(swayFactor),
@ -88,4 +88,4 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

View File

@ -1,40 +1,17 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(Category);
displayName = CSTRING(Enable_DisplayName);
description = CSTRING(Enable_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(showThrowArc) {
category = CSTRING(Category);
displayName = CSTRING(ShowThrowArc_DisplayName);
description = CSTRING(ShowThrowArc_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(showMouseControls) {
category = CSTRING(Category);
displayName = CSTRING(ShowMouseControls_DisplayName);
description = CSTRING(ShowMouseControls_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(enablePickUp) {
category = CSTRING(Category);
displayName = CSTRING(EnablePickUp_DisplayName);
description = CSTRING(EnablePickUp_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(enablePickUpAttached) {
category = CSTRING(Category);
displayName = CSTRING(EnablePickUpAttached_DisplayName);
description = CSTRING(EnablePickUpAttached_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
};

View File

@ -1,17 +1,17 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,10 +2,3 @@ ace_advanced_throwing
===================
Integrates advanced throwing by [Dslyecxi](https://github.com/dslyecxi).
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Jonpas](https://github.com/jonpas)

View File

@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.sqf"
ADDON = true;

View File

@ -53,7 +53,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
_cross = 2; // 2: View LOD Block (Red)
} else {
if !((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo []) then {
if ((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isNotEqualTo []) then {
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
};
};

View File

@ -118,7 +118,7 @@ if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered
private _posCameraWorld = AGLToASL (positionCameraToWorld [0, 0, 0]);
_posHeadRel = _posHeadRel vectorAdd [-0.03, 0.01, 0.15]; // Bring closer to eyePos value
private _posFin = AGLToASL (ACE_player modelToWorldVisual _posHeadRel);
private _posFin = ACE_player modelToWorldVisualWorld _posHeadRel;
private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];

View File

@ -31,7 +31,7 @@
_nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]);
{
if (!(_x in _throwablesHelped) &&
if (!(_x in _throwablesHelped) && {!((attachedTo _x) getVariable [QGVAR(disablePickUp), false])} &&
{!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell"
{GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}}
) then {

View File

@ -40,7 +40,7 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
_velocity = [_velocity, THROWSTYLE_DROP_VEL] select _dropMode;
private _p2 = (eyePos _unit) vectorAdd (AGLToASL (positionCameraToWorld _direction)) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0]));
private _p1 = AGLtoASL (_activeThrowable modelToWorldVisual [0, 0, 0]);
private _p1 = _activeThrowable modelToWorldVisualWorld [0, 0, 0];
private _newVelocity = (_p1 vectorFromTo _p2) vectorMultiply _velocity;

View File

@ -0,0 +1,42 @@
private _category = format ["ACE %1", localize LSTRING(Category)];
[
QGVAR(enabled),
"CHECKBOX",
[LSTRING(Enable_DisplayName), LSTRING(Enable_Description)],
_category,
true,
0
] call CBA_fnc_addSetting;
[
QGVAR(showThrowArc),
"CHECKBOX",
[LSTRING(ShowThrowArc_DisplayName), LSTRING(ShowThrowArc_Description)],
_category,
true,
0
] call CBA_fnc_addSetting;
[
QGVAR(showMouseControls), "CHECKBOX",
[LSTRING(ShowMouseControls_DisplayName), LSTRING(ShowMouseControls_Description)],
_category,
true,
0
] call CBA_fnc_addSetting;
[
QGVAR(enablePickUp), "CHECKBOX",
[LSTRING(EnablePickUp_DisplayName), LSTRING(EnablePickUp_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(enablePickUpAttached), "CHECKBOX",
[LSTRING(EnablePickUpAttached_DisplayName), LSTRING(EnablePickUpAttached_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;

View File

@ -1,19 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,11 +2,3 @@ ace_ai
======
Overhaul of AI firing modes of vanilla weapons, encouraging the AI to use full-auto and bursts more often.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
- [commy2](https://github.com/commy2)

View File

@ -23,6 +23,7 @@ class CfgAmmo {
explosive = 0;
CraterEffects = "";
explosionEffects = "";
EGVAR(vehicle_damage,incendiary) = 0.5;
};
// adjust minigun caliber and deflection to other ammo
@ -58,17 +59,19 @@ class CfgAmmo {
indirectHit = 2.5; // default: 4
indirectHitRange = 1; // default: 3
fuseDistance = 0.2; // default: 10
EGVAR(vehicle_damage,incendiary) = 1.0;
};
// adds submunition logic, enabling multiple rounds per frame
class ACE_Gatling_30mm_Sub_HEI: SubmunitionBullet {
submunitionAmmo = "Gatling_30mm_HE_Plane_CAS_01_F";
weaponType = "cannon";
submunitionConeType[] = {"poissondisccenter", 3};
submunitionConeType[] = {"randomcenter", 3};
submunitionConeAngle = 0.056; // in degrees, 0.055 ~= 0.001 mils minute, but present
model = "\A3\Weapons_f\Data\bullettracer\tracer_red.p3d";
triggerTime = 0.005;
ACE_caliber = 1.4;
EGVAR(vehicle_damage,incendiary) = 1.0;
};
class ACE_Gatling_30mm_Sub_AP: ACE_Gatling_30mm_Sub_HEI {

View File

@ -1,11 +1,11 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};

View File

@ -4,12 +4,3 @@ ace_aircraft
Changes to air weaponry, ejection and HUDs.
- Contributions by Kimi (geraldbolso1899) for HUD updates
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
- [commy2](https://github.com/commy2)
- [jaynus](https://github.com/walterpearce)

View File

@ -1,6 +1,6 @@
class RscControlsGroup;
class RscText;
class RangeText: RscText{};
class RangeText: RscText {};
class RscPicture;
class RscOpticsText;
class RscIGProgress;

View File

@ -19,7 +19,7 @@ params ["_vehicle"];
if (unitIsUAV _vehicle) exitWith {};
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _addAction = false;

View File

@ -2,10 +2,3 @@ ace_apl
============
Assets licensed under Arma Public License (APL).
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- None

View File

@ -4,6 +4,7 @@ class GVAR(sorts) {
displayName = "";
tabs[] = {{}, {}};
statement = "";
condition = "true";
};
class ACE_alphabetically: sortBase {
@ -27,11 +28,19 @@ class GVAR(sorts) {
statement = QUOTE(_this call FUNC(sortStatement_mass));
};
class ACE_amount: sortBase {
scope = 2;
displayName = CSTRING(sortByAmountText);
tabs[] = {{}, {0,1,2,3,4,5,6,7}};
statement = QUOTE(_this call FUNC(sortStatement_amount));
condition = QUOTE(_this select 0); // Only show for containers
};
class ACE_load: sortBase {
scope = 2;
displayName = CSTRING(sortByLoadText);
tabs[] = {{3,4,5}, {}};
statement = QUOTE(getContainerMaxLoad configName _this);
statement = QUOTE(getContainerMaxLoad (_this select 1));
};
class ACE_accuracy: sortBase {
@ -61,4 +70,16 @@ class GVAR(sorts) {
tabs[] = {{}, {4}};
statement = QUOTE(_this call FUNC(sortStatement_magCount));
};
class ACE_protectionBallistic: sortBase {
scope = 2;
displayName = CSTRING(sortByProtectionBallistic);
tabs[] = {{3,4,6}, {}};
statement = QUOTE([ARR_3(_this, 1000000, 1000)] call FUNC(sortStatement_protection));
};
class ACE_protectionExplosive: ACE_protectionBallistic {
displayName = CSTRING(sortByProtectionExplosive);
statement = QUOTE([ARR_3(_this, 1000, 1000000)] call FUNC(sortStatement_protection));
};
};

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -64,9 +64,11 @@ PREP(scanConfig);
PREP(showItem);
PREP(sortPanel);
PREP(sortStatement_accuracy);
PREP(sortStatement_amount);
PREP(sortStatement_magCount);
PREP(sortStatement_mass);
PREP(sortStatement_mod);
PREP(sortStatement_protection);
PREP(sortStatement_rateOfFire);
PREP(sortStatement_scopeMag);
PREP(statBarStatement_accuracy);

View File

@ -1,6 +1,8 @@
#include "script_component.hpp"
#include "defines.hpp"
GVAR(currentBox) = objNull;
GVAR(EH_ID) = 0;
GVAR(lastSearchTextLeft) = "";
GVAR(lastSearchTextRight) = "";

View File

@ -8,15 +8,15 @@ PREP_RECOMPILE_START;
PREP_RECOMPILE_END;
// Arsenal
[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;
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_fnc_addSetting;
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_fnc_addSetting;
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_fnc_addSetting;
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
// 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(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_fnc_addSetting;
[QGVAR(statsToggle), {
params ["_display", "_showStats"];

View File

@ -8,7 +8,7 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
authors[] = {"alganthe", "mharis001", "SynixeBrett"};
authors[] = {"alganthe", "mharis001", "Brett Mayson"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};

View File

@ -165,6 +165,25 @@
#define IDC_ATTRIBUTE_IMPORT_BUTTON 8109
#define IDC_ATTRIBUTE_ADD_COMPATIBLE 8110
// Indexes of virtual items array
#define IDX_VIRT_WEAPONS 0
#define IDX_VIRT_ATTACHEMENTS 1
#define IDX_VIRT_ITEMS_ALL 2
#define IDX_VIRT_HEADGEAR 3
#define IDX_VIRT_UNIFORM 4
#define IDX_VIRT_VEST 5
#define IDX_VIRT_BACKPACK 6
#define IDX_VIRT_GOGGLES 7
#define IDX_VIRT_NVG 8
#define IDX_VIRT_BINO 9
#define IDX_VIRT_MAP 10
#define IDX_VIRT_COMPASS 11
#define IDX_VIRT_RADIO 12
#define IDX_VIRT_WATCH 13
#define IDX_VIRT_COMMS 14
#define SYMBOL_ITEM_NONE ""
#define SYMBOL_ITEM_REMOVE "×"
#define SYMBOL_ITEM_VIRTUAL "∞"

View File

@ -32,9 +32,9 @@ if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into
//get name of DLC
private _dlcName = "";
private _addons = configsourceaddonlist _configPath;
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0);
if !(_mods isEqualTo []) then {
if (_mods isNotEqualTo []) then {
_dlcName = _mods select 0;
};
};

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: SynixeBrett
* Author: Brett Mayson
* Add a custom sorting method.
*
* Arguments:
@ -10,12 +10,13 @@
* 1: Sort Class (a unique string for each algorithm) <STRING>
* 2: Display Name <STRING>
* 3: Algorithm <CODE>
* 4: Condition (Optional)<CODE>
*
* Return Value:
* 0: Array of IDs (ARRAY of STRINGS)
*
* Example:
* [[[0, 1]], "fireRateSort", "Sort by fire rate", {
* [[[0, 1], []], "fireRateSort", "Sort by fire rate", {
* params ["_itemCfg"];
* private _fireModes = getArray (_itemCfg >> "modes");
* private _fireRate = [];
@ -35,7 +36,8 @@ params [
["_tabs", [[], []], [[]], 2],
["_class", "", [""]],
["_displayName", "", [""]],
["_statement", {}, [{}]]
["_statement", {}, [{}]],
["_condition", {true}, [{}]]
];
_tabs params [
@ -57,13 +59,13 @@ private _fnc_addToTabs = {
} forEach _tabsToAddTo;
};
_finalArray = ["", _displayName, _statement];
_finalArray = ["", _displayName, _statement, _condition];
if !(_leftTabs isEqualTo []) then {
if (_leftTabs isNotEqualTo []) then {
[GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
};
if !(_rightTabs isEqualTo []) then {
if (_rightTabs isNotEqualTo []) then {
[GVAR(sortListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs;
};

View File

@ -51,7 +51,7 @@ if (_category == 8) then {
_itemsToAdd append _magazines;
{
_itemsToAdd append ([_magazineGroups, toLower _x] call CBA_fnc_hashGet);
_itemsToAdd append (_magazineGroups get (toLower _x));
} forEach getArray (_muzzleConfig >> "magazineWell");
} forEach getArray (_weaponConfig >> "muzzles");
} forEach _attributeWeapons;

View File

@ -37,6 +37,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
_contentPanelCtrl lnbSetCurSelRow (_contentPanelCursSel);
[(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutDeleted), _loadoutName] joinString " "] call FUNC(message);
[QGVAR(onLoadoutDelete), [_loadoutName]] call CBA_fnc_localEvent;
} else {
private _profileName = profileName; // GVAR(center) could be a remote unit

View File

@ -124,7 +124,7 @@ switch (GVAR(currentLoadoutsTab)) do {
};
};
if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith {
if (GVAR(shiftState) && {is3DEN} && {_loadoutName isNotEqualTo ""} && {_cursSelRow != -1} && {_loadoutIndex isNotEqualTo -1}) exitwith {
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
if (_defaultLoadoutsSearch isEqualto -1) then {
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: SynixeBrett
* Author: Brett Mayson
* Create the internal stats arrays when needed for the first time
*
* Arguments:
@ -64,19 +64,24 @@ private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (confi
private _class = configName _x;
private _displayName = getText (_x >> "displayName");
private _statement = getText (_x >> "statement");
private _condition = getText (_x >> "condition");
(getArray (_x >> "tabs")) params ["_leftTabsList", "_rightTabsList"];
if (_statement != "") then {
_statement = compile _statement;
};
_finalArray = ["", _displayName, _statement];
if (_condition != "") then {
_condition = compile _condition;
};
if !(_leftTabsList isEqualTo []) then {
_finalArray = ["", _displayName, _statement, _condition];
if (_leftTabsList isNotEqualTo []) then {
[_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
};
if !(_rightTabsList isEqualTo []) then {
if (_rightTabsList isNotEqualTo []) then {
[_sortListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs;
};
} foreach _configEntries;

View File

@ -37,10 +37,6 @@ _ctrlPanel ctrlCommit FADE_DELAY;
_ctrlPanel lbSetCurSel -1;
// Fill sort options
private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab;
[_display, _control, _sortLeftCtrl] call FUNC(fillSort);
// Handle icons and filling
switch true do {
case (_ctrlIDC in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]) : {
@ -51,7 +47,7 @@ switch true do {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach ((GVAR(virtualItems) select 0) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC));
} foreach ((GVAR(virtualItems) select IDX_VIRT_WEAPONS) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC));
};
case (_ctrlIDC in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) : {
@ -65,19 +61,19 @@ switch true do {
case IDC_buttonUniform : {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 4);
} foreach (GVAR(virtualItems) select IDX_VIRT_UNIFORM);
};
case IDC_buttonVest : {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 5);
} foreach (GVAR(virtualItems) select IDX_VIRT_VEST);
};
case IDC_buttonBackpack : {
{
["CfgVehicles", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 6);
} foreach (GVAR(virtualItems) select IDX_VIRT_BACKPACK);
};
};
};
@ -96,12 +92,12 @@ switch true do {
case IDC_buttonHeadgear: {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 3);
} foreach (GVAR(virtualItems) select IDX_VIRT_HEADGEAR);
};
case IDC_buttonGoggles : {
{
["CfgGlasses", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 7);
} foreach (GVAR(virtualItems) select IDX_VIRT_GOGGLES);
};
case IDC_buttonNVG : {
{
@ -153,8 +149,8 @@ switch true do {
_ctrlPanel lbSetTooltip [_lbAdd,format ["%1\n%2",_displayName, _configName]];
_x call ADDMODICON;
};
} foreach ("isClass _x" configClasses _x);
} foreach ("isClass _x" configClasses (configfile >> "cfgfaces"));
} foreach ("true" configClasses _x);
} foreach ("true" configClasses (configfile >> "cfgfaces"));
};
case IDC_buttonVoice : {
private _voices = (configProperties [(configFile >> "CfgVoice"), "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [(configfile >> "CfgVoice" >> "NoVoice")];
@ -191,7 +187,8 @@ GVAR(currentLeftPanel) = _ctrlIDC;
[QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent;
// Sort
[_sortLeftCtrl] call FUNC(sortPanel);
private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab;
[_display, _control, _sortLeftCtrl] call FUNC(fillSort);
//Select current item
private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace), GVAR(currentVoice), GVAR(currentInsignia)]) apply {tolower _x};
@ -199,7 +196,7 @@ private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace)
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
private _currentData = _ctrlPanel lbData _lbIndex;
if (!(_currentData isEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
if ((_currentData isNotEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
_ctrlPanel lbSetCurSel _lbIndex;
};
};

View File

@ -45,6 +45,10 @@ private _fnc_fill_right_Container = {
private _cacheNamespace = _ctrlPanel;
private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []];
if (!(_className in GVAR(virtualItemsFlat))) then {
_isUnique = true;
};
// Not in cache. So get info and put into cache
if (_cachedItemInfo isEqualTo []) then {
private _configPath = configFile >> _configCategory >> _className;
@ -86,7 +90,7 @@ private _compatibleMagazines = [[[], []], [[], []], [[], []]];
// Magazine groups
{
private _magazineGroups = uiNamespace getVariable [QGVAR(magazineGroups),["#CBA_HASH#",[],[],[]]];
private _magArray = [_magazineGroups, toLower _x] call CBA_fnc_hashGet;
private _magArray = _magazineGroups get (toLower _x);
{((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x} forEach _magArray;
} foreach ([getArray (_weaponConfig >> _x >> "magazineWell"), getArray (_weaponConfig >> "magazineWell")] select (_x == "this"));
@ -224,7 +228,7 @@ switch (_ctrlIDC) do {
if (_leftPanelState) then {
{
["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsPrimaryMuzzle);
} foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _compatibleMagsPrimaryMuzzle);
};
};
@ -232,14 +236,14 @@ switch (_ctrlIDC) do {
if (_leftPanelState) then {
{
["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsSecondaryMuzzle);
} foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _compatibleMagsSecondaryMuzzle);
};
};
case IDC_buttonMag : {
{
["CfgMagazines", _x, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 2) arrayIntersect _allCompatibleMags);
} foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _allCompatibleMags);
{
["CfgMagazines", _x, true, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 19) arrayIntersect _allCompatibleMags);
@ -248,7 +252,7 @@ switch (_ctrlIDC) do {
case IDC_buttonMagALL : {
{
["CfgMagazines", _x, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 2);
} foreach (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL);
{
["CfgMagazines", _x, true, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 19);
@ -282,32 +286,42 @@ switch (_ctrlIDC) do {
};
} forEach GVAR(customRightPanelButtons);
};
{
["CfgWeapons", _x, false] call _fnc_fill_right_Container;
} forEach ((GVAR(virtualItems) select 17) select {!((toLower _x) in _blockItems)});
{
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 18);
} foreach ((GVAR(virtualItems) select 18) select {!((toLower _x) in _blockItems)});
{
["CfgVehicles", _x, false, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 23);
} foreach ((GVAR(virtualItems) select 23) select {!((toLower _x) in _blockItems)});
{
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 24);
} foreach ((GVAR(virtualItems) select 24) select {!((toLower _x) in _blockItems)});
};
default {
private _index = [RIGHT_PANEL_CUSTOM_BUTTONS] find _ctrlIDC;
if (_index != -1) then {
private _data = GVAR(customRightPanelButtons) param [_index];
if (!isNil "_data") then {
private _items = _data select 0;
{
["CfgWeapons", _x, true] call _fnc_fill_right_Container;
["CfgWeapons", _x, false] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 17) select {(toLower _x) in _items});
{
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 18) select {(toLower _x) in _items});
{
["CfgVehicles", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 23) select {(toLower _x) in _items});
{
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 24) select {(toLower _x) in _items});
};
};
};
@ -353,10 +367,8 @@ if (GVAR(currentLeftPanel) in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBack
private _sortRightCtrl = _display displayCtrl IDC_sortRightTab;
[_display, _control, _sortRightCtrl] call FUNC(fillSort);
[_sortRightCtrl] call FUNC(sortPanel);
// Select current data if not in a container
if !(_itemsToCheck isEqualTo []) then {
if (_itemsToCheck isNotEqualTo []) then {
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
private _currentData = _ctrlPanel lbData _lbIndex;

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
#include "..\defines.hpp"
/*
* Author: Alganthe, SynixeBrett
* Author: Alganthe, Brett Mayson
* Fill right panel.
*
* Arguments:
@ -90,9 +90,13 @@ private _sortIndex = 0;
{
if (_x isEqualTo []) exitWith {};
_sortCtrl lbAdd (_x select 1);
if ((_x select 1) isEqualTo _lastSort) then {
_sortIndex = _forEachIndex;
_x params ["_sortName", "_displayName", "", "_condition"];
if ([_right] call _condition) then {
private _index = _sortCtrl lbAdd _displayName;
_sortCtrl lbSetData [_index, _sortName];
if (_displayName isEqualTo _lastSort) then {
_sortIndex = _index;
};
};
} forEach _sorts;

View File

@ -64,7 +64,7 @@ if (!isNil "_itemCfg") then {
// Handle titles, bars and text
_statsList = _statsList select [0, 5];
if !(_statsList isEqualTo []) then {
if (_statsList isNotEqualTo []) then {
{
_x params ["_ID", "_configEntry", "_title", "_bools", "_statements"];
_bools params ["_showBar", "_showText"];

View File

@ -59,7 +59,6 @@ if (is3DEN) then {
curatorcamera cameraEffect ["internal","back"];
} else {
GVAR(camera) cameraEffect ["terminate","back"];
ACE_player switchCamera GVAR(cameraView);
};
};
@ -71,8 +70,17 @@ if (!isNil QGVAR(moduleUsed)) then {
objNull remoteControl GVAR(center);
};
if (isMultiplayer) then {
ACE_player switchCamera GVAR(cameraView);
// Restore curator camera state
if (!isNull curatorCamera) then {
GVAR(curatorCameraData) params ["_position", "_dirAndUp"];
curatorCamera setPosASL _position;
curatorCamera setVectorDirAndUp _dirAndUp;
};
if (isMultiplayer) then {
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;
[QGVAR(center) + "_face", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
@ -80,9 +88,13 @@ if (isMultiplayer) then {
[QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
};
GVAR(currentBox) = objNull;
GVAR(camera) = nil;
GVAR(cameraHelper) = nil;
GVAR(curatorCameraData) = nil;
GVAR(mouseButtonState) = nil;
GVAR(currentLeftPanel) = nil;
GVAR(currentRightPanel) = nil;
@ -95,6 +107,7 @@ GVAR(rightTabLnBFocus) = nil;
GVAR(selectedWeaponType) = nil;
GVAR(virtualItems) = nil;
GVAR(virtualItemsFlat) = nil;
GVAR(currentItems) = nil;
GVAR(currentFace) = nil;
GVAR(currentVoice) = nil;

View File

@ -60,28 +60,31 @@ GVAR(statsPagesLeft) = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
GVAR(statsPagesRight) = [0, 0, 0, 0, 0, 0, 0, 0];
GVAR(statsInfo) = [true, 0, controlNull, nil, nil];
// Cache assignedItems
private _assignedItems = (getUnitLoadout GVAR(center)) select 9;
// Add the items the player has to virtualItems
for "_index" from 0 to 10 do {
for "_index" from 0 to 14 do {
switch (_index) do {
// primary, secondary, handgun weapons
case 0: {
case IDX_VIRT_WEAPONS: {
private _array = LIST_DEFAULTS select _index;
if !((_array select 0) isEqualTo "") then {
if ((_array select 0) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0);
};
if !((_array select 1) isEqualTo "") then {
if ((_array select 1) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1);
};
if !((_array select 2) isEqualTo "") then {
if ((_array select 2) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2);
};
};
// Accs for the weapons above
case 1: {
case IDX_VIRT_ATTACHEMENTS: {
private _array = LIST_DEFAULTS select _index;
_array params ["_accsArray", "_magsArray"];
@ -96,28 +99,36 @@ for "_index" from 0 to 10 do {
} forEach _accsArray;
{
if !(_x isEqualTo []) then {
if (_x isNotEqualTo []) then {
if (_x select 0 != "") then {
(GVAR(virtualItems) select 2) pushBackUnique (_x select 0);
(GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) pushBackUnique (_x select 0);
};
if (count _x > 1 && {_x select 1 != ""}) then {
(GVAR(virtualItems) select 2) pushBackUnique (_x select 1);
(GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) pushBackUnique (_x select 1);
};
};
} forEach _magsArray;
};
// Assigned items
case IDX_VIRT_MAP: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 0) };
case IDX_VIRT_COMMS: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 1) };
case IDX_VIRT_RADIO: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 2) };
case IDX_VIRT_COMPASS: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 3) };
case IDX_VIRT_WATCH: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 4) };
// Inventory items
case 2: {
case IDX_VIRT_ITEMS_ALL: {
call FUNC(updateUniqueItemsList);
};
// The rest
default {
private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")};
if !(_array isEqualTo []) then {
private _array = (LIST_DEFAULTS select _index) select {_x isNotEqualTo ""};
if (_array isNotEqualTo []) then {
{(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array;
};
};
@ -164,18 +175,24 @@ for "_index" from 0 to 15 do {
};
{
private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation");
if (_simulationType != "NVGoggles") then {
if (_simulationType == "ItemGps" || _simulationType == "Weapon") then {
switch (_forEachIndex) do {
case 0: { // Map
GVAR(currentItems) set [10, _x];
};
case 1: { // GPS
GVAR(currentItems) set [14, _x];
} else {
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType));
GVAR(currentItems) set [_index, _x];
};
case 2: { // Radio
GVAR(currentItems) set [12, _x];
};
case 3: { // Compass
GVAR(currentItems) set [11, _x];
};
case 4: { // Watch
GVAR(currentItems) set [13, _x];
};
};
} forEach (assignedItems GVAR(center));
} forEach _assignedItems;
GVAR(currentWeaponType) = switch true do {
case (currentWeapon GVAR(center) == GVAR(currentItems) select 0): {0};
@ -334,6 +351,11 @@ if (isNil QGVAR(cameraPosition)) then {
GVAR(cameraPosition) = [5,0,0,[0,0,0.85]];
};
// Save curator camera state so camera position and direction are not modified while using arsenal
if (!isNull curatorCamera) then {
GVAR(curatorCameraData) = [getPosASL curatorCamera, [vectorDir curatorCamera, vectorUp curatorCamera]];
};
GVAR(cameraHelper) = createAgent ["Logic", position GVAR(center) ,[] ,0 ,"none"];
GVAR(cameraHelper) attachTo [GVAR(center), GVAR(cameraPosition) select 3, ""];

View File

@ -25,7 +25,7 @@ GVAR(shiftState) = _shiftState;
private _return = true;
private _loadoutsDisplay = findDisplay IDD_loadouts_display;
if !(_loadoutsDisplay isEqualTo displayNull) then {
if (_loadoutsDisplay isNotEqualTo displayNull) then {
if !(GVAR(loadoutsSearchbarFocus)) then {
switch true do {
// Close button
@ -171,7 +171,7 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
case (_keyPressed == DIK_RETURN): {
if (GVAR(leftSearchbarFocus)) then {
[_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar);
};
};
if (GVAR(rightSearchbarFocus)) then {
[_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar);
};

View File

@ -60,7 +60,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};
@ -102,7 +102,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};
@ -143,7 +143,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};

View File

@ -41,12 +41,16 @@ if (isNil "_displayToUse" || {!isnil QGVAR(camera)}) exitWith {
[localize LSTRING(CantOpenDisplay), false, 5, 1] call EFUNC(common,displayText);
};
GVAR(currentBox) = _object;
if (_mode) then {
GVAR(virtualItems) = +(uiNamespace getVariable QGVAR(configItems));
GVAR(virtualItemsFlat) = +(uiNamespace getVariable QGVAR(configItemsFlat));
} else {
GVAR(virtualItems) = +(_object getVariable [QGVAR(virtualItems), [
[[], [], []], [[], [], [], []], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []
]]);
GVAR(virtualItemsFlat) = flatten GVAR(virtualItems);
};
GVAR(center) = _center;

View File

@ -68,9 +68,9 @@ if (_items isEqualType true) then {
private _itemCount = {
if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then {
!(_x isEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
(_x isNotEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
} else {
!(_x isEqualTo [])
(_x isNotEqualTo [])
};
} count _cargo;

View File

@ -41,13 +41,14 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va
private _className = configName _x;
private _hasItemInfo = isClass (_configItemInfo);
private _itemInfoType = if (_hasItemInfo) then {getNumber (_configItemInfo >> "type")} else {0};
private _isMiscItem = _className isKindOf ["CBA_MiscItem", (_configCfgWeapons)];
switch true do {
/* Weapon acc */
case (
_hasItemInfo &&
{_itemInfoType in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} &&
{!(configName _x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}
{!_isMiscItem}
): {
//Convert type to array index
@ -117,7 +118,7 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va
case (
_hasItemInfo &&
(_itemInfoType in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD] &&
{(_className isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) ||
{_isMiscItem}) ||
{_itemInfoType in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} ||
{(getText ( _x >> "simulation")) == "ItemMineDetector"}
): {
@ -140,15 +141,6 @@ private _putList = [];
private _className = configName _x;
switch true do {
// Rifle, handgun, secondary weapons mags
case (
((getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL,TYPE_MAGAZINE_MISSILE]) ||
{(getNumber (_x >> QGVAR(hide))) == -1}) &&
{!(_className in _grenadeList)} &&
{!(_className in _putList)}
): {
(_cargo select 2) pushBackUnique _className;
};
// Grenades
case (_className in _grenadeList): {
(_cargo select 15) pushBackUnique _className;
@ -157,6 +149,13 @@ private _putList = [];
case (_className in _putList): {
(_cargo select 16) pushBackUnique _className;
};
// Rifle, handgun, secondary weapons mags
case (
((getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL,TYPE_MAGAZINE_MISSILE]) ||
{(getNumber (_x >> QGVAR(hide))) == -1})
): {
(_cargo select 2) pushBackUnique _className;
};
};
} foreach configProperties [(configFile >> "CfgMagazines"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true];
@ -170,7 +169,7 @@ private _putList = [];
(_cargo select 7) pushBackUnique (configName _x);
} foreach configProperties [(configFile >> "CfgGlasses"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true];
private _magazineGroups = [[],[]] call CBA_fnc_hashCreate;
private _magazineGroups = createHashMap;
private _cfgMagazines = configFile >> "CfgMagazines";
@ -182,8 +181,9 @@ private _cfgMagazines = configFile >> "CfgMagazines";
_magList append _magazines;
} foreach configProperties [_x, "isArray _x", true];
[_magazineGroups, toLower configName _x, _magList arrayIntersect _magList] call CBA_fnc_hashSet;
_magazineGroups set [toLower configName _x, _magList arrayIntersect _magList];
} foreach configProperties [(configFile >> "CfgMagazineWells"), "isClass _x", true];
uiNamespace setVariable [QGVAR(configItems), _cargo];
uiNamespace setVariable [QGVAR(configItemsFlat), flatten _cargo];
uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups];

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
#include "..\defines.hpp"
/*
* Author: Alganthe, Dedmen, SynixeBrett
* Author: Alganthe, Dedmen, Brett Mayson
* Sort arsenal panel.
*
* Arguments:
@ -97,14 +97,17 @@ private _selected = if (_right) then {
_panel lbData _curSel
};
private _mode = 0 max lbCurSel _sortControl;
private _statement = _sorts select _mode select 2;
private _sortName = _sortControl lbData (0 max lbCurSel _sortControl);
private _sortConfig = _sorts select (0 max (_sorts findIf {(_x select 0) isEqualTo _sortName}));
private _statement = _sortConfig select 2;
missionNamespace setVariable [
[QGVAR(lastSortLeft), QGVAR(lastSortRight)] select _rightSort,
_sorts select _mode select 1
_sortConfig select 1
];
private _originalNames = createHashMap;
private _for = if (_right) then {
for '_i' from 0 to ((lnbSize _panel select 0) - 1)
} else {
@ -117,19 +120,39 @@ _for do {
} else {
_panel lbData _i
};
private _quantity = if (_right) then {
parseNumber (_panel lnbText [_i, 2])
} else {
0
};
private _itemCfg = _cfgClass >> _item;
private _value = _itemCfg call _statement;
// In rare cases, item may not belong to the config class for the panel
// For example, misc items panel can contain CfgVehicles and CfgGlasses items in addition to the usual CfgWeapons items
if (isNull _itemCfg) then {
_itemCfg = _item call CBA_fnc_getItemConfig;
};
private _value = [_itemCfg, _item, _quantity] call _statement;
if (_value isEqualType 0) then {
_value = [_value, 8] call CBA_fnc_formatNumber;
};
if (_value isEqualTo "") then {
_value = "_";
};
if (_right) then {
_panel lnbSetText [[_i, 1], format ["%1%2", _value, _panel lnbText [_i, 1]]];
private _name = _panel lnbText [_i, 1];
_originalNames set [_item, _name];
_panel lnbSetText [[_i, 1], format ["%1%2", _value, _name]];
} else {
if !(_item isEqualTo "") then {
_panel lbSetText [_i, format ["%1%2", _value, _panel lbText _i]];
if (_item isNotEqualTo "") then {
private _name = _panel lbText _i;
_originalNames set [_item, _name];
_panel lbSetText [_i, format ["%1%2", _value, _name]];
};
};
};
@ -139,22 +162,25 @@ if (_right) then {
_for do {
private _data = _panel lnbData [_i, 0];
if (_cursel >= 0) then {
if (_data == _selected) then {_panel lnbSetCurSelRow _i};
if (_curSel >= 0 && {_data == _selected}) then {
_panel lnbSetCurSelRow _i;
};
_panel lnbSetText [[_i, 1], getText (_cfgClass >> _data >> "displayName")];
_panel lnbSetText [[_i, 1], _originalNames get _data];
};
} else {
lbSort [_panel, "ASC"];
_for do {
private _data = _panel lbData _i;
if (_cursel >= 0) then {
if (_data == _selected) then {_panel lbSetCurSel _i};
if (_curSel >= 0 && {_data == _selected}) then {
_panel lbSetCurSel _i;
};
private _name = getText (_cfgClass >> _data >> "displayName");
if !(_name isEqualTo "") then {
_panel lbSetText [_i, _name];
if (_data isNotEqualTo "") then {
_panel lbSetText [_i, _originalNames get _data];
};
};
};

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: Alganthe, SynixeBrett
* Author: Alganthe, Brett Mayson
* Statement to sort weapons by their accuracy.
*
* Arguments:

View File

@ -0,0 +1,19 @@
#include "script_component.hpp"
/*
* Author: Brett Mayson
* Statement to sort items by the amount in inventory.
*
* Arguments:
* 0: Item Config <CONFIG>
* 1: Item Name <STRING>
* 2: Quantity <NUMBER>
*
* Return Value:
* Sorting Value <NUMBER>
*
* Public: No
*/
params ["", "", "_quantity"];
10000 - _quantity

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: SynixeBrett
* Author: Brett Mayson
* Statement to sort magazines by their ammo count.
*
* Arguments:

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: Alganthe, SynixeBrett
* Author: Alganthe, Brett Mayson
* Statement to sort items by their mass.
*
* Arguments:

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: SynixeBrett
* Author: Brett Mayson
* Statement to sort items by the mod they belong to.
*
* Arguments:
@ -16,9 +16,9 @@ params ["_config"];
private _dlc = "";
private _addons = configSourceAddonList _config;
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _mods = configSourceModList (configfile >> "CfgPatches" >> _addons select 0);
if !(_mods isEqualTo []) then {
if (_mods isNotEqualTo []) then {
_dlc = _mods select 0;
};
};

View File

@ -0,0 +1,24 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Statement to sort items by their protection (combination of ballistic and explosive).
*
* Arguments:
* 0: Item Config <CONFIG>
* 1: Ballistic (passthrough) coefficent <NUMBER>
* 2: Explosive (armor) coefficent <NUMBER>
*
* Return Value:
* Sorting Value <NUMBER>
*
* Public: No
*/
params ["_itemInfo", "_ballisticCo", "_explosiveCo"];
_itemInfo params ["_itemCfg"];
(([[_itemCfg], ["passthrough", "armor"]] call BIS_fnc_configExtremes) select 1) params [["_passthroughMax", 0], ["_armorMax", 0]];
private _protectionCombined = _passthroughMax * _ballisticCo + _armorMax * _explosiveCo;
_protectionCombined

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: Alganthe, SynixeBrett
* Author: Alganthe, Brett Mayson
* Statement to sort weapons by their rate of fire.
*
* Arguments:

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: Alganthe, SynixeBrett
* Author: Alganthe, Brett Mayson
* Statement to sort optics by their magnification.
*
* Arguments:

View File

@ -21,7 +21,7 @@ GVAR(virtualItems) set [22, [[], [], [], []]];
GVAR(virtualItems) set [23, []];
GVAR(virtualItems) set [24, []];
private _array = LIST_DEFAULTS select 2;
private _array = LIST_DEFAULTS select IDX_VIRT_ITEMS_ALL;
private _itemsCache = uiNamespace getVariable QGVAR(configItems);
private _configCfgWeapons = configFile >> "CfgWeapons";
@ -33,16 +33,16 @@ private _configGlasses = configFile >> "CfgGlasses";
switch true do {
// Weapon mag
case (
isClass (_configMagazines >> _x) &&
{_x in (_itemsCache select 2)} &&
{!(_x in (GVAR(virtualItems) select 2))}
isClass (_configMagazines >> _x) &&
{_x in (_itemsCache select 2)} &&
{!(_x in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL))}
): {
(GVAR(virtualItems) select 19) pushBackUnique _x;
};
// Mag throw
case (
isClass (_configMagazines >> _x) &&
isClass (_configMagazines >> _x) &&
{_x in (_itemsCache select 15)} &&
{!(_x in (GVAR(virtualItems) select 15))}
): {
@ -51,7 +51,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// Mag put
case (
isClass (_configMagazines >> _x) &&
isClass (_configMagazines >> _x) &&
{_x in (_itemsCache select 16)} &&
{!(_x in (GVAR(virtualItems) select 16))}
): {
@ -61,7 +61,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 0))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 0))} &&
{_x in ((_itemsCache select 1) select 0)}
): {
((GVAR(virtualItems) select 22) select 0) pushBackUnique _x;
@ -70,7 +70,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 1))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 1))} &&
{_x in ((_itemsCache select 1) select 1)}
): {
((GVAR(virtualItems) select 22) select 1) pushBackUnique _x;
@ -79,7 +79,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 2))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 2))} &&
{_x in ((_itemsCache select 1) select 2)}
): {
((GVAR(virtualItems) select 22) select 2) pushBackUnique _x;
@ -87,7 +87,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 3))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 3))} &&
{_x in ((_itemsCache select 1) select 3)}
): {
((GVAR(virtualItems) select 22) select 3) pushBackUnique _x;
@ -100,13 +100,13 @@ private _configGlasses = configFile >> "CfgGlasses";
{!(_x in ((_itemsCache select 1) select 0))} &&
{!(_x in ((_itemsCache select 1) select 1))} &&
{!(_x in ((_itemsCache select 1) select 2))} &&
{!(_x in ((_itemsCache select 1) select 3))}
{!(_x in ((_itemsCache select 1) select 3))}
): {
(GVAR(virtualItems) select 18) pushBackUnique _x;
};
// Backpacks
case (isClass (_configVehicles >> _x)): {
case (getNumber (_configVehicles >> _x >> "isBackpack") == 1): {
(GVAR(virtualItems) select 23) pushBackUnique _x;
};

View File

@ -19,8 +19,8 @@ private _weaponCfg = configFile >> "CfgWeapons";
private _magCfg = configFile >> "CfgMagazines";
private _vehcCfg = configFile >> "CfgVehicles";
private _glassesCfg = configFile >> "CfgGlasses";
private _weaponsArray = GVAR(virtualItems) select 0;
private _accsArray = GVAR(virtualItems) select 1;
private _weaponsArray = GVAR(virtualItems) select IDX_VIRT_WEAPONS;
private _accsArray = GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS;
private _nullItemsAmount = 0;
private _unavailableItemsAmount = 0;
@ -58,7 +58,7 @@ private _fnc_weaponCheck = {
private _mag = _x select 0;
if (isClass (_magCfg >> _mag)) then {
if !(_mag in (GVAR(virtualItems) select 2)) then {
if !(_mag in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL)) then {
_unavailableItemsList pushBackUnique _mag;
_dataPath set [_forEachIndex, []];
@ -137,7 +137,7 @@ for "_dataIndex" from 0 to 9 do {
if (isClass (_magCfg >> _item)) then {
if !(
_item in (GVAR(virtualItems) select 2) ||
_item in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) ||
_item in (GVAR(virtualItems) select 15) ||
_item in (GVAR(virtualItems) select 16)
) then {
@ -173,7 +173,7 @@ for "_dataIndex" from 0 to 9 do {
if (isClass (_weaponCfg >> _item)) then {
if !(_item in (GVAR(virtualItems) select 3)) then {
if !(_item in (GVAR(virtualItems) select IDX_VIRT_HEADGEAR)) then {
_unavailableItemsList pushBackUnique _item;
_loadout set [_dataIndex, ""];
@ -195,7 +195,7 @@ for "_dataIndex" from 0 to 9 do {
if (isClass (_glassesCfg >> _item)) then {
if !(_item in (GVAR(virtualItems) select 7)) then {
if !(_item in (GVAR(virtualItems) select IDX_VIRT_GOGGLES)) then {
_unavailableItemsList pushBackUnique _item;
_loadout set [_dataIndex, ""];

View File

@ -159,22 +159,6 @@
<Czech>[Shift+Klik pro uložení jako standardního vybavení pro misi]</Czech>
<Turkish>[Shift+Click varsayılan kıyafetlere kaydet]</Turkish>
</Key>
<Key ID="STR_ACE_Arsenal_buttonRenameText">
<English>Rename</English>
<Spanish>Renombrar</Spanish>
<French>Renommer</French>
<German>Umbenennen</German>
<Polish>Zmień nazwę</Polish>
<Japanese>改名</Japanese>
<Italian>Rinomina</Italian>
<Korean>이름바꾸기</Korean>
<Chinese>重新命名</Chinese>
<Chinesesimp>重新命名</Chinesesimp>
<Russian>Переименовать</Russian>
<Portuguese>Renomear</Portuguese>
<Czech>Přejmenovat</Czech>
<Turkish>Yeniden adlandır</Turkish>
</Key>
<Key ID="STR_ACE_Arsenal_buttonRenameTooltip">
<English>Rename the selected loadout</English>
<Spanish>Renombrar el equipamiento seleccionado</Spanish>
@ -388,6 +372,9 @@
<German>Nach Tragelast sortieren</German>
<French>Trier par capacité de chargement</French>
<Japanese>容量で並び替え</Japanese>
<Spanish>Ordenar por capacidad</Spanish>
<Russian>Сортировка по вместимости</Russian>
<Polish>Sortuj po rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_sortByAccuracyText">
<English>Sort by accuracy</English>
@ -395,6 +382,9 @@
<French>Trier par précision</French>
<Japanese>精度で並び替え</Japanese>
<Turkish>Isabet doğruluğuna göre sırala</Turkish>
<Spanish>Ordenar por precisión</Spanish>
<Russian>Сортировка по точности</Russian>
<Polish>Sortuj po celności</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_sortByRateOfFireText">
<English>Sort by rate of fire</English>
@ -402,12 +392,18 @@
<French>Trier par cadence de tir</French>
<Japanese>連射速度で並び替え</Japanese>
<Turkish>Atış hızına göre sırala</Turkish>
<Spanish>Ordenar por cadencia de tiro</Spanish>
<Russian>Сортировка по темпу стрельбы</Russian>
<Polish>Sortuj po szybkostrzelności</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_sortByMagnificationText">
<English>Sort by magnification</English>
<German>Nach Vergrößerung sortieren</German>
<French>Trier par grossissement</French>
<Japanese>倍率で並び替え</Japanese>
<Spanish>Ordenar por magnificación</Spanish>
<Russian>Сортировка по кратности приближения</Russian>
<Polish>Sortuj po przybliżeniu</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_sortByMagCountText">
<English>Sort by ammo count</English>
@ -415,6 +411,25 @@
<French>Trier par nombre de munitions</French>
<Japanese>装弾数で並び替え</Japanese>
<Turkish>Mermi sayısına göre sırala</Turkish>
<Spanish>Ordenar por cantidad de munición</Spanish>
<Russian>Сортировка по количеству боеприпасов</Russian>
<Polish>Sortuj po ilości amunicji</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_sortByProtectionBallistic">
<English>Sort by ballistic protection</English>
<French>Trier par protection balistique</French>
<Japanese>防弾性能で並び替え</Japanese>
<Spanish>Ordenar por protección balística</Spanish>
<Russian>Сортировка по баллистической защите</Russian>
<Polish>Sortuj po ochronie balistycznej</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_sortByProtectionExplosive">
<English>Sort by explosive protection</English>
<French>Trier par résistance aux explosifs</French>
<Japanese>防爆性能で並び替え</Japanese>
<Spanish>Ordenar por protección de explosivos</Spanish>
<Russian>Сортировка по защите от взрывов</Russian>
<Polish>Sortuj po ochronie przeciw wybuchom</Polish>
</Key>
<Key ID="STR_ACE_Arsenal_buttonShareTooltip">
<English>Share or stop sharing the selected loadout</English>
@ -1084,7 +1099,6 @@
<Spanish>Niveles de potasio</Spanish>
<German>Kaliumspiegel</German>
<French>Taux de potassium</French>
<Japanese>カリウム レベル</Japanese>
<Chinesesimp>钾水平</Chinesesimp>
<Chinese>鉀水平</Chinese>
<Italian>Ilvello di potassio</Italian>
@ -1093,6 +1107,7 @@
<Portuguese>Níveis de Potássio</Portuguese>
<Czech>Úrovně draslíku</Czech>
<Turkish>Potasyum seviyeleri</Turkish>
<Japanese>カリウム含有量</Japanese>
</Key>
<Key ID="STR_ACE_Arsenal_statMagnification">
<English>Magnification</English>
@ -1370,6 +1385,7 @@
<Russian>Задержка детонации</Russian>
<Polish>Opoźnienie zapalnika</Polish>
<Japanese>信管設定時間</Japanese>
<Spanish>Tiempo de espoleta</Spanish>
</Key>
<Key ID="STR_ACE_Arsenal_DetonatesOnImpact">
<English>Detonates on impact</English>
@ -1378,6 +1394,7 @@
<Russian>Детонация от удара</Russian>
<Polish>Detonuj przy uderzeniu</Polish>
<Japanese>着発信管</Japanese>
<Spanish>Detona mediante impacto</Spanish>
</Key>
</Package>
</Project>

View File

@ -492,7 +492,7 @@ class GVAR(display) {
x = QUOTE(safezoneX + safezoneW - 93 * GRID_W);
h = QUOTE(safezoneH - 28 * GRID_H);
};
class rightTabContentListnBox : RscListNBox {
class rightTabContentListnBox: RscListNBox {
idc = IDC_rightTabContentListnBox;
colorBackground[]={0,0,0,0};
colorSelectBackground[]={1,1,1,0.5};
@ -1005,8 +1005,8 @@ class GVAR(loadoutsDisplay) {
class buttonRename: buttonSave {
idc = IDC_buttonRename;
x = QUOTE(32.5 * GRID_W);
text= CSTRING(buttonRenameText);
tooltip= CSTRING(buttonRenameTooltip);
text = ECSTRING(common,rename);
tooltip = CSTRING(buttonRenameTooltip);
onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsRename));
};
class buttonLoad: buttonSave {

View File

@ -1,4 +1,4 @@
class GVAR(customArsenalButton_Button) : RscButtonArsenal {
class GVAR(customArsenalButton_Button): RscButtonArsenal {
x = QUOTE(safezoneW + safezoneX - 10 * GRID_W);
y = QUOTE(safezoneY + 88 * GRID_H);
w = QUOTE(9 * GRID_W);
@ -10,7 +10,7 @@ class GVAR(customArsenalButton_Button) : RscButtonArsenal {
colorBackground[] = {0,0,0,0.5};
};
class GVAR(customArsenalButton_Background) : ctrlStaticBackground {
class GVAR(customArsenalButton_Background): ctrlStaticBackground {
x = QUOTE(safezoneW + safezoneX - 13 * GRID_W);
y = QUOTE(safezoneY + 88 * GRID_H);
w = QUOTE(12 * GRID_W);

View File

@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -5,10 +5,3 @@ Universal artillery rangetables.
#### Items Added:
`ACE_artilleryTable`
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [PabstMirror](https://github.com/PabstMirror)

View File

@ -42,7 +42,7 @@ class GVAR(rangeTableDialog) {
colorSelectBackground[] = {0, 0, 0, 0.025};
colorSelectBackground2[] = {0, 0, 0, 0.025};
colorScrollbar[] = {0.95,0,0.95,1};
class ListScrollBar: ScrollBar{
class ListScrollBar: ScrollBar {
color[] = {0,0,0,0.6};
};
};

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
["ace_settingsInitialized", {
TRACE_2("ace_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer));
["CBA_settingsInitialized", {
TRACE_2("CBA_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer));
if (hasInterface) then {
// Add hud overlay for actuall azimuth and elevation:
@ -15,7 +15,7 @@
if (GVAR(advancedCorrections)) then {
["LandVehicle", "init", {
params ["_vehicle"];
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _vehicleCfg = configOf _vehicle;
// config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner
private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then {
getNumber (_vehicleCfg >> QGVAR(applyCorrections))

View File

@ -4,7 +4,7 @@ class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
weapons[] = {"ACE_artilleryTable"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author = ECSTRING(common,ACETeam);

View File

@ -1,3 +1,4 @@
//pragma SKIP_COMPILE
diag_log text "-------------------------------------------";
INFO("Showing entries with custom configs");
diag_log text "-------------------------------------------";
@ -7,7 +8,7 @@ private _fnc_showPropertyDefined = {
params ["_configBase", "_configProperty"];
private _customAll = configProperties [_configBase, 'isClass _x && {isNumber (_x >> _configProperty)}', true];
private _customExplicit = _customAll select {!([] isEqualTo configProperties [_x, 'configName _x == _configProperty', false])};
private _customExplicit = _customAll select {[] isNotEqualTo configProperties [_x, 'configName _x == _configProperty', false]};
diag_log text format ["%1 with custom %2: %3 Explicit, %4 Total]", configName _configBase, _configProperty, count _customExplicit, count _customAll];
diag_log text format [" - Defined: %1", _customExplicit apply {configName _x}];
diag_log text format [" - Inherited: %1", _customAll apply {[configName _x, getNumber (_x >> _configProperty)]}];

View File

@ -1,3 +1,4 @@
//pragma SKIP_COMPILE
// #include "\z\ace\addons\artillerytables\script_component.hpp"
INFO("showing shot info");

View File

@ -26,7 +26,7 @@ private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []]
TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown);
{
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _x;
private _vehicleCfg = configOf _x;
// config "ace_artillerytables_showRangetable" [0 disabled, 1 enabled] falls back to artilleryScanner
private _showRangetable = if (isNumber (_vehicleCfg >> QGVAR(showRangetable))) then {
getNumber (_vehicleCfg >> QGVAR(showRangetable))

View File

@ -47,6 +47,7 @@ _mags = _mags apply {
_magParamsArray pushBackUnique _airFriction;
[getText (_magCfg >> _x >> "displayNameShort"), getText (_magCfg >> _x >> "displayName"), _initSpeed, _airFriction]
};
_mags = _mags arrayIntersect _mags;
TRACE_2("",_magParamsArray,_mags);
if ((count _magParamsArray) == 2) then { // test if all magazines share the parameters
_mags = [["", "All Magazines", (_mags select 0) select 2, (_mags select 0) select 3]]; // simplify

View File

@ -10,7 +10,7 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
true, // isGlobal
{[QGVAR(advancedCorrections), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(disableArtilleryComputer), "CHECKBOX",
@ -20,4 +20,4 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
true, // isGlobal
{[QGVAR(disableArtilleryComputer), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,10 +2,3 @@ ace_atragmx
===============
ATragMX - Handheld ballistics calculator
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Ruthberg](http://github.com/Ulteq)

View File

@ -126,7 +126,7 @@ class ATragMX_RscListBox {
thumb="\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
};
class ListScrollBar : ScrollBar {
class ListScrollBar: ScrollBar {
};
};
class ATragMX_RscListNBox: ATragMX_RscListBox {

View File

@ -60,7 +60,7 @@ if (_parseInput) then {
_subsonicDrop = _transonicDrop max _subsonicDrop;
};
if ((GVAR(truingDropDropData) select 0) == 0 || {!([_transonicRange, _subsonicRange] isEqualTo GVAR(truingDropRangeData))}) then {
if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRange] isNotEqualTo GVAR(truingDropRangeData)}) then {
if (isNil QGVAR(targetSolutionInput)) then {
call FUNC(calculate_target_solution);
};

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit));
clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit));
};
};
class Extended_GetIn_EventHandlers {

View File

@ -86,6 +86,10 @@ class CfgVehicles {
dayLight = 0;
onlyInNvg = 1;
useFlare = 0;
maxLifetime = "8 * 60 * 60";
blinkingPattern[] = {0.1, 1.1}; // 0.1 s on, 1.1 s off
blinkingStartsOn = 1;
blinkingPatternGuarantee = 1;
};
side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature
@ -102,6 +106,12 @@ class CfgVehicles {
brightness = 10;
};
class NVG_TargetBase: All {
class NVGMarker {
maxLifetime = "8 * 60 * 60";
};
};
class NATO_Box_Base;
class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems {

View File

@ -5,13 +5,3 @@ Introducing the ability to attach various throwables to yourself or vehicles, to
#### Items Added:
`ACE_IR_Strobe_Item`
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [esteldunedain](https://github.com/esteldunedain)
- [bux578](https://github.com/bux578)
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
- [PabstMirror](https://github.com/PabstMirror)

View File

@ -38,12 +38,13 @@ private _onAttachText = format [localize LSTRING(Item_Attached), _onAttachText];
if (_unit == _attachToVehicle) then { //Self Attachment
private _attachedItem = _itemVehClass createVehicle [0,0,0];
_attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"];
_attachedItem attachTo [_unit, [0.07, -0.06, 0.085], "leftshoulder", true];
if (!_silentScripted) then {
_unit removeItem _itemClassname; // Remove item
[_onAttachText, 2] call EFUNC(common,displayTextStructured);
};
_unit setVariable [QGVAR(attached), [[_attachedItem, _itemClassname]], true];
[QGVAR(attached), [_attachedItem, _itemClassname, _silentScripted]] call CBA_fnc_localEvent;
} else {
GVAR(placeAction) = PLACE_WAITING;
@ -74,7 +75,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
};
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
private _lineInterection = !((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isEqualTo []);
private _lineInterection = ((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isNotEqualTo []);
//Don't allow placing in a bad position:
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};

View File

@ -46,10 +46,12 @@ if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find
private _isChemlight = _attachedObject isKindOf "Chemlight_base";
// Exit if can't add the item
if (!(_unit canAdd _itemName) && {!_isChemlight}) exitWith {
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
if (!([_unit, _itemName] call CBA_fnc_canAddItem) && {!_isChemlight}) exitWith {
[LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured);
};
[QGVAR(detaching), [_attachedObject, _itemName, false]] call CBA_fnc_localEvent;
// Add item to inventory (unless it's a chemlight)
if (!_isChemlight) then {
_unit addItem _itemName;

View File

@ -25,9 +25,10 @@ if (!local _unit) exitWith {};
private _attachedList = _unit getVariable [QGVAR(attached), []];
if (_attachedList isEqualTo []) exitWith {};
(_attachedList select 0) params ["_xObject"];
(_attachedList select 0) params ["_xObject", "_xItemName"];
if (!isNull _xObject) then {
TRACE_1("detaching and moving attached light",_xObject);
[QGVAR(detaching), [_xObject, _xItemName, true]] call CBA_fnc_localEvent;
detach _xObject;
_xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
[{

View File

@ -4,7 +4,7 @@
* Approves placement of the lightObject, scans for an appropriate location and attaches
* A player can release the attachObject with it floating in mid-air.
* This will use lineIntersectsSurfaces to scan towards the center of the vehicle to find a collision
* ArmA's collision detection is of couse terrible and often misses collisions (difference between what we see and collision LOD)
* Arma's collision detection is of couse terrible and often misses collisions (difference between what we see and collision LOD)
* So it does multiple scans at slighly different angles
* This is VERY computationaly intensive, but doesn't happen that often.
*
@ -100,5 +100,6 @@ _unit removeItem _itemClassname;
private _attachList = _attachToVehicle getVariable [QGVAR(attached), []];
_attachList pushBack [_attachedObject, _itemClassname];
_attachToVehicle setVariable [QGVAR(attached), _attachList, true];
[QGVAR(attached), [_attachedObject, _itemClassname, false]] call CBA_fnc_localEvent;
[_onAttachText, 2] call EFUNC(common,displayTextStructured);

View File

@ -154,23 +154,6 @@
<Chinesesimp>已取下萤光棒</Chinesesimp>
<Turkish>ık Çubuğu Söküldü</Turkish>
</Key>
<Key ID="STR_ACE_Attach_Inventory_Full">
<English>No inventory space</English>
<German>Kein Platz im Inventar</German>
<Spanish>Sin espacio en inventario</Spanish>
<Polish>Brak miejsca w ekwipunku</Polish>
<French>Pas de place dans l'inventaire</French>
<Czech>Nedostatek místa v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Non hai più spazio</Italian>
<Hungarian>Nincs több hely</Hungarian>
<Russian>В инвентаре нет места</Russian>
<Japanese>インベントリに空きがない</Japanese>
<Korean>넣을 공간이 없음</Korean>
<Chinese>無可用空間</Chinese>
<Chinesesimp>无可用空间</Chinesesimp>
<Turkish>Envanter de alan yok</Turkish>
</Key>
<Key ID="STR_ACE_Attach_IrStrobe_Name">
<English>IR Strobe</English>
<German>IR-Stroboskop</German>

View File

@ -1,19 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

Some files were not shown because too many files have changed in this diff Show More