Hardbombs & Defusables (#15380)
Co-authored-by: Kara <lunarautomaton6@gmail.com> Co-authored-by: Just-a-Unity-Dev <just-a-unity-dev@users.noreply.github.com> Co-authored-by: LankLTE <twlowe06@gmail.com> Co-authored-by: LankLTE <135308300+LankLTE@users.noreply.github.com>
This commit is contained in:
42
Content.Server/Defusable/WireActions/ActivateWireAction.cs
Normal file
42
Content.Server/Defusable/WireActions/ActivateWireAction.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Content.Server.Defusable.Components;
|
||||
using Content.Server.Defusable.Systems;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Defusable;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Wires;
|
||||
|
||||
namespace Content.Server.Defusable.WireActions;
|
||||
|
||||
public sealed partial class ActivateWireAction : ComponentWireAction<DefusableComponent>
|
||||
{
|
||||
public override Color Color { get; set; } = Color.Lime;
|
||||
public override string Name { get; set; } = "wire-name-bomb-live";
|
||||
|
||||
public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return comp.Activated ? StatusLightState.BlinkingFast : StatusLightState.Off;
|
||||
}
|
||||
|
||||
public override object StatusKey { get; } = DefusableWireStatus.LiveIndicator;
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return EntityManager.System<DefusableSystem>().ActivateWireCut(user, wire, comp);
|
||||
}
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
// if its not disposable defusable system already handles* this
|
||||
// *probably
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
EntityManager.System<DefusableSystem>().ActivateWirePulse(user, wire, comp);
|
||||
}
|
||||
}
|
||||
38
Content.Server/Defusable/WireActions/BoltWireAction.cs
Normal file
38
Content.Server/Defusable/WireActions/BoltWireAction.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Content.Server.Defusable.Components;
|
||||
using Content.Server.Defusable.Systems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Defusable;
|
||||
using Content.Shared.Wires;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.Defusable.WireActions;
|
||||
|
||||
public sealed partial class BoltWireAction : ComponentWireAction<DefusableComponent>
|
||||
{
|
||||
public override Color Color { get; set; } = Color.Red;
|
||||
public override string Name { get; set; } = "wire-name-bomb-bolt";
|
||||
public override bool LightRequiresPower { get; set; } = false;
|
||||
|
||||
public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return comp.Bolted ? StatusLightState.On : StatusLightState.Off;
|
||||
}
|
||||
|
||||
public override object StatusKey { get; } = DefusableWireStatus.BoltIndicator;
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return EntityManager.System<DefusableSystem>().BoltWireCut(user, wire, comp);
|
||||
}
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return EntityManager.System<DefusableSystem>().BoltWireMend(user, wire, comp);
|
||||
}
|
||||
|
||||
public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
EntityManager.System<DefusableSystem>().BoltWirePulse(user, wire, comp);
|
||||
}
|
||||
}
|
||||
39
Content.Server/Defusable/WireActions/BoomWireAction.cs
Normal file
39
Content.Server/Defusable/WireActions/BoomWireAction.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Content.Server.Defusable.Components;
|
||||
using Content.Server.Defusable.Systems;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Defusable;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Wires;
|
||||
|
||||
namespace Content.Server.Defusable.WireActions;
|
||||
|
||||
public sealed partial class BoomWireAction : ComponentWireAction<DefusableComponent>
|
||||
{
|
||||
public override Color Color { get; set; } = Color.Red;
|
||||
public override string Name { get; set; } = "wire-name-bomb-boom";
|
||||
public override bool LightRequiresPower { get; set; } = false;
|
||||
|
||||
public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return comp.Activated ? StatusLightState.On : StatusLightState.Off;
|
||||
}
|
||||
|
||||
public override object StatusKey { get; } = DefusableWireStatus.BoomIndicator;
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return EntityManager.System<DefusableSystem>().BoomWireCut(user, wire, comp);
|
||||
}
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return EntityManager.System<DefusableSystem>().BoomWireMend(user, wire, comp);
|
||||
}
|
||||
|
||||
public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
EntityManager.System<DefusableSystem>().BoomWirePulse(user, wire, comp);
|
||||
}
|
||||
}
|
||||
44
Content.Server/Defusable/WireActions/DelayWireAction.cs
Normal file
44
Content.Server/Defusable/WireActions/DelayWireAction.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Content.Server.Defusable.Components;
|
||||
using Content.Server.Defusable.Systems;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Defusable;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Wires;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.Defusable.WireActions;
|
||||
|
||||
public sealed partial class DelayWireAction : ComponentWireAction<DefusableComponent>
|
||||
{
|
||||
public override Color Color { get; set; } = Color.Yellow;
|
||||
public override string Name { get; set; } = "wire-name-bomb-delay";
|
||||
public override bool LightRequiresPower { get; set; } = false;
|
||||
|
||||
public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return comp.DelayWireUsed ? StatusLightState.On : StatusLightState.Off;
|
||||
}
|
||||
|
||||
public override object StatusKey { get; } = DefusableWireStatus.DelayIndicator;
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
EntityManager.System<DefusableSystem>().DelayWirePulse(user, wire, comp);
|
||||
}
|
||||
}
|
||||
41
Content.Server/Defusable/WireActions/ProceedWireAction.cs
Normal file
41
Content.Server/Defusable/WireActions/ProceedWireAction.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Content.Server.Defusable.Components;
|
||||
using Content.Server.Defusable.Systems;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Defusable;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Wires;
|
||||
|
||||
namespace Content.Server.Defusable.WireActions;
|
||||
|
||||
public sealed partial class ProceedWireAction : ComponentWireAction<DefusableComponent>
|
||||
{
|
||||
public override Color Color { get; set; } = Color.Blue;
|
||||
public override string Name { get; set; } = "wire-name-bomb-proceed";
|
||||
public override bool LightRequiresPower { get; set; } = false;
|
||||
|
||||
public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return comp.Activated ? StatusLightState.Off : StatusLightState.BlinkingFast;
|
||||
}
|
||||
|
||||
public override object StatusKey { get; } = DefusableWireStatus.ProceedIndicator;
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return EntityManager.System<DefusableSystem>().ProceedWireCut(user, wire, comp);
|
||||
}
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
|
||||
{
|
||||
EntityManager.System<DefusableSystem>().ProceedWirePulse(user, wire, comp);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user