[HOTFIX] Borg emag notification and sound fix (#35394)

epic stuff
This commit is contained in:
ScarKy0 2025-02-23 01:49:58 +01:00 committed by deltanedas
parent cc61d8e35e
commit 1daa4215b5
2 changed files with 15 additions and 4 deletions

View File

@ -174,14 +174,18 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
});
}
private void EnsureSubvertedSiliconRole(EntityUid mindId)
protected override void EnsureSubvertedSiliconRole(EntityUid mindId)
{
base.EnsureSubvertedSiliconRole(mindId);
if (!_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
_roles.MindAddRole(mindId, "MindRoleSubvertedSilicon", silent: true);
}
private void RemoveSubvertedSiliconRole(EntityUid mindId)
protected override void RemoveSubvertedSiliconRole(EntityUid mindId)
{
base.RemoveSubvertedSiliconRole(mindId);
if (_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
_roles.MindTryRemoveRole<SubvertedSiliconRoleComponent>(mindId);
}
@ -241,8 +245,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<ActorComponent>(uid, out var actor))
return;

View File

@ -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]