Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow addons to hide loading tips
Addons are able to customize the number of contents of loading
screen tips via scripts and resource XML files, but they are not
able to remove the tips altogether because empty strings are not
allowed as resource strings and the engine always prints out a
hardcoded tip number followed by a colon (:) anyway.

With this minor change,  `loadscreen.script` is able to return `0` for
`get_tip_number` which will hide the loading tip altogether.
  • Loading branch information
Ishmaeel committed Oct 18, 2024
commit 0c58d18b22e98838a99abda95447ce649665b83a
4 changes: 4 additions & 0 deletions src/xrGame/GamePersistent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,10 @@ void CGamePersistent::LoadTitle(bool change_tip, shared_str map_name)
R_ASSERT(ai().script_engine().functor("loadscreen.get_mp_tip_number", m_functor));
tip_num = m_functor(map_name.c_str());
}

if (tip_num < 1)
return;

// tip_num = 83;
xr_sprintf(buff, "%s%d:", CStringTable().translate("ls_tip_number").c_str(), tip_num);
shared_str tmp = buff;
Expand Down