Skip to content

Commit

Permalink
Revert "better text box cancelling"
Browse files Browse the repository at this point in the history
This reverts commit 97ae60b.
  • Loading branch information
Dregu committed Nov 7, 2023
1 parent 519cc33 commit 905950c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/game_api/script/lua_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,12 @@ end
/// Show a message that looks like a level feeling.
lua["toast"] = [](std::u16string message)
{
State::get().ptr()->toast = 0;
static auto toast_fun = (Toast*)get_address("toast");
toast_fun(message.c_str());
};
/// Show a message coming from an entity
lua["say"] = [](uint32_t entity_uid, std::u16string message, int sound_type, bool top)
{
State::get().ptr()->speechbubble = 0;
static auto say = (Say*)get_address("speech_bubble_fun");
const auto hud = get_hud();

Expand Down
4 changes: 2 additions & 2 deletions src/game_api/script/usertypes/state_lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,12 @@ void register_usertypes(sol::state& lua)

lua["cancel_toast"] = []()
{
State::get().ptr()->toast = 0;
State::get().ptr()->toast_timer = 1000;
};

lua["cancel_speechbubble"] = []()
{
State::get().ptr()->speechbubble = 0;
State::get().ptr()->speechbubble_timer = 1000;
};
}
}; // namespace NState

0 comments on commit 905950c

Please sign in to comment.