Working on tutorial refactoring

This commit is contained in:
Vladislav Khorev committed 2026-10-23 22:03:55 +06:00
1 parent ea8f64c940
commit 9fa120d4ad
82 files changed
+1877 -7563

No files matched your search

+22 -22
View File
@@ -11,22 +11,20 @@
namespace FRG {
// The tutorial is one linear sequence: each step shows its hint until the player
// performs the action, then moves on to the next step (GameState::completeTutorialStep).
// Values are saved; AdvanceDialogue..PickUpItem keep the numbers of the old Step0..Step4.
enum class TutorialStep {
Step0, // Dialogue hint: "click to advance"
Step1, // Camera rotation hint
Step2, // Floor tap / walk hint
Step3, // Pinch-zoom hint
Step4, // Pick-up item hint
Step5, // Post-pickup reaction
Step6, // Tutorial complete
};
enum class UniIntTutorialState {
Step10,
Step11,
DarklandsActive,
DarklandsStep13,
DarklandsFull
AdvanceDialogue, // dorm: "click to advance the dialogue"
RotateCamera, // dorm
Walk, // dorm: tap the floor
Zoom, // dorm; interactive objects stay locked until this is done
PickUpItem, // dorm: take the phone or the journal
EnterDarklands, // uni_interior: press the darklands button (once the spell note is picked up)
DarklandsHealth, // uni_interior darklands: health bar hint, until the player walks
DarklandsExplore, // uni_interior darklands: no hint, until the ghost zone is reached
DarklandsAttack, // uni_interior darklands: attack hint, until an enemy is killed
Completed // no more hints; a new game starts here when the tutorial is disabled
};
struct StoredChatMessage {
@@ -56,13 +54,15 @@ struct GameState : public ISaveable {
Quest::QuestJournal questJournal;
// --- Tutorial ---
TutorialStep tutorialStep = TutorialStep::Step0;
UniIntTutorialState uniIntTutorialState = UniIntTutorialState::Step10;
bool tutorialPhonePickedUp = false;
bool tutorialJournalPickedUp = false;
bool tutorialPhoneChatScreenOpened = false;
bool tutorialJournalScreenOpened = false;
bool tutorialNeedOpenTaxiScreen = false;
TutorialStep tutorialStep = TutorialStep::AdvanceDialogue;
// Hints that run alongside the linear steps, until the tutorial is Completed.
bool tutorialPhoneChatScreenOpened = false; // "open the messenger" hint is done
bool tutorialJournalScreenOpened = false; // "open the journal" hint is done
bool tutorialNeedOpenTaxiScreen = false; // "call a taxi" hint is showing
bool isTutorialActive() const { return tutorialStep != TutorialStep::Completed; }
// Moves to the next step if `step` is the current one; returns whether it did.
bool completeTutorialStep(TutorialStep step);
// --- Phone / chat ---
bool chatUnread[3] = { true, true, true };