Commit Graph

57 Commits

Author SHA1 Message Date
86c1df55f2 First pass over MPV for the cement-statue-sticker minigame (#63)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #63
2025-11-24 14:55:45 +00:00
Michal Pikulski
b4b17c18ed Some b ase obstacle and poop spawning 2025-11-21 09:22:06 +01:00
c0e5ec14bd Moved boosterpack 2025-11-20 17:32:02 +01:00
058af331e0 pooper_minigame (#62)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #62
2025-11-20 15:16:57 +00:00
Michal Pikulski
47e4668592 Rename this piece of shit font from the unhinged naming convention 2025-11-19 23:49:42 +01:00
journaliciouz
21308c339d Every card was KUNG FU FIGHTING 2025-11-19 22:56:24 +01:00
fee5515bbd First MVP of sorting minigame (#60)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #60
2025-11-19 13:56:10 +00:00
219f2239a1 Added number of photos scoring 2025-11-18 11:33:16 +01:00
0aa2270e1a Lifecycle System Refactor & Logging Centralization (#56)
## ManagedBehaviour System Refactor

- **Sealed `Awake()`** to prevent override mistakes that break singleton registration
- **Added `OnManagedAwake()`** for early initialization (fires during registration)
- **Renamed lifecycle hook:** `OnManagedAwake()` → `OnManagedStart()` (fires after boot, mirrors Unity's Awake→Start)
- **40 files migrated** to new pattern (2 core, 38 components)
- Eliminated all fragile `private new void Awake()` patterns
- Zero breaking changes - backward compatible

## Centralized Logging System

- **Automatic tagging** via `CallerMemberName` and `CallerFilePath` - logs auto-tagged as `[ClassName][MethodName] message`
- **Unified API:** Single `Logging.Debug/Info/Warning/Error()` replaces custom `LogDebugMessage()` implementations
- **~90 logging call sites** migrated across 10 files
- **10 redundant helper methods** removed
- All logs broadcast via `Logging.OnLogEntryAdded` event for real-time monitoring

## Custom Log Console (Editor Window)

- **Persistent filter popups** for multi-selection (classes, methods, log levels) - windows stay open during selection
- **Search** across class names, methods, and message content
- **Time range filter** with MinMaxSlider
- **Export** filtered logs to timestamped `.txt` files
- **Right-click context menu** for quick filtering and copy actions
- **Visual improvements:** White text, alternating row backgrounds, color-coded log levels
- **Multiple instances** supported for simultaneous system monitoring
- Open via `AppleHills > Custom Log Console`

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #56
2025-11-11 08:48:29 +00:00
3f548c3ed4 Update HUD updates, moving scattered prefabs into a central HUD manager (#53)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #53
2025-11-09 21:41:39 +00:00
Michal Pikulski
0c9a388433 Move buttons to HUD Manager 2025-11-09 13:23:03 +01:00
e27bb7bfb6 Refactor interactions, introduce template-method lifecycle management, work on save-load system (#51)
# Lifecycle Management & Save System Revamp

## Overview
Complete overhaul of game lifecycle management, interactable system, and save/load architecture. Introduces centralized `ManagedBehaviour` base class for consistent initialization ordering and lifecycle hooks across all systems.

## Core Architecture

### New Lifecycle System
- **`LifecycleManager`**: Centralized coordinator for all managed objects
- **`ManagedBehaviour`**: Base class replacing ad-hoc initialization patterns
  - `OnManagedAwake()`: Priority-based initialization (0-100, lower = earlier)
  - `OnSceneReady()`: Scene-specific setup after managers ready
  - Replaces `BootCompletionService` (deleted)
- **Priority groups**: Infrastructure (0-20) → Game Systems (30-50) → Data (60-80) → UI/Gameplay (90-100)
- **Editor support**: `EditorLifecycleBootstrap` ensures lifecycle works in editor mode

### Unified SaveID System
- Consistent format: `{ParentName}_{ComponentType}`
- Auto-registration via `AutoRegisterForSave = true`
- New `DebugSaveIds` editor tool for inspection

## Save/Load Improvements

### Enhanced State Management
- **Extended SaveLoadData**: Unlocked minigames, card collection states, combination items, slot occupancy
- **Async loading**: `ApplyCardCollectionState()` waits for card definitions before restoring
- **New `SaveablePlayableDirector`**: Timeline sequences save/restore playback state
- **Fixed race conditions**: Proper initialization ordering prevents data corruption

## Interactable & Pickup System

- Migrated to `OnManagedAwake()` for consistent initialization
- Template method pattern for state restoration (`RestoreInteractionState()`)
- Fixed combination item save/load bugs (items in slots vs. follower hand)
- Dynamic spawning support for combined items on load
- **Breaking**: `Interactable.Awake()` now sealed, use `OnManagedAwake()` instead

##  UI System Changes

- **AlbumViewPage** and **BoosterNotificationDot**: Migrated to `ManagedBehaviour`
- **Fixed menu persistence bug**: Menus no longer reappear after scene transitions
- **Pause Menu**: Now reacts to all scene loads (not just first scene)
- **Orientation Enforcer**: Enforces per-scene via `SceneManagementService`
- **Loading Screen**: Integrated with new lifecycle

## ⚠️ Breaking Changes

1. **`BootCompletionService` removed** → Use `ManagedBehaviour.OnManagedAwake()` with priority
2. **`Interactable.Awake()` sealed** → Override `OnManagedAwake()` instead
3. **SaveID format changed** → Now `{ParentName}_{ComponentType}` consistently
4. **MonoBehaviours needing init ordering** → Must inherit from `ManagedBehaviour`

Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #51
2025-11-07 15:38:31 +00:00
5c4b8825ee Card Creation 2025-11-07 13:57:36 +01:00
Michal Pikulski
32a477b843 WOrking card dragging, slotting, previewing 2025-11-07 12:51:45 +01:00
Michal Pikulski
77f7d1ee97 Working card dragging into album slots, persistent slots 2025-11-07 11:24:19 +01:00
Michal Pikulski
3e607f3857 Slotting cards in album after revealing 2025-11-07 01:51:03 +01:00
Michal Pikulski
debe70c9b1 Hammer out some last flows of the booster opening page 2025-11-06 23:52:02 +01:00
Michal Pikulski
d23c000347 Working flipping cards 2025-11-06 23:17:55 +01:00
Michal Pikulski
d01859cec0 More snappy tap animation 2025-11-06 23:17:35 +01:00
journaliciouz
f576dad677 New and crispy apple map 2025-11-06 22:28:38 +01:00
78d0bf6441 AppSwitcher work 2025-11-06 15:36:02 +01:00
Michal Pikulski
b17ba7bd98 Finish setting up the basic album layout 2025-11-06 01:25:13 +01:00
Michal Pikulski
50c0a12391 New card UI, new visual config, new card definitions, new working editor window for authoring! 2025-11-05 23:50:15 +01:00
journaliciouz
2b41a9f200 Gardener audio refactor 2025-10-30 15:25:07 +01:00
54f355beda Merge branch 'main' into DamianCardStyles 2025-10-29 12:34:48 +00:00
6dc49f1686 UPDATE FROM MAIN 2025-10-29 13:34:02 +01:00
d5d01e46ea Test the new cards and organized card textures in folders 2025-10-29 13:23:55 +01:00
Michal Pikulski
c24c5df881 Update minigame switcher to only unlock when all puzzles completed 2025-10-29 11:19:17 +01:00
Michal Pikulski
bda645dcc3 Updates to minigame switching 2025-10-29 09:57:33 +01:00
2ce6452d90 Trying to make text Warp 2025-10-28 19:10:56 +01:00
Michal Pikulski
b56524f1f2 Updates to the level switcher UI menu, making it much larger 2025-10-28 16:04:44 +01:00
Michal Pikulski
43779c560e Cleanup compile warnings, cleanup logs, spruce up level selection menu 2025-10-28 14:31:17 +01:00
3a35024fbf WIP Added New Tiles (not working properly now) 2025-10-27 18:10:38 +01:00
Michal Pikulski
dad1f6498d Pause timescale when game is paused 2025-10-27 15:21:23 +01:00
Michal Pikulski
fdfddaec95 Make combine animations and smacks ground Pulve 2025-10-27 14:43:24 +01:00
64e81c8710 WIP Level Placeholders setting 2025-10-27 14:16:56 +01:00
Michal Pikulski
f5c1ae51cd MPV of save/load system 2025-10-27 14:00:37 +01:00
Michal Adam Pikulski
35acaddca5 FIx the issue of end game screen appearing twice 2025-10-22 11:50:24 +02:00
Michal Adam Pikulski
8591490cb2 Make the score display a UIPage as well 2025-10-22 10:37:59 +02:00
Michal Adam Pikulski
68886aafd4 Roll the pause menu into the UI page system 2025-10-22 09:35:34 +02:00
Michal Adam Pikulski
357f942e0d Moved UIPageController out of the card system and into a dedicated prefab 2025-10-22 09:20:18 +02:00
Michal Adam Pikulski
5763aeb4b3 Un-fuck the booster opening page 2025-10-22 07:32:45 +02:00
Michal Adam Pikulski
3aed47b183 Fix input issues 2025-10-21 15:58:13 +02:00
Michal Adam Pikulski
00f6d2c6c6 Add a dirty booster pack opening sequence 2025-10-21 15:40:47 +02:00
Michal Adam Pikulski
af77e07f99 Update the cards to pull in from addressables to wokr in build, remove erronous code preventing building 2025-10-21 10:29:06 +02:00
journaliciouz
e94b692ae4 More gardener shenanigans 2025-10-20 21:32:10 +02:00
Michal Adam Pikulski
32f726d229 Second draft of the consolidated card system 2025-10-20 16:33:58 +02:00
6c0e1acdd6 Modified the Quarry Level Switcher in the Overworld and moved the area to move around. 2025-10-17 15:14:41 +02:00
246e66a1f6 New Menus And Fixed the headband Glow 2025-10-17 15:08:00 +02:00
78fad26ff5 Apple Hills Font 2025-10-17 13:04:15 +02:00