Allow to paint multiple airlocks (#34001)
* Allow to paint multiple airlocks * oh right
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user