minetest-mods / xdecor

A decoration mod for Minetest meant to be light, simple and well-featured
Other
29 stars 45 forks source link

Adding xdecor or xdecor? to depends.txt has the oposite effect #72

Closed adrido closed 7 years ago

adrido commented 7 years ago

I recently added better xdecor support to the darkage mod. but If I want to make the compatibility visible to the user by writing xdecor? to the depends.txt no nodes are cuttable anymore, because xdecor gets loaded before darkage.

Napiophelios commented 7 years ago

aside from players' awareness of the compatibility, what do you lose if you don't add xdecor to the depends text?

Can't you just add something to the mod description to let players know about the added features if xdecor is present?

adrido commented 7 years ago

I do lose nothing. The only odd thing is that you can explicitly drop support of xdecor that way

adrido commented 7 years ago

Another odd thing is if there is a mod eg. called "zoo". zoo gets probably loaded after xdecor so zoo nodes are never compatible to xdecor (not cuttable in workbench)

I does not know how Minetest sets the load order, but if this changes some day because another mod is added that leads to a different load order, mods that where previously compatible with xdecor does not longer work anymore.

Napiophelios commented 7 years ago

I see what you mean. I added xdecor to a modpack to work around the problem in my subgame. This is really the only solution I could think of without modifying xdecor. This helps with controlling the load order, but doesn't help with adding it as a dependency though.

kilbith commented 7 years ago

Yeah, the workbench filtering is some kind of a hack, since mods are loaded in alphabetical order and xdecor is often loaded in last position or close.

Like @Napiophelios says, I suggest to do not recommend xdecor in depends.txt and fill that table with the nodes you want to be cut : https://github.com/minetest-mods/xdecor/blob/master/src/workbench.lua#L31

adrido commented 7 years ago

Uhm you forgott that workbench is a local variable and cant be accessed by any mod https://github.com/minetest-mods/xdecor/blob/master/src/workbench.lua#L31

kilbith commented 7 years ago

There you go : https://github.com/minetest-mods/xdecor/commit/4209040

adrido commented 7 years ago

Thanks