]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix vending machine thank you flag timing (#24049)
authorTayrtahn <tayrtahn@gmail.com>
Sun, 14 Jan 2024 01:43:05 +0000 (20:43 -0500)
committerGitHub <noreply@github.com>
Sun, 14 Jan 2024 01:43:05 +0000 (12:43 +1100)
Fix thank you flag timing

Content.Server/VendingMachines/VendingMachineSystem.cs

index 6d7ebef464d5a339d9c784494f209d80ddbc62e5..e4d4e931e3536bb056c584bc8d3efc100cd2cebf 100644 (file)
@@ -298,6 +298,7 @@ namespace Content.Server.VendingMachines
             vendComponent.Ejecting = true;
             vendComponent.NextItemToEject = entry.ID;
             vendComponent.ThrowNextItem = throwItem;
+            vendComponent.ShouldSayThankYou = true;
             entry.Amount--;
             UpdateVendingMachineInterfaceState(uid, vendComponent);
             TryUpdateVisualState(uid, vendComponent);
@@ -405,8 +406,6 @@ namespace Content.Server.VendingMachines
                 _throwingSystem.TryThrow(ent, direction, vendComponent.NonLimitedEjectForce);
             }
 
-            vendComponent.ShouldSayThankYou = true;
-
             vendComponent.NextItemToEject = null;
             vendComponent.ThrowNextItem = false;
         }