minetest-3d_armor icon indicating copy to clipboard operation
minetest-3d_armor copied to clipboard

improve inventory_plus compatibility

Open bell07 opened this issue 6 years ago • 3 comments

Issue was reported in https://forum.minetest.net/viewtopic.php?t=4654&p=313023#p312975

To solve it on inventory_plus fails: https://github.com/tenplus1/inventory_plus/issues/4

Seems the inventory_plus requires sfinv for creative. Therefore if both mods are found (inventory_plus and sfinv), the 3d_armor_ip module only should be active.

My proposal is to add next lines to 3d_armor_sfinv:

if minetest.global_exists("inventory_plus") then
	minetest.log("warning", S("3d_armor_sfinv: Mod loaded but unused preferring inventory_plus"))
	return
end

bell07 avatar Mar 12 '18 12:03 bell07

Why don't you just disable the 3d_armor_sfinv mod itself ? If it's not running then there is no issue.

tenplus1 avatar Mar 12 '18 13:03 tenplus1

We guess the most players does enable the whole modpack and try to avoid errors depending on them. Therefore the inventory-compat modules does have already soft-dependencies instead of hard dependencies, and mods have at beginninc code like

if not minetest.global_exists("inventory_plus") then
	minetest.log("warning", S("3d_armor_ip: Mod loaded but unused."))
	return
end

Of course an experienced server admin can solve the issue without any change in mod just by disabling the mod.

bell07 avatar Mar 12 '18 13:03 bell07

This seems like a reasonable fix, I can see no good reason for the sfinv module to load if either of the other modules are in use, so this should perhaps include ui too?

It shouldn't be a big deal for someone to just disable the module manually but if we can make it a bit more user-friendly then, why not? At the very least, I guess this should be documented.

@bell07 Thank you once more for your assistance with this.

stujones11 avatar Mar 13 '18 18:03 stujones11