mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'acemod:master' into master
This commit is contained in:
commit
afc3b109d3
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -23,14 +23,14 @@ All good? Then proceed and fill out the items below.
|
||||
**Mods (complete and add to the following information):**
|
||||
- **Arma 3:** `x.xx` [e.g. 1.00 stable, rc, dev]
|
||||
- **CBA:** `3.x.x` [e.g. 3.0.0 stable, commit hash]
|
||||
- **ACE3:** `3.x.x` [eg. 3.0.0 stable, commit hash]
|
||||
- **ACE3:** `3.x.x` [e.g. 3.0.0 stable, commit hash]
|
||||
<!-- Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission! -->
|
||||
|
||||
**Description:**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Steps to reproduce:**
|
||||
_Follow [https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp](this flowchart)!_
|
||||
_Follow [this flowchart](https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp)!_
|
||||
|
||||
1. _Go to ..._
|
||||
2. _Click ..._
|
||||
|
@ -192,6 +192,7 @@
|
||||
<Japanese>一時的に風の情報を表示</Japanese>
|
||||
<Korean>바람 정보 임시로 표시</Korean>
|
||||
<French>Afficher temporairement les informations sur le vent</French>
|
||||
<Russian>Временно показать информацию о ветре</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnableTempWindInfo_Description">
|
||||
<English>Temporarily display Wind Info while throwing, to aid in placing smoke grenades effectively.</English>
|
||||
@ -200,6 +201,7 @@
|
||||
<Japanese>投擲行動中に風向きの情報を一時的に表示し、発煙手榴弾の煙幕を効果的に展開しやすくします。</Japanese>
|
||||
<Korean>연막탄을 효과적으로 배치하는 데 도움이 되도록 투척하는 동안 일시적으로 바람 정보를 표시합니다.</Korean>
|
||||
<French>Affiche les informations sur le vent pendant le lancement pour placer les grenades fumigènes plus efficacement.</French>
|
||||
<Russian>Временно отображайте информацию о ветре во время броска, чтобы помочь эффективно разместить дымовые шашки.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Prepare">
|
||||
<English>Prepare/Change Throwable</English>
|
||||
|
@ -33,7 +33,7 @@ if (_startingPos isEqualTo [0,0,0]) exitWith {
|
||||
[LSTRING(GarrisonInvalidPosition)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if (count _unitsArray == 0 || {isNull (_unitsArray select 0)}) exitWith {
|
||||
if (_unitsArray isEqualTo [] || {isNull (_unitsArray select 0)}) exitWith {
|
||||
TRACE_1("fnc_garrison: Units error",_unitsArray);
|
||||
[LSTRING(GarrisonNoUnits)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
@ -43,7 +43,7 @@ if (_fillingRadius >= 50) then {
|
||||
_buildings = [_buildings] call CBA_fnc_shuffle;
|
||||
};
|
||||
|
||||
if (count _buildings == 0) exitWith {
|
||||
if (_buildings isEqualTo []) exitWith {
|
||||
TRACE_1("fnc_garrison: Building error",_buildings);
|
||||
[LSTRING(GarrisonNoBuilding)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -28,8 +28,8 @@ _item = configName _config;
|
||||
|
||||
// If the switch config entries are inherited, ignore
|
||||
if (
|
||||
(inheritsFrom (_config >> "MRT_SwitchItemNextClass") isNotEqualTo (_config >> "MRT_SwitchItemNextClass")) ||
|
||||
{inheritsFrom (_config >> "MRT_SwitchItemPrevClass") isNotEqualTo (_config >> "MRT_SwitchItemPrevClass")}
|
||||
(inheritsFrom (_config >> "MRT_SwitchItemNextClass") isNotEqualTo _config) ||
|
||||
{inheritsFrom (_config >> "MRT_SwitchItemPrevClass") isNotEqualTo _config}
|
||||
) exitWith {
|
||||
_item // return
|
||||
};
|
||||
|
6
addons/casings/CfgVehicles.hpp
Normal file
6
addons/casings/CfgVehicles.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
class CfgVehicles {
|
||||
class FxCartridge;
|
||||
class FxCartridge_65_caseless: FxCartridge {
|
||||
GVAR(model) = ""; // note: the vanilla 6.5 caseless don't actually use this, just being safe
|
||||
};
|
||||
};
|
@ -15,3 +15,4 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -20,33 +20,30 @@ params ["_unit", "", "", "", "_ammo"];
|
||||
|
||||
if (!isNull objectParent _unit) exitWith {};
|
||||
|
||||
private _modelPath = GVAR(cachedCasings) get _ammo;
|
||||
|
||||
if (isNil "_modelPath") then {
|
||||
private _modelPath = GVAR(cachedCasings) getOrDefaultCall [_ammo, {
|
||||
private _cartridge = getText (configFile >> "CfgAmmo" >> _ammo >> "cartridge");
|
||||
//Default cartridge is a 5.56mm model
|
||||
_modelPath = switch (_cartridge) do {
|
||||
case "FxCartridge_9mm": { "A3\Weapons_f\ammo\cartridge_small.p3d" };
|
||||
case "FxCartridge_65": { "A3\weapons_f\ammo\cartridge_65.p3d" };
|
||||
case "FxCartridge_762": { "A3\weapons_f\ammo\cartridge_762.p3d" };
|
||||
case "FxCartridge_762x39": { "A3\weapons_f_enoch\ammo\cartridge_762x39.p3d" };
|
||||
case "FxCartridge_93x64_Ball": { "A3\Weapons_F_Mark\Ammo\cartridge_93x64.p3d" };
|
||||
case "FxCartridge_338_Ball": { "A3\Weapons_F_Mark\Ammo\cartridge_338_LM.p3d" };
|
||||
case "FxCartridge_338_NM": { "A3\Weapons_F_Mark\Ammo\cartridge_338_NM.p3d" };
|
||||
case "FxCartridge_127": { "A3\weapons_f\ammo\cartridge_127.p3d" };
|
||||
case "FxCartridge_127x54": { "A3\Weapons_F_Mark\Ammo\cartridge_127x54.p3d" };
|
||||
case "FxCartridge_slug": { "A3\weapons_f\ammo\cartridge_slug.p3d" };
|
||||
case "FxCartridge_12Gauge_HE_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_he_lxws.p3d" };
|
||||
case "FxCartridge_12Gauge_Slug_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_slug_lxws.p3d" };
|
||||
case "FxCartridge_12Gauge_Smoke_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_smoke_lxws.p3d" };
|
||||
case "FxCartridge_12Gauge_Pellet_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_pellet_lxws.p3d" };
|
||||
case "CUP_FxCartridge_545": { "CUP\Weapons\CUP_Weapons_Ammunition\magazines\cartridge545.p3d" };
|
||||
case "CUP_FxCartridge_939": { "CUP\Weapons\CUP_Weapons_Ammunition\magazines\cartridge939.p3d" };
|
||||
case "": { "" };
|
||||
default { "A3\Weapons_f\ammo\cartridge.p3d" };
|
||||
if (_cartridge == "") then { // return (note: can't use exitWith)
|
||||
""
|
||||
} else {
|
||||
private _cartridgeConfig = configFile >> "CfgVehicles" >> _cartridge;
|
||||
|
||||
// if explicitly defined, use ACE's config
|
||||
if (isText (_cartridgeConfig >> QGVAR(model))) exitWith {
|
||||
getText (_cartridgeConfig >> QGVAR(model))
|
||||
};
|
||||
// use casing's default model
|
||||
private _model = getText (_cartridgeConfig >> "model");
|
||||
if ("a3\weapons_f\empty" in toLowerANSI _model) exitWith { "" };
|
||||
|
||||
// Add file extension if missing (fileExists needs file extension)
|
||||
if ((_model select [count _model - 4]) != ".p3d") then {
|
||||
_model = _model + ".p3d";
|
||||
};
|
||||
|
||||
["", _model] select (fileExists _model)
|
||||
};
|
||||
GVAR(cachedCasings) set [_ammo, _modelPath];
|
||||
};
|
||||
}, true];
|
||||
|
||||
if (_modelPath isEqualTo "") exitWith {};
|
||||
|
||||
|
@ -58,7 +58,7 @@ if (_switch) then {
|
||||
private _newGroup = createGroup (_x select 1);
|
||||
[_unit] joinSilent _newGroup;
|
||||
};
|
||||
if (count units _currentGroup == 0) then {
|
||||
if (units _currentGroup isEqualTo []) then {
|
||||
deleteGroup _currentGroup;
|
||||
};
|
||||
_previousGroupsList set [_forEachIndex, objNull];
|
||||
|
@ -1833,18 +1833,21 @@
|
||||
<Japanese>手ぶれ</Japanese>
|
||||
<Korean>무기 흔들림</Korean>
|
||||
<French>Oscillation de l'arme</French>
|
||||
<Russian>Колебание оружия</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_EnableSway">
|
||||
<English>Enable Weapon Sway</English>
|
||||
<Japanese>手ぶれを有効化</Japanese>
|
||||
<Korean>무기 흔들림 추가</Korean>
|
||||
<French>Activer l'oscillation de l'arme</French>
|
||||
<Russian>Включить колебание оружия</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_EnableSway_Description">
|
||||
<English>Enables weapon sway influenced by sway factors, such as stance, fatigue and medical condition.\nDisabling this setting will defer sway to vanilla or other mods.</English>
|
||||
<Japanese>姿勢、疲労、負傷状態などの手ぶれ要因に影響を受ける武器照準の揺れを有効にします。\nこの設定を無効にすると、手ぶれの揺れはバニラまたは他のMODの処理に任されます。</Japanese>
|
||||
<Korean>흔들림 계수, 자세, 피로도, 건강 상태 등의 요인에 영향을 받는 무기 흔들림을 활성화합니다.\n이 설정을 비활성화하면 바닐라 또는 다른 모드의 흔들림으로 대체됩니다.</Korean>
|
||||
<French>Active l'oscillation de l'arme influencé par les facteurs d'oscillation, tels que la position, la fatigue et l'état de santé.\nLa désactivation de ce paramètre reportera l'oscillation à vanilla ou à d'autres mods.</French>
|
||||
<Russian>Активируйте колебание оружия в зависимости от таких факторов, как стойка, усталость и состояние здоровья.\nОтключение этого параметра приведет к переносу раскачивания на vanilla или другие моды.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_SwayFactor">
|
||||
<English>Sway factor</English>
|
||||
|
@ -148,5 +148,141 @@ class CfgVehicles {
|
||||
roles[]={"cargo"};
|
||||
};
|
||||
};
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l1", "hitera_l2", "hitera_l3", "hitera_l4", "hitera_l5",
|
||||
"hitera_l6", "hitera_l7", "hitera_l8", "hitera_r1", "hitera_r2",
|
||||
"hitera_r3", "hitera_r4", "hitera_r5", "hitera_r6", "hitera_r7",
|
||||
"hitera_r8", "hitera_t1", "hitera_t2", "hitera_t3", "hitera_t4",
|
||||
"hitera_t5", "hitera_t6", "hitera_t7", "hitera_t8", "hitera_fr1",
|
||||
"hitera_fr2", "hitera_fr3", "hitera_fr4", "hitera_fr5", "hitera_fr6",
|
||||
"hitera_fr7", "hitera_fr8", "hitera_fr9", "hitera_fl1", "hitera_fl2",
|
||||
"hitera_fl3", "hitera_fl4", "hitera_fl5"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {};
|
||||
};
|
||||
class CUP_T90_Base: Tank_F {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l1", "hitera_l2", "hitera_l3", "hitera_r1", "hitera_r2",
|
||||
"hitera_r3", "hitera_1_t_l", "hitera_1_t_r", "hitera_2_t_l",
|
||||
"hitera_2_t_r"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {};
|
||||
};
|
||||
class CUP_T90M_Base: Tank_F {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_t1", "hitera_t2", "hitera_t3", "hitera_t4", "hitera_t5",
|
||||
"hitera_t6", "hitera_t7", "hitera_t8", "hitera_t9", "hitera_t10",
|
||||
"hitera_t11", "hitera_t12", "hitera_t13", "hitera_t14", "hitera_t15",
|
||||
"hitera_t16", "hitera_t17", "hitera_t18", "hitera_t19", "hitera_t20",
|
||||
"hitera_t21", "hitera_f1", "hitera_f2", "hitera_f3", "hitera_f4",
|
||||
"hitera_f5", "hitera_f6", "hitera_f7", "hitera_s1", "hitera_s2",
|
||||
"hitera_s3", "hitera_s4", "hitera_s5", "hitera_s6", "hitera_s7",
|
||||
"hitera_s8", "hitera_s9", "hitera_s10", "hitera_s11", "hitera_s12",
|
||||
"hitera_t22", "hitera_t23", "hitera_t24", "hitera_t25", "hitera_t26",
|
||||
"hitera_t27", "hitera_t28", "hitera_t29", "hitera_t30", "hitera_t31",
|
||||
"hitera_t32", "hitera_t33"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"hitslat_left", "hitslat_right", "hitslat_turret_rear",
|
||||
"hitslat_turret_left", "hitslat_rear"
|
||||
};
|
||||
};
|
||||
|
||||
class CUP_T72_ACR_Base;
|
||||
class CUP_B_T72_CZ: CUP_T72_ACR_Base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_top_l1", "hitera_top_l2", "hitera_top_l3", "hitera_top_l4",
|
||||
"hitera_top_r1", "hitera_top_r2", "hitera_top_r3", "hitera_top_r4",
|
||||
"hitera_front_r1", "hitera_front_r2", "hitera_front_l1",
|
||||
"hitera_front_l2", "hitera_top_rear"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {};
|
||||
};
|
||||
|
||||
class CUP_Leopard2_Base;
|
||||
class CUP_Leopard2_ERA_Base: CUP_Leopard2_Base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_1", "hitera_2", "hitera_3", "hitera_4", "hitera_5", "hitera_6",
|
||||
"hitera_7", "hitera_8", "hitera_9", "hitera_10", "hitera_11", "hitera_12",
|
||||
"hitera_13", "hitera_14", "hitera_15", "hitera_16", "hitera_17", "hitera_18",
|
||||
"hitera_19", "hitera_20", "hitera_21", "hitera_22", "hitera_23", "hitera_24",
|
||||
"hitera_25", "hitera_26", "hitera_27", "hitera_28", "hitera_29", "hitera_30",
|
||||
"hitera_31", "hitera_32", "hitera_33", "hitera_34", "hitera_35", "hitera_36",
|
||||
"hitera_37", "hitera_38", "hitera_39", "hitera_40", "hitera_41", "hitera_42",
|
||||
"hitera_43", "hitera_44", "hitera_45", "hitera_46", "hitera_47"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {};
|
||||
};
|
||||
|
||||
class CUP_M1_Abrams_base;
|
||||
class CUP_M1A2_TUSK_base: CUP_M1_Abrams_base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l1", "hitera_l2", "hitera_l3", "hitera_l4", "hitera_r1",
|
||||
"hitera_r2", "hitera_r3", "hitera_r4"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"hitslat_rear"
|
||||
};
|
||||
};
|
||||
|
||||
class CUP_M1Abrams_Base;
|
||||
class CUP_M1Abrams_TUSK_Base: CUP_M1Abrams_Base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05",
|
||||
"hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10",
|
||||
"hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15",
|
||||
"hitera_l16", "hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04",
|
||||
"hitera_r05", "hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09",
|
||||
"hitera_r10", "hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14",
|
||||
"hitera_r15", "hitera_r16"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"hitslat_rear"
|
||||
};
|
||||
};
|
||||
|
||||
class CUP_M1Abrams_A2_Base;
|
||||
class CUP_M1Abrams_A2_TUSK_Base: CUP_M1Abrams_A2_Base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05",
|
||||
"hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10",
|
||||
"hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15",
|
||||
"hitera_l16", "hitera_l17", "hitera_l18", "hitera_l19", "hitera_l20",
|
||||
"hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04", "hitera_r05",
|
||||
"hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09", "hitera_r10",
|
||||
"hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14", "hitera_r15",
|
||||
"hitera_r16", "hitera_r17", "hitera_r18", "hitera_r19", "hitera_r20"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"hitslat_rear"
|
||||
};
|
||||
};
|
||||
|
||||
class CUP_M1A2Abrams_Base;
|
||||
class CUP_M1A2Abrams_TUSK_Base: CUP_M1A2Abrams_Base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05",
|
||||
"hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10",
|
||||
"hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15",
|
||||
"hitera_l16", "hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04",
|
||||
"hitera_r05", "hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09",
|
||||
"hitera_r10", "hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14",
|
||||
"hitera_r15", "hitera_r16"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"hitslat_rear"
|
||||
};
|
||||
};
|
||||
class CUP_M1A2Abrams_TUSK_II_Base: CUP_M1A2Abrams_TUSK_Base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05",
|
||||
"hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10",
|
||||
"hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15",
|
||||
"hitera_l16", "hitera_l17", "hitera_l18", "hitera_l19", "hitera_l20",
|
||||
"hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04", "hitera_r05",
|
||||
"hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09", "hitera_r10",
|
||||
"hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14", "hitera_r15",
|
||||
"hitera_r16", "hitera_r17", "hitera_r18", "hitera_r19", "hitera_r20"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,6 +15,6 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
@ -434,7 +434,11 @@ class CfgVehicles {
|
||||
"era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint",
|
||||
"era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint",
|
||||
"era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint",
|
||||
"era_31_hitpoint", "era_32_hitpoint"
|
||||
"era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint",
|
||||
"era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint",
|
||||
"era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint",
|
||||
"era_49_hitpoint", "era_50_hitpoint", "era_58_hitpoint", "era_59_hitpoint", "era_60_hitpoint", "era_61_hitpoint",
|
||||
"era_62_hitpoint", "era_63_hitpoint", "era_64_hitpoint", "era_65_hitpoint", "era_66_hitpoint", "era_67_hitpoint"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"SLAT_51_hitpoint", "SLAT_52_hitpoint", "SLAT_53_hitpoint",
|
||||
@ -470,6 +474,9 @@ class CfgVehicles {
|
||||
"era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint",
|
||||
"era_49_hitpoint", "era_50_hitpoint"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"slat_51_hitpoint", "slat_52_hitpoint", "slat_53_hitpoint", "slat_54_hitpoint"
|
||||
};
|
||||
};
|
||||
class rhs_t90am_tv: rhs_t90_tv {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
@ -483,7 +490,7 @@ class CfgVehicles {
|
||||
"era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint",
|
||||
"era_49_hitpoint", "era_50_hitpoint", "era_51_hitpoint", "era_52_hitpoint", "era_53_hitpoint", "era_54_hitpoint",
|
||||
"era_55_hitpoint", "era_56_hitpoint", "era_57_hitpoint", "era_58_hitpoint", "era_59_hitpoint", "era_60_hitpoint",
|
||||
"era_51_hitpoint", "era_62_hitpoint", "era_63_hitpoint", "era_64_hitpoint", "era_65_hitpoint", "era_66_hitpoint"
|
||||
"era_61_hitpoint", "era_62_hitpoint", "era_63_hitpoint", "era_64_hitpoint", "era_65_hitpoint", "era_66_hitpoint"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"SLAT_18_hitpoint", "SLAT_19_hitpoint", "SLAT_20_hitpoint", "SLAT_21_hitpoint",
|
||||
@ -492,10 +499,31 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
class rhs_t90sm_tv: rhs_t90am_tv {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint",
|
||||
"era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint",
|
||||
"era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint",
|
||||
"era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint",
|
||||
"era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint",
|
||||
"era_21_hitpoint", "era_22_hitpoint", "era_24_hitpoint", "era_25_hitpoint",
|
||||
"era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint",
|
||||
"era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint",
|
||||
"era_35_hitpoint", "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint",
|
||||
"era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint",
|
||||
"era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint",
|
||||
"era_47_hitpoint", "era_48_hitpoint", "era_49_hitpoint", "era_50_hitpoint",
|
||||
"era_26_hitpoint", "era_55_hitpoint", "era_56_hitpoint", "era_57_hitpoint",
|
||||
"era_58_hitpoint", "era_59_hitpoint", "era_60_hitpoint", "era_61_hitpoint",
|
||||
"era_62_hitpoint", "era_63_hitpoint", "era_64_hitpoint", "era_65_hitpoint",
|
||||
"era_66_hitpoint", "era_23_hitpoint"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"SLAT_23_hitpoint", "SLAT_26_hitpoint", "SLAT_51_hitpoint", "SLAT_52_hitpoint",
|
||||
"SLAT_53_hitpoint", "SLAT_54_hitpoint", "SLAT_55_hitpoint", "SLAT_56_hitpoint",
|
||||
"SLAT_57_hitpoint"
|
||||
"slat_23_hitpoint", "slat_26_hitpoint", "slat_51_hitpoint",
|
||||
"slat_52_hitpoint", "slat_53_hitpoint", "slat_54_hitpoint",
|
||||
"slat_55_hitpoint", "slat_56_hitpoint", "slat_57_hitpoint",
|
||||
"slat_18_hitpoint", "slat_19_hitpoint", "slat_20_hitpoint",
|
||||
"slat_21_hitpoint", "slat_22_hitpoint", "slat_24_hitpoint",
|
||||
"slat_25_hitpoint"
|
||||
};
|
||||
};
|
||||
|
||||
@ -539,6 +567,35 @@ class CfgVehicles {
|
||||
"era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint"
|
||||
};
|
||||
};
|
||||
class rhs_t80um: rhs_t80u {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint",
|
||||
"era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint",
|
||||
"era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint",
|
||||
"era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint",
|
||||
"era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint",
|
||||
"era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint"
|
||||
};
|
||||
};
|
||||
|
||||
class rhs_t15_base;
|
||||
class rhs_t15_tv: rhs_t15_base {
|
||||
EGVAR(vehicle_damage,eraHitpoints)[] = {
|
||||
"era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint",
|
||||
"era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint",
|
||||
"era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint",
|
||||
"era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint",
|
||||
"era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint",
|
||||
"era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint",
|
||||
"era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint",
|
||||
"era_29_hitpoint", "era_30_hitpoint", "era_31_hitpoint", "era_32_hitpoint",
|
||||
"era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint",
|
||||
"era_37_hitpoint"
|
||||
};
|
||||
EGVAR(vehicle_damage,slatHitpoints)[] = {
|
||||
"slat_38_hitpoint", "slat_39_hitpoint", "slat_40_hitpoint", "slat_41_hitpoint"
|
||||
};
|
||||
};
|
||||
|
||||
// Wirecutter Backpacks
|
||||
class rhs_assault_umbts;
|
||||
|
@ -155,6 +155,7 @@
|
||||
<German>%3IV-Flüssigkeiten%4 stellen das verlorene Blutvolumen wieder her. Blut, Plasma und Kochsalzlösung sind funktionell gleich.<br/><br/>%3Verwende:%4<br/>%2Verwende [%3%13%4] oder [%3%14%4] und wählen ein Körperteil aus..<br/>%2Stelle das Blutvolumen wieder her, indem der gewünschte %3IV Flüssigkeitstyp%4 ausgewählt wird.</German>
|
||||
<Italian>%3Fluidi EV%4 ristorano volume di sangue perso. Sangue, Plasma, e Salina sono funzionalmente identiche.<br/><br/>%3Utilizzo:%4<br/>%2Usa [%3%13%4] o [%3%14%4] e seleziona un arto.<br/>%2Ristora il volume di sangue selezionando il tipo di %3Fluido EV%4 desiderato.</Italian>
|
||||
<Japanese>%3IV 輸液%4は失われた血液を回復します。血液、血漿、生理食塩水は機能的には同じです。<br/><br/>%3使用方法:%4<br/>%2[%3%13%4] または [%3%14%4] を使って四肢を選択します。<br/>%2希望の%3IV 輸液%4の種類を選択して、血液量を復元します。</Japanese>
|
||||
<Russian>%%3Внутривенные жидкости%4восстанавливают потерянный объем крови. Кровь, плазма и физраствор функционально идентичны.<br/><br/>%3 Использование:%4<br/>%2 Используйте [%3%13%4] или [%3%14%4] и выберите добавку.<br/>%2 Восстановите объем крови выбрав желаемый %4тип %3жидкости</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_FieldManual_Medical_Treatment_Epinephrine_ShortName">
|
||||
<English>Increase Heart Rate | Wake Up Faster</English>
|
||||
|
@ -24,10 +24,10 @@ params ["_unit"];
|
||||
TRACE_2("params",_unit,typeOf _unit);
|
||||
|
||||
// Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios)
|
||||
if (!GVAR(enableCombatDeafness) || {!GVAR(autoAddEarplugsToUnits)} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
||||
if (!GVAR(enableCombatDeafness) || {GVAR(autoAddEarplugsToUnits) == 0} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
||||
|
||||
// add earplugs if the soldier has a rocket launcher
|
||||
if ((secondaryWeapon _unit) != "") exitWith {
|
||||
// Add earplugs if enabled for everyone or if the soldier has a rocket launcher
|
||||
if (GVAR(autoAddEarplugsToUnits) == 2 || {(secondaryWeapon _unit) != ""}) exitWith {
|
||||
TRACE_1("has launcher - adding",_unit);
|
||||
_unit addItem "ACE_EarPlugs";
|
||||
};
|
||||
|
@ -5,7 +5,9 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
||||
[LSTRING(EnableCombatDeafness_DisplayName), LSTRING(EnableCombatDeafness_Description)],
|
||||
_category,
|
||||
true,
|
||||
1
|
||||
1,
|
||||
{[QGVAR(enableCombatDeafness), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||
true // Needs mission restart
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
@ -41,9 +43,9 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
QGVAR(autoAddEarplugsToUnits), "CHECKBOX",
|
||||
QGVAR(autoAddEarplugsToUnits), "LIST",
|
||||
[LSTRING(autoAddEarplugsToUnits_DisplayName), LSTRING(autoAddEarplugsToUnits_Description)],
|
||||
_category,
|
||||
true,
|
||||
[[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(heavyWeaponUnits), ELSTRING(common,Enabled)], 1],
|
||||
1
|
||||
] call CBA_fnc_addSetting;
|
||||
|
@ -371,5 +371,10 @@
|
||||
<Korean>귀마개 토글</Korean>
|
||||
<French>Mettre/enlever les bouchons</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Hearing_heavyWeaponUnits">
|
||||
<English>Only units with heavy weapons</English>
|
||||
<French>Uniquement les unités dotées d'armes lourdes</French>
|
||||
<Russian>Только юниты с тяжелым вооружением</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -43,12 +43,21 @@ _origActionData params [
|
||||
"_distance"
|
||||
];
|
||||
|
||||
private _result = [_target, ACE_player, _customParams] call _conditionCode;
|
||||
|
||||
// Handle nil as false
|
||||
if (isNil "_result") then {
|
||||
ERROR_1("Action [%1] bad condition return",_actionName);
|
||||
|
||||
_result = false;
|
||||
};
|
||||
|
||||
// Return nothing if the action itself is not active
|
||||
if !([_target, ACE_player, _customParams] call _conditionCode) exitWith {
|
||||
if (!_result) exitWith {
|
||||
[]
|
||||
};
|
||||
|
||||
// Return nothing if the action is to far (including checking sub actions) [DISABLED FOR NOW ref #2196]
|
||||
// Return nothing if the action is too far (including checking sub actions) [DISABLED FOR NOW ref #2196]
|
||||
// if (_distanceToBasePoint > _distance) exitWith {
|
||||
// []
|
||||
// };
|
||||
@ -64,7 +73,7 @@ if (_insertChildrenCode isNotEqualTo {}) then {
|
||||
// Collect dynamic children class actions
|
||||
{
|
||||
private _action = [_x select 2, _x, _fullPath, _distanceToBasePoint] call FUNC(collectActiveActionTree);
|
||||
if ((count _action) > 0) then {
|
||||
if (_action isNotEqualTo []) then {
|
||||
_activeChildren pushBack _action;
|
||||
};
|
||||
} forEach _dynamicChildren;
|
||||
@ -73,7 +82,7 @@ if (_insertChildrenCode isNotEqualTo {}) then {
|
||||
// Collect children class actions
|
||||
{
|
||||
private _action = [_object, _x, _fullPath, _distanceToBasePoint] call FUNC(collectActiveActionTree);
|
||||
if ((count _action) > 0) then {
|
||||
if (_action isNotEqualTo []) then {
|
||||
_activeChildren pushBack _action;
|
||||
};
|
||||
} forEach _origActionChildren;
|
||||
@ -85,7 +94,7 @@ if (_insertChildrenCode isNotEqualTo {}) then {
|
||||
// Check if the action is children of the original action
|
||||
if (_pPath isEqualTo _fullPath) then {
|
||||
private _action = [_object, [_actionData,[]], _fullPath, _distanceToBasePoint] call FUNC(collectActiveActionTree);
|
||||
if ((count _action) > 0) then {
|
||||
if (_action isNotEqualTo []) then {
|
||||
_activeChildren pushBack _action;
|
||||
};
|
||||
};
|
||||
|
@ -22,10 +22,10 @@ params ["_unit", "_target"];
|
||||
|
||||
[_unit, "GestureGo"] call EFUNC(common,doGesture);
|
||||
|
||||
private _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
private _chance = [0.5, 0.8] select (weapons _unit isNotEqualTo []);
|
||||
|
||||
{
|
||||
if (count weapons _x == 0 && {random 1 < _chance}) then {
|
||||
if (weapons _x isEqualTo [] && {random 1 < _chance}) then {
|
||||
[QGVAR(getDown), [_x], [_x]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
} forEach (_target nearEntities ["Civilian", SEND_RADIUS]);
|
||||
|
@ -22,10 +22,10 @@ params ["_unit"];
|
||||
|
||||
[_unit, "GestureGo"] call EFUNC(common,doGesture);
|
||||
|
||||
private _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
private _chance = [0.5, 0.8] select (weapons _unit isNotEqualTo []);
|
||||
|
||||
{
|
||||
if (count weapons _x == 0 && {random 1 < _chance}) then {
|
||||
if (weapons _x isEqualTo [] && {random 1 < _chance}) then {
|
||||
private _position = getPosASL _unit vectorAdd (eyeDirection _unit vectorMultiply SEND_DISTANCE);
|
||||
_position set [2, 0];
|
||||
|
||||
|
@ -103,7 +103,7 @@ private _finalOwner = objNull;
|
||||
|
||||
TRACE_2("",count _spots,_spots);
|
||||
|
||||
if ((count _spots) > 0) then {
|
||||
if (_spots isNotEqualTo []) then {
|
||||
private _bucketList = nil;
|
||||
private _bucketPos = nil;
|
||||
private _c = 0;
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
params ["_input", "_points", ["_randomRound", false]];
|
||||
|
||||
if (count _points < 1) exitWith {
|
||||
if (_points isEqualTo []) exitWith {
|
||||
//TODO: sensible default/error value
|
||||
0
|
||||
};
|
||||
|
@ -86,12 +86,6 @@
|
||||
if (!isNull objectParent _unit && {local objectParent _unit}) exitWith {
|
||||
[_unit] call FUNC(lockUnconsciousSeat);
|
||||
};
|
||||
|
||||
// Prevent second ragdoll of uncon units when they're killed
|
||||
if (IS_UNCONSCIOUS(_unit) && !isAwake _unit) then {
|
||||
_unit enableSimulation false;
|
||||
[{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["CAManBase", "deleted", {
|
||||
|
@ -1366,6 +1366,7 @@
|
||||
<Japanese>出血状態の表示</Japanese>
|
||||
<Korean>출혈 상태 표시</Korean>
|
||||
<French>Afficher l'état des saignements</French>
|
||||
<Russian>Показать состояние кровотечения</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_showBleeding_Description">
|
||||
<English>Display if the patient is bleeding, optionally with rate</English>
|
||||
@ -1376,6 +1377,7 @@
|
||||
<Japanese>患者が出血しているかどうかを表示します。オプションで出血速度も表示します</Japanese>
|
||||
<Korean>환자가 출혈 중인지 여부를 표시합니다(선택적으로 출혈 속도 포함)</Korean>
|
||||
<French>Indique si le patient saigne, éventuellement avec le taux de saignement</French>
|
||||
<Russian>Показывает, есть ли у пациента кровотечение, опционально с указанием частоты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_ShowBleeding_Rate">
|
||||
<English>Show Bleeding Rate</English>
|
||||
@ -1386,6 +1388,7 @@
|
||||
<Japanese>出血速度の表示</Japanese>
|
||||
<Korean>출혈 속도 표시</Korean>
|
||||
<French>Afficher le taux de saignement</French>
|
||||
<Russian>Показать частоту кровотечения</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_PeekMedicalOnHit_DisplayName">
|
||||
<English>Peek Medical Info on Hit</English>
|
||||
|
@ -10,6 +10,12 @@ class Extended_PreInit_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
|
14
addons/medical_statemachine/XEH_postInit.sqf
Normal file
14
addons/medical_statemachine/XEH_postInit.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["ace_killed", { // global event
|
||||
params ["_unit"];
|
||||
|
||||
// Prevent second ragdoll of uncon units when they're killed
|
||||
if (
|
||||
IS_UNCONSCIOUS(_unit) && !isAwake _unit // uncon and not ragdolling
|
||||
&& {isPlayer _unit || {_unit getVariable [QGVAR(AIUnconsciousness), GVAR(AIUnconsciousness)]}}
|
||||
) then {
|
||||
_unit enableSimulation false;
|
||||
[{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
@ -23,4 +23,10 @@ if (_woundBleeding == 0) exitWith {0};
|
||||
private _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
|
||||
|
||||
// even if heart stops blood will still flow slowly (gravity)
|
||||
(_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * EGVAR(medical,bleedingCoefficient))
|
||||
private _bloodLoss = (_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * EGVAR(medical,bleedingCoefficient));
|
||||
|
||||
private _eventArgs = [_unit, _bloodLoss]; // Pass by reference
|
||||
|
||||
[QGVAR(getBloodLoss), _eventArgs] call CBA_fnc_localEvent;
|
||||
|
||||
_eventArgs select 1 // return
|
||||
|
@ -17,10 +17,14 @@
|
||||
params ["_unit", ["_reason", "#setDead"], ["_instigator", objNull]];
|
||||
TRACE_3("setDead",_unit,_reason,_instigator);
|
||||
|
||||
|
||||
// No heart rate or blood pressure to measure when dead
|
||||
_unit setVariable [VAR_HEART_RATE, 0, true];
|
||||
_unit setVariable [VAR_BLOOD_PRESS, [0, 0], true];
|
||||
|
||||
// Clear uncon variable just to be safe
|
||||
_unit setVariable [VAR_UNCON, nil, true];
|
||||
|
||||
_unit setVariable [QEGVAR(medical,causeOfDeath), _reason, true];
|
||||
|
||||
// Send a local event before death
|
||||
|
@ -19,6 +19,9 @@
|
||||
|
||||
// todo: move this macro to script_macros_medical.hpp?
|
||||
#define MORPHINE_PAIN_SUPPRESSION 0.6
|
||||
// 0.2625 = 0.6/0.8 * 0.35
|
||||
// 0.6 = basic medication morph. pain suppr., 0.8 = adv. medication morph. pain suppr., 0.35 = adv. medication painkillers. pain suppr.
|
||||
#define PAINKILLERS_PAIN_SUPPRESSION 0.2625
|
||||
|
||||
params ["_patient", "_bodyPart", "_classname"];
|
||||
TRACE_3("medicationLocal",_patient,_bodyPart,_classname);
|
||||
@ -36,6 +39,10 @@ if (!GVAR(advancedMedication)) exitWith {
|
||||
case "Epinephrine": {
|
||||
[QEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent;
|
||||
};
|
||||
case "Painkillers": {
|
||||
private _painSuppress = GET_PAIN_SUPPRESS(_patient);
|
||||
_patient setVariable [VAR_PAIN_SUPP, (_painSuppress + PAINKILLERS_PAIN_SUPPRESSION) min 1, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_patient);
|
||||
|
@ -52,7 +52,7 @@ private _userAndItem = if (GET_NUMBER_ENTRY(_config >> "consumeItem") == 1) then
|
||||
[objNull, ""]; // Treatment does not require items to be consumed
|
||||
};
|
||||
|
||||
_userAndItem params ["_itemUser", "_usedItem"];
|
||||
_userAndItem params ["_itemUser", "_usedItem", "_createLitter"];
|
||||
|
||||
private _isInZeus = !isNull findDisplay 312;
|
||||
|
||||
@ -161,7 +161,7 @@ if (_callbackProgress isEqualTo {}) then {
|
||||
|
||||
[
|
||||
_treatmentTime,
|
||||
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem],
|
||||
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem, _createLitter],
|
||||
FUNC(treatmentSuccess),
|
||||
FUNC(treatmentFailure),
|
||||
getText (_config >> "displayNameProgress"),
|
||||
|
@ -11,6 +11,7 @@
|
||||
* 3: Treatment <STRING>
|
||||
* 4: Item User <OBJECT>
|
||||
* 5: Used Item <STRING>
|
||||
* 6: Create Litter <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -19,7 +20,8 @@
|
||||
*/
|
||||
|
||||
params ["_args"];
|
||||
_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem"];
|
||||
_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem", "_createLitter"];
|
||||
TRACE_7("",_medic,_patient,_bodyPart,_classname,_itemUser,_usedItem,_createLitter);
|
||||
|
||||
// Switch medic to end animation immediately
|
||||
private _endInAnim = _medic getVariable QGVAR(endInAnim);
|
||||
@ -45,7 +47,7 @@ GET_FUNCTION(_callbackSuccess,configFile >> QGVAR(actions) >> _classname >> "cal
|
||||
_args call _callbackSuccess;
|
||||
|
||||
// Call litter creation handler
|
||||
_args call FUNC(createLitter);
|
||||
if (_createLitter) then { _args call FUNC(createLitter); };
|
||||
|
||||
// Emit local event for medical API
|
||||
["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* 2: Items <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* User and Item <ARRAY>
|
||||
* User and Item and Litter Created<ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [player, cursorObject, ["bandage"]] call ace_medical_treatment_fnc_useItem
|
||||
@ -40,22 +40,24 @@ private _useOrder = [[_patient, _medic], [_medic, _patient], [_medic]] select GV
|
||||
switch (true) do {
|
||||
case (_x in _vehicleItems): {
|
||||
_unitVehicle addItemCargoGlobal [_x, -1];
|
||||
[_unit, _x] breakOut "Main";
|
||||
[_unit, _x, false] breakOut "Main";
|
||||
};
|
||||
case (_x in _vehicleMagazines): {
|
||||
[_unitVehicle, _x] call EFUNC(common,adjustMagazineAmmo);
|
||||
[_unit, _x] breakOut "Main";
|
||||
[_unit, _x, false] breakOut "Main";
|
||||
};
|
||||
case (_x in _unitItems): {
|
||||
_unit removeItem _x;
|
||||
[_unit, _x] breakOut "Main";
|
||||
[_unit, _x, true] breakOut "Main";
|
||||
};
|
||||
case (_x in _unitMagazines): {
|
||||
private _magsStart = count magazines _unit;
|
||||
[_unit, _x] call EFUNC(common,adjustMagazineAmmo);
|
||||
[_unit, _x] breakOut "Main";
|
||||
private _magsEnd = count magazines _unit;
|
||||
[_unit, _x, (_magsEnd < _magsStart)] breakOut "Main";
|
||||
};
|
||||
};
|
||||
} forEach _items;
|
||||
} forEach _useOrder;
|
||||
|
||||
[objNull, ""]
|
||||
[objNull, "", false]
|
||||
|
@ -3574,7 +3574,7 @@
|
||||
<English>Receiving Saline IV [%1ml]</English>
|
||||
<German>Erhalte Saline IV [%1ml]</German>
|
||||
<Spanish>Recibiendo Salina IV [%1ml]</Spanish>
|
||||
<Russian>Принимается солевой раствор IV [%1 мл]</Russian>
|
||||
<Russian>Принимается физраствор [%1 мл]</Russian>
|
||||
<Polish>Otrzymywanie soli IV [%1ml]</Polish>
|
||||
<French>Transfusion de sérum salé : [%1 ml]</French>
|
||||
<Czech>Přijímání soli IV [%1ml]</Czech>
|
||||
@ -3590,7 +3590,7 @@
|
||||
<English>Receiving Blood IV [%1ml]</English>
|
||||
<German>Erhalte Blut IV [%1ml]</German>
|
||||
<Spanish>Recibiendo Sangre IV [%1ml]</Spanish>
|
||||
<Russian>Принимается кровь IV [%1 мл]</Russian>
|
||||
<Russian>Принимается кровь [%1 мл]</Russian>
|
||||
<Polish>Otrzymywanie krwi IV [%1ml]</Polish>
|
||||
<French>Transfusion de sang : [%1 ml]</French>
|
||||
<Czech>Přijímání krve IV [%1ml]</Czech>
|
||||
@ -3606,7 +3606,7 @@
|
||||
<English>Receiving Plasma IV [%1ml]</English>
|
||||
<German>Erhalte Plasma IV [%1ml]</German>
|
||||
<Spanish>Recibiendo Plasma IV [%1ml]</Spanish>
|
||||
<Russian>Принимается плазма IV [%1 мл]</Russian>
|
||||
<Russian>Принимается плазма [%1 мл]</Russian>
|
||||
<Polish>Otrzymywanie plazmy IV [%1ml]</Polish>
|
||||
<French>Transfusion de plasma : [%1 ml]</French>
|
||||
<Czech>Přijímání plazmy IV [%1ml]</Czech>
|
||||
|
@ -72,7 +72,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then {
|
||||
};
|
||||
_nearestObjects = _nearestObjects select { !isNull _x };
|
||||
// Select closest object to the expected position to be the current radar target
|
||||
if ((count _nearestObjects) <= 0) exitWith {
|
||||
if (_nearestObjects isEqualTo []) exitWith {
|
||||
_projectile setMissileTarget objNull;
|
||||
_searchPos
|
||||
};
|
||||
@ -117,4 +117,3 @@ if !(isNull _target) then {
|
||||
|
||||
_launchParams set [0, _target];
|
||||
_expectedTargetPos
|
||||
|
||||
|
@ -57,7 +57,7 @@ private _missionRoot = str missionConfigFile select [0, count str missionConfigF
|
||||
};
|
||||
} forEach _splittedList;
|
||||
|
||||
if (count _ambianceSounds == 0) exitWith {};
|
||||
if (_ambianceSounds isEqualTo []) exitWith {};
|
||||
{
|
||||
if ((_x find ".") == -1) then {
|
||||
_ambianceSounds set [_forEachIndex, _x + ".wss"];
|
||||
@ -80,7 +80,7 @@ TRACE_1("",_ambianceSounds);
|
||||
private _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]};
|
||||
|
||||
// Check if there are enough players to even start playing this sound.
|
||||
if (count _allUnits > 0) then {
|
||||
if (_allUnits isNotEqualTo []) then {
|
||||
// find the position from which we are going to play this sound from.
|
||||
private _newPosASL = if (_followPlayers) then {
|
||||
// Select a target unit at random.
|
||||
|
@ -31,7 +31,7 @@ if (_weaponBarrelClass == "") then {
|
||||
// Find all spare barrel the player has
|
||||
private _allBarrels = [_assistant, _weaponBarrelClass] call CBA_fnc_getMagazineIndex;
|
||||
TRACE_1("_allBarrels",_allBarrels);
|
||||
if ((count _allBarrels) < 1) exitWith {};
|
||||
if (_allBarrels isEqualTo []) exitWith {};
|
||||
|
||||
// Determine which on is coolest
|
||||
private _coolestTemp = 10000;
|
||||
|
@ -32,7 +32,7 @@ if (_weaponBarrelClass == "") then {
|
||||
};
|
||||
private _allBarrels = [_unit, _weaponBarrelClass] call CBA_fnc_getMagazineIndex;
|
||||
TRACE_1("_allBarrels",_allBarrels);
|
||||
if ((count _allBarrels) < 1) exitWith {};
|
||||
if (_allBarrels isEqualTo []) exitWith {};
|
||||
|
||||
// Determine the temp of each barrel
|
||||
private _temps = [];
|
||||
|
@ -100,7 +100,7 @@ private _barrelLength = _weaponConfig select 2;
|
||||
private _muzzleVelocity = 0;
|
||||
|
||||
private _bc = 0;
|
||||
if (count (_ammoConfig select 6) > 0) then {
|
||||
if ((_ammoConfig select 6) isNotEqualTo []) then {
|
||||
_bc = (_ammoConfig select 6) select 0;
|
||||
};
|
||||
private _transonicStabilityCoef = _ammoConfig select 4;
|
||||
|
@ -38,7 +38,7 @@ private _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
|
||||
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false};
|
||||
|
||||
private _items = _config call FUNC(getRepairItems);
|
||||
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
if (_items isNotEqualTo [] && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
|
||||
private _return = true;
|
||||
if (getText (_config >> "condition") != "") then {
|
||||
|
@ -20,17 +20,9 @@
|
||||
*/
|
||||
|
||||
params ["_hitPoint", "_textLocalized", "_textDefault", ["_trackArray", []]];
|
||||
_trackArray params [["_trackNames", []], ["_trackStrings", []], ["_trackAmount", []]];
|
||||
|
||||
private _track = (count _trackArray > 0);
|
||||
private _trackNames = [];
|
||||
private _trackStrings = [];
|
||||
private _trackAmount = [];
|
||||
|
||||
if (_track) then {
|
||||
_trackNames = _trackArray select 0;
|
||||
_trackStrings = _trackArray select 1;
|
||||
_trackAmount = _trackArray select 2;
|
||||
};
|
||||
private _track = _trackArray isNotEqualTo [];
|
||||
|
||||
// Prepare first part of the string from stringtable
|
||||
//IGNORE_STRING_WARNING(str_ace_repair_hit);
|
||||
|
@ -44,7 +44,7 @@ if ((isEngineOn _target) && {!GVAR(autoShutOffEngineWhenStartingRepair)}) exitWi
|
||||
};
|
||||
|
||||
private _items = _config call FUNC(getRepairItems);
|
||||
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
if (_items isNotEqualTo [] && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
|
||||
private _return = true;
|
||||
if (getText (_config >> "condition") != "") then {
|
||||
|
@ -9,6 +9,9 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Add keybinds
|
||||
#include "initKeybinds.inc.sqf"
|
||||
|
||||
GVAR(Optics) = ["", "", ""];
|
||||
GVAR(Guns) = ["", "", ""];
|
||||
GVAR(canAdjustElevation) = [false, false, false];
|
||||
@ -41,104 +44,6 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
|
||||
};
|
||||
}] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Add keybinds
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_UP, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_DOWN, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_LEFT, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_RIGHT, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
|
||||
// Register fire event handler
|
||||
["ace_firedPlayer", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
|
@ -17,12 +17,13 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
if (!GVAR(enabled)) exitWith {false};
|
||||
|
||||
params ["_unit", "_turretAndDirection", "_majorStep"];
|
||||
TRACE_3("adjustScope",_unit,_turretAndDirection,_majorStep);
|
||||
|
||||
if (!(_unit isKindOf "Man")) exitWith {false};
|
||||
if (currentMuzzle _unit != currentWeapon _unit) exitWith {false};
|
||||
if (!GVAR(enabled)) exitWith {false};
|
||||
|
||||
private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||
if (_weaponIndex < 0) exitWith {false};
|
||||
|
95
addons/scopes/initKeybinds.inc.sqf
Normal file
95
addons/scopes/initKeybinds.inc.sqf
Normal file
@ -0,0 +1,95 @@
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), LLSTRING(AdjustUpMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), LLSTRING(AdjustDownMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [false, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), LLSTRING(AdjustLeftMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), LLSTRING(AdjustRightMinor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [false, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), LLSTRING(AdjustUpMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_UP, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), LLSTRING(AdjustDownMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, ELEVATION_DOWN, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [true, false, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), LLSTRING(AdjustLeftMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_LEFT, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [209, [true, true, false]], true] call CBA_fnc_addKeybind;
|
||||
|
||||
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), LLSTRING(AdjustRightMajor), {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||
|
||||
[ACE_player] call FUNC(inventoryCheck);
|
||||
|
||||
// Statement
|
||||
[ACE_player, WINDAGE_RIGHT, MAJOR_INCREMENT] call FUNC(adjustScope);
|
||||
}, {false}, [201, [true, true, false]], true] call CBA_fnc_addKeybind;
|
@ -5,7 +5,9 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)];
|
||||
[LSTRING(enabled_displayName), LSTRING(enabled_description)],
|
||||
_category,
|
||||
true,
|
||||
1
|
||||
1,
|
||||
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||
true // Needs mission restart
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
@ -69,7 +71,9 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)];
|
||||
[LSTRING(deduceBarometricPressureFromTerrainAltitude_displayName), LSTRING(deduceBarometricPressureFromTerrainAltitude_description)],
|
||||
_category,
|
||||
false,
|
||||
1
|
||||
1,
|
||||
{[QGVAR(deduceBarometricPressureFromTerrainAltitude), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||
true // Needs mission restart
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
|
@ -48,7 +48,7 @@ class CfgVehicles {
|
||||
selection = "";
|
||||
displayName = CSTRING(PickUp);
|
||||
distance = 5;
|
||||
condition = QUOTE((alive _target) && (count (crew _target) == 0));
|
||||
condition = QUOTE((alive _target) && {(crew _target) isEqualTo []});
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
|
@ -27,7 +27,7 @@ if (GVAR(EnableSafeZone)) then {
|
||||
private _allNearestPlayers = [position _unit, GVAR(SafeZoneRadius)] call FUNC(nearestPlayers);
|
||||
private _nearestEnemyPlayers = _allNearestPlayers select {((side GVAR(OriginalGroup)) getFriend side _x < 0.6) && !(_x getVariable [QGVAR(IsPlayerControlled), false])};
|
||||
|
||||
if (count _nearestEnemyPlayers > 0) exitWith {
|
||||
if (_nearestEnemyPlayers isNotEqualTo []) exitWith {
|
||||
_leave = true;
|
||||
};
|
||||
};
|
||||
|
@ -124,7 +124,7 @@ private _chanceOfDetonation = 0;
|
||||
private _explosiveAmmoCount = 0;
|
||||
private _nonExplosiveAmmoCount = 0;
|
||||
|
||||
if (count (_currentVehicleAmmo select 0) isNotEqualTo 0) then {
|
||||
if ((_currentVehicleAmmo select 0) isNotEqualTo []) then {
|
||||
private _magConfig = configFile >> "CfgMagazines";
|
||||
private _ammoConfig = configFile >> "CfgAmmo";
|
||||
private _countOfExplodableAmmo = 0;
|
||||
|
@ -30,7 +30,7 @@ if (_useCustom) then {
|
||||
private _previousMags = magazinesDetail _unit;
|
||||
_unit addMagazine ["ACE_key_customKeyMagazine", 1]; //addMagazine array has global effects
|
||||
private _newMags = (magazinesDetail _unit) - _previousMags;
|
||||
if ((count _newMags) == 0) exitWith {ERROR("failed to add magazine (inventory full?)");};
|
||||
if (_newMags isEqualTo []) exitWith {ERROR("failed to add magazine (inventory full?)");};
|
||||
private _keyMagazine = _newMags select 0;
|
||||
TRACE_2("setting up key on server",_veh,_keyMagazine);
|
||||
//Have the server run add the key to the vehicle's key array:
|
||||
|
@ -22,7 +22,7 @@ private _weapons = _vehicle weaponsTurret _turret;
|
||||
|
||||
if (
|
||||
count _weapons > 1
|
||||
|| {count _weapons > 0 && {!(_weapons select 0 in ["SmokeLauncher", "BWA3_SmokeLauncher"])}} // @todo somebody might use custom smoke launcher weapons aswell, maybe ...
|
||||
|| {_weapons isNotEqualTo [] && {!(_weapons select 0 in ["SmokeLauncher", "BWA3_SmokeLauncher"])}} // @todo somebody might use custom smoke launcher weapons aswell, maybe ...
|
||||
) then {
|
||||
//This doesn't work reliably for vehilces with additional weapons for the commander. Select smoke launcher instead.
|
||||
|
||||
|
@ -48,34 +48,35 @@ GVAR(currentHumidity) = 0;
|
||||
GVAR(currentOvercast) = 0;
|
||||
|
||||
// Get all non inherited arrays to filter maps that inherit from Stratis/Altis/Tanoa
|
||||
private _nonInheritedArrays = configProperties [configFile >> "CfgWorlds" >> _worldName, "isArray _x", false];
|
||||
private _cfgPath = configFile >> "CfgWorlds" >> _worldName;
|
||||
private _nonInheritedArrays = configProperties [_cfgPath, "isArray _x", false];
|
||||
// And check if any custom non-inherited weather is defined through config and use that if so
|
||||
if ((configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay") in _nonInheritedArrays) exitWith {
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay")) then {
|
||||
GVAR(TempDay) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay");
|
||||
if ((_cfgPath >> "ACE_TempDay") in _nonInheritedArrays) exitWith {
|
||||
if (isArray (_cfgPath >> "ACE_TempDay")) then {
|
||||
GVAR(TempDay) = getArray (_cfgPath >> "ACE_TempDay");
|
||||
};
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempNight")) then {
|
||||
GVAR(TempNight) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempNight");
|
||||
if (isArray (_cfgPath >> "ACE_TempNight")) then {
|
||||
GVAR(TempNight) = getArray (_cfgPath >> "ACE_TempNight");
|
||||
};
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_Humidity")) then {
|
||||
GVAR(Humidity) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_Humidity");
|
||||
if (isArray (_cfgPath >> "ACE_Humidity")) then {
|
||||
GVAR(Humidity) = getArray (_cfgPath >> "ACE_Humidity");
|
||||
};
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMin")) then {
|
||||
GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMin");
|
||||
if (isArray (_cfgPath >> "ACE_WindSpeedMin")) then {
|
||||
GVAR(WindSpeedMin) = getArray (_cfgPath >> "ACE_WindSpeedMin");
|
||||
};
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMean")) then {
|
||||
GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMean");
|
||||
if (isArray (_cfgPath >> "ACE_WindSpeedMean")) then {
|
||||
GVAR(WindSpeedMean) = getArray (_cfgPath >> "ACE_WindSpeedMean");
|
||||
};
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMax")) then {
|
||||
GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMax");
|
||||
if (isArray (_cfgPath >> "ACE_WindSpeedMax")) then {
|
||||
GVAR(WindSpeedMax) = getArray (_cfgPath >> "ACE_WindSpeedMax");
|
||||
};
|
||||
if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindDirectionProbabilities")) then {
|
||||
GVAR(WindDirectionProbabilities) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindDirectionProbabilities");
|
||||
if (isArray (_cfgPath >> "ACE_WindDirectionProbabilities")) then {
|
||||
GVAR(WindDirectionProbabilities) = getArray (_cfgPath >> "ACE_WindDirectionProbabilities");
|
||||
};
|
||||
};
|
||||
|
||||
// Check if the map is among the most popular
|
||||
if (_worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) then {
|
||||
if (_worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) exitWith {
|
||||
// Source: http://www.iten-online.ch/klima/europa/tschechien/prag.htm
|
||||
GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2];
|
||||
GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2];
|
||||
@ -239,3 +240,17 @@ if (_worldName in ["kunduz"]) exitWith {
|
||||
[0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07] // December
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
// Catches any "Winter" Map that hasnt been defined otherwise - this should stay at the end of the file
|
||||
// Values are not based on any RL reference since the snow terrain textures persists regardless the date
|
||||
_cfgPath = _cfgPath >> "RainParticles";
|
||||
if (
|
||||
"winter" in _worldName ||
|
||||
{"snow" in getText (_cfgPath >> "rainDropTexture")} ||
|
||||
{getNumber (_cfgPath >> "snow") != 0}
|
||||
) exitWith {
|
||||
GVAR(TempDay) = [-10,-9,-8,-7,-6,-5,-6,-7,-8,-9,-10,-11];
|
||||
GVAR(TempNight) = [-15,-14,-13,-12,-11,-10,-9,-10,-11,-12,-13,-17];
|
||||
GVAR(Humidity) = [82, 80, 81, 82, 83, 82, 81, 82, 83, 82, 83, 82];
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith {
|
||||
} else {
|
||||
// Direct fire - Get a target position that will work
|
||||
private _lis = lineIntersectsSurfaces [eyePos _unit, _targetASL, _unit, _vehicle];
|
||||
if ((count _lis) > 0) then { // If point is hidden, unit won't fire, do a ray cast to find where they should shoot at
|
||||
if (_lis isNotEqualTo []) then { // If point is hidden, unit won't fire, do a ray cast to find where they should shoot at
|
||||
_targetASL = ((_lis select 0) select 0);
|
||||
TRACE_1("using ray cast pos",_mousePosASL distance _targetASL);
|
||||
};
|
||||
|
@ -146,7 +146,13 @@ MenuType: 0 = Interaction, 1 = Self Interaction
|
||||
|---------- |------------|----------|------|-------------|
|
||||
| `ace_medical_treatment_fullHealLocalMod` | [_patient] | Local | Listen | Called before a local unit is fully healed, mods can listen and apply their own healing logic
|
||||
|
||||
### 2.15 Interaction (`ace_interaction`)
|
||||
### 2.15 Medical Status (`ace_medical_status`)
|
||||
|
||||
| Event Key | Parameters | Locality | Type | Description |
|
||||
|---------- |------------|----------|------|-------------|
|
||||
| `ace_medical_status_getBloodLoss` | [_unit, _bloodLoss] | Local | Listen | Called when blood loss is calculated for a unit, mods can listen and modify the blood loss value by modifying the array
|
||||
|
||||
### 2.16 Interaction (`ace_interaction`)
|
||||
|
||||
| Event Key | Parameters | Locality | Type | Description |
|
||||
|---------- |------------|----------|------|-------------|
|
||||
@ -271,4 +277,4 @@ Calls a globally synchronized event, which will also be run on JIP players unles
|
||||
|
||||
// Event called on another machine (tapping above target machine)
|
||||
["ace_interact_tapShoulder", [arguments], [target]] call CBA_fnc_targetEvent;
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user