Commit Graph

151 Commits

Author SHA1 Message Date
2602cbbeb3 Trafalgar-Reimport 2025-11-11 14:24:56 +01:00
MacBuilder
d647bb5707 Target eliminated, good job 47 2025-11-10 15:55:28 +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
355c3fabc8 Merge branch 'main' into DamianBranch 2025-11-07 13:35:19 +01:00
d7d9d74a7b Change to Card NamePlaque, and Card Album Prefabs 2025-11-07 13:34:30 +01:00
6aacd9234c ExtraConfirmations Screens and WIP for the diving minigame end screen 2025-11-07 13:01:22 +01:00
DamianCorazza
3a1eef8a12 Cut up the Prefab and reset some pivots 2025-11-06 23:43:38 +01:00
153ab2bb08 Merge branch 'main' into DamianBranch 2025-11-06 21:31:12 +00:00
journaliciouz
f576dad677 New and crispy apple map 2025-11-06 22:28:38 +01:00
DamianCorazza
3ac90bea1e Added New Card Graphics 2025-11-06 22:17:43 +01:00
69e628ceb8 Added New art for level selection 2025-11-06 19:22:26 +01:00
2b3154c22b Level Change and Confirmation popups art change 2025-11-06 14:11:52 +01:00
DamianCorazza
1442a2426b Changed ScrapBook Icon 2025-11-05 23:14:27 +01:00
629b137421 Added New Map TExture 2025-11-05 17:46:56 +01:00
0dc3f3e803 Added New Menu Background Textures 2025-11-05 17:25:26 +01:00
journaliciouz
949bd6d32b You can close the card album again 2025-11-05 16:36:00 +01:00
1a6324b054 Clarifying name changes for cards 2025-11-05 12:59:57 +01:00
035fdda2be Added the textures for a smaller version of the scrapbook. 2025-11-04 18:51:42 +01:00
DamianCorazza
d00d20121c WIP Moving work from home to the office. 2025-11-04 12:21:02 +01:00
DamianCorazza
7051267c33 ScrapBookPrefab and textures 2025-11-04 04:59:33 +01:00
DamianCorazza
eb63086466 Added New Glow for the Combination of items, changed the position of gardener dialogue, changed position of the balls, changed soundbird cameraswitcher, changed hammerbird lurespot sprite order. 2025-11-03 11:43:05 +01:00
Michal Pikulski
a020e9af04 Update level select menu with icons and scrollable view 2025-10-29 14:37:11 +01:00
d5d01e46ea Test the new cards and organized card textures in folders 2025-10-29 13:23:55 +01:00
2ce6452d90 Trying to make text Warp 2025-10-28 19:10:56 +01:00
7743fbdd8f Merge branch 'main' into DamianCardStyles 2025-10-28 09:51:42 +00:00
2a18489f44 Added A new tiles material and the two levels to the build 2025-10-28 10:49:37 +01:00
3a35024fbf WIP Added New Tiles (not working properly now) 2025-10-27 18:10:38 +01:00
Michal Pikulski
fdfddaec95 Make combine animations and smacks ground Pulve 2025-10-27 14:43:24 +01:00
2524d4dcdd WIP Card Reformatting 2025-10-24 18:07:18 +02:00
2e05e500c9 Added the art for cards 2025-10-23 16:55:01 +02:00
c80089e5fc Pushed app icons to get Steve Jobs off my back 2025-10-22 10:58:51 +02:00
DamianCorazza
0a240da9a7 Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-10-21 14:54:08 +02:00
DamianCorazza
14d1b8316e Added New Textures for Cards And Configure basic Card Variations 2025-10-21 14:53:59 +02:00
MacBuilder
8e90878a97 Updated diving controls and tutorial 2025-10-21 13:47:18 +02:00
journaliciouz
84dd8004d5 Monster Approach and react audio 2025-10-20 22:33:39 +02:00
journaliciouz
cb3aa515d1 Cucumberattack sound and anne lise shush 2025-10-20 21:23:18 +02:00
journaliciouz
b7d7e5ae35 Scoffed picnic couple audio implementation 2025-10-20 21:01:10 +02:00
1b0a206be7 Wolter sound FX 2025-10-20 17:05:24 +02:00
Michal Pikulski
6c23d1bcfa Add implementation plan and main UI for the card system 2025-10-20 16:33:58 +02:00
Michal Pikulski
44e1833aea Add backpack 2025-10-20 16:33:58 +02:00
b49bb43f79 AnneLise bird counter implemented 2025-10-20 13:57:38 +02:00
594a9815cc AnneLise guidance 2025-10-17 16:15:43 +02:00
246e66a1f6 New Menus And Fixed the headband Glow 2025-10-17 15:08:00 +02:00
7cdc8fab22 Fixed outrocinematic and added audio 2025-10-17 13:44:22 +02:00
099a6093e0 Outro WIP 2025-10-17 13:03:01 +02:00
646e9711eb Updated intro voiceover 2025-10-17 12:55:14 +02:00
bb6a595104 Merge branch 'main' into audio 2025-10-17 12:42:18 +02:00
49c1f55ec0 Merge branch 'main' into audio 2025-10-17 12:40:19 +02:00
82fce5c135 Added aglow to the Pickable Items 2025-10-17 12:36:09 +02:00