From a6861b0461bafc8818d1c8add84dd03fc2751d17 Mon Sep 17 00:00:00 2001 From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Sun, 23 Feb 2025 01:49:58 +0100 Subject: [PATCH] [HOTFIX] Borg emag notification and sound fix (#35394) epic stuff --- Content.Server/Silicons/Laws/SiliconLawSystem.cs | 12 +++++++++--- .../Silicons/Laws/SharedSiliconLawSystem.cs | 7 ++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs index f5ead80bdd..33eef8bc56 100644 --- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs +++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs @@ -172,14 +172,18 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem }); } - private void EnsureSubvertedSiliconRole(EntityUid mindId) + protected override void EnsureSubvertedSiliconRole(EntityUid mindId) { + base.EnsureSubvertedSiliconRole(mindId); + if (!_roles.MindHasRole(mindId)) _roles.MindAddRole(mindId, "MindRoleSubvertedSilicon", silent: true); } - private void RemoveSubvertedSiliconRole(EntityUid mindId) + protected override void RemoveSubvertedSiliconRole(EntityUid mindId) { + base.RemoveSubvertedSiliconRole(mindId); + if (_roles.MindHasRole(mindId)) _roles.MindTryRemoveRole(mindId); } @@ -239,8 +243,10 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem return ev.Laws; } - public void NotifyLawsChanged(EntityUid uid, SoundSpecifier? cue = null) + public override void NotifyLawsChanged(EntityUid uid, SoundSpecifier? cue = null) { + base.NotifyLawsChanged(uid, cue); + if (!TryComp(uid, out var actor)) return; diff --git a/Content.Shared/Silicons/Laws/SharedSiliconLawSystem.cs b/Content.Shared/Silicons/Laws/SharedSiliconLawSystem.cs index c3a8c22808..e7433de604 100644 --- a/Content.Shared/Silicons/Laws/SharedSiliconLawSystem.cs +++ b/Content.Shared/Silicons/Laws/SharedSiliconLawSystem.cs @@ -62,7 +62,7 @@ public abstract partial class SharedSiliconLawSystem : EntitySystem args.Handled = true; } - protected virtual void NotifyLawsChanged(EntityUid uid, SoundSpecifier? cue = null) + public virtual void NotifyLawsChanged(EntityUid uid, SoundSpecifier? cue = null) { } @@ -71,6 +71,11 @@ public abstract partial class SharedSiliconLawSystem : EntitySystem { } + + protected virtual void RemoveSubvertedSiliconRole(EntityUid mindId) + { + + } } [ByRefEvent] -- 2.51.2