minetest-mods / xdecor

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

Some nodes are inappropriately cuttable in the workbench #68

Closed kilbith closed 7 years ago

kilbith commented 7 years ago

Cc: @adrido

https://forum.minetest.net/viewtopic.php?p=226487#p226487

I also found out, that there are hundreds of nodes registered for that saw that doesn't make logically and from looking of the textures sense.

Please investigate and report which nodes should not be cuttable in the workbench, and share their definitions so that we can improve the filtering.

adrido commented 7 years ago

puhh it was a long time... here are a few to start with: https://github.com/minetest/minetest_game/blob/master/mods/nyancat/init.lua#L1 https://bitbucket.org/adrido/darkage/src/9dd709485b2efdcece36c6e6ead4192c3c12dc89/nodes.lua?at=master&fileviewer=file-view-default#nodes.lua-39 https://bitbucket.org/adrido/darkage/src/9dd709485b2efdcece36c6e6ead4192c3c12dc89/nodes.lua?at=master&fileviewer=file-view-default#nodes.lua-51 https://bitbucket.org/adrido/darkage/src/9dd709485b2efdcece36c6e6ead4192c3c12dc89/furniture.lua?at=master&fileviewer=file-view-default#furniture.lua-117 https://bitbucket.org/adrido/darkage/src/9dd709485b2efdcece36c6e6ead4192c3c12dc89/furniture.lua?at=master&fileviewer=file-view-default#furniture.lua-140

uhm and probably all nodes from this file: https://bitbucket.org/Infinatum/medieval/src/01397e7f09bbc9aa76279ad1837643e3e15fb72b/mod_files/bars_and_plaster.lua?at=master&fileviewer=file-view-default

I think filtering is a bad idea. Better would be adding only the ones from default minetest_game and let the mod authors decide which nodes should be cuttable by the saw. Or only nodes that have a registered stair /slap should be cuttable.

kilbith commented 7 years ago

Thanks for the infos.

For the nyan cat, I don't see a problem if it's cuttable since it's a regular node and solid. Neither for the cobbles and bricks.

For the iron bars in your mod, I don't think it's appropriate to register them as glasslike. May I suggest to use the xpanes API instead ?

adrido commented 7 years ago

Its not a problem at all. But it doesn't make logically sense. There is no nyan cat stair by default. The texture of the plastered nodes and bars of darkage are not designed to be used as stairs. So they just look ugly. (there is also no stair variant by default) The xpanes can only used as fence, but the iron bars/grile can used as window or on the floor/ roofing. So I think glasslike is the correct drawtype of them. But that would be a issue of the darkage mod itself. ;-)

Also filtering does not work correctly if there is a translation mod installed: https://forum.minetest.net/viewtopic.php?p=226487#p226458

And there is probably also a problem with mesecons: https://forum.minetest.net/viewtopic.php?p=226487#p226499

Please don't understand me wrong I only want to help to make this mod better or at least I want to help to make it work correctly. There is now a way to opt in nodes from a different mod. https://github.com/minetest-mods/xdecor/commit/313c3de85b1d89167991761cae7ced8389b5fb50 So filtering should not required anymore. If a mod want to add the node to the saw it can just fill the workbench.custom_nodes_register table.

kilbith commented 7 years ago

OK, I just added some filters to solve the mesecons + translation issues : https://github.com/minetest-mods/xdecor/commit/fa15d1b7f52b7740b0075564e118267f2010fc69

Not exactly sure what are the "spawners" though. I assume these are spawners in the mob mods but they're correctly filtered anyways.

So filtering should not required anymore

The filtering reduces the maintenance on the long run. In the past there was a big table of manual entries but it was too much of a pain to write down all these nodes if you have lots of mods installed, not to mention the nodes that are constantly added to the games and that you likely miss.

So the filtering will stay as it exonerates the humans from hours of boring task.

adrido commented 7 years ago

Well in the same step the mod author is writing stairs.register_stair_and_slab(...) he could also write workbench.custom_nodes_register[#workbench.custom_nodes_register+1] = "nodename". Thats only 5 minutes more work if you want to have support for stairs/cutting. But OK, its your mod. But could you please filter out all nodes that have groups.xdecor_not_cuttable or xdecor_not_cuttable or something similar? Then I can manually remove the nodes that are not designed to be cuttable from the darkage mod.

EDIT: I just noticed, that you cannot access workbench.custom_nodes_register because workbench is a local variable.

kilbith commented 7 years ago

But could you please filter out all nodes that have groups.xdecor_not_cuttable or xdecor_not_cuttable or something similar?

Good idea, implemented : https://github.com/minetest-mods/xdecor/commit/0ddfea29d003a7e1d720e646946e7f74c7c2c64e

you cannot access workbench.custom_nodes_register because workbench is a local variable.

That's because I prefer to have all listed nodes in a central place.

adrido commented 7 years ago

Good idea, implemented : 0ddfea2

Great 😃

you cannot access workbench.custom_nodes_register because workbench is a local variable.

That's because I prefer to have all listed nodes in a central place.

Sorry, I does not understand the sense. How should a mod add nodes to the list if it cannot access it?

adrido commented 7 years ago

Why got this closed?

kilbith commented 7 years ago

Because the issues are solved, BlockMen ;)