mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-09-27 15:10:17 +02:00
remove assert if sfinv disabled
The mod should not crash the game if sfinv is loaded but disabled
This commit is contained in:
parent
7b1deb1b61
commit
3056465701
|
@ -134,8 +134,7 @@ elseif rawget(_G, "inventory_plus") then --inventory++ installed
|
||||||
inventory_plus.set_inventory_formspec(player, get_formspec(name, page))
|
inventory_plus.set_inventory_formspec(player, get_formspec(name, page))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif rawget(_G, "sfinv") then --sfinv installed (part of minetest_game since 0.4.15)
|
elseif rawget(_G, "sfinv") and sfinv.enabled then --sfinv installed (part of minetest_game since 0.4.15) and not disabled
|
||||||
assert(sfinv.enabled)
|
|
||||||
local orig_get = sfinv.pages["sfinv:crafting"].get
|
local orig_get = sfinv.pages["sfinv:crafting"].get
|
||||||
sfinv.override_page("sfinv:crafting", {
|
sfinv.override_page("sfinv:crafting", {
|
||||||
get = function(self, player, context)
|
get = function(self, player, context)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user