diff --git a/addons/disposable/XEH_preInit.sqf b/addons/disposable/XEH_preInit.sqf
index 52d330e4d..069405edc 100644
--- a/addons/disposable/XEH_preInit.sqf
+++ b/addons/disposable/XEH_preInit.sqf
@@ -49,6 +49,8 @@ private _cfgMagazines = configFile >> "CfgMagazines";
};
} forEach configProperties [configFile >> "CBA_DisposableLaunchers", "isArray _x"];
-["All", "InitPost", FUNC(replaceMagazineCargo)] call CBA_fnc_addClassEventHandler;
+["CBA_settingsInitialized", {
+ ["All", "InitPost", FUNC(replaceMagazineCargo), nil, nil, true] call CBA_fnc_addClassEventHandler;
+}] call CBA_fnc_addEventHandler;
ADDON = true;
diff --git a/addons/disposable/fnc_firedDisposable.sqf b/addons/disposable/fnc_firedDisposable.sqf
index dd69b3dc3..9e0cf2f44 100644
--- a/addons/disposable/fnc_firedDisposable.sqf
+++ b/addons/disposable/fnc_firedDisposable.sqf
@@ -29,6 +29,8 @@ Author:
commy2
---------------------------------------------------------------------------- */
+if (!GVAR(replaceDisposableLauncher)) exitWith {};
+
params ["_unit", "_launcher", "_muzzle", "", "", "", "_projectile"];
private _usedLauncher = GVAR(UsedLaunchers) getVariable _launcher;
diff --git a/addons/disposable/fnc_initDisplayInventory.sqf b/addons/disposable/fnc_initDisplayInventory.sqf
index ef8c017aa..6a856f0ae 100644
--- a/addons/disposable/fnc_initDisplayInventory.sqf
+++ b/addons/disposable/fnc_initDisplayInventory.sqf
@@ -6,8 +6,7 @@ private _fnc_update = {
params ["_display"];
private _control = _display displayCtrl IDC_FG_SW_MAGAZINE;
- private _unit = call CBA_fnc_currentUnit;
- _control ctrlEnable isNil {GVAR(LoadedLaunchers) getVariable secondaryWeapon _unit};
+ _control ctrlEnable (!GVAR(replaceDisposableLauncher) || {isNil {GVAR(LoadedLaunchers) getVariable secondaryWeapon call CBA_fnc_currentUnit}});
};
_display displayAddEventHandler ["MouseMoving", _fnc_update];
diff --git a/addons/disposable/fnc_replaceMagazineCargo.sqf b/addons/disposable/fnc_replaceMagazineCargo.sqf
index cc56439fe..7e9e2ce55 100644
--- a/addons/disposable/fnc_replaceMagazineCargo.sqf
+++ b/addons/disposable/fnc_replaceMagazineCargo.sqf
@@ -20,6 +20,8 @@ Author:
commy2
---------------------------------------------------------------------------- */
+if (!GVAR(replaceDisposableLauncher)) exitWith {};
+
params ["_box"];
if (!local _box) exitWith {};
if (missionNamespace getVariable [QGVAR(disableMagazineReplacement), false]) exitWith {};
diff --git a/addons/disposable/initSettings.sqf b/addons/disposable/initSettings.sqf
index 5a02aa491..501cfcea0 100644
--- a/addons/disposable/initSettings.sqf
+++ b/addons/disposable/initSettings.sqf
@@ -1,3 +1,12 @@
+[
+ QGVAR(replaceDisposableLauncher),
+ "CHECKBOX",
+ [LLSTRING(ReplaceDisposableLauncher), LLSTRING(ReplaceDisposableLauncherTooltip)],
+ ELSTRING(common,WeaponsCategory),
+ true, // default value
+ 1 // isGlobal
+] call EFUNC(settings,init);
+
[
QGVAR(dropUsedLauncher),
"LIST",
@@ -5,7 +14,11 @@
ELSTRING(common,WeaponsCategory),
[
[0,1,2],
- [LLSTRING(DropNever), LLSTRING(DropAIOnly), LLSTRING(DropSelectedAnotherWeapon)],
+ [
+ [LLSTRING(DropNever), LLSTRING(DropNeverTooltip)],
+ [LLSTRING(DropAIOnly), LLSTRING(DropAIOnlyTooltip)],
+ [LLSTRING(DropSelectedAnotherWeapon), LLSTRING(DropSelectedAnotherWeaponTooltip)]
+ ],
2
],
0 // isGlobal
diff --git a/addons/disposable/stringtable.xml b/addons/disposable/stringtable.xml
index f802a6540..3f0447847 100644
--- a/addons/disposable/stringtable.xml
+++ b/addons/disposable/stringtable.xml
@@ -16,15 +16,40 @@
Niemals
行わない
+
+ Don't automatically drop the used disposable launcher.
+ Benutzten Einwegwerfer nicht automatisch ablegen.
+ 使った使い捨てランチャーを自動的に落とさないようにします。
+
AI Only
Nur KI
AI のみ
+
+ Only AI drops the used disposable launcher.
+ Nur KI legt den benutzten Einwegwerfer ab.
+ AI のみ使った使い捨てランチャーを落とすようにします。
+
Selected Another Weapon
Andere Waffe ausgewählt
別の武器が選択後
+
+ Automatically drop the used disposable launcher as soon as another weapon is selected.
+ Benutzten Einwegwerfer automatisch ablegen, sobald eine andere Waffe ausgewählt wurde.
+ 他の武器を選択すると即時に使った使い捨てランチャーを自動的に落とすようにします。
+
+
+ Replace Disposable Launcher
+ Einwegwerfer ersetzten
+ 使い捨てランチャーを置換
+
+
+ If enabled, disposable launchers can only be used once. Ammunition for disposable launchers in containers and vehicles will be replaced with loaded disposable launchers. If disabled, disposable launchers can be reloaded after use.
+ Wenn aktiviert, dann können Einwegwerfer nur einmal benutzt werden. Munition für Einwegwerfer in Kisten und Fahrzeugen wird durch geladene Einwegwerfer ersetzt. Wenn deaktiviert, dann können Einwegwerfer nach der Benutzung nachgeladen werden.
+ 有効化すると、使い捨てランチャーは一度のみ使用できます。コンテナ内にある使い捨てランチャーは装填された使い捨てランチャーに置き換えられます。無効化すると、使用後に使い捨てランチャーをリロードできます。
+
diff --git a/addons/events/initSettings.sqf b/addons/events/initSettings.sqf
index 19370088d..a3afe954d 100644
--- a/addons/events/initSettings.sqf
+++ b/addons/events/initSettings.sqf
@@ -3,10 +3,14 @@
"LIST",
[LLSTRING(RepetitionMode), LLSTRING(RepetitionModeTooltip)],
ELSTRING(common,WeaponsCategory),
- [[0, 1, 2], [
- [LLSTRING(RepetitionModeOptic), LLSTRING(RepetitionModeOpticTooltip)], // Exit optic view
- [LLSTRING(RepetitionModeTriggerRelease), LLSTRING(RepetitionModeTriggerReleaseTooltip)], // Stop holding trigger
- [LLSTRING(RepetitionModeTriggerPress), LLSTRING(RepetitionModeTriggerPressTooltip)] // Click trigger again
- ], 1],
- 2
+ [
+ [0, 1, 2],
+ [
+ [LLSTRING(RepetitionModeOptic), LLSTRING(RepetitionModeOpticTooltip)], // Exit optic view
+ [LLSTRING(RepetitionModeTriggerRelease), LLSTRING(RepetitionModeTriggerReleaseTooltip)], // Stop holding trigger
+ [LLSTRING(RepetitionModeTriggerPress), LLSTRING(RepetitionModeTriggerPressTooltip)] // Click trigger again
+ ],
+ 1
+ ],
+ 2 // client setting
] call CBA_fnc_addSetting;