New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mainmenu: Fix problems with recently added "game" type #5770
Conversation
f699f28
to
db51c75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can make "string.find(mod.typ, "game")" a function with a good name could be nice
src/client.cpp
Outdated
@@ -168,7 +168,7 @@ void Client::initMods() | |||
if (!string_allowed(mod.name, MODNAME_ALLOWED_CHARS)) { | |||
throw ModError("Error loading mod \"" + mod.name + | |||
"\": Mod name does not follow naming conventions: " | |||
"Only chararacters [a-z0-9_] are allowed."); | |||
"Only characterss [a-z0-9_] are allowed."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
builtin/mainmenu/modmgr.lua
Outdated
@@ -252,7 +252,7 @@ function modmgr.render_modlist(render_list) | |||
break | |||
end | |||
end | |||
elseif v.typ == "game_mod" or v.typ == "game" then | |||
elseif string.find(v.typ, "game") then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really need find
here and there? Prefer sub
when it's possible.
39eafb4
to
6ae3424
Compare
@nerzhul Instead of creating a function for this simple task, I extended the mod table to mark all the game content with the key/value |
Fixes problems pointed out in http://irc.minetest.ru/minetest-dev/2017-05-18#i_4927850
Caused by #5367