mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 08:47:58 +03:00
Merge branch 'master' into NewLuaScripting
# Conflicts: # TR5Main/Scripting/GameFlowScript.cpp # TR5Main/Scripting/GameFlowScript.h
This commit is contained in:
commit
e2e4022188
13 changed files with 321 additions and 228 deletions
|
@ -95,7 +95,7 @@ GameFlow::GameFlow(sol::state* lua) : LuaHandler{ lua }
|
|||
// Level type
|
||||
m_lua->new_usertype<GameScriptLevel>("Level",
|
||||
sol::constructors<GameScriptLevel()>(),
|
||||
"name", &GameScriptLevel::NameStringIndex,
|
||||
"name", &GameScriptLevel::NameStringKey,
|
||||
"script", &GameScriptLevel::ScriptFileName,
|
||||
"fileName", &GameScriptLevel::FileName,
|
||||
"loadScreen", &GameScriptLevel::LoadScreenFileName,
|
||||
|
@ -149,7 +149,6 @@ auto GameFlow::GetLang() -> decltype(std::ref(Strings[0]->Strings))
|
|||
return std::ref(eng->Strings);
|
||||
};
|
||||
|
||||
|
||||
void GameFlow::SetLanguageNames(sol::as_table_t<std::vector<std::string>> && src)
|
||||
{
|
||||
m_languageNames = std::move(src);
|
||||
|
@ -210,9 +209,10 @@ bool GameFlow::LoadGameFlowScript()
|
|||
return true;
|
||||
}
|
||||
|
||||
char* GameFlow::GetString(int id)
|
||||
char* GameFlow::GetString(const char* id)
|
||||
{
|
||||
return (char*)(CurrentStrings->Strings[id].c_str());
|
||||
return (char*)id;
|
||||
//return (char*)(CurrentStrings->Strings[id].c_str());
|
||||
}
|
||||
|
||||
GameScriptSettings* GameFlow::GetSettings()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue