[SOLVED]Area-digging tools

Post Reply
Schoggo
New member
Posts: 2
Joined: Tue Oct 06, 2020 19:29
GitHub: Schoggo
In-game: Schoggo
Location: Germany

[SOLVED]Area-digging tools

by Schoggo » Post

Hi,
I'm trying to make a mod with tools that dig a 3x3 area, just like, for example, the hammer in Tinkers' Construct.

It seems to me there is no way of doing this, at least not without ugly hax, or am I missing something?

As a workaround, I let the user mark the nodes to be mined with rightclick and then break them when they mine a node, however this is less than ideal. I think the best way to implement this would be to change the definition of on_use so that the default behaviour (mining the node) can still be executed (eg. if the registerd function returns true as second value). Is this something feasible?

This is what I have so far.
Last edited by Schoggo on Mon Oct 19, 2020 12:21, edited 1 time in total.

User avatar
goats
Member
Posts: 212
Joined: Thu Nov 21, 2019 05:29

Re: Area-digging tools

by goats » Post

You might want to look at some more mods, including mods that exist only in some games, as there are quite a few different mass-mining tools that i (only vaguely) recall such as mining lasers, etc.

However, i would imagine that if you simply caused the mining to affect the 3x3 area centered on the targeted node with respect to the targeted face...

Schoggo
New member
Posts: 2
Joined: Tue Oct 06, 2020 19:29
GitHub: Schoggo
In-game: Schoggo
Location: Germany

Re: [SOLVED]Area-digging tools

by Schoggo » Post

I didn't find any mass-mining tools that actually mine, you rather just punch / rightclick a node and it is dug instantly. I have, however, submitted a PR that's currently waiting for review that passes the pointed_thing to the after_use callback.

User avatar
goats
Member
Posts: 212
Joined: Thu Nov 21, 2019 05:29

Re: [SOLVED]Area-digging tools

by goats » Post

I need to search my memory or see if i can find a reference. The mining was very probably dig instant, but had an adjustable "pattern".

Regardless, your PR seems like a good idea for general flexibility in designing game mechanics. Good luck with that.

Post Reply

Who is online

Users browsing this forum: rudzik8 and 5 guests