Fix masks not toggling voice mask component (#22506)

This commit is contained in:
DrSmugleaf
2023-12-14 17:39:11 -08:00
committed by GitHub
parent 69767eef24
commit af3a1e5900
3 changed files with 7 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ public sealed partial class VoiceMaskSystem : EntitySystem
{
SubscribeLocalEvent<VoiceMaskComponent, TransformSpeakerNameEvent>(OnSpeakerNameTransform);
SubscribeLocalEvent<VoiceMaskComponent, VoiceMaskChangeNameMessage>(OnChangeName);
SubscribeLocalEvent<VoiceMaskComponent, ItemMaskToggledEvent>(OnMaskToggled);
SubscribeLocalEvent<VoiceMaskComponent, WearerMaskToggledEvent>(OnMaskToggled);
SubscribeLocalEvent<VoiceMaskerComponent, GotEquippedEvent>(OnEquip);
SubscribeLocalEvent<VoiceMaskerComponent, GotUnequippedEvent>(OnUnequip);
SubscribeLocalEvent<VoiceMaskSetNameEvent>(OnSetName);
@@ -69,7 +69,7 @@ public sealed partial class VoiceMaskSystem : EntitySystem
}
}
private void OnMaskToggled(Entity<VoiceMaskComponent> ent, ref ItemMaskToggledEvent args)
private void OnMaskToggled(Entity<VoiceMaskComponent> ent, ref WearerMaskToggledEvent args)
{
ent.Comp.Enabled = !args.IsToggled;
}