Merge branch 'master' into pr/9121

This commit is contained in:
johnb432 2023-11-12 19:25:54 +01:00
commit d6b009cd84
3481 changed files with 46606 additions and 60187 deletions

View File

@ -36,7 +36,7 @@ We welcome anyone to contribute to this repository. Issues that we are actively
When contributing to this repository, please first discuss the change you wish to make via issue or [Discord](https://acemod.org/discord) with the [ACE3 project maintainers](https://ace3.acemod.org/team.html) before making a change. This may not be necessary if you are contributing for something which has an existing issue in our repository already.
1. Please make a pull request (PR) as early as possible. This lets use help you in the proces of developing it. When opening a work in progress pull request, mark your PR with a `WIP:` prefix.
1. Please make a pull request (PR) as early as possible. This lets use help you in the proces of developing it. When opening a work in progress pull request, use GitHub's draft feature. This will mark the PR as a work in progress and will prevent it from being merged until you mark it as ready for review.
2. Describe what this pull request will do and how it solves this in the description of your PR. A clear intent and description of the way the issue is resolved will help us to review the PR more efficiently.
3. Please follow our [Development Guidelines](https://ace3.acemod.org/wiki/development/).

View File

@ -4,6 +4,6 @@
### IMPORTANT
- [ ] If the contribution affects [the documentation](https://github.com/acemod/ACE3/tree/master/docs), please include your changes in this pull request so the documentation will appear on the [website](https://ace3.acemod.org/).
- [ ] [Development Guidelines](https://ace3.acemod.org/wiki/development/) are read, understood and applied.
- [ ] Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`.
- If the contribution affects [the documentation](https://github.com/acemod/ACE3/tree/master/docs), please include your changes in this pull request so the documentation will appear on the [website](https://ace3.acemod.org/).
- [Development Guidelines](https://ace3.acemod.org/wiki/development/) are read, understood and applied.
- Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`.

View File

@ -21,6 +21,10 @@ categories:
labels:
- 'kind/cleanup'
- 'area/compatibility'
- 'kind/change'
- title: '**SETTINGS:**'
labels:
- 'kind/setting'
- title: '**TRANSLATIONS:**'
labels:
- 'area/translations'
@ -39,5 +43,5 @@ template: |
replacers:
# Category titles
- search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED|TRANSLATIONS):\*\*)/g'
- search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED|SETTINGS|TRANSLATIONS):\*\*)/g'
replace: '$1'

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
@ -22,12 +22,16 @@ jobs:
run: python3 tools/check_strings.py
- name: Check for BOM
uses: arma-actions/bom-check@master
with:
path: 'addons'
- name: Validate function headers
run: python3 docs/tools/document_functions.py --debug
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives
@ -36,13 +40,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Build using HEMTT
uses: arma-actions/hemtt@master
with:
command: build --release --ci
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@ace
- name: Upload Artifact
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v3
with:
name: ace3-${{ github.sha }}-nobin
path: releases/ace3_*.zip
path: .hemttout/@*

View File

@ -4,13 +4,18 @@ on:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Install Python packages
run: |
pip3 install wheel
@ -22,3 +27,59 @@ jobs:
env:
GH_TOKEN: ${{ secrets.DOCS_TOKEN }}
run: python3 tools/deploy.py
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract Dependencies
run: python3 tools/extract_dependencies.py --markdown
- name: Document Functions
run: python3 docs/tools/document_functions.py
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: docs/
destination: docs/_site/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: jekyll-site
path: docs/_site/
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [build]
environment:
name: netlify
url: ${{ steps.deployment.outputs.deploy-url }}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: jekyll-site
path: _site/
- name: Deploy to Netlify
id: deployment
uses: nwtgck/actions-netlify@v2
with:
publish-dir: _site/
production-branch: master
production-deploy: true
deploy-message: ${{ github.event.head_commit.message }}
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

View File

@ -7,14 +7,14 @@ on:
jobs:
build:
runs-on: ${{ matrix. os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
@ -23,7 +23,7 @@ jobs:
cd build
cmake .. && cmake --build .
- name: Upload Artifact
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: ace3_extensions-${{ matrix.os }}-debug
path: extensions/build

44
.github/workflows/hemtt.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: HEMTT
on:
push:
branches:
- master
pull_request_target:
jobs:
windows:
runs-on: windows-latest
steps:
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Checkout pull request
uses: actions/checkout@v4
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 addons\
rm -r optionals\
rm -r include\
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\optionals optionals\
xcopy /e /h /q pullrequest\include include\
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@ace
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ace3-${{ github.sha }}
path: .hemttout/@*

View File

@ -8,14 +8,14 @@ on:
jobs:
pboproject:
runs-on: windows-2019
runs-on: windows-2022
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-11-06
uses: arma-actions/mikero-tools@2023-01-04
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
@ -35,18 +35,18 @@ jobs:
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: x\cba
ref: master
repository: CBATeam/CBA_A3.git
- name: Checkout ACE3
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: z\ace
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v2
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
@ -64,21 +64,21 @@ jobs:
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\
xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\
- name: Build
run: py P:\z\ace\tools\make.py ci
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @ace
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: '@ace3-${{ github.sha }}'
path: z\ace\release\@ace

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ extensions/vcproj64/*
.vscode/*
hemtt
hemtt.exe
.hemttout
tools/temp
*.cache
*.pbo

View File

@ -0,0 +1,4 @@
let docs_readmes = ["README.zh-TW.md", "README_DE.md", "README_PL.md"];
for readme in docs_readmes {
HEMTT_VFS.join("docs").join(readme).move(HEMTT_VFS.join(readme));
}

View File

@ -0,0 +1,9 @@
let releases = HEMTT_RFS.join("releases");
let src = releases.join(HEMTT.project().prefix() + "-" + HEMTT.project().version().to_string() + ".zip");
let dst = releases.join(HEMTT.project().name().to_lower() + "_" + HEMTT.project().version().to_string_short() + ".zip");
print("Moving zip to " + dst);
if !src.move(dst) {
fatal("Failed to move " + src + " to " + dst);
}

View File

@ -0,0 +1,12 @@
let modcpp = HEMTT_VFS.join("mod.cpp").open_file().read();
modcpp.replace("0.0.0", HEMTT.project().version().to_string_short());
HEMTT_VFS.join("mod.cpp").create_file().write(modcpp);
print("mod.cpp version set");
let docs_readmes = ["README.zh-TW.md", "README_DE.md", "README_PL.md"];
for readme in docs_readmes {
let readmemd = HEMTT_VFS.join("docs").join(readme).open_file().read();
readmemd.replace("0.0.0", HEMTT.project().version().to_string_short());
HEMTT_VFS.join("docs").join(readme).create_file().write(readmemd);
print(readme + " version set");
}

72
.hemtt/project.toml Normal file
View File

@ -0,0 +1,72 @@
name = "ACE3"
prefix = "ace"
author = "ACE-Team"
mainprefix = "z"
[files]
include = [
"*.dll",
"*.so",
"mod.cpp",
"README*.md", # Translated READMEs get moved to root in a hook (virtual file system)
"AUTHORS.txt",
"LICENSE",
"logo_ace3_ca.paa",
"meta.cpp",
]
[version]
git_hash = 0
[asc]
enabled = true
exclude = [
"/initsettings.sqf",
"/initkeybinds.sqf",
"/xeh_prep.sqf",
"/dev/",
"medical_ai/statemachine.sqf",
"common/functions/fnc_dummy.sqf",
"zeus/functions/fnc_zeusAttributes.sqf",
]
[hemtt.config]
preset = "Hemtt"
[hemtt.launch]
workshop = [
"450814997", # CBA_A3
]
[hemtt.launch.spe]
workshop = [
"450814997", # CBA_A3
]
dlc = [
"spe"
]
[hemtt.launch.vn]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
dlc = [
"S.O.G. Prairie Fire",
]
[hemtt.launch.ws]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
dlc = [
"Western Sahara",
]
[hemtt.launch.rhs]
workshop = [
"450814997", # CBA_A3's Workshop ID
"843425103", # RHS AFRF Workshop ID
"843577117", # RHS USAF Workshop ID
"843593391", # RHS GREF Workshop ID
"843632231", # RHS SAF Workshop ID
]

View File

@ -6,24 +6,29 @@
# request, preferably including an email address.
# CORE TEAM
Brett Mayson
bux578 <github@jonathandavid.de>
commy2
Dahlgren
Dani (TCVM) <baileydanyluk@gmail.com>
Drofseh <drofseh.arma@gmail.com>
esteldunedain <nicolas.d.badano@gmail.com>
Felix Wiegand <koffeinflummi@gmail.com>
Garth "L-H" de Wet <garthofhearts@gmail.com>
Giallustio
Glowbal
Grim
Janus
johnb43
jokoho482 <jokoho482@gmail.com>
Jonpas <jonpas33@gmail.com>
Kieran
kymckay
mharis001 <mhariszakar@gmail.com>
MikeMF
NouberNou
PabstMirror <pabstmirror@gmail.com>
Ruthberg <ulteq@web.de>
SilentSpike <SilentSpike100@gmail.com>
tcvm <baileydanyluk@gmail.com>
tpM
veteran29
ViperMaul
@ -42,6 +47,7 @@ aeroson
Aggr094 <bastards4glory@gmail.com>
alef <alefor@gmail.com>
Aleksey EpMAK Yermakov <epmak777@gmail.com>
AleM
Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com>
@ -57,7 +63,6 @@ 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>
@ -77,7 +82,6 @@ diwako
dixon13 <dixonbegay@gmail.com>
Drift_91
Drill <drill87@gmail.com>
Drofseh <drofseh@gmail.com>
Dslyecxi <dslyecxi@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Eclipser <jms@modeemi.fi>
@ -111,7 +115,9 @@ havena <silveredenis@gmail.com>
Hawkins
Head <brobergsebastian@gmail.com>
Hybrid V
Hypoxic <martini_a@outlook.com>
JasperRab <jasper@jasperrab.eu>
JDT
john681611 <john681611@hotmail.com>
JoramD
Karneck <dschultz26@hotmail.com>
@ -119,6 +125,7 @@ Kavinsky <nmunozfernandez@gmail.com>
Keithen <Keithen.Neu@gmail.com>
Kllrt <kllrtik@gmail.com>
KokaKolaA3
Krzyciu
legman <juicemelon@msn.com>
Legolasindar "Viper" <legolasindar@gmail.com>
licht-im-Norden87 <lichtimnorden87@gmail.com>
@ -145,6 +152,7 @@ PiZZADOX <509thParachuteInfantry@gmail.com>
pokertour
Professor <lukas.trneny@wo.cz>
Pterolatypus <pterolatypus@gmail.com>
QuantX
QuickDagger
rakowozz
ramius86 <pasini86@hotmail.com>
@ -172,7 +180,6 @@ 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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@ -1,10 +1,11 @@
<p align="center">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/black/ACE3-Logo.jpg" width="480">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/black/ACE3-Logo.png#gh-light-mode-only" width="480">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/white/ACE3-Logo.png#gh-dark-mode-only" width="480">
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.15.2-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.16.1-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">
@ -21,9 +22,6 @@
<a href="https://acemod.org/discord">
<img src="https://img.shields.io/badge/Discord-Join-darkviolet.svg?style=flat-square" alt="ACE3 Discord">
</a>
<a href="https://circleci.com/gh/acemod/ACE3">
<img src="https://circleci.com/gh/acemod/ACE3.svg?style=svg" alt="ACE3 Build Status">
</a>
</p>
<p align="center">
@ -97,9 +95,7 @@ Please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues) to report
### Testing & building
To help us test the latest development changes, download our master branch ([directly](https://github.com/acemod/ACE3/archive/master.zip), or [with git](https://help.github.com/articles/fetching-a-remote/)), then assemble a test build:
- [Setting up the development environment](https://ace3.acemod.org/wiki/development/setting-up-the-development-environment.html) step-by-step instructions on how to properly setup and build a version of ACE3 for testing purposes.
To help us test the latest development changes, download the [artifact](https://github.com/acemod/ACE3/actions/workflows/arma.yml) of the branch you'd like to test or subscribe to "Anrop ACE3 Master" on the workshop to test `master` branch. Alternatively [build your own version](https://ace3.acemod.org/wiki/development/setting-up-the-development-environment.html).
### Get in touch

View File

@ -42,7 +42,7 @@ class RscTitles {
x="SafeZoneX + 0.001";
y="SafeZoneY + 0.001";
w=0.2;
h=0.2*4/3;
h="0.2*4/3";
size=0.034;
sizeEx=0.027;
text="";

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg, MikeMatrix, joko // Jonas
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,5 +1,5 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: esteldunedain
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg, joko // Jonas
* Handle the PFH for Bullets

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg
* Module for adjusting the advanced ballistics settings

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
* Initializes the advanced ballistics extension with terrain data
@ -19,7 +19,7 @@ if (!hasInterface) exitWith {};
if (!GVAR(enabled)) exitWith {};
private _initStartTime = diag_tickTime;
private _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
private _mapSize = worldSize;
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
INFO_1("Terrain already initialized [world: %1]", worldName);

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1 +0,0 @@
#include "\z\ace\addons\advanced_ballistics\script_component.hpp"

View File

@ -2,6 +2,7 @@ PREP(addDutyFactor);
PREP(createStaminaBar);
PREP(getAnimDuty);
PREP(getMetabolicCosts);
PREP(getWeaponInertia);
PREP(handleEffects);
PREP(handlePlayerChanged);
PREP(handleStaminaBar);

View File

@ -2,22 +2,39 @@
if (!hasInterface) exitWith {};
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
private _unit = ACE_player;
private _fatigue = _unit getVariable [QGVAR(aimFatigue), 0];
switch (stance _unit) do {
["baseline", {
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
switch (stance ACE_player) do {
case ("CROUCH"): {
(1.0 + _fatigue ^ 2 * 0.1) * GVAR(swayFactor)
(1.0 + _fatigue ^ 2 * 0.1)
};
case ("PRONE"): {
(1.0 + _fatigue ^ 2 * 2.0) * GVAR(swayFactor)
(1.0 + _fatigue ^ 2 * 2.0)
};
default {
(1.5 + _fatigue ^ 2 * 3.0) * GVAR(swayFactor)
(1.5 + _fatigue ^ 2 * 3.0)
};
};
}] call EFUNC(common,arithmeticSetSource);
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
["multiplier", {
switch (true) do {
case (isWeaponRested ACE_player): {
GVAR(swayFactor) * GVAR(restedSwayFactor)
};
case (isWeaponDeployed ACE_player): {
GVAR(swayFactor) * GVAR(deployedSwayFactor)
};
default {
GVAR(swayFactor)
};
};
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
// recheck weapon inertia after weapon swap, change of attachments or switching unit
["weapon", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["loadout", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["unit", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["CBA_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};

View File

@ -11,5 +11,7 @@ PREP_RECOMPILE_END;
GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
GVAR(dutyList) = createHashMap;
GVAR(setAnimExclusions) = [];
GVAR(inertia) = 0;
GVAR(inertiaCache) = createHashMap;
ADDON = true;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Adds a duty factor.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Creates the stamina bar.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Calculates the duty of the current animation.
@ -37,13 +37,14 @@ if (_animType in ["idl", "mov", "adj"]) then {
};
};
if (currentWeapon _unit != handgunWeapon _unit) then {
if (currentWeapon _unit != "") then {
if (_animName select [13, 3] == "ras") then {
// low ready jog
_duty = _duty * 1.2;
if (_animName select [9, 3] == "tac") then {
// high ready jog/walk
_duty = _duty * 1.5;
_duty = _duty * (1 + 0.8*GVAR(inertia));
} else {
// low ready jog
_duty = _duty * (1 + 0.2*GVAR(inertia));
};
};
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Calculates the current metabolic costs for a unit.
@ -36,16 +36,19 @@ if (GVAR(isSwimming)) then {
_terrainGradient = 0;
};
// Metabolic cost for walking and running is different
if (_velocity > 2) then {
// Running
(
2.10 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
+ (SIM_BODYMASS + _gearMass) * (0.9 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
} else {
// Walking
(
1.05 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ 2 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
};

View File

@ -0,0 +1,38 @@
#include "..\script_component.hpp"
/*
* Author: Pterolatypus
* Calculates total weapon inertia, accounting for attachments.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Total inertia <NUMBER>
*
* Example:
* [ACE_player] call ace_advanced_fatigue_fnc_getWeaponInertia
*
* Public: No
*/
params [["_unit", ACE_player, [objNull]]];
private _cache = GVAR(inertiaCache);
private _weapon = currentWeapon _unit;
private _weaponAndItems = [_weapon] + (_unit weaponAccessories _weapon);
private _inertia = _cache get _weaponAndItems;
if (isNil "_inertia") then {
_inertia = 0;
private _cfgWeapons = configFile >> "CfgWeapons";
{
// if item is "" or inertia property is undefined, just ignore it
private _itemInertia = getNumber (_cfgWeapons >> _x >> "inertia");
if (isNil "_itemInertia") then { continue };
_inertia = _inertia + _itemInertia;
} forEach _weaponAndItems;
_cache set [_weaponAndItems, _inertia];
};
GVAR(inertia) = _inertia;
_inertia

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles any audible, visual and physical effects of fatigue.
@ -94,6 +94,3 @@ if (_overexhausted) then {
};
_unit setVariable [QGVAR(aimFatigue), _fatigue];
private _aimCoef = [missionNamespace, "ACE_setCustomAimCoef", "max"] call EFUNC(common,arithmeticGetResult);
_unit setCustomAimCoef _aimCoef;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles switching units (once on init and afterwards via Zeus).

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles visual changes of the stamina bar.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Main looping function that updates fatigue values.
@ -38,7 +38,7 @@ if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGr
// Calculate muscle damage increase
// Note: Muscle damage recovery is ignored as it takes multiple days
GVAR(muscleDamage) = GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * 0.00004;
GVAR(muscleDamage) = (GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * 0.00004) min 1;
private _muscleIntegritySqrt = sqrt (1 - GVAR(muscleDamage));
// Calculate available power

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Initializes the module settings.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Removes a duty factor.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\advanced_fatigue\script_component.hpp"

View File

@ -89,3 +89,21 @@
[0, 5, 1, 1],
true
] call CBA_fnc_addSetting;
[
QGVAR(restedSwayFactor),
"SLIDER",
[LSTRING(RestedSwayFactor), LSTRING(RestedSwayFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 2],
true
] call CBA_fnc_addSetting;
[
QGVAR(deployedSwayFactor),
"SLIDER",
[LSTRING(DeployedSwayFactor), LSTRING(DeployedSwayFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 2],
true
] call CBA_fnc_addSetting;

View File

@ -172,7 +172,7 @@
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
<English>Influences the amount of weapon sway. Higher means more sway.</English>
<Spanish>Afecta al la estabilidad de la mira. Más alto significa más balanceo</Spanish>
<German>Beeinflusst den Faktor, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung</German>
<German>Beeinflusst, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung.</German>
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害。</Chinesesimp>
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
@ -184,6 +184,30 @@
<Czech>Ovlivňuje množství kývání zbraní. Vyšší znamená více kývání.</Czech>
<Korean>손떨림의 정도를 정합니다. 높을 수록 많이 휘적입니다.</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RestedSwayFactor">
<English>Rested sway factor</English>
<French>Facteur de balancement au repos</French>
<Korean>휴식 시 손떨림 정도</Korean>
<German>Verwacklungsfaktor, wenn aufgelegt</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RestedSwayFactor_Description">
<English>Influences the amount of weapon sway while weapon is rested.</English>
<French>Influence le degré de balancement de l'arme au repos.</French>
<Korean>무기가 아무런 행동도 하지 않는 동안 무기가 흔들리는 정도를 정합니다.</Korean>
<German>Beeinflusst, wie ruhig man die Waffe hält, während sie aufgelegt ist.</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_DeployedSwayFactor">
<English>Deployed sway factor</English>
<French>Facteur de balancement déployé</French>
<Korean>거치 시 손떨림 정도</Korean>
<German>Verwacklungsfaktor, wenn Zweibein aufgestellt ist.</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_DeployedSwayFactor_Description">
<English>Influences the amount of weapon sway while weapon is deployed.</English>
<French>Influence le degré de balancement de l'arme déployée.</French>
<Korean>무기를 거치하는 동안 무기를 흔드는 정도를 정합니다.</Korean>
<German>Beeinflusst, wie ruhig man die Waffen hält, während das Zweibein aufgestellt ist.</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
<Spanish>Activada</Spanish>

View File

@ -1,6 +1,7 @@
#include "script_component.hpp"
// Fired XEH
GVAR(ammoEventHandlers) = createHashMap;
[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
// Exit on HC

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Checks if a throwable can be prepared.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Checks if a throwable can be thrown.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Zapat, Dslyecxi, Jonpas
* Draws throw arc.

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas, SilentSpike
* Author: Dslyecxi, Jonpas, kymckay
* Handles drawing the currently selected or cooked throwable.
*
* Arguments:

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Exits throw mode.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Retrieve muzzle name from config.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Initializes the Advanced Throwing module.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Key down event.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Mouse button down event.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Mouse scroll wheel changed event.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Picks up a throwable from the ground.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Prepares throwable or selects the next.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Primes the throwable, creates global throwable vehicle and throws Fired XEH.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror, Jonpas
* When interact_menu starts rendering (from "interact_keyDown" event).

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Throw selected throwable.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: CBA Team
* Throws Fired XEH.
@ -20,14 +20,25 @@
*
* Public: No
*/
params ["_unit", "", "_muzzle", "", "_ammo"];
TRACE_1("Fired",_this);
{
_this call _x;
} forEach ((_this select 0) getVariable "cba_xeh_fired");
} forEach (_unit getVariable "cba_xeh_fired");
// Call muzzle fired EH
{
_this call compile getText (_x >> "fired");
} forEach (configProperties [configFile >> "CfgWeapons" >> "Throw" >> (_this select 2) >> "EventHandlers", "isClass _x", true]);
} forEach (configProperties [configFile >> "CfgWeapons" >> "Throw" >> _muzzle >> "EventHandlers", "isClass _x", true]);
// Call ammo fired EH
{ _this call _x } forEach (GVAR(ammoEventHandlers) getOrDefaultCall [_ammo, {
private _cfg = configFile >> "CfgAmmo" >> _ammo >> "EventHandlers";
private _eventHandlers = [];
{
private _eh = getText (_x >> "fired");
if (_eh != "") then { _eventHandlers pushBack compile _eh };
} forEach ([_cfg] + configProperties [_cfg, "isClass _x", true]);
_eventHandlers
}, true]);

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Updates controls hints based on current state.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\advanced_throwing\script_component.hpp"

View File

@ -289,7 +289,7 @@
<Italian>(Scorrere) Estendere</Italian>
<Chinese>(滾輪) 延長</Chinese>
<Chinesesimp>(滚轮)延长</Chinesesimp>
<Portuguese>(Roda do Mouse) Extender</Portuguese>
<Portuguese>(Roda do Mouse) Estender</Portuguese>
<Czech>(Scrollovat) Oddálit</Czech>
<Turkish>(Tekerlek) Uzat</Turkish>
</Key>

View File

@ -1,3 +1,5 @@
PREP(assignNVG);
PREP(assignNVGpfh);
PREP(drawCuratorGarrisonPathing);
PREP(garrison);
PREP(garrisonMove);

View File

@ -68,3 +68,11 @@
params ["_unit", "_mode"];
_unit enableGunLights _mode;
}] call CBA_fnc_addEventHandler;
if (isServer) then {
["CAManBase", "init", {
// wait for HMD to be assigned so `hmd _unit` works
[FUNC(assignNVG), _this, 1] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addClassEventHandler;
};

View File

@ -6,4 +6,11 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
if (isServer) then {
GVAR(assignNVGthread) = false;
GVAR(assignNVGstate) = false;
};
#include "initSettings.sqf"
ADDON = true;

View File

@ -0,0 +1,39 @@
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Assigns AI first found NVG in their inventory during night time and unassigns it during day time.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [cursorObject] call ace_ai_fnc_assignNVG
*
* Public: No
*/
if (!GVAR(assignNVG)) exitWith {};
params ["_unit"];
if (alive _unit && {!isPlayer _unit}) then {
private _nvg = hmd _unit;
if (GVAR(assignNVGstate)) then {
if (_nvg == "") then {
private _items = [_unit, false, true, true, true, false, false] call CBA_fnc_uniqueUnitItems; // backpack, vest, uniform
{
if (getText (configFile >> "CfgWeapons" >> _x >> "simulation") == "NVGoggles") exitWith {
_unit assignItem _x;
};
} forEach _items;
};
} else {
if (_nvg != "" && {currentVisionMode _unit == 0} && {_unit canAdd _nvg}) then {
_unit unassignItem _nvg;
};
};
};

View File

@ -0,0 +1,27 @@
#include "..\script_component.hpp"
/*
* Author: Jonpas
* waitAndExecute Handler for periodic NVG assignment.
*
* Arguments:
* None
* Return Value:
* None
*
* Example:
* [] call ace_ai_fnc_assignNVGpfh
*
* Public: No
*/
TRACE_1("assignNVGpfh",count allUnits);
if (!GVAR(assignNVG)) exitWith { TRACE_1("shutdown loop",_this); GVAR(assignNVGthread) = false; };
GVAR(assignNVGstate) = sunOrMoon < 1 || {moonIntensity > 0.8};
{
_x call FUNC(assignNVG);
} forEach allUnits;
[FUNC(assignNVGpfh), [], 300] call CBA_fnc_waitAndExecute;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Draws AI garrison pathing while the Zeus display is open.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Garrison function used to garrison AI inside buildings.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: mharis001
* Initializes the Zeus display.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Used to un-garrison units.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\ai\script_component.hpp"

View File

@ -0,0 +1,19 @@
private _category = format ["ACE %1", LLSTRING(DisplayName)];
[
QGVAR(assignNVG), "CHECKBOX",
[LSTRING(AssignNVG_DisplayName), LSTRING(AssignNVG_Description)],
_category,
false,
1,
{
if (isServer) then {
params ["_enabled"];
if (_enabled && {!GVAR(assignNVGthread)}) then {
TRACE_1("start loop",_this);
GVAR(assignNVGthread) = true;
[FUNC(assignNVGpfh), [], 1] call CBA_fnc_waitAndExecute;
};
};
}
] call CBA_fnc_addSetting;

View File

@ -1,6 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="AI">
<Key ID="STR_ACE_AI_DisplayName">
<English>AI</English>
<Chinese>AI</Chinese>
<French>IA</French>
<Spanish>IA</Spanish>
<Italian>AI</Italian>
<Polish>SI</Polish>
<Russian>ИИ</Russian>
<German>KI</German>
<Czech>UI</Czech>
<Portuguese>IA</Portuguese>
<Korean>AI</Korean>
<Chinesesimp>AI</Chinesesimp>
<Japanese>AI</Japanese>
<Turkish>AI</Turkish>
</Key>
<Key ID="STR_ACE_AI_GarrisonInvalidPosition">
<English>Invalid position provided.</English>
<German>Ungültige Position</German>
@ -65,5 +81,19 @@
<Czech>Nenalezena žádná budova.</Czech>
<Turkish>Bir yapı bulunamadı</Turkish>
</Key>
<Key ID="STR_ACE_AI_AssignNVG_DisplayName">
<English>Auto-Equip NVGs</English>
<Polish>Automatyczne zakładanie NVG</Polish>
<German>Automatisch NVGs ausrüsten</German>
<Korean>야투경 자동 창착</Korean>
<French>Equipement JVN automatique</French>
</Key>
<Key ID="STR_ACE_AI_AssignNVG_Description">
<English>Equips NVG in inventory during night time and unequips it during day time.\nDoes not add NVGs to inventory!</English>
<Polish>Zakłada NVG w nocy i zdejmuje je w ciągu dnia.\nNie dodaje NVG do ekwipunku!</Polish>
<German>Rüstet NVG nachts aus dem Inventar aus und entfernt es tagsüber.\nFügt keine NVGs zum Inventar hinzu!</German>
<Korean>야간에는 야투경을 소지품에 장착하고 주간에는 장착을 해제합니다.\n주의! 소지품에 야투경을 추가하는 것이 아닙니다!</Korean>
<French>Equipe des JVN pendant la nuit et les déséquipe le jour.\nN'ajoute pas les JVN dans l'intenvaire !</French>
</Key>
</Package>
</Project>

View File

@ -12,6 +12,6 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dystopian
* Check if Eject action can be shown.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Adds actions to a drone

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Get drone's target location, if aimed at infinity it will return a virtual point

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Modify the current waypoint of a drone

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Set new waypoint of a drone

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dystopian
* Add Eject action to vehicle if needed.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\aircraft\script_component.hpp"

View File

@ -0,0 +1 @@
class GVAR(actions) {};

View File

@ -4,7 +4,7 @@ class GVAR(sorts) {
displayName = "";
tabs[] = {{}, {}};
statement = "";
condition = "true";
condition = QUOTE(true);
};
class ACE_alphabetically: sortBase {
@ -75,11 +75,11 @@ class GVAR(sorts) {
scope = 2;
displayName = CSTRING(sortByProtectionBallistic);
tabs[] = {{3,4,6}, {}};
statement = QUOTE([ARR_3(_this, 1000000, 1000)] call FUNC(sortStatement_protection));
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));
statement = QUOTE([ARR_3(_this,1000,1000000)] call FUNC(sortStatement_protection));
};
};

View File

@ -8,12 +8,12 @@ class GVAR(stats) {
showText = 0;
barStatement = "";
textStatement = "";
condition = "true";
condition = QUOTE(true);
tabs[] = {{}, {}};
};
class ACE_bananaPotassium: statBase {
scope = 2;
displayName= CSTRING(statPotassium);
displayName = CSTRING(statPotassium);
showBar = 1;
barStatement = "1";
condition = QUOTE((configName (_this select 1)) == 'ACE_Banana');
@ -21,20 +21,21 @@ class GVAR(stats) {
};
class ACE_mass: statBase {
scope = 2;
displayName= "$STR_a3_rscdisplayarsenal_stat_weight";
priority = 1.5;
displayName = "$STR_a3_rscdisplayarsenal_stat_weight";
showText = 1;
textStatement = QUOTE([ARR_2(_this select 0, _this select 1)] call FUNC(statTextStatement_mass));
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";
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));
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 {
@ -44,26 +45,26 @@ class GVAR(stats) {
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));
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;
priority = 3.2;
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));
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;
priority = 3.1;
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));
barStatement = QUOTE([ARR_3(_this select 0,_this select 1,[ARR_2([ARR_2(0,3.2)],[ARR_2(-1,1100)])])] call FUNC(statBarStatement_impact));
tabs[] = {{0,1,2}, {}};
};
class ACE_scopeMagnification: statBase {
@ -74,21 +75,37 @@ class GVAR(stats) {
textStatement = QUOTE(call FUNC(statTextStatement_scopeMag));
tabs[] = {{}, {0}};
};
class ACE_binoMagnification: statBase {
scope = 2;
priority = 2;
displayName = CSTRING(statMagnification);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_binoMag));
tabs[] = {{9}, {}};
};
class ACE_scopeVisionMode: statBase {
scope = 2;
priority = 1;
priority = 1.6;
displayName = CSTRING(statVisionMode);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_scopeVisionMode));
tabs[] = {{}, {0}};
};
class ACE_binoVisionMode: statBase {
scope = 2;
priority = 1.6;
displayName = CSTRING(statVisionModeGeneric);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_binoVisionMode));
tabs[] = {{8,9}, {}};
};
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));
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 {
@ -97,7 +114,7 @@ class GVAR(stats) {
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));
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 {
@ -106,7 +123,7 @@ class GVAR(stats) {
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));
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}, {}};
};
class ACE_smokeChemTTL: statBase {
@ -116,7 +133,7 @@ class GVAR(stats) {
displayName = CSTRING(statTTL);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_smokeChemTTL));
condition = QUOTE((configName (_this select 1)) isKindOf [ARR_2('smokeShell', configFile >> 'CfgMagazines')]);
condition = QUOTE((configName (_this select 1)) isKindOf [ARR_2('smokeShell',configFile >> 'CfgMagazines')]);
tabs[] = {{}, {5}};
};
class ACE_explosionTime: statBase {
@ -125,7 +142,23 @@ class GVAR(stats) {
displayName = CSTRING(StatExplosionTime);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_explosionTime));
condition = QUOTE(true);
tabs[] = {{}, {5}};
};
class ACE_magCount: statBase {
scope = 2;
priority = 1;
displayName = CSTRING(statMagCount);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_magCount));
tabs[] = {{}, {4}};
};
class ACE_illuminators: statBase {
scope = 2;
priority = 1;
stats[] = {};
displayName = CSTRING(statIlluminators);
showText = 1;
textStatement = QUOTE(call FUNC(statTextStatement_illuminators));
tabs[] = {{}, {1}};
};
};

View File

@ -28,7 +28,7 @@ class Cfg3DEN {
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)])]);
attributeSave = QUOTE(uiNamespace getVariable [ARR_2(QQGVAR(attributeValue),[ARR_2([],0)])]);
class controls {
class ModeTitle: ctrlStatic {
idc = -1;
@ -40,7 +40,7 @@ class Cfg3DEN {
};
class Mode: ctrlToolbox {
idc = IDC_ATTRIBUTE_MODE;
onToolBoxSelChanged = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0), _this select 1)] call FUNC(attributeMode));
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);
@ -55,7 +55,7 @@ class Cfg3DEN {
};
class Category: ctrlToolboxPictureKeepAspect {
idc = IDC_ATTRIBUTE_CATEGORY;
onToolBoxSelChanged = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0), _this select 1)] call FUNC(attributeCategory));
onToolBoxSelChanged = QUOTE([ARR_2(ctrlParentControlsGroup (_this select 0),_this select 1)] call FUNC(attributeCategory));
x = QUOTE(5 * ATTRIBUTE_W);
y = QUOTE(15 * ATTRIBUTE_H);
w = QUOTE(125 * ATTRIBUTE_W);
@ -129,7 +129,8 @@ class Cfg3DEN {
};
class SearchButton: ctrlButtonPicture {
idc = IDC_ATTRIBUTE_SEARCH_BUTTON;
onButtonClick = QUOTE( \
#pragma hemtt suppress pw3_padded_arg
onButtonClick = QUOTE(\
params ['_searchButton']; \
private _controlsGroup = ctrlParentControlsGroup _searchButton; \
private _searchBar = _controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_SEARCHBAR; \
@ -147,7 +148,8 @@ class Cfg3DEN {
class SearchBar: ctrlEdit {
idc = IDC_ATTRIBUTE_SEARCHBAR;
onKeyUp = QUOTE([ctrlParentControlsGroup (_this select 0)] call FUNC(attributeAddItems));
onMouseButtonClick = QUOTE( \
#pragma hemtt suppress pw3_padded_arg
onMouseButtonClick = QUOTE(\
params [ARR_2('_searchBar','_button')]; \
if (_button != 1) exitWith {}; \
_searchBar ctrlSetText ''; \

View File

@ -0,0 +1,10 @@
class CfgWeapons {
class ItemCore;
class ToolKit: ItemCore {
ACE_isTool = 1; // sort in Tools Tab
};
class DetectorCore;
class MineDetector: DetectorCore {
ACE_isTool = 1; // sort in Tools Tab
};
};

View File

@ -26,7 +26,7 @@ class Display3DEN {
class GVAR(portVALoadouts) {
text = CSTRING(portLoadoutsText);
picture = QPATHTOEF(common,data\logo_ace3_ca.paa);
action = QUOTE(call DFUNC(portVALoadouts););
action = QUOTE(call DFUNC(portVALoadouts));
};
};
};

View File

@ -1,7 +1,8 @@
PREP(addAction);
PREP(addDefaultLoadout);
PREP(addListBoxItem);
PREP(addSort);
PREP(addRightPanelButton);
PREP(addSort);
PREP(addStat);
PREP(addVirtualItems);
PREP(attributeAddCompatible);
@ -15,9 +16,12 @@ PREP(attributeKeyDown);
PREP(attributeLoad);
PREP(attributeMode);
PREP(attributeSelect);
PREP(baseWeapon);
PREP(buttonActionsPage);
PREP(buttonCargo);
PREP(buttonClearAll);
PREP(buttonExport);
PREP(buttonFavorites);
PREP(buttonHide);
PREP(buttonImport);
PREP(buttonLoadoutsDelete);
@ -25,20 +29,24 @@ PREP(buttonLoadoutsLoad);
PREP(buttonLoadoutsRename);
PREP(buttonLoadoutsSave);
PREP(buttonLoadoutsShare);
PREP(buttonStats);
PREP(buttonStatsPage);
PREP(canEditDefaultLoadout);
PREP(clearSearchbar);
PREP(compileActions);
PREP(compileSorts);
PREP(compileStats);
PREP(fillLeftPanel);
PREP(fillLoadoutsList);
PREP(fillRightPanel);
PREP(fillSort);
PREP(getLoadout);
PREP(getVirtualItems);
PREP(handleActions);
PREP(handleLoadoutsSearchbar);
PREP(handleMouse);
PREP(handleScrollWheel);
PREP(handleSearchbar);
PREP(handleSearchInputChanged);
PREP(handleSearchModeToggle);
PREP(handleStats);
PREP(initBox);
PREP(itemInfo);
@ -51,6 +59,7 @@ PREP(onLoadoutsClose);
PREP(onLoadoutsOpen);
PREP(onMouseButtonDown);
PREP(onMouseButtonUp);
PREP(onPanelDblClick);
PREP(onSelChangedLeft);
PREP(onSelChangedLoadouts);
PREP(onSelChangedRight);
@ -58,13 +67,21 @@ PREP(onSelChangedRightListnBox);
PREP(open3DEN);
PREP(openBox);
PREP(portVALoadouts);
PREP(refresh);
PREP(removeAction);
PREP(removeBox);
PREP(removeDefaultLoadout);
PREP(removeSort);
PREP(removeStat);
PREP(removeVirtualItems);
PREP(renameDefaultLoadout);
PREP(replaceUniqueItemsLoadout);
PREP(scanConfig);
PREP(showItem);
PREP(sortPanel);
PREP(sortStatement_accuracy);
PREP(statTextStatement_binoMag);
PREP(statTextStatement_binoVisionMode);
PREP(sortStatement_amount);
PREP(sortStatement_magCount);
PREP(sortStatement_mass);
@ -78,6 +95,8 @@ PREP(statBarStatement_impact);
PREP(statBarStatement_rateOfFIre);
PREP(statTextStatement_accuracy);
PREP(statTextStatement_explosionTime);
PREP(statTextStatement_illuminators);
PREP(statTextStatement_magCount);
PREP(statTextStatement_mass);
PREP(statTextStatement_rateOfFire);
PREP(statTextStatement_scopeMag);
@ -85,5 +104,7 @@ PREP(statTextStatement_scopeVisionMode);
PREP(statTextStatement_smokeChemTTL);
PREP(updateCamPos);
PREP(updateRightPanel);
PREP(updateCurrentItemsList);
PREP(updateUniqueItemsList);
PREP(updateVirtualItemsFlat);
PREP(verifyLoadout);

View File

@ -9,43 +9,43 @@ GVAR(lastSearchTextRight) = "";
GVAR(lastSearchTextLoadouts) = "";
GVAR(lastSortLeft) = "";
GVAR(lastSortRight) = "";
GVAR(lastSortDirectionLeft) = DESCENDING;
GVAR(lastSortDirectionRight) = DESCENDING;
[QGVAR(initBox), {_this call FUNC(initBox)}] call CBA_fnc_addEventHandler;
[QGVAR(removeBox), {_this call FUNC(removeBox)}] call CBA_fnc_addEventHandler;
[QGVAR(initBox), LINKFUNC(initBox)] call CBA_fnc_addEventHandler;
[QGVAR(removeBox), LINKFUNC(removeBox)] call CBA_fnc_addEventHandler;
[QGVAR(addDefaultLoadout), LINKFUNC(addDefaultLoadout)] call CBA_fnc_addEventHandler;
[QGVAR(removeDefaultLoadout), LINKFUNC(removeDefaultLoadout)] call CBA_fnc_addEventHandler;
[QGVAR(renameDefaultLoadout), LINKFUNC(renameDefaultLoadout)] call CBA_fnc_addEventHandler;
[QGVAR(broadcastFace), {
params ["_unit", "_face"];
_unit setFace _face;
}] call CBA_fnc_addEventHandler;
[QGVAR(broadcastVoice), {
params ["_unit", "_voice"];
_unit setSpeaker _voice;
}] call CBA_fnc_addEventHandler;
[QGVAR(loadoutUnshared), {
params ["_contentPanelCtrl" , "_playerName", "_loadoutName"];
// If player is in arsenal in the shared tab and a loadout is unshared at the same time
if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {
private _dataToCheck = _playerName + _loadoutName;
for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do {
if ((_contentPanelCtrl lnbData [_i, 1]) == _dataToCheck) exitwith {_contentPanelCtrl lnbDeleteRow _i};
for "_lbIndex" from 0 to (lnbSize _contentPanelCtrl select 0) - 1 do {
if ((_contentPanelCtrl lnbData [_lbIndex, 1]) == _dataToCheck) exitWith {
_contentPanelCtrl lnbDeleteRow _lbIndex;
};
};
} else {
if (
profileName == _playerName &&
{!(isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonMyLoadouts})}
) then {
for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do {
if ((_contentPanelCtrl lnbText [_i, 1]) == _loadoutName) exitwith {
_contentPanelCtrl lnbSetPicture [[_i, 0], QPATHTOF(data\iconPublicBlank.paa)];
_contentPanelCtrl lnbSetValue [[_i, 0], 0];
if (profileName == _playerName && {!(isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonMyLoadouts})}) then {
for "_lbIndex" from 0 to (lnbSize _contentPanelCtrl select 0) - 1 do {
if ((_contentPanelCtrl lnbText [_lbIndex, 1]) == _loadoutName) exitWith {
_contentPanelCtrl lnbSetPicture [[_lbIndex, 0], QPATHTOF(data\iconPublicBlank.paa)];
_contentPanelCtrl lnbSetValue [[_lbIndex, 0], 0];
};
};
};
@ -53,53 +53,121 @@ GVAR(lastSortRight) = "";
}] call CBA_fnc_addEventHandler;
[QGVAR(loadoutShared), {
params ["_contentPanelCtrl" ,"_loadoutArgs"];
params ["_contentPanelCtrl", "_loadoutArgs"];
_loadoutArgs params ["_playerName", "_loadoutName", "_loadoutData"];
// If player is in arsenal in the shared tab and a loadout is shared at the same time
if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {
private _curSelData = _contentPanelCtrl lnbData [lnbCurSelRow _contentPanelCtrl, 1];
private _curSelData =_contentPanelCtrl lnbData [(lnbCurSelRow _contentPanelCtrl), 1];
([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"];
_extendedLoadout params ["_loadout"];
private _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName];
private _cfgWeapons = configFile >> "CfgWeapons";
_extendedLoadout params ["_loadout"];
ADD_LOADOUTS_LIST_PICTURES
_contentPanelCtrl lnbSetData [[_newRow, 1], _playerName + _loadoutName];
// Set color of row, depending if items are unavailable/missing
if (_nullItemsAmount > 0) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]];
} else {
if (_unavailableItemsAmount > 0) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]];
};
};
// Sort loadouts alphabetically
_contentPanelCtrl lnbSort [1, false];
// Select previously selected loadout
for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do {
if ((_contentPanelCtrl lnbText [_i, 1]) == _curSelData) exitwith {_contentPanelCtrl lnbSetCurSelRow _i};
for "_lbIndex" from 0 to (lnbSize _contentPanelCtrl select 0) - 1 do {
if ((_contentPanelCtrl lnbText [_lbIndex, 1]) == _curSelData) exitWith {
_contentPanelCtrl lnbSetCurSelRow _lbIndex
};
};
};
}] call CBA_fnc_addEventHandler;
["CBA_loadoutSet", {
params ["_unit", "_loadout", "_extendedInfo"];
// Set face
private _face = _extendedInfo getOrDefault [QGVAR(face), ""];
if (_face != "") then {
_unit setFace _face;
if (isMultiplayer) then {
private _id = [QGVAR(broadcastFace), [_unit, _face], QGVAR(centerFace_) + netId _unit] call CBA_fnc_globalEventJIP;
[_id, _unit] call CBA_fnc_removeGlobalEventJIP;
} else {
_unit setFace _face;
};
};
// Set voice
private _voice = _extendedInfo getOrDefault [QGVAR(voice), ""];
if (_voice != "") then {
_unit setSpeaker _voice;
if (isMultiplayer) then {
private _id = [QGVAR(broadcastVoice), [_unit, _voice], QGVAR(centerVoice_) + netId _unit] call CBA_fnc_globalEventJIP;
[_id, _unit] call CBA_fnc_removeGlobalEventJIP;
} else {
_unit setSpeaker _voice;
};
};
// Set insignia
private _insignia = _extendedInfo getOrDefault [QGVAR(insignia), ""];
if (_insignia != "") then {
_unit setVariable ["BIS_fnc_setUnitInsignia_class", nil];
[_unit, _insignia] call bis_fnc_setUnitInsignia;
[_unit, _insignia] call BIS_fnc_setUnitInsignia;
};
}] call CBA_fnc_addEventHandler;
["CBA_loadoutGet", {
params ["_unit", "_loadout", "_extendedInfo"];
// Set face if enabled
if (GVAR(loadoutsSaveFace)) then {
_extendedInfo set [QGVAR(face), face _unit];
};
// Set voice if enabled
if (GVAR(loadoutsSaveVoice)) then {
_extendedInfo set [QGVAR(voice), speaker _unit];
};
// Set insignia if enabled
if (GVAR(loadoutsSaveInsignia)) then {
private _insignia = _unit call BIS_fnc_getUnitInsignia;
if (_insignia != "") then {
_extendedInfo set [QGVAR(insignia), _insignia];
};
};
}] call CBA_fnc_addEventHandler;
// Compatibility for RHS attachment system. Also used by NIArms.
// Will only work for ACE_player, different arsenal centers will be ignored. RHS limitation.
if (!isNil "rhs_fnc_accGripod") then {
[QEGVAR(arsenal,weaponItemChanged), {
params ["_weapon", "_item", "_itemIndex"];
if (EGVAR(arsenal,center) != ACE_player) exitWith {};
switch (_itemIndex) do {
case ITEM_INDEX_SIDE: {
call rhs_fnc_anpeq15_rail;
};
case ITEM_INDEX_BIPOD: {
// Need this call to make sure RHS's functions are set
call rhs_fnc_accGripod;
if (getText (configFile >> "CfgWeapons" >> _item >> "rhs_grip_type") == "") then {
call rhs_grip_deinitialize;
};
};
};
}] call CBA_fnc_addEventHandler;
};

View File

@ -1,27 +1,17 @@
#include "script_component.hpp"
#include "defines.hpp"
#define TOOLS_TAB_ICON "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
// Arsenal
[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), localize LSTRING(loadoutSubcategory)], true, true] call CBA_fnc_addSetting;
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), [localize LSTRING(settingCategory), localize LSTRING(loadoutSubcategory)], true, true] call CBA_fnc_addSetting;
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], [localize LSTRING(settingCategory), localize LSTRING(loadoutSubcategory)], false, false] call CBA_fnc_addSetting;
[QGVAR(loadoutsSaveFace), "CHECKBOX", localize LSTRING(loadoutsSaveFaceSetting), [localize LSTRING(settingCategory), localize LSTRING(loadoutSubcategory)], false] call CBA_fnc_addSetting;
[QGVAR(loadoutsSaveVoice), "CHECKBOX", localize LSTRING(loadoutsSaveVoiceSetting), [localize LSTRING(settingCategory), localize LSTRING(loadoutSubcategory)], false] call CBA_fnc_addSetting;
[QGVAR(loadoutsSaveInsignia), "CHECKBOX", localize LSTRING(loadoutsSaveInsigniaSetting), [localize LSTRING(settingCategory), localize LSTRING(loadoutSubcategory)], true] call CBA_fnc_addSetting;
#include "initSettings.sqf"
// Arsenal events
[QGVAR(statsToggle), {
params ["_display", "_showStats"];
@ -30,49 +20,71 @@ PREP_RECOMPILE_END;
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
_statsCurrentPageCtrl
];
_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);
[QGVAR(actionsChangePage), {
_this call FUNC(buttonActionsPage);
}] call CBA_fnc_addEventHandler;
[QGVAR(displayActions), {
_this call FUNC(handleActions);
}] call CBA_fnc_addEventHandler;
[QGVAR(actionsToggle), {
params ["_display", "_showActions"];
private _actionsCtrlGroupCtrl = _display displayCtrl IDC_actionsBox;
private _actionsPreviousPageCtrl = _display displayCtrl IDC_actionsPreviousPage;
private _actionsNextPageCtrl = _display displayCtrl IDC_actionsNextPage;
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;
{
_x ctrlShow (GVAR(showActions) && {_showActions});
} forEach [
_actionsCtrlGroupCtrl,
_actionsPreviousPageCtrl,
_actionsNextPageCtrl,
_actionsCurrentPageCtrl
];
}] call CBA_fnc_addEventHandler;
call FUNC(compileActions);
call FUNC(compileSorts);
call FUNC(compileStats);
[QUOTE(ADDON), {!isNil QGVAR(camera)}] call CBA_fnc_registerFeatureCamera;
// Compatibility with CBA scripted optics and dispoable framework
// Compatibility with CBA scripted optics and disposable framework
[QGVAR(displayOpened), {
"cba_optics_arsenalOpened" call CBA_fnc_localEvent;
"cba_disposable_arsenalOpened" call CBA_fnc_localEvent;
"CBA_optics_arsenalOpened" call CBA_fnc_localEvent;
"CBA_disposable_arsenalOpened" call CBA_fnc_localEvent;
EGVAR(common,blockItemReplacement) = true;
}] call CBA_fnc_addEventHandler;
[QGVAR(displayClosed), {
"cba_optics_arsenalClosed" call CBA_fnc_localEvent;
"cba_disposable_arsenalClosed" call CBA_fnc_localEvent;
"CBA_optics_arsenalClosed" call CBA_fnc_localEvent;
"CBA_disposable_arsenalClosed" call CBA_fnc_localEvent;
EGVAR(common,blockItemReplacement) = false;
}] call CBA_fnc_addEventHandler;
// Setup Tools tab
[keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton);
ADDON = true;

View File

@ -2,4 +2,12 @@
#include "XEH_PREP.hpp"
// Cache for FUNC(baseWeapon)
uiNamespace setVariable [QGVAR(baseWeaponNameCache), createHashMap];
// Caches for names, pictures, mod icons
uiNamespace setVariable [QGVAR(addListBoxItemCache), createHashMap];
uiNamespace setVariable [QGVAR(rightPanelCache), createHashMap];
uiNamespace setVariable [QGVAR(sortCache), createHashMap];
call FUNC(scanConfig);

View File

@ -8,7 +8,7 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
authors[] = {"alganthe", "mharis001", "Brett Mayson"};
authors[] = {"alganthe", "mharis001", "Brett Mayson", "johnb43"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
@ -19,6 +19,7 @@ class CfgPatches {
#include "Display3DEN.hpp"
#include "Cfg3DEN.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
#include "RscDisplayMain.hpp"
#include "ACE_Arsenal_Sorts.hpp"
#include "ACE_Arsenal_Stats.hpp"

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