mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Prevent installing mods when there is no base game (#13429)
This commit is contained in:
parent
ccd696c49a
commit
c5fb50298a
@ -200,6 +200,9 @@ local function queue_download(package, reason)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function get_raw_dependencies(package)
|
local function get_raw_dependencies(package)
|
||||||
|
if package.type ~= "mod" then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
if package.raw_deps then
|
if package.raw_deps then
|
||||||
return package.raw_deps
|
return package.raw_deps
|
||||||
end
|
end
|
||||||
@ -999,7 +1002,13 @@ function store.handle_submit(this, fields)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not package.path and core.is_dir(install_parent .. DIR_DELIM .. package.name) then
|
if package.type == "mod" and #pkgmgr.games == 0 then
|
||||||
|
local dlg = messagebox("install_game",
|
||||||
|
fgettext("You need to install a game before you can install a mod"))
|
||||||
|
dlg:set_parent(this)
|
||||||
|
this:hide()
|
||||||
|
dlg:show()
|
||||||
|
elseif not package.path and core.is_dir(install_parent .. DIR_DELIM .. package.name) then
|
||||||
local dlg = confirm_overwrite.create(package, on_confirm)
|
local dlg = confirm_overwrite.create(package, on_confirm)
|
||||||
dlg:set_parent(this)
|
dlg:set_parent(this)
|
||||||
this:hide()
|
this:hide()
|
||||||
|
Loading…
Reference in New Issue
Block a user