]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Allow to paint multiple airlocks (#34001)
authorlzk <124214523+lzk228@users.noreply.github.com>
Tue, 24 Dec 2024 02:25:03 +0000 (03:25 +0100)
committerGitHub <noreply@github.com>
Tue, 24 Dec 2024 02:25:03 +0000 (03:25 +0100)
* Allow to paint multiple airlocks

* oh right

Content.Shared/SprayPainter/Components/SprayPainterComponent.cs
Content.Shared/SprayPainter/SharedSprayPainterSystem.cs

index 1742b13f8d32d5e9125551cd0d9299155b4bd207..0591cb2dcbd03b58c2614b272475e0b5afe9ca4f 100644 (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>
index 0e216db1467622a8ab271271b8c11c832f56dc96..48a941d598fd290ea09aea8a582cc12b2071296a 100644 (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