-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional InvRef to minetest.dig_node(pos) #11336
Comments
Maybe a little out of topic here, but it would be really nice to have something like |
Such a fake player function inside MT would definitely be great and help NPC mods as well - even in more situations than just dig_node. |
Also, adding a Same applies to I like the idea of being able to specify in which inventory list to put the drops, though! |
I suggest:
|
this will break backwards compat, it is better to add additional parameters as sokomine originally suggested |
How so? Just adding Adding discrete params like initially suggested is limiting in conparison to all the stuff that can be included in a "DiggerRef" imho... EDIT: to be even clearer on what I mean, I'm talking about re-using a |
they are suggesting DiggerRef as the only parameter with 3 types in it. this WILL break mods that expect minetest.dig_node to accept only a pos. as Sokomine suggested originally, adding a additional optional field will keep backwords compatibility EDIT: not to mention there idea fails to include a pos input at all for the node to be dug |
Granted, my bad. I assumed they were meaning to add a parameter... |
Updated my suggestion to make backwards compat |
Observed behaviour: Nodes digged with minetest.dig_node(pos) are properly digged - and then their drops are dropped as items.
NPCs and/or nodebreakers do need quite a lot of code to handle proper node digging. It is not very helpful if the items are dropped to the ground - they can't pick them up easily and thus need to implement their own functionality.
It would be very helpful if an optional target InvRef could be specified that receives the node drops. Perhaps even with the target list as a further additional parameter (or else "main").
It might also help to be able to act in the name of a given player in order to operate in protected areas.
And last, specifying a tool for the digging might sometimes be useful.
The text was updated successfully, but these errors were encountered: