fix lathe syncing and tweak ui (#17489)
This commit is contained in:
@@ -41,6 +41,7 @@ namespace Content.Server.Lathe
|
||||
SubscribeLocalEvent<LatheComponent, RefreshPartsEvent>(OnPartsRefresh);
|
||||
SubscribeLocalEvent<LatheComponent, UpgradeExamineEvent>(OnUpgradeExamine);
|
||||
SubscribeLocalEvent<LatheComponent, TechnologyDatabaseModifiedEvent>(OnDatabaseModified);
|
||||
SubscribeLocalEvent<LatheComponent, ResearchRegistrationChangedEvent>(OnResearchRegistrationChanged);
|
||||
|
||||
SubscribeLocalEvent<LatheComponent, LatheQueueRecipeMessage>(OnLatheQueueRecipeMessage);
|
||||
SubscribeLocalEvent<LatheComponent, LatheSyncRequestMessage>(OnLatheSyncRequestMessage);
|
||||
@@ -262,6 +263,11 @@ namespace Content.Server.Lathe
|
||||
UpdateUserInterfaceState(uid, component);
|
||||
}
|
||||
|
||||
private void OnResearchRegistrationChanged(EntityUid uid, LatheComponent component, ref ResearchRegistrationChangedEvent args)
|
||||
{
|
||||
UpdateUserInterfaceState(uid, component);
|
||||
}
|
||||
|
||||
protected override bool HasRecipe(EntityUid uid, LatheRecipePrototype recipe, LatheComponent component)
|
||||
{
|
||||
return GetAvailableRecipes(uid, component).Contains(recipe.ID);
|
||||
|
||||
Reference in New Issue
Block a user