0gb.us wrote:PilzAdam wrote:I dont like the checking for chests or owned nodes, because just some random meta strings are tested.
True. I don't like the implementation either. I wanted to test for meta data in general, but I'm not sure that can be done with the current API.
Fixed. Now the node's own can_dig() function is used. This takes care of chests, furnaces, and steel doors, without using arbitrary meta data. This will also allow user-defined nodes to take care of themselves as well.
0gb.us wrote:PilzAdam wrote:I also dont like to add the replaced nodes to the bones inventory because it should only contain the players items. Otherwise it would be possible to dig mese without any tools.
True, but replacing the mese with the bones node and completely losing the mese forever is worse. Just the inconvenience of finding a way to die in mese just to avoid having to use a tool paired with being warped back to the spawn point so you have to walk all the way back down into the mine to find the mese/bones will deter people from using bones as a way of mining without tools. Not to mention the fact that you can only find your way into the mese to die if you already had a strong enough tool to break the mese in the first place, but lag caused the server to not respond to your digging. Or course, another solution is to just not spawn bones if the player is inside ANY node, and let them keep their stuff in that case.
node_dig() is now used, so the user's tool will be worn out. Since the player can't get into the node without the proper tool, this should fix the problem.
-=-=-=-
Pull request updated.