Stable merge for hotfix backport (#35412)
This commit is contained in:
@@ -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<SubvertedSiliconRoleComponent>(mindId))
|
if (!_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
|
||||||
_roles.MindAddRole(mindId, "MindRoleSubvertedSilicon", silent: true);
|
_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))
|
if (_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
|
||||||
_roles.MindTryRemoveRole<SubvertedSiliconRoleComponent>(mindId);
|
_roles.MindTryRemoveRole<SubvertedSiliconRoleComponent>(mindId);
|
||||||
}
|
}
|
||||||
@@ -239,8 +243,10 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
|
|||||||
return ev.Laws;
|
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))
|
if (!TryComp<ActorComponent>(uid, out var actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -168,11 +168,9 @@ public abstract class SharedRoleSystem : EntitySystem
|
|||||||
var update = MindRolesUpdate((mindId, mind));
|
var update = MindRolesUpdate((mindId, mind));
|
||||||
|
|
||||||
// RoleType refresh, Role time tracking, Update Admin playerlist
|
// RoleType refresh, Role time tracking, Update Admin playerlist
|
||||||
if (mind.OwnedEntity != null)
|
|
||||||
{
|
|
||||||
var message = new RoleAddedEvent(mindId, mind, update, silent);
|
var message = new RoleAddedEvent(mindId, mind, update, silent);
|
||||||
RaiseLocalEvent(mind.OwnedEntity.Value, message, true);
|
RaiseLocalEvent(mindId, message, true);
|
||||||
}
|
|
||||||
|
|
||||||
var name = Loc.GetString(protoEnt.Name);
|
var name = Loc.GetString(protoEnt.Name);
|
||||||
if (mind.OwnedEntity is not null)
|
if (mind.OwnedEntity is not null)
|
||||||
@@ -311,11 +309,8 @@ public abstract class SharedRoleSystem : EntitySystem
|
|||||||
|
|
||||||
var update = MindRolesUpdate(mind);
|
var update = MindRolesUpdate(mind);
|
||||||
|
|
||||||
if (mind.Comp.OwnedEntity != null)
|
|
||||||
{
|
|
||||||
var message = new RoleRemovedEvent(mind.Owner, mind.Comp, update);
|
var message = new RoleRemovedEvent(mind.Owner, mind.Comp, update);
|
||||||
RaiseLocalEvent(mind.Comp.OwnedEntity.Value, message, true);
|
RaiseLocalEvent(mind, message, true);
|
||||||
}
|
|
||||||
|
|
||||||
_adminLogger.Add(LogType.Mind,
|
_adminLogger.Add(LogType.Mind,
|
||||||
LogImpact.Low,
|
LogImpact.Low,
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public abstract partial class SharedSiliconLawSystem : EntitySystem
|
|||||||
args.Handled = true;
|
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]
|
[ByRefEvent]
|
||||||
|
|||||||
Reference in New Issue
Block a user