Page 1 of 1

[0.15] [kovarex] player.mine_entity() does not damage pickaxe

Posted: Fri May 19, 2017 2:07 pm
by Mylon
Mining entities via the mine_entity() does not damage the player's pickaxe.

To recreate:
Start a new game.
Craft an iron pickaxe.
Run this command:

Code: Select all

/c for k, v in pairs(game.player.surface.find_entities_filtered{type="tree"}) do game.player.mine_entity(v) end
Note pickaxe is still at full durability.

Expected behavior: Pickaxe is consumed.

Re: [0.15] [kovarex] player.mine_entity() does not damage pickaxe

Posted: Fri May 19, 2017 2:21 pm
by kovarex
Well the pickaxe is used up during the actual mining process, and as this commands skips it and just mines it instantly, it isn't used up. I don't consider to be a bug.