Stash work
This commit is contained in:
@@ -5,6 +5,7 @@ using AppleHills.Core.Settings;
|
||||
using Core.Lifecycle;
|
||||
using Core.Settings;
|
||||
using Input;
|
||||
using Minigames.FortFight.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Core
|
||||
@@ -173,7 +174,9 @@ namespace Core
|
||||
var sortingGameSettings = SettingsProvider.Instance.LoadSettingsSynchronous<CardSortingSettings>();
|
||||
var birdPooperSettings = SettingsProvider.Instance.LoadSettingsSynchronous<BirdPooperSettings>();
|
||||
var statueDressupSettings = SettingsProvider.Instance.LoadSettingsSynchronous<StatueDressupSettings>();
|
||||
|
||||
var fortFightSettings = SettingsProvider.Instance.LoadSettingsSynchronous<FortFightSettings>();
|
||||
|
||||
|
||||
// Register settings with service locator
|
||||
if (playerSettings != null)
|
||||
{
|
||||
@@ -244,10 +247,21 @@ namespace Core
|
||||
{
|
||||
Debug.LogError("Failed to load StatueDressupSettings");
|
||||
}
|
||||
|
||||
if (fortFightSettings != null)
|
||||
{
|
||||
ServiceLocator.Register<IFortFightSettings>(fortFightSettings);
|
||||
Logging.Debug("FortFightSettings registered successfully");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Failed to load FortFightSettings");
|
||||
}
|
||||
|
||||
// Log success
|
||||
_settingsLoaded = playerSettings != null && interactionSettings != null && minigameSettings != null
|
||||
&& cardSystemSettings != null && birdPooperSettings != null && statueDressupSettings != null;
|
||||
&& cardSystemSettings != null && birdPooperSettings != null && statueDressupSettings != null
|
||||
&& fortFightSettings != null;
|
||||
if (_settingsLoaded)
|
||||
{
|
||||
Logging.Debug("All settings loaded and registered with ServiceLocator");
|
||||
@@ -312,5 +326,8 @@ namespace Core
|
||||
public float PlayerStopDistance => GetSettings<IInteractionSettings>()?.PlayerStopDistance ?? 6.0f;
|
||||
public float PlayerStopDistanceDirectInteraction => GetSettings<IInteractionSettings>()?.PlayerStopDistanceDirectInteraction ?? 2.0f;
|
||||
public float DefaultPuzzlePromptRange => GetSettings<IInteractionSettings>()?.DefaultPuzzlePromptRange ?? 3.0f;
|
||||
|
||||
// Fort Fight Settings
|
||||
public float WeakPointExplosionRadius => GetSettings<IFortFightSettings>()?.WeakPointExplosionRadius ?? 2.5f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user