Strip debug logging from the game, fix screen weirdness

This commit is contained in:
Michal Pikulski
2025-10-14 15:53:58 +02:00
parent 18be597424
commit e8180b21bf
65 changed files with 768 additions and 411 deletions

View File

@@ -4,7 +4,8 @@ using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement;
using AppleHills.Core.Settings; // Added for IInteractionSettings
using AppleHills.Core.Settings;
using Core; // Added for IInteractionSettings
namespace PuzzleS
{
@@ -86,7 +87,7 @@ namespace PuzzleS
{
SceneManager.sceneLoaded -= OnSceneLoaded;
Debug.Log("[MDPI] OnSceneLoaded");
Logging.Debug("[MDPI] OnSceneLoaded");
_runtimeDependencies.Clear();
BuildRuntimeDependencies();
UnlockInitialSteps();
@@ -173,7 +174,7 @@ namespace PuzzleS
_unlockedSteps.Clear();
BuildRuntimeDependencies();
UnlockInitialSteps();
Debug.Log($"[Puzzles] Registered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
Logging.Debug($"[Puzzles] Registered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
}
}
@@ -185,7 +186,7 @@ namespace PuzzleS
{
if (behaviour?.stepData == null) return;
_stepBehaviours.Remove(behaviour.stepData);
Debug.Log($"[Puzzles] Unregistered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
Logging.Debug($"[Puzzles] Unregistered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
}
/// <summary>
@@ -198,10 +199,10 @@ namespace PuzzleS
{
foreach (var dep in _runtimeDependencies[step])
{
Debug.Log($"[Puzzles] Step {step.stepId} depends on {dep.stepId}");
Logging.Debug($"[Puzzles] Step {step.stepId} depends on {dep.stepId}");
}
}
Debug.Log($"[Puzzles] Runtime dependencies built. Total steps: {_stepBehaviours.Count}");
Logging.Debug($"[Puzzles] Runtime dependencies built. Total steps: {_stepBehaviours.Count}");
}
/// <summary>
@@ -213,7 +214,7 @@ namespace PuzzleS
var initialSteps = PuzzleGraphUtility.FindInitialSteps(_runtimeDependencies);
foreach (var step in initialSteps)
{
Debug.Log($"[Puzzles] Initial step unlocked: {step.stepId}");
Logging.Debug($"[Puzzles] Initial step unlocked: {step.stepId}");
UnlockStep(step);
}
@@ -229,7 +230,7 @@ namespace PuzzleS
// Check if all dependencies have been completed
if (AreRuntimeDependenciesMet(step))
{
Debug.Log($"[Puzzles] Chain step unlocked: {step.stepId}");
Logging.Debug($"[Puzzles] Chain step unlocked: {step.stepId}");
UnlockStep(step);
madeProgress = true;
}
@@ -245,7 +246,7 @@ namespace PuzzleS
{
if (_completedSteps.Contains(step)) return;
_completedSteps.Add(step);
Debug.Log($"[Puzzles] Step completed: {step.stepId}");
Logging.Debug($"[Puzzles] Step completed: {step.stepId}");
// Broadcast completion
OnStepCompleted?.Invoke(step);
@@ -254,12 +255,12 @@ namespace PuzzleS
{
if (AreRuntimeDependenciesMet(unlock))
{
Debug.Log($"[Puzzles] Unlocking step {unlock.stepId} after completing {step.stepId}");
Logging.Debug($"[Puzzles] Unlocking step {unlock.stepId} after completing {step.stepId}");
UnlockStep(unlock);
}
else
{
Debug.Log($"[Puzzles] Step {unlock.stepId} not unlocked yet, waiting for other dependencies");
Logging.Debug($"[Puzzles] Step {unlock.stepId} not unlocked yet, waiting for other dependencies");
}
}
CheckPuzzleCompletion();
@@ -292,7 +293,7 @@ namespace PuzzleS
{
behaviour.UnlockStep();
}
Debug.Log($"[Puzzles] Step unlocked: {step.stepId}");
Logging.Debug($"[Puzzles] Step unlocked: {step.stepId}");
// Broadcast unlock
OnStepUnlocked?.Invoke(step);
@@ -305,7 +306,7 @@ namespace PuzzleS
{
if (_completedSteps.Count == _stepBehaviours.Count)
{
Debug.Log("[Puzzles] Puzzle complete! All steps finished.");
Logging.Debug("[Puzzles] Puzzle complete! All steps finished.");
// TODO: Fire puzzle complete event or trigger outcome logic
}
}