Voice mask (#10458)

This commit is contained in:
Flipp Syder
2022-09-28 19:22:27 -07:00
committed by GitHub
parent 336e9ee609
commit 0385f1387c
18 changed files with 357 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ using Content.Server.Disease.Components;
using Content.Server.IdentityManagement;
using Content.Server.Nutrition.EntitySystems;
using Content.Server.Popups;
using Content.Server.VoiceMask;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.IdentityManagement.Components;
using Robust.Shared.Player;
@@ -87,6 +88,8 @@ namespace Content.Server.Clothing
_clothing.SetEquippedPrefix(uid, mask.IsToggled ? "toggled" : null, clothing);
}
// shouldn't this be an event?
// toggle ingestion blocking
if (TryComp<IngestionBlockerComponent>(uid, out var blocker))
blocker.Enabled = !mask.IsToggled;
@@ -99,6 +102,10 @@ namespace Content.Server.Clothing
if (TryComp<IdentityBlockerComponent>(uid, out var identity))
identity.Enabled = !mask.IsToggled;
// toggle voice masking
if (TryComp<VoiceMaskComponent>(uid, out var voiceMask))
voiceMask.Enabled = !mask.IsToggled;
// toggle breath tool connection (skip during equip since that is handled in LungSystem)
if (isEquip || !TryComp<BreathToolComponent>(uid, out var breathTool))
return;