Commit Graph

541 Commits

Author SHA1 Message Date
journaliciouz
5d0a9f999a Aligned card slots better in book 2025-11-08 22:46:16 +01:00
journaliciouz
eda7361702 Fixed most horrifying scaling issues with the book 2025-11-08 22:16:43 +01:00
journaliciouz
2ec53629c6 Added contextual UI switching depending on level type 2025-11-08 21:08:01 +01:00
journaliciouz
0e55248698 Fixed weird background breaks in outrocinematic 2025-11-08 19:56:59 +01:00
Michal Pikulski
4d7c48a681 Update Cinematic Manager, Hud Manager, fix log verbosity issue, update PauseMenu 2025-11-08 12:07:45 +01:00
Michal Pikulski
6e466cd7aa Add dev options ot the minigame menu 2025-11-07 17:50:46 +01:00
29d01df3ce Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-07 17:37:17 +01:00
de0a243b1e Added eagle eye button 2025-11-07 17:37:12 +01:00
fdfa4e0e09 Fixed a problem with buttons not rezising in the End game UI for the Minigame 2025-11-07 17:31:46 +01:00
Michal Pikulski
2127bf37b2 Add boosters to minigame again 2025-11-07 17:26:29 +01:00
ea12766cf7 Fixed button issue 2025-11-07 17:21:38 +01:00
41c71f07fd Fixed compile error 2025-11-07 17:08:02 +01:00
d2e79f058b Merge branch 'ui-overhaul' 2025-11-07 16:56:51 +01:00
1bcb63ffd0 Cinematics fuckery 2025-11-07 16:54:41 +01:00
de2966fb1e Cinematics and UI overhaul 2025-11-07 16:47:10 +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
dfa42b2296 Merge pull request 'DamianBranch' (#52) from DamianBranch into main
Reviewed-on: #52
2025-11-07 15:37:03 +00:00
720df10178 Updated the minigame tutorials 2025-11-07 16:35:13 +01:00
32601e5ef8 Card Data Update 2025-11-07 15:54:25 +01:00
dba3c5a1af Changed the Arrows of the Scrapbook 2025-11-07 14:05:12 +01: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
00e1746ac4 Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-07 13:34:56 +01:00
d7d9d74a7b Change to Card NamePlaque, and Card Album Prefabs 2025-11-07 13:34:30 +01:00
Michal Pikulski
5b70042005 Update minigames to start unlocked 2025-11-07 13:31:49 +01:00
6aacd9234c ExtraConfirmations Screens and WIP for the diving minigame end screen 2025-11-07 13:01:22 +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
0d8702a5f6 Move some tools for consistency, audo add feature for card debugger 2025-11-07 09:32:43 +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
DamianCorazza
fda67e4b92 Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-06 23:43:52 +01:00
DamianCorazza
3a1eef8a12 Cut up the Prefab and reset some pivots 2025-11-06 23:43:38 +01:00
Michal Pikulski
a705b3a829 Semi-working rarity upgrades 2025-11-06 23:18:02 +01:00
Michal Pikulski
d23c000347 Working flipping cards 2025-11-06 23:17:55 +01:00
Michal Pikulski
774f27410a Working drag, tap, open sequence, looking pretty OK 2025-11-06 23:17:46 +01:00
Michal Pikulski
1b1ea65744 Fire off impulses on booster taps 2025-11-06 23:17:36 +01:00
Michal Pikulski
d01859cec0 More snappy tap animation 2025-11-06 23:17:35 +01:00
a9b9fb87b5 Merge pull request 'Added New Card Graphics' (#50) from DamianBranch into main
Reviewed-on: #50
2025-11-06 21:31:23 +00: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
430522b872 Merge pull request 'DamianBranch' (#49) from DamianBranch into main
Reviewed-on: #49
2025-11-06 18:45:03 +00:00
ba6f671104 Merge branch 'main' into DamianBranch 2025-11-06 19:44:15 +01:00
984c8f0566 Added TownMap Icons (WIP need to check with Michal) 2025-11-06 19:44:02 +01:00
69e628ceb8 Added New art for level selection 2025-11-06 19:22:26 +01:00
Michal Pikulski
1c9d0333ea Fix editor compilation issue 2025-11-06 18:23:21 +01:00
eb9da316ad Put the appswitcher in the overworld for build test 2025-11-06 17:59:26 +01:00
7fb0b14337 Merge branch 'ui-animation' 2025-11-06 17:49:57 +01:00
eba2befc5f Good-enough-for-now appswitcher 2025-11-06 17:49:44 +01:00