]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Bug fix: Force cancellation of RCD constructions if the construction type is changed...
authorchromiumboy <50505512+chromiumboy@users.noreply.github.com>
Sun, 14 Apr 2024 03:01:01 +0000 (22:01 -0500)
committerGitHub <noreply@github.com>
Sun, 14 Apr 2024 03:01:01 +0000 (13:01 +1000)
Force cancellation of RCD constructions if the construction type is changed

Content.Shared/RCD/Systems/RCDSystem.cs

index f172060dedb321f5b8fd6af70a3a6d00d856cd17..974755f0004f8f918f7055d50eb1433f53137c11 100644 (file)
@@ -230,13 +230,19 @@ public class RCDSystem : EntitySystem
 
         // Exit if the RCD prototype has changed
         if (component.ProtoId != args.Event.StartingProtoId)
+        {
+            args.Cancel();
             return;
+        }
 
         // Ensure the RCD operation is still valid
         var location = GetCoordinates(args.Event.Location);
 
         if (!TryGetMapGridData(location, out var mapGridData))
+        {
+            args.Cancel();
             return;
+        }
 
         if (!IsRCDOperationStillValid(uid, component, mapGridData.Value, args.Event.Target, args.Event.User))
             args.Cancel();