minetest-mods / digtron

A modular tunnel boring/construction machine mod for Minetest.
https://forum.minetest.net/viewtopic.php?f=9&t=16295
Other
22 stars 29 forks source link

Digtron Ejector module and builder #74

Open minertestdude opened 3 years ago

minertestdude commented 3 years ago

Ejector module doesn't seem to work on digtron with builder module. This is most evident with planting crops by builder (at 1 node distance above soil, pointing to it).

Test case: 3 module digtron CH++EJ ++ BL

where: EJ digtron ejector module, pipe rotated outside CH digtron storage BL digtron builder module, facing downwards, floating 1 node above soil.

If BL is removed, EJ function is restored. This is featurekiller bug for EJ.

I would like also to ask for ejection direction or just make ejector eject into opposite vector of digtron movement, as ejected items (diggerhead config only) start moving into same direction of digtron travel, catch up on next cycle and travel back into ejector. Which forces to create a full line of sorting tubes, which is not cost sufficient :/ but if this isnt closely related code-wise, then I will open another bug after above blocker is ressolved. Thank you for reading

S-S-X commented 3 years ago

That is also useful feature for some building tasks.. I believe it is intended to work like this. Ejector configuration option would probably work here.

minertestdude commented 3 years ago

Improved bug description.

S-S-X commented 3 years ago

Put Corn stack into chest, Set Builder item to corn, Punch eject (fails)

For farming it makes sense to eject some of building materials, for that ejecting would be good. However if using digger that also builds actual structures then you want to eject only digged materials but never materials used for building, for this case it currently works correctly.

This is why configuration option is needed as ejector cannot know how you want to use it, so another check box for ejector formspec. I believe this is exactly why ejector is designed to not eject building materials.

minertestdude commented 3 years ago

For farming it makes sense to eject some of building materials, for that ejecting would be good. However if using digger that also builds actual structures then you want to eject only digged materials but never materials used for building, for this case it currently works correctly.

This is why configuration option is needed as ejector cannot know how you want to use it, so another check box for ejector formspec. I believe this is exactly why ejector is designed to not eject building materials.

Ah yes, I see. Otherwise machine needs to harvest/dig at least a full stack+1 in order not to trigger the underrun.

What ejector needs is correction if formspec and additional logic to specify a low limit, past which it wont eject and leave in system storage.

It is also useful to call builder code first, and only afterwards the ejector code, this way builders will first profit from diggers.