This commit is contained in:
ShadowCommander
2023-06-18 11:33:19 -07:00
committed by GitHub
parent 8a943fb374
commit dd7032a860
85 changed files with 1432 additions and 711 deletions

View File

@@ -69,8 +69,8 @@ public sealed partial class ParticleAcceleratorSystem
if (comp.Enabled || !comp.CanBeEnabled)
return;
if (HasComp<MindComponent>(user?.AttachedEntity))
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{EntityManager.ToPrettyString((EntityUid) user!.AttachedEntity):player} has turned {EntityManager.ToPrettyString(uid)} on");
if (user?.AttachedEntity is {} player)
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(player):player} has turned {ToPrettyString(uid)} on");
comp.Enabled = true;
UpdatePowerDraw(uid, comp);
@@ -89,8 +89,8 @@ public sealed partial class ParticleAcceleratorSystem
if (!comp.Enabled)
return;
if (HasComp<MindComponent>(user?.AttachedEntity))
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{EntityManager.ToPrettyString((EntityUid) user!.AttachedEntity):player} has turned {EntityManager.ToPrettyString(uid)} off");
if (user?.AttachedEntity is {} player)
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(player):player} has turned {ToPrettyString(uid)} off");
comp.Enabled = false;
UpdatePowerDraw(uid, comp);
@@ -146,7 +146,7 @@ public sealed partial class ParticleAcceleratorSystem
if (strength == comp.SelectedStrength)
return;
if (HasComp<MindComponent>(user?.AttachedEntity))
if (user?.AttachedEntity is {} player)
{
var impact = strength switch
{
@@ -158,7 +158,7 @@ public sealed partial class ParticleAcceleratorSystem
or _ => LogImpact.Extreme,
};
_adminLogger.Add(LogType.Action, impact, $"{EntityManager.ToPrettyString(user!.AttachedEntity!.Value):player} has set the strength of {EntityManager.ToPrettyString(uid)} to {strength}");
_adminLogger.Add(LogType.Action, impact, $"{ToPrettyString(player):player} has set the strength of {ToPrettyString(uid)} to {strength}");
}
comp.SelectedStrength = strength;