From 7f62067a7b89e18ccaa4aa8a0788672e26441a86 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Dec 2019 18:30:53 +0100 Subject: [PATCH 1/4] Add Wipe glasses self interaction (#7307) --- AUTHORS.txt | 1 + addons/goggles/CfgVehicles.hpp | 14 ++++++++++++++ addons/goggles/XEH_PREP.hpp | 1 + addons/goggles/XEH_postInit.sqf | 12 ++++++------ addons/goggles/XEH_preInit.sqf | 2 ++ addons/goggles/config.cpp | 1 + .../goggles/functions/fnc_canWipeGlasses.sqf | 18 ++++++++++++++++++ addons/goggles/initSettings.sqf | 8 ++++++++ addons/goggles/stringtable.xml | 17 +++++++++++++++++ 9 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 addons/goggles/CfgVehicles.hpp create mode 100644 addons/goggles/functions/fnc_canWipeGlasses.sqf create mode 100644 addons/goggles/initSettings.sqf diff --git a/AUTHORS.txt b/AUTHORS.txt index 26979b22ea..37f79efcc2 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -148,6 +148,7 @@ Tonic Tourorist Tuupertunut Valentin Torikian +veteran29 voiper VyMajoris(W-Cephei) Winter diff --git a/addons/goggles/CfgVehicles.hpp b/addons/goggles/CfgVehicles.hpp new file mode 100644 index 0000000000..c9cdf70293 --- /dev/null +++ b/addons/goggles/CfgVehicles.hpp @@ -0,0 +1,14 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(wipeGlasses) { + displayName = CSTRING(WipeGlasses); + condition = QUOTE(GVAR(showClearGlasses) && {call FUNC(canWipeGlasses)}); + statement = QUOTE(call FUNC(clearGlasses)); + }; + }; + }; + }; +}; diff --git a/addons/goggles/XEH_PREP.hpp b/addons/goggles/XEH_PREP.hpp index ba198439b5..fdbb4f9fef 100644 --- a/addons/goggles/XEH_PREP.hpp +++ b/addons/goggles/XEH_PREP.hpp @@ -17,6 +17,7 @@ PREP(isGogglesVisible); PREP(isInRotorWash); // general +PREP(canWipeGlasses); PREP(clearGlasses); PREP(getExplosionIndex); diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index a1a7c53460..7e4c038ae5 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -3,12 +3,12 @@ if (!hasInterface) exitWith {}; ["ACE3 Common", QGVAR(wipeGlasses), localize LSTRING(WipeGlasses), { - if (GVAR(effects) != 2) exitWith {false}; //Can only wipe if full effects setting is set - if (!GETVAR(ace_player,ACE_isUnconscious,false)) exitWith { - call FUNC(clearGlasses); - true - }; - false + // Conditions: specific + if !(call FUNC(canWipeGlasses)) exitWith {false}; + + call FUNC(clearGlasses); + + true }, {false}, [20, [true, true, false]], false] call CBA_fnc_addKeybind; diff --git a/addons/goggles/XEH_preInit.sqf b/addons/goggles/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/goggles/XEH_preInit.sqf +++ b/addons/goggles/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index 5ef19a3640..5d0d8bbaf1 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -16,6 +16,7 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" #define COMBAT_GOGGLES ACE_Overlay = QPATHTOF(textures\HUD\CombatGoggles.paa); \ ACE_OverlayCracked = QPATHTOF(textures\HUD\CombatGogglesCracked.paa); \ diff --git a/addons/goggles/functions/fnc_canWipeGlasses.sqf b/addons/goggles/functions/fnc_canWipeGlasses.sqf new file mode 100644 index 0000000000..e6dc89b3ce --- /dev/null +++ b/addons/goggles/functions/fnc_canWipeGlasses.sqf @@ -0,0 +1,18 @@ +#include "script_component.hpp" +/* + * Author: veteran29 + * Checks if player can wipe goggles. + * + * Arguments: + * None + * + * Return Value: + * Can wipe goggles + * + * Example: + * [] call ace_goggles_fnc_canWipeGlasses + * + * Public: No + */ + +GVAR(effects) == 2 && {!GETVAR(ACE_player,ACE_isUnconscious,false)} // return diff --git a/addons/goggles/initSettings.sqf b/addons/goggles/initSettings.sqf new file mode 100644 index 0000000000..1ecd1c01e8 --- /dev/null +++ b/addons/goggles/initSettings.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(showClearGlasses), + "CHECKBOX", + [LSTRING(SettingShowClearGlasses), LSTRING(SettingShowClearGlasses)], + localize LSTRING(SettingsName), + false, // default value + 0 // isGlobal +] call CBA_fnc_addSetting; diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index dfcfc7a868..ba0c60c1da 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -14,6 +14,19 @@ Óculos Lunettes + + ACE Goggles + ACE Schutzbrille + ACE Occhiali + ACE 護目鏡 + ACE 护目镜 + ACE ゴーグル + ACE 고글 + ACE Gogle + ACE Очки + ACE Óculos + ACE Lunettes + Show Goggle Effects in Third Person Brilleneffekt in dritter Person anzeigen @@ -85,5 +98,9 @@ 染色 + 影響 Cor + Efeitos + + Show Wipe Goggles self interaction + Pokaż interakcję Wyczyść Gogle + From ead5105070b4358ad9b8a8648e8d82b844466e73 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Wed, 18 Dec 2019 18:31:08 +0100 Subject: [PATCH 2/4] Add Check ammo self interaction setting (#7306) --- addons/reload/CfgVehicles.hpp | 11 ++++++++++ addons/reload/XEH_PREP.hpp | 1 + addons/reload/XEH_postInit.sqf | 2 +- addons/reload/XEH_preInit.sqf | 2 ++ .../reload/functions/fnc_canCheckAmmoSelf.sqf | 20 +++++++++++++++++++ addons/reload/initSettings.sqf | 9 +++++++++ addons/reload/stringtable.xml | 8 ++++++++ 7 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 addons/reload/functions/fnc_canCheckAmmoSelf.sqf create mode 100644 addons/reload/initSettings.sqf diff --git a/addons/reload/CfgVehicles.hpp b/addons/reload/CfgVehicles.hpp index fe1e9672e6..f6723510e0 100644 --- a/addons/reload/CfgVehicles.hpp +++ b/addons/reload/CfgVehicles.hpp @@ -1,6 +1,17 @@ class CfgVehicles { class Man; class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(checkAmmo) { + displayName = CSTRING(checkAmmo); + condition = QUOTE(GVAR(showCheckAmmoSelf) && {_player call FUNC(canCheckAmmoSelf)}); + statement = QUOTE(call FUNC(checkAmmo)); + exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"}; + }; + }; + }; + class ACE_Actions { class ACE_Weapon { class GVAR(LinkBelt) { diff --git a/addons/reload/XEH_PREP.hpp b/addons/reload/XEH_PREP.hpp index f2b386ac37..0a7fd80fbb 100644 --- a/addons/reload/XEH_PREP.hpp +++ b/addons/reload/XEH_PREP.hpp @@ -1,5 +1,6 @@ PREP(canCheckAmmo); +PREP(canCheckAmmoSelf); PREP(getAmmoToLinkBelt); PREP(checkAmmo); PREP(displayAmmo); diff --git a/addons/reload/XEH_postInit.sqf b/addons/reload/XEH_postInit.sqf index 3e1b95f9bf..26f7f303ff 100644 --- a/addons/reload/XEH_postInit.sqf +++ b/addons/reload/XEH_postInit.sqf @@ -8,7 +8,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(ACE_player call CBA_fnc_canUseWeapon || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false}; + if !(ACE_player call FUNC(canCheckAmmoSelf)) exitWith {false}; // Ignore if controlling UAV (blocks radar keybind) if (!isNull (ACE_controlledUAV param [0, objNull])) exitWith {false}; diff --git a/addons/reload/XEH_preInit.sqf b/addons/reload/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/reload/XEH_preInit.sqf +++ b/addons/reload/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/reload/functions/fnc_canCheckAmmoSelf.sqf b/addons/reload/functions/fnc_canCheckAmmoSelf.sqf new file mode 100644 index 0000000000..2c8c03dcce --- /dev/null +++ b/addons/reload/functions/fnc_canCheckAmmoSelf.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: veteran29 + * Check if the player can check his own ammo. + * + * Arguments: + * 0: Player + * + * Return Value: + * Can check ammo + * + * Example: + * [cursorObject] call ace_reload_fnc_canCheckAmmoSelf + * + * Public: No + */ + +params ["_player"]; + +_player call CBA_fnc_canUseWeapon && {!((vehicle _player) isKindOf "StaticWeapon")} diff --git a/addons/reload/initSettings.sqf b/addons/reload/initSettings.sqf new file mode 100644 index 0000000000..bf692c20de --- /dev/null +++ b/addons/reload/initSettings.sqf @@ -0,0 +1,9 @@ + +[ + QGVAR(showCheckAmmoSelf), + "CHECKBOX", + [LSTRING(SettingShowCheckAmmoSelf), LSTRING(SettingShowCheckAmmoSelfDesc)], + localize ELSTRING(common,ACEKeybindCategoryWeapons), + false, // default value + 0 // isGlobal +] call CBA_fnc_addSetting; diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index b5419ebbf2..f78d8676b7 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -33,6 +33,14 @@ 在重新装填时检查新弹匣上的弹药. 在重新裝填時檢查新彈匣上的彈藥. + + Always show check ammo self interaction + Zawsze pokazuj interakcję od sprawdzania amunicji + + + Shows check ammo self interaction even when not in static weapons. + Pokazuje interakcję od sprawdzania amunicji poza bronią statyczną. + Check Ammo Munition prüfen From 204a0c9331660aafe3f60dbf3dcd0f73247527d3 Mon Sep 17 00:00:00 2001 From: dfr1238 <48888992+dfr1238@users.noreply.github.com> Date: Thu, 19 Dec 2019 01:31:34 +0800 Subject: [PATCH 3/4] update tchinese translate (#7309) --- addons/artillerytables/stringtable.xml | 6 ++++- addons/ballistics/stringtable.xml | 31 +++++++++++++++++++++++++- addons/grenades/stringtable.xml | 1 + 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/addons/artillerytables/stringtable.xml b/addons/artillerytables/stringtable.xml index 1ac88416e6..a61477fba0 100644 --- a/addons/artillerytables/stringtable.xml +++ b/addons/artillerytables/stringtable.xml @@ -3,9 +3,11 @@ Artillery Rangetable + 火炮射程表 Universal Artillery Rangetable + 通用的火炮射程表 Air Resistance @@ -41,9 +43,11 @@ Artillery Computer Disabled + 停用火炮電腦 Disable the vanilla artillery computers + 停用原本的火炮控制電腦 - + diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index d314c83d27..9943ab3c78 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -4,90 +4,119 @@ #00 Buckshot + #00 鹿彈 #00 Buckshot + #00 鹿彈 #0 Buckshot + #0 鹿彈 #0 Buckshot + #0 鹿彈 #1 Buckshot + #1 鹿彈 #1 Buckshot + #1 鹿彈 #2 Buckshot + #2 鹿彈 #2 Buckshot + #2 鹿彈 #3 Buckshot + #3 鹿彈 #3 Buckshot + #3 鹿彈 #4 Buckshot + #4 鹿彈 #4 Buckshot + #4 鹿彈 #7 Birdshot + #7 鹿彈 #7 Birdshot + #7 鹿彈 12 Gauge 2Rnd #00 Buckshot + 12鉛徑 2發 #00 鹿彈 12 Gauge 2Rnd #0 Buckshot + 12鉛徑 2發 #0 鹿彈 12 Gauge 2Rnd #1 Buckshot + 12鉛徑 2發 #1 鹿彈 12 Gauge 2Rnd #2 Buckshot + 12鉛徑 2發 #2 鹿彈 12 Gauge 2Rnd #3 Buckshot + 12鉛徑 2發 #3 鹿彈 12 Gauge 2Rnd #4 Buckshot + 12鉛徑 2發 #4 鹿彈 12 Gauge 2Rnd #7 Birdshot + 12鉛徑 2發 #7 鹿彈 12 Gauge 6Rnd #00 Buckshot + 12鉛徑 6發 #00 鹿彈 12 Gauge 6Rnd #0 Buckshot + 12鉛徑 6發 #0 鹿彈 12 Gauge 6Rnd #1 Buckshot + 12鉛徑 6發 #1 鹿彈 12 Gauge 6Rnd #2 Buckshot + 12鉛徑 6發 #2 鹿彈 12 Gauge 6Rnd #3 Buckshot + 12鉛徑 6發 #3 鹿彈 12 Gauge 6Rnd #4 Buckshot + 12鉛徑 6發 #4 鹿彈 12 Gauge 6Rnd #7 Birdshot + 12鉛徑 6發 #7 鹿彈 12 Gauge 15Rnd #00 Buckshot + 12鉛徑 15發 #00 鹿彈 @@ -1294,7 +1323,7 @@ 6.5mm 200-lövedékes infravörös nyomkövető heveder<br />Lövedékek: 200<br />Használható: Stoner 99 LMG 6.5mm 200発入り IR-DIM曳光弾ベルト<br />装填数: 200<br />次で使用: Stoner 99 LMG 200발들이 6.5mm IR-DIM 예광탄 벨트<br />장탄수: 200<br />사용처: Stoner 99 LMG - 6.5毫米 200發 低視度紅外線曳光彈<br />發數: 200<br />使用於: Stoner 99 LMG + 6.5毫米 200發 低視度紅外線曳光彈<br />發數: 200<br />使用於: Stoner 99 重機槍 6.5mm 200发 低视度红外线曳光弹<br />发数: 200<br />使用于: Stoner 99 LMG diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index 2a82fb2d8f..c8c5ddcf9a 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -148,6 +148,7 @@ CTS 7290 9-bang Flash Grenade CTS 7290 9-fach Blendgranate + CTS 7290-9 9閃 閃光彈 CTS 7290-9 From f57fe99e9ad2ca5a64f1dffb32599e9244202cbb Mon Sep 17 00:00:00 2001 From: Laid3acK Date: Wed, 18 Dec 2019 19:00:10 +0100 Subject: [PATCH 4/4] RKSL compat - Updated with the last RKSL v3.01 (#7310) --- optionals/compat_rksl_pm_ii/CfgWeapons.hpp | 36 ++++++++-------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/optionals/compat_rksl_pm_ii/CfgWeapons.hpp b/optionals/compat_rksl_pm_ii/CfgWeapons.hpp index dcf9fe569b..d787565419 100644 --- a/optionals/compat_rksl_pm_ii/CfgWeapons.hpp +++ b/optionals/compat_rksl_pm_ii/CfgWeapons.hpp @@ -3,49 +3,37 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - class RKSL_optic_PMII_312: ItemCore { + class RKSL_optic_PMII_312: ItemCore { // https://www.schmidtundbender.de/en/products/police-military-forces/3-12x50-pm-ii.html ACE_ScopeHeightAboveRail = 4.2235; - ACE_ScopeAdjust_Vertical[] = { -1, 12 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {0, 13}; // Single Turn + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 100 }; + discreteDistance[] = {100}; // default RKSL {100,...,1500} discreteDistanceInitIndex = 0; + distanceZoomMax = 1500; // default RKSL 100 + distanceZoomMin = 100; // default RKSL }; }; }; }; - class RKSL_optic_PMII_312_sunshade: ItemCore { + class RKSL_optic_PMII_525: ItemCore { // https://www.schmidtundbender.de/en/products/police-military-forces/5-25x56-pm-iilp.html ACE_ScopeHeightAboveRail = 4.2235; - ACE_ScopeAdjust_Vertical[] = { -1, 12 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {0, 26}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 100 }; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - - class RKSL_optic_PMII_525: ItemCore { - ACE_ScopeHeightAboveRail = 4.2235; - ACE_ScopeAdjust_Vertical[] = { 0, 26 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo: InventoryOpticsItem_Base_F { - class OpticsModes { - class Snip { - discreteDistance[] = { 100 }; + discreteDistance[] = {100}; // default RKSL {300,...,2500} discreteDistanceInitIndex = 0; + distanceZoomMax = 2500; // default RKSL 300 + distanceZoomMin = 300; // default RKSL }; }; };