Working on dialog editor, on dialogs, on phone
This commit is contained in:
1 parent
0e27521bea
commit
8f7797789d
63 files changed
+9502
-1459
No files matched your search
+33
-1
@@ -200,7 +200,7 @@ namespace ZL
|
||||
LocationSetup uniInteriorParams;
|
||||
uniInteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_interior.json";
|
||||
uniInteriorParams.npcsJsonPath = "resources/config2/npcs_uni_interior.json";
|
||||
uniInteriorParams.dialoguesJsonPath = "resources/dialogue/uni_interior_dialogues.json";
|
||||
uniInteriorParams.dialoguesJsonPath = "resources/dialogue/uni_interior_dialogues_003.json";
|
||||
|
||||
|
||||
/*
|
||||
@@ -242,6 +242,7 @@ namespace ZL
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
uniInteriorParams.navigationJsonPaths = {
|
||||
"resources/navigation/uni_interior3_all_locked.json",
|
||||
"resources/navigation/uni_interior3_hall.json",
|
||||
@@ -258,6 +259,23 @@ namespace ZL
|
||||
"resources/navigation/uni_interior3_unlocked_n3.json",
|
||||
"resources/navigation/uni_interior3_unlocked_hall.json"
|
||||
};
|
||||
/*
|
||||
uniInteriorParams.navigationJsonPaths = {
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json", //6
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json"
|
||||
};*/
|
||||
|
||||
uniInteriorParams.teleportsJsonPath = "resources/config2/teleports_uni_interior.json";
|
||||
uniInteriorParams.triggerZonesJsonPath = "resources/config2/trigger_zones_uni_interior.json";
|
||||
@@ -273,6 +291,7 @@ namespace ZL
|
||||
locations["uni_interior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { this->menuManager.isNight = isNight; this->menuManager.isDawn = isDawn; };
|
||||
locations["uni_interior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["uni_interior"]->requestAdvanceDarklandsHud = [this]() { menuManager.advanceUniIntDarklandsHud(); };
|
||||
locations["uni_interior"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
if (locations["uni_interior"]->player)
|
||||
locations["uni_interior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
|
||||
for (auto& npc : locations["uni_interior"]->npcs) {
|
||||
@@ -301,6 +320,7 @@ namespace ZL
|
||||
locations["uni_exterior"]->scriptEngine.setGlobalFloatStore(&globalFloats);
|
||||
locations["uni_exterior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { this->menuManager.isNight = isNight; this->menuManager.isDawn = isDawn; };
|
||||
locations["uni_exterior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["uni_exterior"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
if (locations["uni_exterior"]->player)
|
||||
locations["uni_exterior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
|
||||
|
||||
@@ -362,6 +382,7 @@ namespace ZL
|
||||
locations["location_dorm"]->scriptEngine.setGlobalFloatStore(&globalFloats);
|
||||
locations["location_dorm"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { this->menuManager.isNight = isNight; this->menuManager.isDawn = isDawn; };
|
||||
locations["location_dorm"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["location_dorm"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
if (locations["location_dorm"]->player)
|
||||
locations["location_dorm"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
|
||||
|
||||
@@ -391,6 +412,12 @@ namespace ZL
|
||||
locations["uni_interior"]->onTeleport = teleportCallback;
|
||||
locations["location_dorm"]->onTeleport = teleportCallback;
|
||||
|
||||
// Share the global int store with all dialogue runtimes so flags set via
|
||||
// dialogue JSON and via Lua set_dialogue_flag all see the same state.
|
||||
for (auto& [name, loc] : locations) {
|
||||
loc->dialogueSystem.setGlobalFlagStore(&globalInts);
|
||||
}
|
||||
|
||||
// Wire tutorial advance callbacks for all locations.
|
||||
// advanceTutorialStep() guards against double-advancing, so sharing is safe.
|
||||
for (auto& [name, loc] : locations) {
|
||||
@@ -423,6 +450,11 @@ namespace ZL
|
||||
startNightTransition();
|
||||
};
|
||||
|
||||
menuManager.chatOpenCallback = [this](int chatIndex) {
|
||||
if (currentLocation)
|
||||
currentLocation->scriptEngine.callChatOpenCallback(chatIndex);
|
||||
};
|
||||
|
||||
// Wire chat-bubble callback so dynamic bubbles appear as dialogue lines are shown.
|
||||
for (auto& [name, loc] : locations) {
|
||||
loc->dialogueSystem.setOnChatBubbleReady([this](const std::string& text, bool incoming) {
|
||||
|
||||
Reference in new issue
Block a user