Skip to content
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

Use CDB author and name in installed package's config #8550

Merged
merged 2 commits into from Jun 10, 2019

Conversation

p-ouellette
Copy link
Contributor

@p-ouellette p-ouellette commented May 19, 2019

Fixes #8269 (specifically the issue with MTG not being detected because of a different author in the game.conf. Preinstalled games without an author in the game.conf won't be detected, but that probably can't be fixed since there's no guarantee that it's the same game as the one on CDB.)

They are used for tracking the package, so should match ContentDB.
@rubenwardy
Copy link
Member

Authors should be compared case insensitively, maybe I'm forgetting a :lower()

@p-ouellette
Copy link
Contributor Author

OK, did that.

end
end

local game_hash = {}
pkgmgr.update_gamelist()
for _, game in pairs(pkgmgr.games) do
if game.author then
game_hash[game.author .. "/" .. game.id] = game
if game.author ~= "" then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should work. author should either be filled or nil, but never an empty string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the tables returned by get_games always have the author field
https://github.com/minetest/minetest/blob/master/src/script/lua_api/l_mainmenu.cpp#L434

@SmallJoker SmallJoker merged commit 4c11574 into minetest:master Jun 10, 2019
@p-ouellette p-ouellette deleted the cdb_author_conf branch June 10, 2019 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some installed games not detected as installed
3 participants