LuaEntity.deplete()

User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

LuaEntity.deplete()

Post by Mylon »

tl;dr: Similar to LuaEntity.destroy() (for finite resources), but also raises the on_resource_depleted event for the marked entity.

Use case: Nougat Mining turns ore in the ground to items on the ground marked for pickup. Currently I call raise_event if the ore runs out. With this, I wouldn't have to.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14594
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity.deplete()

Post by Rseding91 »

Ok.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: LuaEntity.deplete()

Post by Mylon »

Thanks!
Post Reply

Return to “Implemented mod requests”