]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix microwave construction (#27500)
authorShadowCommander <shadowjjt@gmail.com>
Tue, 30 Apr 2024 00:19:07 +0000 (17:19 -0700)
committerGitHub <noreply@github.com>
Tue, 30 Apr 2024 00:19:07 +0000 (20:19 -0400)
The microwave system would update UserInterface on any container changed instead of just the microwave_entity_container. This would cause it to error when trying to update the UI when ConstructionSystem inserted the circuit board and components.

Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs

index fa5c5dad2ac531eaa881a8738fa23c06019abfe1..8938aa8b1dc420bd879595a65c715e175475cafa 100644 (file)
@@ -271,6 +271,9 @@ namespace Content.Server.Kitchen.EntitySystems
 
         private void OnContentUpdate(EntityUid uid, MicrowaveComponent component, ContainerModifiedMessage args) // For some reason ContainerModifiedMessage just can't be used at all with Entity<T>. TODO: replace with Entity<T> syntax once that's possible
         {
+            if (component.Storage != args.Container)
+                return;
+
             UpdateUserInterfaceState(uid, component);
         }