digtron icon indicating copy to clipboard operation
digtron copied to clipboard

Digtron extrudtion ignoring protection

Open Emojigit opened this issue 1 year ago • 1 comments

See C-C-Minetest-Server/twi_mods#35

Digtron builders are not checking for protection in the extruded length. This can be used to violate protections and leave behind a mess.

Emojigit avatar Dec 02 '24 12:12 Emojigit

Patches/suggestions are welcome. I don't really know how this mod works.

SmallJoker avatar Dec 14 '24 19:12 SmallJoker

Some notes:

Problem comes from class_layout.lua. While discovering nodes belonging to digtron, this class also builds a map of protected nodes around. This will speed up later checks (just have to check node is not in protected list).

But there is a problem, Only nodes just around digtron are checked. All others are considered as not protected. So when performing extrusion, any node too far for having been checked is considered unprotected.

First idea: keep a list of known unprotected nodes aside the protected node list. So when looking for a node, we can know if it has not been checked yet and check it (and add it to one of those lists).

pyrollo avatar Aug 20 '25 19:08 pyrollo

#116

SmallJoker avatar Oct 23 '25 15:10 SmallJoker