Working on night and day transition

This commit is contained in:
Vladislav Khorev committed 2026-06-04 17:14:10 +03:00
1 parent ed8d6f2e92
commit 83b92e9881
6 files changed
+25

No files matched your search

+3
View File
@@ -271,6 +271,7 @@ namespace ZL
locations["uni_interior"]->setup(uniInteriorParams, &menuManager.questJournal);
locations["uni_interior"]->scriptEngine.setGlobalStore(&globalInts);
locations["uni_interior"]->scriptEngine.setGlobalFloatStore(&globalFloats);
locations["uni_interior"]->requestNightDayTransition = [this](bool isNight) { this->isNight = isNight; };
locations["uni_interior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
locations["uni_interior"]->requestAdvanceDarklandsHud = [this]() { menuManager.advanceUniIntDarklandsHud(); };
if (locations["uni_interior"]->player)
@@ -299,6 +300,7 @@ namespace ZL
locations["uni_exterior"]->setup(uniExteriorParams, &menuManager.questJournal);
locations["uni_exterior"]->scriptEngine.setGlobalStore(&globalInts);
locations["uni_exterior"]->scriptEngine.setGlobalFloatStore(&globalFloats);
locations["uni_exterior"]->requestNightDayTransition = [this](bool isNight) { this->isNight = isNight; };
locations["uni_exterior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
if (locations["uni_exterior"]->player)
locations["uni_exterior"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
@@ -361,6 +363,7 @@ namespace ZL
locations["location_dorm"]->setup(params_dorm, &menuManager.questJournal);
locations["location_dorm"]->scriptEngine.setGlobalStore(&globalInts);
locations["location_dorm"]->scriptEngine.setGlobalFloatStore(&globalFloats);
locations["location_dorm"]->requestNightDayTransition = [this](bool isNight) { this->isNight = isNight; };
locations["location_dorm"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
if (locations["location_dorm"]->player)
locations["location_dorm"]->player->onDeathAnimComplete = [this]() { startDarklandsTransition(); };
+2
View File
@@ -109,6 +109,8 @@ namespace ZL
// request the transition without coupling Location to Game directly.
std::function<bool()> requestDarklandsTransition;
std::function<void(bool)> requestNightDayTransition;
// Set by Game after setup(). Lua calls this to advance the uni_interior HUD
// from step12 to step13 (trigger-zone encounter hint).
std::function<void()> requestAdvanceDarklandsHud;
+12
View File
@@ -204,6 +204,18 @@ namespace ZL {
game->requestDarklandsTransition();
});
api.set_function("set_day",
[game]() {
game->requestNightDayTransition(false);
});
api.set_function("set_night",
[game]() {
game->requestNightDayTransition(true);
std::cout << "Set night called" << std::endl;
});
// advance_darklands_hud()
// Advances the uni_interior darklands HUD from step12 to step13.
// Call when the player enters the ghost trigger zone in darklands.