diff --git a/Content.Server/GameObjects/Components/Research/LatheComponent.cs b/Content.Server/GameObjects/Components/Research/LatheComponent.cs index f06967b592..b97cc3a7cb 100644 --- a/Content.Server/GameObjects/Components/Research/LatheComponent.cs +++ b/Content.Server/GameObjects/Components/Research/LatheComponent.cs @@ -64,38 +64,39 @@ namespace Content.Server.GameObjects.Components.Research { if (!Powered) return; - switch (message.Message) - { - case LatheQueueRecipeMessage msg: - _prototypeManager.TryIndex(msg.ID, out LatheRecipePrototype recipe); - if (recipe != null) - for (var i = 0; i < msg.Quantity; i++) - { - Queue.Enqueue(recipe); - _userInterface.SendMessage(new LatheFullQueueMessage(GetIDQueue())); - } - break; - case LatheSyncRequestMessage msg: - if (!Owner.TryGetComponent(out MaterialStorageComponent storage)) return; - _userInterface.SendMessage(new LatheFullQueueMessage(GetIDQueue())); - if (_producingRecipe != null) - _userInterface.SendMessage(new LatheProducingRecipeMessage(_producingRecipe.ID)); - break; - case LatheServerSelectionMessage msg: - if (!Owner.TryGetComponent(out ResearchClientComponent researchClient)) return; - researchClient.OpenUserInterface(message.Session); - break; + switch (message.Message) + { + case LatheQueueRecipeMessage msg: + _prototypeManager.TryIndex(msg.ID, out LatheRecipePrototype recipe); + if (recipe != null) + for (var i = 0; i < msg.Quantity; i++) + { + Queue.Enqueue(recipe); + _userInterface.SendMessage(new LatheFullQueueMessage(GetIDQueue())); + } + break; + case LatheSyncRequestMessage msg: + if (!Owner.TryGetComponent(out MaterialStorageComponent storage)) return; + _userInterface.SendMessage(new LatheFullQueueMessage(GetIDQueue())); + if (_producingRecipe != null) + _userInterface.SendMessage(new LatheProducingRecipeMessage(_producingRecipe.ID)); + break; - case LatheServerSyncMessage msg: - if (!Owner.TryGetComponent(out TechnologyDatabaseComponent database) - || !Owner.TryGetComponent(out ProtolatheDatabaseComponent protoDatabase)) return; + case LatheServerSelectionMessage msg: + if (!Owner.TryGetComponent(out ResearchClientComponent researchClient)) return; + researchClient.OpenUserInterface(message.Session); + break; - if (database.SyncWithServer()) - protoDatabase.Sync(); + case LatheServerSyncMessage msg: + if (!Owner.TryGetComponent(out TechnologyDatabaseComponent database) + || !Owner.TryGetComponent(out ProtolatheDatabaseComponent protoDatabase)) return; - break; - } + if (database.SyncWithServer()) + protoDatabase.Sync(); + + break; + } }