Allow to paint multiple airlocks (#34001)

* Allow to paint multiple airlocks

* oh right
This commit is contained in:
lzk
2024-12-24 03:25:03 +01:00
committed by GitHub
parent 31aec7385d
commit 1cbc8c1dcc
2 changed files with 1 additions and 13 deletions

View File

@@ -16,13 +16,6 @@ public sealed partial class SprayPainterComponent : Component
[DataField]
public TimeSpan PipeSprayTime = TimeSpan.FromSeconds(1);
/// <summary>
/// DoAfterId for airlock spraying.
/// Pipes do not track doafters so you can spray multiple at once.
/// </summary>
[DataField]
public DoAfterId? AirlockDoAfter;
/// <summary>
/// Pipe color chosen to spray with.
/// </summary>

View File

@@ -60,8 +60,6 @@ public abstract class SharedSprayPainterSystem : EntitySystem
private void OnDoorDoAfter(Entity<SprayPainterComponent> ent, ref SprayPainterDoorDoAfterEvent args)
{
ent.Comp.AirlockDoAfter = null;
if (args.Handled || args.Cancelled)
return;
@@ -116,7 +114,7 @@ public abstract class SharedSprayPainterSystem : EntitySystem
if (args.Handled)
return;
if (!TryComp<SprayPainterComponent>(args.Used, out var painter) || painter.AirlockDoAfter != null)
if (!TryComp<SprayPainterComponent>(args.Used, out var painter))
return;
var group = Proto.Index<AirlockGroupPrototype>(ent.Comp.Group);
@@ -138,9 +136,6 @@ public abstract class SharedSprayPainterSystem : EntitySystem
if (!DoAfter.TryStartDoAfter(doAfterEventArgs, out var id))
return;
// since we are now spraying an airlock prevent spraying more at the same time
// pipes ignore this
painter.AirlockDoAfter = id;
args.Handled = true;
// Log the attempt