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

Bugs that are actually features.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

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

Post 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.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post 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.
Post Reply

Return to “Not a bug”