diff --git a/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantManagementStateSo.cs b/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantManagementStateSo.cs index 8c19ff11c..56e8cebf1 100644 --- a/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantManagementStateSo.cs +++ b/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantManagementStateSo.cs @@ -191,7 +191,6 @@ public bool TryRemoveTodayMenu(ItemViewModel model) dirtyEvt.DomainFlags = SmartVariablesDomain.RestaurantToday; EventBus.Broadcast(dirtyEvt); EventBus.Broadcast(removedEvt); - } return removed; @@ -216,10 +215,10 @@ public bool TryAddTodayCookware(ItemViewModel model) } } + var dirtyEvt = GameEvents.SmartVariablesDirtyEvent; + dirtyEvt.DomainFlags = SmartVariablesDomain.RestaurantToday; + EventBus.Broadcast(dirtyEvt); EventBus.Broadcast(RestaurantEvents.TodayMenuAddedEvent); - var dirtyEvt2 = GameEvents.SmartVariablesDirtyEvent; - dirtyEvt2.DomainFlags = SmartVariablesDomain.RestaurantToday; - EventBus.Broadcast(dirtyEvt2); return true; } @@ -234,12 +233,12 @@ public bool TryRemoveTodayCookware(ItemViewModel model) if (_cookwareToRecipeIds.Remove(cookwareId) == false) return false; + var dirtyEvt = GameEvents.SmartVariablesDirtyEvent; + dirtyEvt.DomainFlags = SmartVariablesDomain.RestaurantToday; + EventBus.Broadcast(dirtyEvt); var evt = RestaurantEvents.TodayMenuRemovedEvent; evt.InventoryCategoryType = InventoryCategoryType.Cookware; EventBus.Broadcast(evt); - var dirtyEvt3 = GameEvents.SmartVariablesDirtyEvent; - dirtyEvt3.DomainFlags = SmartVariablesDomain.RestaurantToday; - EventBus.Broadcast(dirtyEvt3); return true; }