Stash work

This commit is contained in:
Michal Pikulski
2025-12-02 23:56:13 +01:00
parent bb8d600af2
commit d5ab69d944
100 changed files with 10105 additions and 124 deletions

View File

@@ -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;
}
}