@@ -2,10 +2,11 @@ using Content.Server.ParticleAccelerator.Components;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Singularity.Components;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Diagnostics;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.ParticleAccelerator.EntitySystems;
|
||||
|
||||
@@ -59,7 +60,7 @@ public sealed partial class ParticleAcceleratorSystem
|
||||
FireEmitter(comp.StarboardEmitter!.Value, strength);
|
||||
}
|
||||
|
||||
public void SwitchOn(EntityUid uid, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null)
|
||||
public void SwitchOn(EntityUid uid, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null)
|
||||
{
|
||||
if (!Resolve(uid, ref comp))
|
||||
return;
|
||||
@@ -82,7 +83,7 @@ public sealed partial class ParticleAcceleratorSystem
|
||||
UpdateUI(uid, comp);
|
||||
}
|
||||
|
||||
public void SwitchOff(EntityUid uid, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null)
|
||||
public void SwitchOff(EntityUid uid, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null)
|
||||
{
|
||||
if (!Resolve(uid, ref comp))
|
||||
return;
|
||||
@@ -130,7 +131,7 @@ public sealed partial class ParticleAcceleratorSystem
|
||||
UpdateUI(uid, comp);
|
||||
}
|
||||
|
||||
public void SetStrength(EntityUid uid, ParticleAcceleratorPowerState strength, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null)
|
||||
public void SetStrength(EntityUid uid, ParticleAcceleratorPowerState strength, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null)
|
||||
{
|
||||
if (!Resolve(uid, ref comp))
|
||||
return;
|
||||
@@ -346,10 +347,10 @@ public sealed partial class ParticleAcceleratorSystem
|
||||
if (msg.Enabled)
|
||||
{
|
||||
if (comp.Assembled)
|
||||
SwitchOn(uid, msg.Session, comp);
|
||||
SwitchOn(uid, (IPlayerSession?) msg.Session, comp);
|
||||
}
|
||||
else
|
||||
SwitchOff(uid, msg.Session, comp);
|
||||
SwitchOff(uid, (IPlayerSession?) msg.Session, comp);
|
||||
|
||||
UpdateUI(uid, comp);
|
||||
}
|
||||
@@ -363,7 +364,7 @@ public sealed partial class ParticleAcceleratorSystem
|
||||
if (TryComp<ApcPowerReceiverComponent>(uid, out var apcPower) && !apcPower.Powered)
|
||||
return;
|
||||
|
||||
SetStrength(uid, msg.State, msg.Session, comp);
|
||||
SetStrength(uid, msg.State, (IPlayerSession?) msg.Session, comp);
|
||||
|
||||
UpdateUI(uid, comp);
|
||||
}
|
||||
@@ -377,7 +378,7 @@ public sealed partial class ParticleAcceleratorSystem
|
||||
if (TryComp<ApcPowerReceiverComponent>(uid, out var apcPower) && !apcPower.Powered)
|
||||
return;
|
||||
|
||||
RescanParts(uid, msg.Session, comp);
|
||||
RescanParts(uid, (IPlayerSession?) msg.Session, comp);
|
||||
|
||||
UpdateUI(uid, comp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user