diff --git a/Assets/_DDD/_Scripts/Game/GameFramework/Localization/LocalizationManager.cs b/Assets/_DDD/_Scripts/Game/GameFramework/Localization/LocalizationManager.cs index e43ed2d8a..1eef04352 100644 --- a/Assets/_DDD/_Scripts/Game/GameFramework/Localization/LocalizationManager.cs +++ b/Assets/_DDD/_Scripts/Game/GameFramework/Localization/LocalizationManager.cs @@ -70,6 +70,8 @@ public void PostInit() /// public LocalizedString GetLocalizedString(string key) { + if (string.IsNullOrWhiteSpace(key)) return null; + if (!_isInitialized) { Debug.LogWarning("[LocalizationManager] 호출 전에 초기화되지 않았습니다."); diff --git a/Assets/_DDD/_Scripts/Game/GameUi/BaseUi/InteractionUis/InteractionMessageUi.cs b/Assets/_DDD/_Scripts/Game/GameUi/BaseUi/InteractionUis/InteractionMessageUi.cs index 9062a088b..71d35b969 100644 --- a/Assets/_DDD/_Scripts/Game/GameUi/BaseUi/InteractionUis/InteractionMessageUi.cs +++ b/Assets/_DDD/_Scripts/Game/GameUi/BaseUi/InteractionUis/InteractionMessageUi.cs @@ -47,13 +47,14 @@ public void HandleEvent(HideInteractionUiEvent evt) private void ShowInteractionUiEvent(ShowInteractionUiEvent evt) { - _previousLocalizedString = LocalizationManager.Instance.GetLocalizedString(evt.TextKey); - _textLabel.color = evt.CanInteract ? _canInteractTextColor : _cannotInteractTextColor; - - if (_textLabelLocalizeStringEvent.StringReference != _previousLocalizedString) + var currentLocalizedString = LocalizationManager.Instance.GetLocalizedString(evt.TextKey); + if (currentLocalizedString != _previousLocalizedString) { - _textLabelLocalizeStringEvent.StringReference = _previousLocalizedString; + _textLabelLocalizeStringEvent.StringReference = currentLocalizedString; + _previousLocalizedString = LocalizationManager.Instance.GetLocalizedString(evt.TextKey); } + + _textLabel.color = evt.CanInteract ? _canInteractTextColor : _cannotInteractTextColor; _filledImage.fillAmount = evt.HoldProgress; if (_panel.activeInHierarchy == false) diff --git a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Cook.cs b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Cook.cs index b70a77aec..c72d3ad23 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Cook.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Cook.cs @@ -37,5 +37,10 @@ public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloa { return true; } + + public string GetCurrentSubsystemTypeName() + { + return _cookType.ToString(); + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs index 55c89e123..190249fc1 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs @@ -24,7 +24,7 @@ public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInter if (iCookware == null) return false; var interactableCookwareType = iCookware.CookwareType; - if (DataManager.Instance.GetDataSo().TryGetValueByCookwareType(interactableCookwareType, out var cookwareData) == false) + if (DataManager.Instance.GetDataAsset().TryGetValueByCookwareType(interactableCookwareType, out var cookwareData) == false) { return false; }