Merge branch 'master' into pr/9273

This commit is contained in:
PabstMirror 2024-08-24 22:23:15 -05:00
commit 78adfdf1ba
986 changed files with 16598 additions and 79334 deletions

View File

@ -11,5 +11,8 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.yml]
indent_size = 2
[Makefile]
indent_style = tab

View File

@ -27,15 +27,6 @@ jobs:
- 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@v4
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives
build:
runs-on: ubuntu-latest
steps:

View File

@ -1,29 +1,65 @@
name: Extensions
on:
pull_request:
push:
paths:
- 'extensions/**'
- 'extension/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/extensions.yml'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Install dependencies
run: |
rustup toolchain update stable --no-self-update
rustup default stable
rustup component add clippy rustfmt
- name: Run rustfmt
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy --all -- -Dwarnings
test:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin
options: --security-opt seccomp=unconfined
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Test & Coverage
run: cargo tarpaulin --verbose --no-default-features --workspace --timeout 240
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
arrays: [
os: { tag: "windows-latest", target: "i686-pc-windows-msvc" },
os: { tag: "windows-latest", target: "x86_64-pc-windows-msvc" },
]
runs-on: ${{ matrix.arrays.os.tag }}
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
cd extensions
mkdir build
cd build
cmake .. && cmake --build .
- name: Upload Artifact
uses: actions/upload-artifact@v4
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
name: ace3_extensions-${{ matrix.os }}-debug
path: extensions/build
target: ${{ matrix.arrays.os.target }}
toolchain: stable
default: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Upload
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arrays.os.target }}
path: target/debug/ace.dll
if-no-files-found: error
retention-days: 30

View File

@ -33,6 +33,8 @@ jobs:
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\optionals optionals\
xcopy /e /h /q pullrequest\include include\
xcopy /y /h /q pullrequest\ace.dll ace.dll
xcopy /y /h /q pullrequest\ace_x64.dll ace_x64.dll
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder

3
.gitignore vendored
View File

@ -2,8 +2,6 @@
*.zip
release/*
releases/*
extensions/vcproj32/*
extensions/vcproj64/*
.vscode/*
hemtt
hemtt.exe
@ -20,4 +18,5 @@ CHANGELOG.md
sqfvm.exe
ArmaScriptCompiler.exe
*.sqfc
target/
!extras/**/*.zip

View File

@ -34,32 +34,26 @@ workshop = [
]
[hemtt.launch.spe]
workshop = [
"450814997", # CBA_A3
]
extends = "default"
dlc = [
"spe"
]
[hemtt.launch.vn]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
extends = "default"
dlc = [
"S.O.G. Prairie Fire",
]
[hemtt.launch.ws]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
extends = "default"
dlc = [
"Western Sahara",
]
[hemtt.launch.rhs]
extends = "default"
workshop = [
"450814997", # CBA_A3's Workshop ID
"843425103", # RHS AFRF Workshop ID
"843577117", # RHS USAF Workshop ID
"843593391", # RHS GREF Workshop ID

1364
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

11
Cargo.toml Normal file
View File

@ -0,0 +1,11 @@
[workspace]
resolver = "2"
members = [
"extension"
]
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true

BIN
ace.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
ace_x64.dll Normal file

Binary file not shown.

View File

@ -1,10 +1,10 @@
#include "script_component.hpp"
GVAR(currentbulletID) = -1;
#include "initKeybinds.inc.sqf"
GVAR(Protractor) = false;
GVAR(ProtractorStart) = CBA_missionTime;
GVAR(allBullets) = [];
GVAR(allBullets) = createHashMap;
GVAR(currentGrid) = 0;
if (!hasInterface) exitWith {};
@ -24,22 +24,6 @@ if (!hasInterface) exitWith {};
// Register Perframe Handler
[LINKFUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler;
//Add warnings for missing compat PBOs (only if AB is on)
{
_x params ["_modPBO", "_compatPBO"];
if ([_modPBO] call EFUNC(common,isModLoaded) && {!([_compatPBO] call EFUNC(common,isModLoaded))}) then {
WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
};
} forEach [
["RH_acc","ace_compat_rh_acc"],
["RH_de_cfg","ace_compat_rh_de"],
["RH_m4_cfg","ace_compat_rh_m4"],
["RH_PDW","ace_compat_rh_pdw"],
["RKSL_PMII","ace_compat_rksl_pm_ii"],
["iansky_opt","ace_compat_sma3_iansky"],
["R3F_Armes","ace_compat_r3f"]
];
}] call CBA_fnc_addEventHandler;
#ifdef DEBUG_MODE_FULL

View File

@ -18,10 +18,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "RscTitles.hpp"
#include "ACE_Settings.hpp"
class ACE_Extensions {
class ace_advanced_ballistics {
windows = 1;
client = 1;
};
};

View File

@ -80,7 +80,7 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
diag_log text format ["AB_Diagnose_barrelTwist,%1,%2,%3,%4,%5",_weapon,_magazine,_ammo,_twistDirection,_barrelTwist];
};
if (_barrelLength == 0) then {
diag_log text format ["AB_Diagnose_barrelLength,%1,%2,%3,%4,%5",_weapon,_magazine,_ammo,_barrelLength];
diag_log text format ["AB_Diagnose_barrelLength,%1,%2,%3,%4",_weapon,_magazine,_ammo,_barrelLength];
};
};
} forEach _magazines;

View File

@ -1,6 +1,6 @@
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg, joko // Jonas
* Author: Glowbal, Ruthberg, joko // Jonas, Brett Mayson
* Handle the PFH for Bullets
*
* Arguments:
@ -17,7 +17,7 @@
private _deleted = false;
{
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
_y params ["_bullet","_caliber","_bulletTraceVisible"];
if (alive _bullet) then {
private _bulletVelocity = velocity _bullet;
@ -27,13 +27,21 @@ private _deleted = false;
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
};
_bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6])));
} else {
GVAR(allBullets) set [_forEachIndex, objNull];
_deleted = true;
(
"ace" callExtension ["ballistics:bullet:simulate", [
_x,
_bulletVelocity,
_bulletPosition,
wind,
ASLToATL(_bulletPosition) select 2,
CBA_missionTime toFixed 6
]]
) params ["_data", "_code"];
if (_code == 0) then {
_bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray (_data)));
};
} forEach GVAR(allBullets);
if (_deleted) then {
GVAR(allBullets) = GVAR(allBullets) - [objNull];
};
} else {
GVAR(allBullets) deleteAt _x;
"ace" callExtension ["ballistics:bullet:delete", [_x]];
};
} forEach GVAR(allBullets)

View File

@ -1,6 +1,6 @@
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg
* Author: Glowbal, Ruthberg, Brett Mayson
*
* Handles advanced ballistics for (BulletBase) projectiles. Called from the unified fired EH only for players.
*
@ -120,8 +120,26 @@ if (_caliber * _bulletLength * _bulletMass * _barrelTwist > 0) then {
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
};
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _ammoCount, _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _transonicStabilityCoef, getPosASL _projectile, _bulletVelocity, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), EGVAR(weather,currentOvercast), CBA_missionTime toFixed 6];
GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)];
("ace" callExtension [
"ballistics:bullet:new", [
_ammoCount,
_airFriction,
_ballisticCoefficients,
_velocityBoundaries,
_atmosphereModel,
_dragModel,
_stabilityFactor,
_twistDirection,
_transonicStabilityCoef,
_bulletVelocity,
EGVAR(common,mapLatitude),
EGVAR(weather,currentTemperature),
EGVAR(common,mapAltitude),
EGVAR(weather,currentHumidity),
EGVAR(weather,currentOvercast),
CBA_missionTime toFixed 6
]
]) params ["_id", "_code"];
if (_code == 0) then {
GVAR(allBullets) set [_id, [_projectile, _caliber, _bulletTraceVisible]];
};

View File

@ -21,7 +21,14 @@ if (!GVAR(enabled)) exitWith {};
private _initStartTime = diag_tickTime;
private _mapSize = worldSize;
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
(
"ace" callExtension ["ballistics:map:init", [worldName, _mapSize]]
) params ["_data", "_code"];
if (_code != 0) exitWith {
ERROR("Error initializing map")
};
if (_data == "true") exitWith {
INFO_1("Terrain already initialized [world: %1]",worldName);
#ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized";
@ -53,8 +60,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName
private _gridCenter = [_x + 25, _y + 25];
private _gridHeight = round(getTerrainHeightASL _gridCenter);
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter);
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
"ace" callExtension ["ballistics:map:set", [GVAR(currentGrid), _gridHeight, _gridNumObjects, surfaceIsWater _gridCenter]];
GVAR(currentGrid) = GVAR(currentGrid) + 1;
if (GVAR(currentGrid) >= _gridCells) exitWith {};
};

View File

@ -5,7 +5,9 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)];
[LSTRING(enabled_DisplayName), LSTRING(enabled_Description)],
_category,
false,
1
1,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_fnc_addSetting;
[
@ -45,5 +47,7 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)];
[LSTRING(simulationInterval_DisplayName), LSTRING(simulationInterval_Description)],
_category,
[0, 0.2, 0.05, 2],
1
1,
{[QGVAR(simulationInterval), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_fnc_addSetting;

View File

@ -46,7 +46,7 @@
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
<Italian>Balistica Avanzata</Italian>
<Japanese>アドバンスド弾道計算</Japanese>
<Japanese>高度な弾道計算</Japanese>
<Korean>고급 탄도학</Korean>
<Chinese>先進彈道系統</Chinese>
<Chinesesimp>进阶弹道系统</Chinesesimp>
@ -63,7 +63,7 @@
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
<Italian>Balistica Avanzata</Italian>
<Japanese>アドバンスド弾道計算を有効化</Japanese>
<Japanese>高度な弾道計算を有効化</Japanese>
<Korean>고급 탄도학</Korean>
<Chinese>先進彈道系統</Chinese>
<Chinesesimp>进阶弹道系统</Chinesesimp>
@ -80,7 +80,7 @@
<Hungarian>Engedélyezi a fejlett ballisztikát</Hungarian>
<Russian>Включает продвинутую баллистику</Russian>
<Italian>Abilita Balistica Avanzata</Italian>
<Japanese>アドバンスド弾道計算は高度な弾道計算処理を有効化します。</Japanese>
<Japanese>高度な弾道計算を有効化します。</Japanese>
<Korean>고급 탄도학을 적용합니다</Korean>
<Chinese>啟用先進彈道系統</Chinese>
<Chinesesimp>启用进阶弹道系统</Chinesesimp>
@ -280,7 +280,7 @@
<Hungarian>Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak</Hungarian>
<Russian>Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам</Russian>
<Italian>Definisce il raggio attorno al giocatore (in metri) entro il quale la Balistica Avanzata è applicata ai proiettili</Italian>
<Japanese>アドバンスド弾道計算の適用半径範囲 (プレイヤー中心、メートル単位) を定義します。</Japanese>
<Japanese>高度な弾道計算が飛翔体に適用される半径距離 (プレイヤー中心、メートル単位) を定義します。</Japanese>
<Korean>플레이어 주위의 발사체를 고급 탄도학으로 정의하는 범위를 정합니다(미터)</Korean>
<Chinese>以玩家的半徑距離(公尺)定義先進彈道系統啟用範圍</Chinese>
<Chinesesimp>定义玩家周围的半径(米),在这个半径内,进阶弹道系统会被启用</Chinesesimp>
@ -297,7 +297,7 @@
<Russian>Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел.</Russian>
<Spanish>Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada.</Spanish>
<Italian>Questo modulo abilita la simulazione della Balistica Avanzata - essa comporta che la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata.</Italian>
<Japanese>アドバンスド弾道計算のシミュレーションを有効化します。 弾道は気温・気圧・湿度・重力・弾薬の種類・発射する武器などの変化による影響を受けるようになります。</Japanese>
<Japanese>高度な弾道計算のシミュレーションを有効化します。 弾道は気温・気圧・湿度・重力・弾薬の種類・発射する武器などの変化による影響を受けるようになります。</Japanese>
<Korean>이 모듈은 고급 탄도학을 적용시킵니다 - 이는 발사체의 궤적이 기온, 대기압, 습도, 중력, 탄환의 종류와 어느 무기에서 발사되는지에 따라 영향을 받습니다.</Korean>
<Chinese>該模塊實現先進的彈道仿真 - 這意味著子彈的軌跡是由空氣溫度、大氣壓力、濕度、重力、彈藥類型以及射擊的武器所影響</Chinese>
<Chinesesimp>该模块实现增强的弹道模拟—子弹的轨迹由空气温度、大气压力、湿度、重力、弹药类型和射击的武器等变量所影响</Chinesesimp>

View File

@ -10,3 +10,4 @@ PREP(mainLoop);
PREP(moduleSettings);
PREP(removeDutyFactor);
PREP(renderDebugLines);
PREP(updateStaminaBar);

View File

@ -14,6 +14,8 @@ call FUNC(renderDebugLines);
["CBA_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
[QEGVAR(ui,hideHud), LINKFUNC(updateStaminaBar)] call CBA_fnc_addEventHandler;
["baseline", {
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
switch (stance ACE_player) do {

View File

@ -140,7 +140,7 @@ systemChat format ["---- velocity %1 - respiratoryRate: %2 ----", (vectorMagnitu
[ACE_player, _perceivedFatigue, GVAR(anReserve) == 0, _fwdAngle, _sideAngle] call FUNC(handleEffects);
if (GVAR(enableStaminaBar)) then {
if (GVAR(enableStaminaBarRealized)) then {
[GVAR(anReserve) / AN_MAXRESERVE] call FUNC(handleStaminaBar);
};

View File

@ -0,0 +1,25 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Updates the stamina bar state
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_advanced_fatigue_fnc_updateStaminaBar
*
* Public: No
*/
GVAR(enableStaminaBarRealized) = GVAR(enabled) && GVAR(enableStaminaBar) && {!(missionNamespace getVariable [QEGVAR(ui,hideHud), false])};
TRACE_1("updateStaminaBar",GVAR(enableStaminaBarRealized));
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
if (isNull _staminaBarContainer) exitWith {};
_staminaBarContainer ctrlSetFade ([1, 0] select GVAR(enableStaminaBarRealized));
_staminaBarContainer ctrlCommit 0;

View File

@ -6,12 +6,7 @@
true,
1,
{
if (!_this) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
call FUNC(updateStaminaBar);
[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)
},
true // Needs mission restart
@ -24,13 +19,7 @@
LSTRING(DisplayName),
true,
1,
{
if (!_this) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
}
{call FUNC(updateStaminaBar)}
] call CBA_fnc_addSetting;
[

View File

@ -7,7 +7,7 @@
<German>ACE Erweiterte Ausdauer</German>
<Chinese>ACE 進階疲勞</Chinese>
<Chinesesimp>ACE 进阶体力</Chinesesimp>
<Japanese>ACE アドバンスド疲労</Japanese>
<Japanese>ACE 高度な疲労</Japanese>
<Italian>ACE Fatica Avanzata</Italian>
<Korean>ACE 고급 피로도</Korean>
<French>ACE Fatigue avancée</French>
@ -173,7 +173,7 @@
<English>Enables/disables Advanced Fatigue.</English>
<Spanish>Activa/desactiva la fatiga avanzada</Spanish>
<German>Aktiviert/deaktiviert Advanced Fatigue.</German>
<Japanese>アドバンスド疲労は高度な疲労管理システムを有効化します。</Japanese>
<Japanese>高度な疲労を有効/無効化します。</Japanese>
<Polish>Włącza/wyłącza zaawansowaną wytrzymałość</Polish>
<Korean>고급 피로도 활성화/비활성화</Korean>
<French>Active/Désactive la fatigue avancée.</French>

View File

@ -5,7 +5,7 @@
<English>Advanced Throwing</English>
<Spanish>Lanzamiento Avanzado</Spanish>
<Russian>Улучшенный бросок гранат</Russian>
<Japanese>アドバンスド投擲</Japanese>
<Japanese>高度な投擲</Japanese>
<Polish>Zaawansowane rzucanie</Polish>
<German>Erweitertes Wurfsystem</German>
<Korean>고급 투척</Korean>
@ -21,7 +21,7 @@
<English>Allows changing advanced throwing behaviour.</English>
<Spanish>Permite modificar el comportamiento del lanzamiento avanzado</Spanish>
<Russian>Позволяет настраивать поведение улучшенного броска гранат.</Russian>
<Japanese>アドバンスド投擲は投擲の高度な動作挙動を変更可能にします。</Japanese>
<Japanese>高度な投擲挙動への変更を可能にします。</Japanese>
<Polish>Zezwala na zmianę zachowania zaawansowanego trybu rzucania.</Polish>
<German>Erlaubt es, das Verhalten des erweiterten Wurfsystems zu ändern.</German>
<Korean>고급 투척 행위를 허가합니다</Korean>
@ -36,7 +36,7 @@
<English>Enable Advanced Throwing</English>
<Spanish>Activar Lanzamiento Avanzado</Spanish>
<Russian>Вкл. улучшенный бросок</Russian>
<Japanese>アドバンスド投擲を有効化</Japanese>
<Japanese>高度な投擲を有効化</Japanese>
<Polish>Aktywuj zaawansowane rzucanie</Polish>
<German>Aktiviere erweitertes Wurfsystem</German>
<Korean>고급 투척 활성화 </Korean>
@ -52,7 +52,7 @@
<English>Enables advanced throwing system.</English>
<Spanish>Activa el Lanzamiento Avanzado</Spanish>
<Russian>Включает систему улучшенного броска.</Russian>
<Japanese>アドバンスド投擲は高度な投擲システムを有効化します。</Japanese>
<Japanese>高度な投擲システムを有効化します。</Japanese>
<Polish>Aktywuje system zaawansowanego rzucania.</Polish>
<German>Aktiviert das erweiterte Wurfsystem.</German>
<Korean>고급 투척을 활성화 합니다</Korean>

View File

@ -182,6 +182,7 @@
<Italian>Distanza di seguimento</Italian>
<German>Folge-Entfernung</German>
<Korean>따라가는 거리</Korean>
<French>Distance de suivi</French>
<Japanese>追跡距離</Japanese>
</Key>
<Key ID="STR_ACE_Aircraft_DroneFollowHint">
@ -189,6 +190,7 @@
<Italian>Seguendo unità entro %1m</Italian>
<German>Folgt Einheit bis zu %1m</German>
<Korean>%1m 이내로 유닛을 따라갑니다</Korean>
<French>Suivre l'unité jusqu'à %1m</French>
<Japanese>%1m 間隔で 目標を追跡します</Japanese>
</Key>
</Package>

View File

@ -78,6 +78,7 @@ PREP(removeStat);
PREP(removeVirtualItems);
PREP(renameDefaultLoadout);
PREP(replaceUniqueItemsLoadout);
PREP(saveLoadout);
PREP(scanConfig);
PREP(showItem);
PREP(sortPanel);

View File

@ -85,10 +85,10 @@ private _insigniaCondition = toString {
// Ref fnc_addListBoxItem, 0/nil = configFile, 1 = campaignConfigFile, 2 = missionConfigFile
{
GVAR(insigniaCache) set [_x, 1];
GVAR(insigniaCache) set [configName _x, 1];
} forEach (_insigniaCondition configClasses (campaignConfigFile >> "CfgUnitInsignia"));
{
GVAR(insigniaCache) set [_x, 2];
GVAR(insigniaCache) set [configName _x, 2];
} forEach (_insigniaCondition configClasses (missionConfigFile >> "CfgUnitInsignia"));
ADDON = true;

View File

@ -26,28 +26,27 @@ if (GVAR(shiftState)) then {
switch (true) do {
// Beginning
case (_index == -1): {
"ace_clipboard" callExtension (format ["[%1", endl]);
"ace" callExtension ["clipboard:append", [format ["[%1", endl]]];
};
// End
case (_index == _listLength): {
"ace_clipboard" callExtension "];";
"ace" callExtension ["clipboard:append", ["];"]];
};
// Rest
default {
"ace_clipboard" callExtension ([" ", str (GVAR(defaultLoadoutsList) select _index), [",", ""] select (_index == _listLength - 1), endl] joinString "");
"ace" callExtension ["clipboard:append", [[" ", str (GVAR(defaultLoadoutsList) select _index), [",", ""] select (_index == _listLength - 1), endl] joinString ""]];
};
};
};
"ace_clipboard" callExtension "--COMPLETE--";
"ace" callExtension ["clipboard:complete", []];
[_display, LLSTRING(exportDefault)] call FUNC(message);
} else {
// Export singular loadout
private _export = str (GVAR(center) call CBA_fnc_getLoadout);
"ace_clipboard" callExtension (_export + ";");
"ace_clipboard" callExtension "--COMPLETE--";
"ace" callExtension ["clipboard:append", [_export]];
"ace" callExtension ["clipboard:complete", []];
[_display, LLSTRING(exportCurrent)] call FUNC(message);
};

View File

@ -16,7 +16,13 @@
params ["_display"];
// Can be either a singular loadout or an array of loadouts
private _extendedLoadout = call compile copyFromClipboard;
private _extendedLoadout = if (isMultiplayer) then {
("ace" callExtension ["clipboard:loadout", []]) params ["_loadout", "_code"];
if (_code != 0) exitWith {};
parseSimpleArray _loadout
} else {
call compile copyFromClipboard
};
// If error, exit
if (isNil "_extendedLoadout" || {!(_extendedLoadout isEqualType [])}) exitWith {

View File

@ -138,14 +138,6 @@ _actionsBoxCtrl ctrlSetPosition [
];
_actionsBoxCtrl ctrlCommit 0;
// Disable import in MP
if (isMultiplayer) then {
private _importButtonCtrl = _display displayCtrl IDC_buttonImport;
_importButtonCtrl ctrlEnable false;
_importButtonCtrl ctrlSetFade 0.6;
_importButtonCtrl ctrlCommit 0;
};
//--------------- Camera prep
cutText ["", "PLAIN"];
showCommandingMenu "";

View File

@ -94,8 +94,8 @@ if (!isNull _loadoutsDisplay) then {
};
} params ["_className"];
"ace_clipboard" callExtension (_className + ";");
"ace_clipboard" callExtension "--COMPLETE--";
"ace" callExtension ["clipboard:append", [_className]];
"ace" callExtension ["clipboard:complete", []];
[_display, LLSTRING(exportedClassnameText)] call FUNC(message);
} else {

View File

@ -0,0 +1,37 @@
#include "..\script_component.hpp"
/*
* Author: DartRuffian
* Saves a given loadout to the client's profile.
*
* Arguments:
* 0: Name of loadout <STRING>
* 1: CBA extended loadout or getUnitLoadout array <ARRAY>
* 2: Replace existing loadout <BOOL> (default: false)
*
* Return Value:
* True if loadout was saved, otherwise false <BOOL>
*
* Example:
* ["Current Loadout", getUnitLoadout ACE_player] call ace_arsenal_fnc_saveLoadout
*
* Public: Yes
*/
params [["_name", "", [""]], ["_loadout", [], [[]]], ["_replaceExisting", false, [false]]];
if (_name == "" || {_loadout isEqualTo []}) exitWith { false };
private _loadouts = profileNamespace getVariable [QGVAR(saved_loadouts), []];
private _loadoutIndex = _loadouts findIf {(_x#0) == _name};
// If a loadout with same name already exists and no overwriting enabled, quit
if (!_replaceExisting && {_loadoutIndex != -1}) exitWith { false };
if (_loadoutIndex == -1) then {
_loadouts pushBack [_name, _loadout];
} else {
_loadouts set [_loadoutIndex, [_name, _loadout]];
};
profileNamespace setVariable [QGVAR(saved_loadouts), _loadouts];
true

View File

@ -14,4 +14,9 @@
params ["_config"];
(modParams [_config call EFUNC(common,getAddon), ["name"]]) param [0, ""]
private _addon = _config call EFUNC(common,getAddon);
// Calling modParams with "" prints 'ModParams - Undefined or empty mod directory' in RPT
if (_addon == "") exitWith {""};
(modParams [_addon, ["name"]]) param [0, ""]

View File

@ -1,8 +1,14 @@
TRACE_1("prep",_this);
PREP(adjustFire);
PREP(calculateElevation);
PREP(calculateMaxAngle);
PREP(calculateMuzzleVelocity);
PREP(calculateSolution);
PREP(firedEH);
PREP(interactMenuOpened);
PREP(rangeTableOpen);
PREP(rangeTableUpdate);
PREP(simulateShot);
PREP(turretChanged);
PREP(turretPFEH);

View File

@ -4,10 +4,13 @@
TRACE_2("CBA_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer));
if (hasInterface) then {
// Add hud overlay for actuall azimuth and elevation:
// Add hud overlay for actual azimuth and elevation:
GVAR(pfID) = -1;
["turret", LINKFUNC(turretChanged), true] call CBA_fnc_addPlayerEventHandler;
// Handles being teleported from one vehicle to another
["vehicle", {[_this select 0, (_this select 1) unitTurret (_this select 0)] call FUNC(turretChanged)}] call CBA_fnc_addPlayerEventHandler;
// Add ability to dynamically open rangetables:
["ace_interactMenuOpened", LINKFUNC(interactMenuOpened)] call CBA_fnc_addEventHandler;
};
@ -30,6 +33,33 @@
};
}] call CBA_fnc_addEventHandler;
addMissionEventHandler ["ExtensionCallback", {
params ["_name", "_function", "_data"];
if (_name == "ace:artillery" && {_function == "calculate_table"}) then {
(parseSimpleArray _data) params ["_line", "_data"];
if (_data isEqualType []) then {
GVAR(tableData) set [_line, _data];
};
GVAR(tableSizeReceived) = GVAR(tableSizeReceived) + 1;
if (GVAR(tableSizeReceived) == GVAR(tableSizeActual)) then {
private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull];
private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE;
if (isNull _dialog) exitWith {true};
for "_i" from 0 to GVAR(tableSizeActual) do {
private _row = GVAR(tableData) getOrDefault [_i, []];
if (count _row == 12) then {
_ctrlRangeTable lnbAddRow _row;
};
};
private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull];
private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE;
if (isNull _dialog) exitWith {TRACE_1("dialog closed",_this);};
_ctrlRangeTable lnbAddRow ["", "", "", "", "", "", "", "", "", "", ""];
TRACE_1("table filled",_ctrlRangeTable);
};
};
}];
#ifdef DEBUG_MODE_FULL
#include "dev\showShotInfo.inc.sqf"
#include "dev\checkConfigs.inc.sqf"

View File

@ -14,13 +14,6 @@ class CfgPatches {
};
};
class ACE_Extensions {
class ace_artillerytables {
windows = 1;
client = 1;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,41 @@
#include "..\script_component.hpp"
/*
* Author: LorenLuke
* Adjusts a target point north and east, and recalculates a solution in air based on atmospheric conditions
*
* Arguments:
* 0: Gun Position ASL <ARRAY>
* 1: Target Position ASL <ARRAY>
* 2: Adjustment to the East (negative is West); meters <NUMBER>
* 3: Adjustment to the North (negative is South); meters <NUMBER>
* 4: Adjustment vertically (negative is Down); meters <NUMBER>
* 5: Muzzle velocity; meters/second <NUMBER>
* 6: Air Friction; meters^-1 (m/s^2)/(m^2/s^2) <NUMBER>
* 7: High angle boolean (true is high angle) <BOOL>
* 8: Temperature; degrees Celsius <NUMBER>
* 9: Atmospheric Density; kg/(meters^3) <NUMBER>
* 10: Direction of wind; degrees clockwise from north <NUMBER>
* 11: Speed of wind; meters/second <NUMBER>
*
* Return Value:
* Array of returns <ARRAY>
* 0: Angle of shot; Milliradians <NUMBER>
* 1: Angle adjust left or right; Milliradians <NUMBER>
* 2: Time of flight; seconds <NUMBER>
*
* Example:
* [getposASL vehicle player, targetPos, 20, 50, 0, 200, -0.0001, true, 15, 1.225, 225, 5] call ace_artilleryTables_fnc_adjustFire
*
* Public: No
*/
params ["_gunPos", "_targetPos", "_adjustEast", "_adjustNorth", "_adjustUp", "_muzzleVelocity", "_airFriction", ["_highAngle", true], ["_temperature", 15], ["_airDensity", 1.225], ["_windDir", 0], ["_windSpeed", 0]];
//DEFAULT_AIR_FRICTION == -0.00006
//MK6_82mm_AIR_FRICTION == -0.0001
private _resultPos = [_adjustEast + _targetPos select 0, _adjustNorth + _targetPos select 1, _adjustUp + _targetPos select 2];
private _returns = ["_gunPos", "_resultPos", "_muzzleVelocity", "_highAngle", "_airFriction", "_temperature", "_airDensity", "_windDir", "_windSpeed"] call FUNC(calculateSolution);
_returns

View File

@ -0,0 +1,71 @@
#include "..\script_component.hpp"
/*
* Author: LorenLuke
* Adjusts a target point north and east, and recalculates a solution in air based on atmospheric conditions
*
* Arguments:
* 0: Distance to Target; meters <NUMBER>
* 1: Height of target; meters, relative to gun altitude (positive means target higher than gun) <NUMBER>
* 2: Muzzle velocity; meters/second <NUMBER>
* 3: High angle boolean (true is high angle) <BOOL>
* 4: Air Friction; meters^-1 [(m/s^2)/(m^2/s^2)] <NUMBER>
* 5: Temperature; degrees Celsius <NUMBER>
* 6: Atmospheric Density; kg/(meters^3) <NUMBER>
* 7: Cross wind; meters/second (negative is Right to Left) <NUMBER>
* 8: Tail wind; meters/second (negative is flying against the wind) <NUMBER>
*
* Return Value:
* Array of returns <ARRAY>
* 0: Angle of shot; Milliradians <NUMBER>
* 1: Angle adjust left or right; Milliradians <NUMBER>
* 2: Time of flight; seconds <NUMBER>
*
* Example:
* [myPos, 0, 200, true, -0.0001, 15, 1.225, 5, -10] call ace_artilleryTables_fnc_calculateElevation
*
* Public: No
*/
params ["_targetDistance", "_targetHeight", "_muzzleVelocity", ["_highArc", true], ["_airFriction", 0], ["_temperature", 15], ["_airDensity", 1.225], ["_crossWind", 0], ["_tailWind", 0]];
//DEFAULT_AIR_FRICTION == -0.00006
//MK6_82mm_AIR_FRICTION == -0.0001
if (_airFriction != 0) then {
_muzzleVelocity = [_muzzleVelocity, _temperature, _atmosphericDensity] call FUNC(calculateMuzzleVelocity);
};
private _maxResults = [_muzzleVelocity, _airFriction] call FUNC(calculateMaxAngle);
private _testShot = [_maxResults select 0, _targetHeight, _muzzleVelocity, _airFriction, _crossWind, _tailWind, _temperature, _airDensity] call FUNC(simulateShot);
if (_testShot select 1 < _targetDistance) exitWith {
//No way we can hit it so don't bother;
[-1, -1, -1]
};
private _useDistance = _targetDistance;
private _useAngle = 0;
private _resultDistance = 0;
private _xDeviation = 0;
private _tof = 0;
while {abs(_resultDistance - _targetDistance) > 0.5} do {
TRACE_7("callExtension:artillery:simulate_find_solution",_useDistance,_targetHeight,_muzzleVelocity,_airFriction,_higharc,DEFAULT_MIN_ELEV,DEFAULT_MAX_ELEV);
(
"ace" callExtension ["artillery:simulate_find_solution", [_useDistance, _targetHeight, _muzzleVelocity, _airFriction, _higharc, DEFAULT_MIN_ELEV, DEFAULT_MAX_ELEV]]
) params ["_data", "_code"];
TRACE_1("",_code);
(parseSimpleArray _data) params ["", "_useAngleRad", ""];
_useAngle = deg(_useAngleRad) * DEGTOMILS;
private _shotResults = [_useAngle, _targetHeight, _muzzleVelocity, _airFriction, _crossWind, _tailWind, _temperature, _airDensity] call FUNC(simulateShot);
_xDeviation = _shotResults select 0;
_resultDistance = _shotResults select 1;
_tof = _shotResults select 2;
_useDistance = (2 * _targetDistance) - _resultDistance;
};
private _angleOffsetDeg = _xDeviation atan2 _resultDistance;
private _angleOffset = _angleOffsetDeg * DEGTOMILS;
[_useAngle, -_angleOffset, _tof]

View File

@ -0,0 +1,31 @@
#include "..\script_component.hpp"
/*
* Author: LorenLuke
* Calculates the best possible angle to shoot farthest based on muzzle velocity and air friction.
*
* Arguments:
* 0: Initial Muzzle Velocity; meters/second <NUMBER>
* 1: Air Friction; meters^-1 (m/s^2)/(m^2/s^2) <NUMBER>
*
* Return Values: <ARRAY>
* 1: Best Angle; Milliradians <NUMBER>
* 2: Furthest Distance; Meters <NUMBER>
*
* Example:
* [200, -0.00006] call ace_artilleryTables_fnc_calculateMaxAngle
*
* Public: No
*/
params ["_muzzleVelocity", "_airFriction"];
TRACE_2("callExtension:artillery:find_max_angle",_muzzleVelocity,_airFriction);
(
"ace" callExtension ["artillery:find_max_angle", [_muzzleVelocity, _airFriction]]
) params ["_data", "_code"];
TRACE_1("",_code);
(parseSimpleArray _data) params ["_bestAngle", "_bestDistance", ""];
_returns = [deg _bestAngle * 6400 / 360, _bestDistance];
_returns params ["_bestAngle", "_bestDistance"];
_returns

View File

@ -0,0 +1,28 @@
#include "..\script_component.hpp"
/*
* Author: LorenLuke
* Calculates the muzzleVelocity change with advanced calculations.
*
* Arguments:
* 0: Initial Muzzle velocity; meters/second <NUMBER>
* 1: Temperature; degrees Celsius <NUMBER>
* 2: Atmospheric Density; kg/(meters^3) <NUMBER>
*
* Return Value:
* Adjusted Muzzle Velocity; Meters <NUMBER>
*
* Example:
* [200, 15, 1.225] call ace_artilleryTables_fnc_calculateMuzzleVelocity
*
* Public: No
*/
params ["_muzzleVelocity", "_temperature", "_airDensity"];
// Calculate air density
private _relativeDensity = _airDensity / 1.225;
private _newMuzzleVelocityCoefficient = (((_temperature + 273.13) / 288.13 - 1) / 40 + 1);
private _newMuzzleVelocity = _muzzleVelocity * _newMuzzleVelocityCoefficient;
_newMuzzleVelocity

View File

@ -0,0 +1,44 @@
#include "..\script_component.hpp"
/*
* Author: LorenLuke
* Provides fire angle and deflection solutions on a target of set distance and height, including accounting for drag and atmospheric wind conditions.
*
* Arguments:
* 0: Gun Position ASL; <ARRAY>
* 1: Target Position ASL; <ARRAY>
* 2: Muzzle Velocity; meters/second <NUMBER>
* 3: High angle boolean (true is high angle) <BOOL>
* 4: Air Friction; meters^-1 [(m/s^2)/(m^2/s^2)] <NUMBER>
* 5: Temperature; degrees Celsius <NUMBER>
* 6: Atmospheric Density; kg/(meters^3) <NUMBER>
* 7: Direction of wind; degrees clockwise from north <NUMBER>
* 8: Speed of wind; meters/second <NUMBER>
*
* Return Value:
* array of returns <ARRAY>
* 0: Angle of shot; Milliradians <NUMBER>
* 1: Angle adjust left or right; Milliradians <NUMBER>
* 2: Time of flight; seconds <NUMBER>
*
* Example:
* [myPos, targetPos, 200, true, -0.0001, 15, 1.225, 225, 5] call ace_artilleryTables_fnc_calculateSolution
*
* Public: No
*/
params ["_ownPos", "_targetPos", "_muzzleVelocity", ["_highAngle", true], ["_airFriction", 0], ["_temperature", 15], ["_airDensity", 1.225], ["_windDir", 0], ["_windSpeed", 0]];
//DEFAULT_AIR_FRICTION == -0.00006
//MK6_82mm_AIR_FRICTION == -0.0001
private _relPos = _targetPos vectorDiff _ownPos;
private _targetDir = (_relpos select 0) atan2 (_relPos select 1);
private _targetDist = sqrt( (_relPos select 0)^2 + (_relpos select 1)^2 );
private _heightDif = _relPos select 2;
private _crossWind = sin(_targetDir - _windDir) * _windSpeed;
private _tailWind = -cos(_targetDir - _windDir) * _windSpeed;
private _solutionReturns = [_targetDist, _heightDif, _muzzleVelocity, _highAngle, _airFriction, _crossWind, _tailWind, _temperature, _airDensity] call FUNC(calculateElevation);
_solutionReturns

View File

@ -34,7 +34,7 @@ TRACE_2("created dialog",_dialog,_ctrlChargeList);
// Get Mags:
private _mags = [_weaponName] call CBA_fnc_compatibleMagazines;
if (_mags isEqualTo []) exitWith {WARNING_1("No Mags",_weaponName);};
if (_mags isEqualTo []) exitWith {WARNING_1("No Mags %1",_weaponName);};
private _magCfg = configFile >> "CfgMagazines";
private _magParamsArray = [];
_mags = _mags apply {

View File

@ -34,31 +34,12 @@ _ctrlElevationLow ctrlSetTextColor ([[1,1,1,1],[0.25,0.25,0.25,1]] select GVAR(l
lnbClear _ctrlRangeTable;
// Call extension with current data and start workers
TRACE_5("callExtension:start",_muzzleVelocity,_airFriction,_elevMin,_elevMax,GVAR(lastElevationMode));
private _ret = "ace_artillerytables" callExtension ["start", [_muzzleVelocity,_airFriction,_elevMin,_elevMax,GVAR(lastElevationMode)]];
TRACE_1("",_ret);
TRACE_5("callExtension:artillery:calculate_table",_muzzleVelocity,_airFriction,_elevMin,_elevMax,GVAR(lastElevationMode));
(
"ace" callExtension ["artillery:calculate_table", [_muzzleVelocity, _airFriction, _elevMin, _elevMax, GVAR(lastElevationMode)]]
) params ["_data", "_code"];
TRACE_1("",_code);
// Non-blocking read data out of extension as it becomes availiable
[{
private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull];
private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE;
if (isNull _dialog) exitWith {true};
private _status = 1; // 1 = data on line, 2 - data not ready, 3 - done
while {_status == 1} do {
private _ret = ("ace_artillerytables" callExtension ["getline", []]);
// TRACE_1("callExtension:getline",_ret);
_status = _ret select 1;
if (_status == 1) then { _ctrlRangeTable lnbAddRow parseSimpleArray (_ret select 0) };
};
(_status == 3) // exit loop when all data read
}, {
// put dummy line at end because scrolling is problematic and can't see last line
private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull];
private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE;
if (isNull _dialog) exitWith {TRACE_1("dialog closed",_this);};
_ctrlRangeTable lnbAddRow ["", "", "", "", "", "", "", "", "", "", ""];
TRACE_1("table filled",_ctrlRangeTable);
}, []] call CBA_fnc_waitUntilAndExecute;
GVAR(tableData) = createHashMap;
GVAR(tableSizeActual) = (parseSimpleArray _data) select 1;
GVAR(tableSizeReceived) = 0;

View File

@ -0,0 +1,47 @@
#include "..\script_component.hpp"
/*
* Author: LorenLuke
* Simulates an indirect shot on a target of known height with given drag, wind, and atmospheric conditions
*
* Arguments:
* 0: Gun Elevation Angle; milliradians <NUMBER>
* 1: Relative Target Height; meters, relative to gun altitude (positive means target higher than gun) <NUMBER>
* 2: Muzzle Velocity; meters/second <NUMBER>
* 3: Air Friction; meters^-1 [(m/s^2)/(m^2/s^2)] <NUMBER>
* 4: Cross wind; meters/second (negative is Right to Left) <NUMBER>
* 5: Tail wind; meters/second (negative is flying against the wind) <NUMBER>
* 6: Temperature; degrees Celsius <NUMBER>
* 7: Atmospheric Density; kg/(meters^3) <NUMBER>
*
* Return Value:
* array of returns <ARRAY>
* 0: Deflection Adjustment To Hit; Milliradians (negative is Left) <NUMBER>
* 1: Distance of Shot; meters <NUMBER>
* 2: Time of Flight; seconds <NUMBER>
*
* Example:
* [900, 10, 200, -0.0001, 4, 0, 15, 1.225] call ace_artilleryTables_fnc_simulateShot
*
* Public: No
*/
params ["_angle", "_targetHeight", "_muzzleVelocity", ["_airFriction", 0], ["_crossWind", 0], ["_tailWind", 0], ["_temperature", 15], ["_atmosphericDensity", 1.225]];
//DEFAULT_AIR_FRICTION == -0.00006
//MK6_82mm_AIR_FRICTION == -0.0001
if (_airFriction != 0) then {
_muzzleVelocity = [_muzzleVelocity, _temperature, _atmosphericDensity] call FUNC(calculateMuzzleVelocity);
};
private _atmosphericDensityRatio = _atmosphericDensity / 1.225;
private _radAngle = rad(_angle / DEGTOMILS);
TRACE_8("callExtension:artillery:simulate_shot",_radAngle,_targetHeight,_muzzleVelocity,_airFriction,_crossWind,_tailWind,_temperature,_atmosphericDensityRatio);
(
"ace" callExtension ["artillery:simulate_shot", [_radAngle, _targetHeight, _muzzleVelocity, _airFriction, _crossWind, _tailWind, _temperature, _atmosphericDensityRatio]]
) params ["_data", "_code"];
TRACE_1("",_code);
//[xDeviation, yDistance, timeOfFlight]
parseSimpleArray _data

View File

@ -30,7 +30,10 @@ if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
};
private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000;
if (cameraView != "GUNNER") exitWith { // need to be in gunner mode, so we can check where the optics are aiming at
// Need to be in gunner mode, so we can check where the optics are aiming at
// However, if there are no optics, ignore the above
if (!_invalidGunnerMem && {cameraView != "GUNNER"}) exitWith {
_ctrlGroup ctrlShow false;
};
_ctrlGroup ctrlShow true;

View File

@ -12,6 +12,10 @@
// This is a good fit for most large artillery, but a little low for lighter mortars
#define DEFAULT_AIR_FRICTION -0.00006
#define DEFAULT_MIN_ELEV 0
// 90 degrees in radians
#define DEFAULT_MAX_ELEV 1.5708
#define DEGTOMILS 17.7777778
#define IDC_MODECONTROLGROUP 1000

View File

@ -6,7 +6,7 @@ class CfgPatches {
units[] = {"ACE_Item_ATragMX"};
weapons[] = {"ACE_ATragMX"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_Advanced_Ballistics", "ACE_common", "ACE_weather"};
requiredAddons[] = {"ace_advanced_ballistics", "ace_common", "ace_weather"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);

View File

@ -30,9 +30,16 @@ while {_velocity > _thresholdVelocity} do {
private _bc = GVAR(targetSolutionInput) select 14;
private _dragModel = GVAR(targetSolutionInput) select 15;
private _temperature = GVAR(targetSolutionInput) select 5;
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _velocity, _temperature]));
_distance = _distance + _velocity * __DELTA_T;
_velocity = _velocity - (_drag * __DELTA_T);
private _data = (
"ace" callExtension ["ballistics:retard", [
_dragModel,
_bc,
_velocity,
_temperature
]]
) select 0;
_velocity = _velocity - ((parseNumber _data) * __DELTA_T);
};
_distance

View File

@ -90,7 +90,14 @@ private _wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windD
private _wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0];
private _windDrift = 0;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel]));
_bc = parseNumber (("ace" callExtension ["ballistics:atmospheric_correction", [
_bc,
_temperature,
_barometricPressure,
_relativeHumidity,
_atmosphereModel
]]
) select 0);
};
private _eoetvoesMultiplier = 0;
@ -113,8 +120,15 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_trueSpeed = vectorMagnitude _trueVelocity;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _trueSpeed, _temperature]));
_bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag);
private _data = (
"ace" callExtension ["ballistics:retard", [
_dragModel,
_bc,
_trueSpeed,
_temperature
]]
) select 0;
_bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * (parseNumber _data));
} else {
_bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction);
};

View File

@ -36,11 +36,25 @@ if (!GVAR(atmosphereModeTBH)) then {
};
private _scopeBaseAngle = if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight];
(parseNumber _zeroAngle)
parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [
_zeroRange,
_muzzleVelocity,
_airFriction,
_boreHeight
]]) select 0)
} else {
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel];
(parseNumber _zeroAngle)
parseNumber (("ace" callExtension ["ballistics:zero_advanced", [
_zeroRange,
_muzzleVelocity,
_airFriction,
_boreHeight,
_temperature,
_barometricPressure,
_relativeHumidity,
_bc,
_dragModel,
_atmosphereModel
]]) select 0)
};
GVAR(workingMemory) set [2, _zeroRange];

View File

@ -50,8 +50,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
} else {
GVAR(placeAction) = PLACE_WAITING;
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
[_unit, "blockThrow", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame;
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
@ -88,8 +88,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
[_idPFH] call CBA_fnc_removePerFrameHandler;
[_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set);
[_unit, "blockThrow", "ACE_Attach", false] call EFUNC(common,statusEffect_set);
[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
[] call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
_unit removeAction _actionID;

View File

@ -40,12 +40,12 @@ if (_respawn > 3) then {
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
[_unit, false] call FUNC(setHandcuffed);
};
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", QGVAR(handcuffed), false] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrendered);
};
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", QGVAR(surrendered), false] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isEscorting), false]) then {
_unit setVariable [QGVAR(isEscorting), false, true];

View File

@ -41,8 +41,8 @@ if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith
if (_state) then {
_unit setVariable [QGVAR(isHandcuffed), true, true];
[_unit, "setCaptive", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", QGVAR(handcuffed), true] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(handcuffed), true] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
[_unit, false] call FUNC(setSurrendered);
@ -82,8 +82,8 @@ if (_state) then {
}, [_unit], 0.01] call CBA_fnc_waitAndExecute;
} else {
_unit setVariable [QGVAR(isHandcuffed), false, true];
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", QGVAR(handcuffed), false] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(handcuffed), false] call EFUNC(common,statusEffect_set);
//remove AnimChanged EH
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];

View File

@ -44,8 +44,8 @@ if (_state) then {
_unit setVariable [QGVAR(isSurrendering), true, true];
[_unit, "setCaptive", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", QGVAR(surrendered), true] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(surrendered), true] call EFUNC(common,statusEffect_set);
if (_unit == ACE_player) then {
["captive", [false, false, false, false, false, false, false, false, false, true]] call EFUNC(common,showHud);
@ -71,8 +71,8 @@ if (_state) then {
}, [_unit], 0.01] call CBA_fnc_waitAndExecute;
} else {
_unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", QGVAR(surrendered), false] call EFUNC(common,statusEffect_set);
[_unit, "blockRadio", QGVAR(surrendered), false] call EFUNC(common,statusEffect_set);
//remove AnimChanged EH
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];

View File

@ -158,6 +158,7 @@
<Japanese>目隠しを外す</Japanese>
<Russian>Снять повязку с глаз</Russian>
<Spanish>Quitar vendas de los ojos</Spanish>
<Portuguese>Remover a venda</Portuguese>
</Key>
<Key ID="STR_ACE_Captives_CableTie">
<English>Cable Tie</English>

View File

@ -62,6 +62,17 @@ if (_item isEqualType objNull) then {
// Some objects below water will take damage over time, eventually becoming "water logged" and unfixable (because of negative z attach)
[_item, "blockDamage", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
// Prevent UAVs from firing
private _UAVCrew = _item call EFUNC(common,getVehicleUAVCrew);
if (_UAVCrew isNotEqualTo []) then {
{
[_x, true] call EFUNC(common,disableAiUAV);
} forEach _UAVCrew;
_item setVariable [QGVAR(isUAV), _UAVCrew, true];
};
};
// Invoke listenable event

View File

@ -100,14 +100,26 @@ if (_item isEqualType objNull) then {
// Create smoke effect when crate landed
[{
(_this select 0) params ["_object"];
params ["_object", "_pfhID"];
if (isNull _object) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
_pfhID call CBA_fnc_removePerFrameHandler;
};
if (getPos _object select 2 < 1) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
_pfhID call CBA_fnc_removePerFrameHandler;
// Reenable UAV crew
private _UAVCrew = _object getVariable [QGVAR(isUAV), []];
if (_UAVCrew isNotEqualTo []) then {
// Reenable AI
{
[_x, false] call EFUNC(common,disableAiUAV);
} forEach _UAVCrew;
_object setVariable [QGVAR(isUAV), nil, true];
};
if ((GVAR(disableParadropEffectsClasstypes) findIf {_object isKindOf _x}) == -1) then {
private _smoke = "SmokeshellYellow" createVehicle [0, 0, 0];

View File

@ -96,6 +96,18 @@ if (_object isEqualType objNull) then {
[QEGVAR(zeus,addObjects), [[_object], _objectCurators]] call CBA_fnc_serverEvent;
};
// Reenable UAV crew
private _UAVCrew = _object getVariable [QGVAR(isUAV), []];
if (_UAVCrew isNotEqualTo []) then {
// Reenable AI
{
[_x, false] call EFUNC(common,disableAiUAV);
} forEach _UAVCrew;
_object setVariable [QGVAR(isUAV), nil, true];
};
} else {
_object = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"];

View File

@ -3,6 +3,7 @@
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {"ACE_Box_Chemlights","ACE_Item_Chemlight_Shield","ACE_Item_Chemlight_Shield_Green","ACE_Item_Chemlight_Shield_Red","ACE_Item_Chemlight_Shield_Blue","ACE_Item_Chemlight_Shield_Yellow","ACE_Item_Chemlight_Shield_Orange","ACE_Item_Chemlight_Shield_White","ModuleChemlightOrange","ModuleChemlightWhite","ModuleChemlightHiRed","ModuleChemlightHiYellow","ModuleChemlightHiWhite","ModuleChemlightHiBlue","ModuleChemlightHiGreen","ModuleChemlightUltraHiOrange"};
weapons[] = {"ACE_Chemlight_Shield", "ACE_Chemlight_Shield_Green","ACE_Chemlight_Shield_Red","ACE_Chemlight_Shield_Blue","ACE_Chemlight_Shield_Yellow","ACE_Chemlight_Shield_Orange","ACE_Chemlight_Shield_White"};
requiredVersion = REQUIRED_VERSION;

View File

@ -1,4 +1,5 @@
#define COMPONENT chemlights
#define COMPONENT_BEAUTIFIED Chemlights
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL

View File

@ -43,6 +43,7 @@ PREP(deviceKeyFindValidIndex);
PREP(deviceKeyRegisterNew);
PREP(deprecateComponent);
PREP(disableAI);
PREP(disableAiUAV);
PREP(disableUserInput);
PREP(displayIcon);
PREP(displayText);
@ -177,6 +178,7 @@ PREP(setupLocalUnitsHandler);
PREP(setVariableJIP);
PREP(setVariablePublic);
PREP(setVolume);
PREP(setWeaponLightLaserState);
PREP(showHud);
PREP(statusEffect_addType);
PREP(statusEffect_get);
@ -189,6 +191,7 @@ PREP(stopGesture);
PREP(stringCompare);
PREP(stringToColoredText);
PREP(swayLoop);
PREP(switchAttachmentMode);
PREP(switchPersistentLaser);
PREP(switchToGroupSide);
PREP(throttledPublicVariable);

View File

@ -19,16 +19,16 @@
//Status Effect EHs:
[QGVAR(setStatusEffect), LINKFUNC(statusEffect_set)] call CBA_fnc_addEventHandler;
["forceWalk", false, ["ace_advanced_fatigue", "ACE_SwitchUnits", "ACE_Attach", "ace_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches", "ace_medical_fracture"]] call FUNC(statusEffect_addType);
["blockSprint", false, ["ace_advanced_fatigue", "ace_dragging", "ace_medical_fracture"]] call FUNC(statusEffect_addType);
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered)]] call FUNC(statusEffect_addType);
["blockDamage", false, ["fixCollision", "ACE_cargo"]] call FUNC(statusEffect_addType);
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
["blockThrow", false, ["ACE_Attach", "ACE_concertina_wire", "ace_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_rearm", "ACE_refuel", "ACE_Sandbag", "ACE_Trenches", "ACE_tripod"]] call FUNC(statusEffect_addType);
["forceWalk", false, ["ace_advanced_fatigue", "ace_attach", "ace_dragging", "ace_explosives", QEGVAR(medical,fracture), "ace_rearm", "ace_refuel", "ace_sandbag", "ace_switchunits", "ace_tacticalladder", "ace_trenches"]] call FUNC(statusEffect_addType);
["blockSprint", false, ["ace_advanced_fatigue", "ace_dragging", QEGVAR(medical,fracture)]] call FUNC(statusEffect_addType);
["setCaptive", true, [QEGVAR(captives,handcuffed), QEGVAR(captives,surrendered)]] call FUNC(statusEffect_addType);
["blockDamage", false, ["fixCollision", "ace_cargo"]] call FUNC(statusEffect_addType);
["blockEngine", false, ["ace_refuel"]] call FUNC(statusEffect_addType);
["blockThrow", false, ["ace_attach", "ace_concertina_wire", "ace_dragging", "ace_explosives", "ace_rearm", "ace_refuel", "ace_sandbag", "ace_tacticalladder", "ace_trenches", "ace_tripod"]] call FUNC(statusEffect_addType);
["setHidden", true, ["ace_unconscious"]] call FUNC(statusEffect_addType);
["blockRadio", false, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
["blockRadio", false, [QEGVAR(captives,handcuffed), QEGVAR(captives,surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
["blockSpeaking", false, ["ace_unconscious"]] call FUNC(statusEffect_addType);
["disableWeaponAssembly", false, ["ace_common", "ace_common_lockVehicle", "ace_csw"]] call FUNC(statusEffect_addType);
["disableWeaponAssembly", false, ["ace_common", QGVAR(lockVehicle), "ace_csw"]] call FUNC(statusEffect_addType);
["lockInventory", true, [], true] call FUNC(statusEffect_addType);
[QGVAR(forceWalk), {
@ -133,6 +133,30 @@
_object lockInventory (_set > 0);
}] call CBA_fnc_addEventHandler;
[QGVAR(disableAiUAV), {
params ["_unit", "_disable"];
if (_disable) then {
private _features = ["AUTOTARGET", "TARGET", "WEAPONAIM"/*, "FIREWEAPON"*/, "RADIOPROTOCOL"]; // TODO: Uncomment in 2.18
// Save current status
_unit setVariable [QGVAR(featuresAiUAV), _features apply {[_x, _unit checkAIFeature _x]}];
{
_unit enableAIFeature [_x, false];
} forEach _features;
} else {
// Restore previous status
private _features = _unit getVariable [QGVAR(featuresAiUAV), []];
{
_unit enableAIFeature [_x select 0, _x select 1];
} forEach _features;
_unit setVariable [QGVAR(featuresAiUAV), nil];
};
}] call CBA_fnc_addEventHandler;
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
//This variable is used for isPlayer checks
if (isServer) then {
@ -192,6 +216,7 @@ if (isServer) then {
[QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(addWeaponItem), {(_this select 0) addWeaponItem [(_this select 1), (_this select 2)]}] call CBA_fnc_addEventHandler;
[QGVAR(removeMagazinesTurret), {(_this select 0) removeMagazinesTurret [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
[QGVAR(triggerAmmo), {triggerAmmo _this}] call CBA_fnc_addEventHandler;
[QGVAR(setVanillaHitPointDamage), {
params ["_object", "_hitPointAnddamage"];

View File

@ -12,6 +12,8 @@ GVAR(showHudHash) = createHashMap;
GVAR(vehicleIconCache) = createHashMap; // for getVehicleIcon
GVAR(wheelSelections) = createHashMap;
GVAR(InteractionConditions) = createHashMap;
GVAR(blockItemReplacement) = false;
// Cache for FUNC(isModLoaded)

View File

@ -15,3 +15,25 @@ uiNamespace setVariable [QGVAR(addonCache), createHashMap];
// Cache for FUNC(getConfigName)
uiNamespace setVariable [QGVAR(configNames), createHashMap];
//Add warnings for missing compat PBOs
GVAR(isModLoadedCache) = createHashMap;
{
_x params ["_modPBO", "_compatPBO"];
if ([_modPBO] call FUNC(isModLoaded) && {!([_compatPBO] call FUNC(isModLoaded))}) then {
WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2]",_modPBO,_compatPBO);
};
} forEach [
["CUP_Creatures_People_LoadOrder","ace_compat_cup_units"],
["CUP_Vehicles_LoadOrder","ace_compat_cup_vehicles"],
["CUP_Weapons_LoadOrder","ace_compat_cup_weapons"],
["r3f_armes_c","ace_compat_r3f"],
["RF_Data_Loadorder","ace_compat_rf"],
["RH_acc","ace_compat_rh_acc"],
["RH_de_cfg","ace_compat_rh_de"],
["RH_m4_cfg","ace_compat_rh_m4"],
["RH_PDW","ace_compat_rh_pdw"],
["RKSL_PMII","ace_compat_rksl_pm_ii"],
["iansky_opt","ace_compat_sma3_iansky"],
["R3F_Armes","ace_compat_r3f"]
];

View File

@ -70,8 +70,6 @@ class ctrlMapEmpty;
#include "CompassControl.hpp"
#include "CfgUIGrids.hpp"
class ACE_Extensions {};
class ACE_Tests {
vehicleTransportInventory = QPATHTOF(dev\test_vehicleInventory.sqf);
mapConfigs = QPATHTOF(dev\test_mapConfigs.sqf);

View File

@ -19,17 +19,4 @@
params ["_conditionName", "_conditionFunc"];
_conditionName = toLowerANSI _conditionName;
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
_conditions params ["_conditionNames", "_conditionFuncs"];
private _index = _conditionNames find _conditionName;
if (_index == -1) then {
_index = count _conditionNames;
};
_conditionNames set [_index, _conditionName];
_conditionFuncs set [_index, _conditionFunc];
GVAR(InteractionConditions) = _conditions;
GVAR(InteractionConditions) set [_conditionName, _conditionFunc];

View File

@ -27,15 +27,11 @@ private _owner = _target getVariable [QGVAR(owner), objNull];
if (!isNull _owner && {_unit != _owner}) exitWith {false};
// check general conditions
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
_conditions params ["_conditionNames", "_conditionFuncs"];
private _canInteract = true;
{
if (!(_x in _exceptions) && {!([_unit, _target] call (_conditionFuncs select _forEachIndex))}) exitWith {
if (!(_x in _exceptions) && {!([_unit, _target] call _y)}) exitWith {
_canInteract = false;
};
} forEach _conditionNames;
} forEach GVAR(InteractionConditions);
_canInteract

View File

@ -103,47 +103,29 @@ if (_oldCompats isNotEqualTo []) then {
///////////////
private _platform = toLowerANSI (productVersion select 6);
if (!isServer && {_platform in ["linux", "osx"]}) then {
if (_platform in ["linux", "osx"]) then {
// Linux and OSX client ports do not support extensions at all
if (hasInterface) then {
WARNING("Operating system does not support extensions");
} else {
INFO("Operating system does not support extensions");
} else {
{
private _extension = configName _x;
private _isWindows = _platform == "windows" && {getNumber (_x >> "windows") == 1};
private _isLinux = _platform == "linux" && {getNumber (_x >> "linux") == 1};
private _isClient = hasInterface && {getNumber (_x >> "client") == 1};
private _isServer = !hasInterface && {getNumber (_x >> "server") == 1};
if ((_isWindows || _isLinux) && {_isClient || _isServer}) then {
private _versionEx = _extension callExtension "version";
if (_versionEx == "") then {
private _extensionFile = _extension;
if (productVersion select 7 == "x64") then {
_extensionFile = format ["%1_x64", _extensionFile];
};
} else {
("ace" callExtension ["version", []]) params [["_versionEx", "", [""]], ["_returnCode", -1, [-1]]];
private _platformExt = [".dll", ".so"] select (_platform == "linux");
_extensionFile = format ["%1%2", _extensionFile, _platformExt];
private _errorMsg = format ["Extension %1 not found.", _extensionFile];
if (_returnCode != 0 || {_versionEx == ""}) then {
private _errorMsg = format ["Extension not found. [Return Code: %1]", _returnCode];
ERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg] call FUNC(errorMessage);
};
} else {
// Print the current extension version
INFO_2("Extension version: %1: %2",_extension,_versionEx);
_versionEx = _versionEx select [0, 8]; // git hash
INFO_1("Extension [Version: %1]",_versionEx);
};
};
} forEach ("true" configClasses (configFile >> "ACE_Extensions"));
};
if (isArray (configFile >> "ACE_Extensions" >> "extensions")) then {
WARNING("extensions[] array no longer supported");
};
///////////////
// Check server version/addons

View File

@ -38,7 +38,7 @@ if (_isDeprecatedLoaded && {!_isReplacementLoaded}) then {
switch (true) do {
case (_componentMajor >= _major && {_componentMinor >= _minor} && {_componentPatch >= _patch}): { // Removed from this version
private _message = format[
"Component %1 is deprecated. It has been replaced by %2. The component %1 is no longer usable on this version. ", _oldComponentName, _newComponentName, _version];
"Component %1 is deprecated. It has been replaced by %2. The component %1 is no longer usable on this version %3. ", _oldComponentName, _newComponentName, _version];
systemChat format["ACE [ERROR] - %1", _message];
ERROR(_message);
};

View File

@ -0,0 +1,45 @@
#include "..\script_component.hpp"
/*
* Author: johnb43
* Disables/Enables UAV AI crew members, can be run on any machine and is applied globally.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Disable AI <BOOL>
*
* Return Value:
* None
*
* Example:
* [cursorObject, true] call ace_common_fnc_disableAiUAV
*
* Public: No
*/
params [["_unit", objNull, [objNull]], ["_disable", true, [false]]];
// Allow disabling of Zeus remote controlled units
if (!alive _unit || {isPlayer _unit} || {!unitIsUAV _unit}) exitWith {};
if (_disable) then {
// Ignore if already disabled
if (!isNil "_jipID") exitWith {};
// Disable shooting and targeting on every machine
// Give predefined JIP ID, in case of simultaneous executions on different machines
private _jipID = [QGVAR(disableAiUAV), [_unit, _disable], QGVAR(disableAiUAV_) + hashValue _unit] call CBA_fnc_globalEventJIP;
[_jipID, _unit] call CBA_fnc_removeGlobalEventJIP;
_unit setVariable [QGVAR(disableAiUavJipID), _jipID, true];
} else {
// Restore shooting and targeting to each client's individual state prior to disabling
private _jipID = _unit getVariable QGVAR(disableAiUavJipID);
if (isNil "_jipID") exitWith {};
_jipID call CBA_fnc_removeGlobalEventJIP;
_unit setVariable [QGVAR(disableAiUavJipID), nil, true];
[QGVAR(disableAiUAV), [_unit, _disable]] call CBA_fnc_globalEvent;
};

View File

@ -1,6 +1,6 @@
#include "..\script_component.hpp"
/*
* Author: commy2
* Author: commy2, johnb43
* Get the muzzles of a weapon.
*
* Arguments:
@ -10,19 +10,30 @@
* All weapon muzzles <ARRAY>
*
* Example:
* ["gun"] call ace_common_fnc_getWeaponMuzzles
* "arifle_AK12_F" call ace_common_fnc_getWeaponMuzzles
*
* Public: Yes
*/
params [["_weapon", "", [""]]];
private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
private _config = configFile >> "CfgWeapons" >> _weapon;
if (!isClass _config) exitWith {
[] // return
};
private _muzzles = [];
// Get config case muzzle names
{
if (_x == "this") then {
_muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)];
_muzzles pushBack (configName _config);
} else {
if (isClass (_config >> _x)) then {
_muzzles pushBack (configName (_config >> _x));
};
} forEach _muzzles;
};
} forEach getArray (_config >> "muzzles");
_muzzles
_muzzles // return

View File

@ -17,4 +17,4 @@
params ["_unit"];
alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}
lifeState _unit in ["HEALTHY", "INJURED"]

View File

@ -18,16 +18,4 @@
params ["_conditionName"];
_conditionName = toLowerANSI _conditionName;
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
_conditions params ["_conditionNames", "_conditionFuncs"];
private _index = _conditionNames find _conditionName;
if (_index == -1) exitWith {};
_conditionNames deleteAt _index;
_conditionFuncs deleteAt _index;
GVAR(InteractionConditions) = _conditions;
GVAR(InteractionConditions) deleteAt _conditionName;

View File

@ -0,0 +1,59 @@
#include "..\script_component.hpp"
/*
* Author: johnb43
* Toggles the unit's current weapon's light & laser.
* API for persistent lasers. Doesn't work on AI, as they have their own logic.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Weapon light/laser state <BOOL> (default: false)
*
* Return Value:
* None
*
* Example:
* [player, true] call ace_common_fnc_setWeaponLightLaserState
*
* Public: Yes
*/
params [["_unit", objNull, [objNull]], ["_state", false, [false]]];
if (!local _unit || {!alive _unit} || {!(_unit call FUNC(isPlayer))}) exitWith {};
if !(_unit call CBA_fnc_canUseWeapon) exitWith {};
private _currentWeapon = currentWeapon _unit;
// Exit if unit has no weapon selected
if (_currentWeapon == "") exitWith {};
private _weaponIndex = [_unit, _currentWeapon] call FUNC(getWeaponIndex);
// Ignore binoculars
if (_weaponIndex == -1) exitWith {};
_unit setVariable [QGVAR(laserEnabled_) + str _weaponIndex, _state];
// Turn off light/laser (switching between weapons can leave previous weapon laser on)
action ["GunLightOff", _unit];
action ["IRLaserOff", _unit];
// Light/laser is off, don't need to do anything more
if (!_state) exitWith {};
// Turn laser on next frame (if weapon hasn't changed)
[{
params ["_unit", "_currentWeapon"];
private _weaponState = (weaponState _unit) select [0, 3];
if (_weaponState select 0 != _currentWeapon) exitWith {};
action ["GunLightOn", _unit];
action ["IRLaserOn", _unit];
_unit selectWeapon _weaponState;
}, [_unit, _currentWeapon]] call CBA_fnc_execNextFrame;
nil

View File

@ -6,8 +6,8 @@
*
* Arguments:
* 0: Source ID <STRING> (default: "")
* 1: Show Hud Bool Array (8 to set, empty to remove) <ARRAY> (default: [])
* - [hud, info, radar, compass, direction, menu, group, cursors]
* 1: Show Hud Bool Array (10 to set, empty to remove) <ARRAY> (default: [])
* - [hud, info, radar, compass, direction, menu, group, cursors, panels, kills]
* - hud: Boolean - show scripted HUD (same as normal showHUD true/false)
* - info: Boolean - show vehicle + soldier info (hides weapon info from the HUD as well)
* - radar: Boolean - show vehicle radar
@ -17,7 +17,8 @@
* - group: Boolean - show group info bar (hides squad leader info bar)
* - cursors: Boolean - show HUD weapon cursors (connected with scripted HUD)
* - panels: Boolean - show vehicle panels / GPS
* - ???: Boolean - Possibly related to changelog entry `Added: A new showKillConfirmations parameter for the showHud command`
* - kills: Boolean - show "x killed by y" systemChat messages
* - showIcon3D: is unsupported as it has inverted logic
*
* Return Value:
* Resulting ShowHud Array <ARRAY>

View File

@ -0,0 +1,73 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Switch attachment from one mode to another - based on CBA_accessory_fnc_switchAttachment
* ToDo: Port this to CBA?
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Weapon (String or CBA-Weapon-Index (not ace's getWeaponIndex)) <STRING|NUMBER>
* 2: From <STRING>
* 3: To <STRING>
*
* Return Value:
* None
*
* Example:
* [player, 0, "ACE_DBAL_A3_Green_VP", "ACE_DBAL_A3_Green"] call ace_common_fnc_switchAttachmentMode
*
* Public: No
*/
params ["_unit", "_weapon", "_currItem", "_switchItem"];
TRACE_4("switchAttachmentMode",_unit,_weapon,_currItem,_switchItem);
if (_weapon isEqualTo "") exitWith {};
private _exit = _unit != ACE_player;
switch (_weapon) do {
case 0;
case (primaryWeapon _unit): {
private _currWeaponType = 0;
_unit removePrimaryWeaponItem _currItem;
[{
params ["_unit", "", "_switchItem"];
_unit addPrimaryWeaponItem _switchItem;
["CBA_attachmentSwitched", _this] call CBA_fnc_localEvent;
}, [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_execNextFrame;
};
case 1;
case (handgunWeapon _unit): {
private _currWeaponType = 1;
_unit removeHandgunItem _currItem;
[{
params ["_unit", "", "_switchItem"];
_unit addHandgunItem _switchItem;
["CBA_attachmentSwitched", _this] call CBA_fnc_localEvent;
}, [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_execNextFrame;
};
case 2;
case (secondaryWeapon _unit): {
private _currWeaponType = 2;
_unit removeSecondaryWeaponItem _currItem;
[{
params ["_unit", "", "_switchItem"];
_unit addSecondaryWeaponItem _switchItem;
["CBA_attachmentSwitched", _this] call CBA_fnc_localEvent;
}, [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_execNextFrame;
};
default {
ERROR_1("bad weapon - %1",_this);
_exit = true;
};
};
if (_exit) exitWith {}; // Don't notify if the unit isn't the local player or if an invalid weapon was passed
private _configSwitchItem = configfile >> "CfgWeapons" >> _switchItem;
private _switchItemHintText = getText (_configSwitchItem >> "MRT_SwitchItemHintText");
private _switchItemHintImage = getText (_configSwitchItem >> "picture");
playSound "click";
if (_switchItemHintText != "") then {
[[_switchItemHintImage, 2.0], [_switchItemHintText], true] call CBA_fnc_notify;
};

View File

@ -1,6 +1,6 @@
#include "..\script_component.hpp"
/*
* Author: Dystopian
* Author: Dystopian, johnb43
* Controls persistent laser state.
*
* Arguments:
@ -17,51 +17,87 @@
params ["_enabled"];
if (!hasInterface) exitwith {};
// Reset state
{
ACE_player setVariable [QGVAR(laserEnabled_) + str _x, nil];
} forEach [0, 1, 2];
if (!_enabled) exitWith {
if (isNil QGVAR(laserKeyDownEH)) exitWith {};
["KeyDown", GVAR(laserKeyDownEH)] call CBA_fnc_removeDisplayHandler;
removeUserActionEventHandler ["headlights", "Activate", GVAR(laserKeyDownEH)];
["loadout", GVAR(laserLoadoutEH)] call CBA_fnc_removePlayerEventHandler;
["turret", GVAR(laserTurretEH)] call CBA_fnc_removePlayerEventHandler;
["vehicle", GVAR(laserVehicleEH)] call CBA_fnc_removePlayerEventHandler;
["weapon", GVAR(laserWeaponEH)] call CBA_fnc_removePlayerEventHandler;
GVAR(laserKeyDownEH) = nil;
GVAR(laserLoadoutEH) = nil;
GVAR(laserTurretEH) = nil;
GVAR(laserVehicleEH) = nil;
GVAR(laserWeaponEH) = nil;
};
GVAR(laserKeyDownEH) = ["KeyDown", {
if !((_this select 1) in actionKeys "headlights") exitWith {false};
private _weapon = currentWeapon ACE_player;
[
{
params ["_weapon", "_laserWasEnabled"];
private _laserEnabled = ACE_player isIRLaserOn _weapon || {ACE_player isFlashlightOn _weapon};
if (_laserEnabled && {_laserWasEnabled} || {!_laserEnabled && {!_laserWasEnabled}}) exitWith {};
private _weaponIndex = [ACE_player, _weapon] call FUNC(getWeaponIndex);
ACE_player setVariable [QGVAR(laserEnabled_) + str _weaponIndex, [nil, true] select _laserEnabled];
},
[_weapon, ACE_player isIRLaserOn _weapon || {ACE_player isFlashlightOn _weapon}]
] call CBA_fnc_execNextFrame;
false
}] call CBA_fnc_addDisplayHandler;
private _fnc_getLightLaserState = {
private _currentWeapon = currentWeapon ACE_player;
private _laserEH = {
if (sunOrMoon == 1) exitWith {};
params ["_player"];
private _weaponIndex = [_player, currentWeapon _player] call FUNC(getWeaponIndex);
if (
!(_player getVariable [QGVAR(laserEnabled_) + str _weaponIndex, false])
|| {_weaponIndex > 0 && {"" != primaryWeapon _player}} // Arma switches to primary weapon if exists
|| {!(_player call CBA_fnc_canUseWeapon)} // ignore in vehicle except FFV
) exitWith {};
[
// wait for weapon in "ready to fire" direction
{0.01 > getCameraViewDirection _this vectorDistance (_this weaponDirection currentWeapon _this)},
{{_this action [_x, _this]} forEach ["GunLightOn", "IRLaserOn"]},
_player,
3,
{{_this action [_x, _this]} forEach ["GunLightOn", "IRLaserOn"]}
] call CBA_fnc_waitUntilAndExecute;
if (_currentWeapon == "") exitWith {};
// Ignore in vehicle except FFV
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {};
private _weaponIndex = [ACE_player, _currentWeapon] call FUNC(getWeaponIndex);
if (_weaponIndex == -1) exitWith {};
// Light/laser state only changes in the next frame
// However, as by default changing attachment modes is CTRL + L, the vanilla EH triggers when lights are bound to L (even despite CBA intercepting keystroke)
// Therefore, add an extra frame of delay, after which the previous laser state will have been restored
[{
ACE_player setVariable [
QGVAR(laserEnabled_) + str (_this select 1),
ACE_player isIRLaserOn (_this select 0) || {ACE_player isFlashlightOn (_this select 0)}
];
}, [_currentWeapon, _weaponIndex], 2] call CBA_fnc_execAfterNFrames;
};
GVAR(laserLoadoutEH) = ["loadout", _laserEH] call CBA_fnc_addPlayerEventHandler;
GVAR(laserTurretEH) = ["turret", _laserEH] call CBA_fnc_addPlayerEventHandler;
GVAR(laserVehicleEH) = ["vehicle", _laserEH] call CBA_fnc_addPlayerEventHandler;
GVAR(laserWeaponEH) = ["weapon", _laserEH] call CBA_fnc_addPlayerEventHandler;
// Get current weapon light/laser state
call _fnc_getLightLaserState;
// Update state every time it's changed
GVAR(laserKeyDownEH) = addUserActionEventHandler ["headlights", "Activate", _fnc_getLightLaserState];
// Dropping weapons, as well as switching light/laser attachments turns off lights/lasers
GVAR(lastWeapons) = (getUnitLoadout ACE_player) select [0, 3];
// Monitor weapon addition/removal here
GVAR(laserLoadoutEH) = ["loadout", {
params ["_unit", "_loadout"];
private _weapons = _loadout select [0, 3];
if (_weapons isEqualTo GVAR(lastWeapons)) exitWith {};
GVAR(lastWeapons) = _weapons;
[
_unit,
_unit getVariable [QGVAR(laserEnabled_) + str ([_unit, currentWeapon _unit] call FUNC(getWeaponIndex)), false]
] call FUNC(setWeaponLightLaserState);
}] call CBA_fnc_addPlayerEventHandler;
private _fnc_switchPersistentLaserEH = {
params ["_unit"];
[
_unit,
_unit getVariable [QGVAR(laserEnabled_) + str ([_unit, currentWeapon _unit] call FUNC(getWeaponIndex)), false]
] call FUNC(setWeaponLightLaserState);
};
GVAR(laserTurretEH) = ["turret", _fnc_switchPersistentLaserEH] call CBA_fnc_addPlayerEventHandler;
GVAR(laserVehicleEH) = ["vehicle", _fnc_switchPersistentLaserEH] call CBA_fnc_addPlayerEventHandler;
GVAR(laserWeaponEH) = ["weapon", _fnc_switchPersistentLaserEH] call CBA_fnc_addPlayerEventHandler;

View File

@ -44,7 +44,7 @@
<French>Avancé</French>
<Hungarian>Fejlett</Hungarian>
<Italian>Avanzato</Italian>
<Japanese>アドバンスド</Japanese>
<Japanese>高度な</Japanese>
<Korean>고급</Korean>
<Chinese>進階</Chinese>
<Chinesesimp>进阶</Chinesesimp>

View File

@ -0,0 +1 @@
z\ace\addons\compat_aegis

View File

@ -0,0 +1,21 @@
class CfgVehicles {
class APC_Wheeled_01_base_v2_F;
class B_APC_Wheeled_01_cannon_v2_F: APC_Wheeled_01_base_v2_F {
displayName = ECSTRING(realisticnames,APC_Wheeled_01_cannon_Name);
};
class B_APC_Wheeled_01_base_F;
class B_APC_Wheeled_01_medical_F: B_APC_Wheeled_01_base_F {
displayName = SUBCSTRING(APC_Wheeled_01_medical_Name);
};
class APC_Tracked_02_medical_base_F;
class O_R_APC_Tracked_02_medical_F: APC_Tracked_02_medical_base_F {
displayName = SUBCSTRING(APC_Tracked_02_medical_Name);
};
class APC_Tracked_03_base_v2_F;
class B_A_APC_tracked_03_cannon_v2_F: APC_Tracked_03_base_v2_F {
displayName = ECSTRING(realisticnames,APC_tracked_03_cannon_Name);
};
};

View File

@ -0,0 +1,26 @@
#include "script_component.hpp"
class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"A3_Aegis_Armor_F_Aegis_APC_Wheeled_01",
"A3_Aegis_Armor_F_Aegis_APC_Tracked_02",
"A3_Aegis_Armor_F_Aegis_APC_Tracked_03",
"ace_realisticnames"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"johnb43"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
// this prevents any patched class from requiring this addon
addonRootClass = "A3_Characters_F";
};
};
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,3 @@
#define SUBCOMPONENT realisticnames
#define SUBCOMPONENT_BEAUTIFIED Realistic Names
#include "..\script_component.hpp"

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Compat_Aegis_RealisticNames">
<Key ID="STR_ACE_Compat_Aegis_RealisticNames_APC_Wheeled_01_medical_Name">
<English>Badger IFV (Medical)</English>
<German>SPz Badger (Medizin)</German>
<Spanish>Badger IFV (médico)</Spanish>
<Polish>Badger IFV (sprzęt medyczny)</Polish>
<Czech>Badger IFV (zdravotnický)</Czech>
<French>Badger IFV (médical)</French>
<Russian>БМП Badger (медицинский)</Russian>
<Portuguese>Badger IFV (médico)</Portuguese>
<Italian>Badger IFV (medico)</Italian>
<Japanese>バジャー IFV医療</Japanese>
<Korean>뱃져 보병전투차 (의료)</Korean>
<Chinese>"蜜獾"步兵戰車(醫療用)</Chinese>
<Chinesesimp>"蜜獾"(医疗)</Chinesesimp>
<Turkish>Badger IFV (Sıhhiye)</Turkish>
</Key>
<Key ID="STR_ACE_Compat_Aegis_RealisticNames_APC_Tracked_02_medical_Name">
<English>BM-2T Stalker (Medical)</English>
<German>BM-2T Stalker (Medizin)</German>
<Spanish>BM-2T Stalker (médico)</Spanish>
<Polish>BM-2T Stalker (sprzęt medyczny)</Polish>
<Czech>BM-2T Stalker (zdravotnický)</Czech>
<French>BM-2T Stalker (médical)</French>
<Russian>БМ-2Т Сталкер (медицинский)</Russian>
<Portuguese>BM-2T Stalker (médico)</Portuguese>
<Italian>BM-2T Stalker (medico)</Italian>
<Japanese>BM-2T ストーカー(医療)</Japanese>
<Korean>BM-2T 스토커 (의료)</Korean>
<Chinese>BM-2T"潛行者"步兵戰車(醫療用)</Chinese>
<Chinesesimp>BM-2T "潜行者"(医疗)</Chinesesimp>
<Turkish>BM-2T Stalker (Sıhhiye)</Turkish>
</Key>
</Package>
</Project>

View File

@ -0,0 +1,95 @@
class CfgVehicles {
class Tank;
class Tank_F: Tank {
class Turrets {
class MainTurret;
};
};
class APC_Tracked_03_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
};
class APC_Tracked_03_base_v2_F: APC_Tracked_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_40mm_CTWS", "ACE_LMG_coax_L94A1_mem3"}; // Aegis upgrades to a 40mm cannon, but we want realistic MG name
};
};
};
class MBT_01_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
// Overwrite the changes Aegis makes for the .338 coax MG on the Slammer/Merkava
// The idea is:
// 1) keep it as realistic as possible
// 2) easier to overwrite something with skipWhenMissingDependencies than to not overwrite something if another mod is loaded
weapons[] = {"cannon_120mm", "ACE_LMG_coax_MAG58_mem3"}; // Base 1.82: "cannon_120mm","LMG_coax"
magazines[] = {
"24Rnd_120mm_APFSDS_shells_Tracer_Red",
"12Rnd_120mm_HE_shells_Tracer_Red",
"12Rnd_120mm_HEAT_MP_T_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"4Rnd_120mm_LG_cannon_missiles" // Aegis adds laser-guided munitions
};
};
};
};
class B_MBT_01_base_F: MBT_01_base_F {};
class B_MBT_01_cannon_F: B_MBT_01_base_F {};
class B_MBT_01_TUSK_F: B_MBT_01_cannon_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_120mm", "ACE_LMG_coax_MAG58_mem3"}; // Base 1.82: "cannon_120mm","LMG_coax"
magazines[] = {
"24Rnd_120mm_APFSDS_shells_Tracer_Red",
"12Rnd_120mm_HE_shells_Tracer_Red",
"12Rnd_120mm_HEAT_MP_T_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"200Rnd_762x51_Belt_Red",
"4Rnd_120mm_LG_cannon_missiles" // Aegis adds laser-guided munitions
};
};
};
};
};

View File

@ -0,0 +1,25 @@
#include "script_component.hpp"
class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"A3_Aegis_Armor_F_Aegis_MBT_01",
"A3_Aegis_Armor_F_Aegis_APC_Tracked_03",
"ace_vehicles"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"johnb43"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
// this prevents any patched class from requiring this addon
addonRootClass = "A3_Characters_F";
};
};
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,3 @@
#define SUBCOMPONENT vehicles
#define SUBCOMPONENT_BEAUTIFIED Vehicles
#include "..\script_component.hpp"

View File

@ -0,0 +1,19 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"johnb43"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
// this prevents any patched class from requiring this addon
addonRootClass = "A3_Characters_F";
};
};

View File

@ -0,0 +1,5 @@
#define COMPONENT compat_aegis
#define COMPONENT_BEAUTIFIED Aegis Compatibility
#include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,15 +1,15 @@
class CfgMagazines {
class US85_Magazine;
class US85_ATMine_mag: US85_Magazine {
EGVAR(explosives,SetupObject) = "ACE_Explosives_Place_US85_ATMine_mag";
EGVAR(explosives,setupObject) = "ACE_Explosives_Place_US85_ATMine_mag";
useAction = 0;
};
class US85_M14Mine_mag: US85_Magazine {
EGVAR(explosives,SetupObject) = "ACE_Explosives_Place_US85_M14Mine";
EGVAR(explosives,setupObject) = "ACE_Explosives_Place_US85_M14Mine";
useAction = 0;
};
class US85_SatchelCharge_Mag: US85_Magazine {
EGVAR(explosives,SetupObject) = "ACE_Explosives_Place_US85_SatchelCharge_Mag";
EGVAR(explosives,setupObject) = "ACE_Explosives_Place_US85_SatchelCharge_Mag";
useAction = 0;
};
};

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