Skip to content

Commit d5b15a8

Browse files
committed
Added Docs + CBA Setting for Gas particles
1 parent b8cc1bb commit d5b15a8

5 files changed

Lines changed: 494 additions & 2 deletions

File tree

addons/chemical/XEH_postInit.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ GVAR(exposureWatcherUnits) = createHashMap;
223223
};
224224

225225
// Gas particles are only created for toxic zones right now
226-
if (_gasLevel != 0) then {
226+
if (_gasLevel != 0 && missionNamespace getVariable [QGVAR(enableParticleEffects), true]) then {
227227
// Broadcast particle creation to all machines (JIP-safe). Gas level is
228228
// forwarded so each client can pick the right per-gas particle class.
229229
private _effectsJipID = [QGVAR(createZoneParticles), [_gasLogic, _radius, _gasLevel]] call CBA_fnc_globalEventJIP;

addons/chemical/functions/fnc_gasManagerPFH.sqf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
if (_effectsJipID != "") then {
3232
[_effectsJipID] call CBA_fnc_removeGlobalEventJIP;
3333
};
34-
[QGVAR(removeZoneParticles), [netId _gasLogic]] call CBA_fnc_globalEvent;
34+
if (missionNamespace getVariable [QGVAR(enableParticleEffects), true]) then {
35+
[QGVAR(removeZoneParticles), [netId _gasLogic]] call CBA_fnc_globalEvent;
36+
};
3537

3638
detach _gasLogic;
3739
deleteVehicle _gasLogic;

addons/chemical/initSettings.inc.sqf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@
7777
true
7878
] call CBA_fnc_addSetting;
7979

80+
[
81+
QGVAR(enableParticleEffects),
82+
"CHECKBOX",
83+
[LLSTRING(SETTING_enableParticleEffects), LLSTRING(SETTING_enableParticleEffects_DESC)],
84+
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Protection)],
85+
[true],
86+
true
87+
] call CBA_fnc_addSetting;
88+
8089
// =============== CS Gas (Level 0) ===============
8190
[
8291
QGVAR(tearGasDropChance),

addons/chemical/stringtable.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,12 @@
967967
<English>Determines if a small hint should appear telling the player that he smells a certain type of gas</English>
968968
<German>Bestimmt, ob ein Hinweis angezeigt wird dass der Spieler ein gewisses Gas riecht</German>
969969
</Key>
970+
<Key ID="STR_KAT_Chemical_SETTING_enableParticleEffects">
971+
<English>Enable Gas particle effects</English>
972+
</Key>
973+
<Key ID="STR_KAT_Chemical_SETTING_enableParticleEffects_DESC">
974+
<English>Determines if particle effects are created for gas zones.</English>
975+
</Key>
970976
<Key ID="STR_KAT_Chemical_giveGasMask_action">
971977
<English>Put on gas mask</English>
972978
<Czech>Nasadit Plynovou masku</Czech>

0 commit comments

Comments
 (0)