[Mod] Simple Digger - Standalone automatic mining machine [0.2] [simple_digger]

Post Reply
User avatar
Ferret2
Member
Posts: 11
Joined: Mon Feb 11, 2019 14:07
In-game: Ferret2
Location: Hungary

[Mod] Simple Digger - Standalone automatic mining machine [0.2] [simple_digger]

by Ferret2 » Post

Mod that adds the Digger node, a standalone item for automatic mining of rectangular cuboid volumes of limited size. The Digger is relatively cheap, doesn't depend on any other mods, and doesn't need energy or complex infrastructure.

Makes mining of cuboid volumes into an easy thing, roughly similar to how digging of designated volumes is handled in the game "Dwarf Fortress": the user specifies the dimensions of the volume to be dug, and the Digger does the rest. This removes much of the tedium of mining, so that instead of having to do constant "manual labor", you can concentrate on the design and architecture of your subterranean spaces.

It can also be used to harvest plants and trees.

The Digger mines all nodes of all types, except itself (and any other Digger nodes), and except Chests.


Visual manual:
simple_digger_visual_manual_v02.png
simple_digger_visual_manual_v02.png (468.9 KiB) Viewed 229 times

Usage:

The dimensions of the rectangular cuboid to be mined are set in the GUI window that opens when right-clicking the placed Digger node. These dimensions are specified as integer distances in the directions Up,Down,East,West,North,South relative to the Digger node. For example, setting all six fields to the value "1" will mine out a 3x3x3 volume centered on the Digger node. For ease of use, the six faces of the Digger node indicate these six directions by their initial letters.

The cuboid that can be specified is limited in size to at most a volume of 256 nodes. Within this maximum volume limit, the shape of the cuboid can be anything, including for example a vertical or horizontal 1x1x256 shaft or tunnel, or an 8x8x4 room.

Punch the Digger node to start/stop digging.

If there is a Chest directly below and adjacent to the Digger, then the Digger transfers the mined items into it; otherwise the mined items are destroyed.


Download:

Newest version:
simple_digger_v02.zip
Version 0.2 (30 December 2022)
(17.5 KiB) Downloaded 36 times
-- Digs everything. No delay while iterating over air nodes.

Previous version:
simple_digger_v01.zip
Version 0.1 (20 August 2020)
(17.98 KiB) Downloaded 62 times
-- Digs only stone,dirt,gravel,sand. Delay of 1 second for every node iterated over (including air nodes).


Notes:
- Only tested with Minetest version 0.4.16
- Only tested as singleplayer
Last edited by Ferret2 on Sat Dec 31, 2022 11:37, edited 4 times in total.

User avatar
Ferret2
Member
Posts: 11
Joined: Mon Feb 11, 2019 14:07
In-game: Ferret2
Location: Hungary

Re: [Mod] Simple Digger - Standalone automatic mining machine [0.1] [simple_digger]

by Ferret2 » Post

Hi all:

As any user will have noticed, the Digger is programmed to mine one node roughly every second.
After uploading the mod, I however noticed another thing, namely the one-second delay is there always, for any type of node iterated over by the Digger, in particular the delay is ALSO there for nodes that are not actually mined by the Digger, such as air nodes. I.e. if you designate a cuboid volume that begins with a lot of air nodes (such as after temporarily stopping and then restarting the Digger, after it had previously already mined much of the cuboid), then the Digger simply loops over the initial air nodes in the same speed as looping over and digging any other node such as stone.

I am wondering whether it would be better (and clearer) for the user if I change the implementation so that the one-second delay is there only for nodes (like stone) that are actually mined by the Digger, and NOT for nodes (like air) that are not actually mined by the Digger but simply skipped over while looping through the cuboid volume. Would not having the delay for air nodes indeed be clearer, or would that make the behavior of the Digger actually LESS clear for the user? Opinions?

EDIT (December 2022):
I've modified the code to remove the 1 second delay while iterating over air nodes. I think this makes the Digger nicer to use. The new version is version 0.2 (download link added in the top post). Another new feature of the new version is that it now mines ALL types of nodes (and no longer only stone/gravel/dirt/sand), so that the Digger can now also be used e.g. for harvesting trees or plants.

Post Reply

Who is online

Users browsing this forum: TPH and 4 guests