added main and pause menus
This commit is contained in:
@@ -98,6 +98,8 @@ State of the C++ module as of the latest pass. File references use `Source/Naked
|
||||
- **Session loss resolver (GDD §4.4)** — `Global/SessionLossResolver.h/.cpp` (`UWorldSubsystem`). Single entry point `ResolveLoss(ESessionLossCause)`, bound to `USessionManagerSubsystem::OnSessionEnd`. Applies the police-chase precedence override (any cause → `PoliceCapture` while `bPoliceChaseActive`), then per cause: `EmbarrassmentMax` no-cost; `EnergyZero` destroys every world `AItemPickup` + clears its save record (guaranteed sleep loss); `PoliceCapture` deducts `PoliceCaptureMoneyPenalty` if affordable else flags a holding-cell outcome; `SafeReturn` no loss. Never strips equipped clothing. Autosaves, broadcasts `OnSessionLossResolved(FinalCause, bWentToHoldingCell)`, then runs `BeginLossPresentation(Cause)`: looks up the cause's cutscene in the data-driven `ULossPresentationConfig` (`UNakedDesireGameInstance::LossPresentation`, a `TMap<ESessionLossCause, TSoftObjectPtr<ULevelSequence>>`), plays it via `ULevelSequencePlayer` (movement/look input disabled during playback), and on `OnFinished` teleports the player to the home `APlayerStart` (one tagged `"Home"` preferred). No cutscene authored for a cause → teleports immediately; `SafeReturn` → no presentation. See §1.3 for the per-cause time-skip extras still pending.
|
||||
- **Movement** — `EnhancedInput`, walk / run / crouch (`NakedDesireCharacter.cpp:115-127`), stamina-gated run (`Tick` lines 91-113).
|
||||
- **Wardrobe storage + management** — `Inventory/InventorySubsystem` (`UGameInstanceSubsystem`) is the single runtime owner of the off-body store. It holds live `UItemInstance`s mirrored from `UGlobalSaveGameData::WardrobeItems` and exposes the atomic moves `AddToWardrobe` / `RemoveFromWardrobe` / `EquipFromWardrobe` / `UnequipToWardrobe`, each mutating the wardrobe + equipped save buckets together and broadcasting `OnWardrobeChanged`. `AClothingManager` stays the body-state authority (owns the `EquippedItems` bucket via the new `EquipSlot` + existing `RemoveClothing`); the bodysuit exclusion rule is now the shared static `UClothingManager::GetBodysuitExcludedSlots` and routes displaced garments back to the wardrobe instead of dropping them to the world. `AWardrobe` is reduced to an interaction shell that forwards to the subsystem (its stale `ClothingItems` array is gone). UI: `WardrobeScreenWidget` inits the inventory list and hosts the `EquipmentSlotMenuWidget` popup (same plumbing as `InventoryScreenWidget`); `WardrobeInventoryWidget` renders the live list and re-renders on `OnWardrobeChanged`; clicking a wardrobe item calls `EquipFromWardrobe`. The slot menu has a single Remove button whose `Init(slot, bAtWardrobe)` flag decides the action — store via `UnequipToWardrobe` when opened at the wardrobe, drop to the world otherwise. **Home-storage model (GDD §6.5 / §10.4 / §28):** the wardrobe is the general home stockpile for **all non-food** items (clothing, sex toys, phones, keys, spare bags) — `WardrobeItems` is already a generic `UItemInstance` list, so this matches with no change. Food is **not** stored in the wardrobe; it lives in the **fridge** (separate fixture, pending — see §1.3). **Follow-ups:** `BuyItem` buy-flow not reattached (no caller yet); world pickup (`ItemPickup`→`TakeClothing`) still doesn't clear the `WorldItems` record; non-clothing wardrobe items (phones/toys) are stored but not yet rendered in the wardrobe UI.
|
||||
- **Front-end + pause menu shell (C++ logic).** `UI/Menu/` holds the CommonUI menu stack: `UMainMenuWidget` (Continue / New Game / Settings / Credits / Quit — Continue gated on `USaveSubsystem::DoesSaveExist()`, New Game + Quit route through `UConfirmModalWidget`, gameplay map is a data-driven `TSoftObjectPtr<UWorld>`), `UPauseMenuWidget` (Resume / Settings / Main Menu — pauses on activate via `SetGamePaused`, unpauses on deactivate, Main Menu confirms first), reusable `UConfirmModalWidget` (`Setup(title, msg)` + `OnConfirmed`/`OnCancelled` C++ delegates, pushed onto a nested `ModalStack`), and `UCreditsWidget` (back button). New Game is backed by `USaveSubsystem::StartNewGame()` (wipes the slot, reseeds from `StartingSaveData`, replaces the cached `CurrentSave`). Display: `Global/MainMenuHUD` creates the main menu on the menu map (assign as the menu map's HUD class); the pause menu pushes onto the existing `UGameLayoutWidget::WidgetStack` via `OpenPauseMenu()`, triggered by a new `PauseAction` EnhancedInput on `ANakedDesireCharacter`. **BP wiring still required:** reparent `WBP_MainMenu`/`WBP_PauseMenu`/`WBP_ConfirmModal`/`WBP_Credits` to these classes, match the `BindWidget` names, set the class/map defaults, add the `PauseAction` IA + IMC mapping, and set `AMainMenuHUD` on the MainMenu map. The main-menu gameplay target defaults to `L_TestCity` in C++ (overridable per-asset).
|
||||
- **Settings screen (C++ logic, three tabs).** `UI/Menu/Settings/`: `USettingsScreenWidget` (tab buttons + `WidgetSwitcher` + Apply/Back; persists on Apply and on close) hosting `UGameplaySettingsTab` (censorship toggle — live via `OnSettingsChanged` — plus a language selector: English/Ukrainian/Japanese → cultures `en`/`uk`/`ja` via `UKismetInternationalizationLibrary::SetCurrentLanguageAndLocale`, applied + persisted instantly), `UAudioSettingsTab` (Master/Music/SFX sliders), and `UGraphicsSettingsTab` (quality preset, window mode, resolution, VSync via the inherited `UGameUserSettings`). Backend: `UNakedDesireUserSettings` gained `MusicVolume`/`SfxVolume` config + clamped getters/setters; `Global/AudioSettingsSubsystem` (`UGameInstanceSubsystem`) applies the three volumes to SoundClasses through a SoundMix described by the new `Global/AudioSettingsConfig` data asset (`UNakedDesireGameInstance::AudioConfig`), re-pushing on `OnSettingsChanged` and `PostLoadMapWithWorld`. Assign `USettingsScreenWidget`'s BP as `SettingsWidgetClass` on both menus to enable the Settings button. **BP wiring:** author `WBP_Settings` (+ per-tab widgets) matching the `BindWidget` names, and author + assign a `UAudioSettingsConfig` (SoundMix + 3 SoundClasses) on the GI for the volume sliders to be audible.
|
||||
|
||||
### 1.2 Partially implemented (deviates from GDD)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user