1
This commit is contained in:
commit
39a0fa64ce
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,4 +20,5 @@ __pycache__
|
|||||||
.user
|
.user
|
||||||
game.py
|
game.py
|
||||||
*.cxx
|
*.cxx
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
*.DS_Store
|
BIN
res/imserver/en/text.xlsx
Normal file
BIN
res/imserver/en/text.xlsx
Normal file
Binary file not shown.
@ -181,5 +181,8 @@ std::string MetaMgr::ReplaceDirtyWord(const std::string& text, char c)
|
|||||||
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
|
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
|
||||||
{
|
{
|
||||||
auto itr = loader_->text_hash.find(textid);
|
auto itr = loader_->text_hash.find(textid);
|
||||||
return itr != loader_->text_hash.end() ? itr->second : def_text;
|
if (itr != loader_->text_hash.end()) {
|
||||||
|
return itr->second;
|
||||||
|
}
|
||||||
|
return loader_->text_hash.empty() ? def_text : "";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user