Detecting when resources are mined

Place to get help with not working mods / modding interface.
apriori
Filter Inserter
Filter Inserter
Posts: 282
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Detecting when resources are mined

Post by apriori »

Does anybody know how to catch a fact of mining resources? I mean is there any lua event (or another way) occurring when mining drill collects resources from the ground?
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Detecting when resources are mined

Post by daniel34 »

Moved from the [MOD 0.12.x] Advanced Drills topic to Modding help.

There is no such event that I know of.
As a workaround you could periodically count the number of resources under the mining drill, although it's not possible to determine which drill it was due to possibly overlapping drill ranges.
quick links: log file | graphical issues | wiki
Rseding91
Factorio Staff
Factorio Staff
Posts: 15967
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Detecting when resources are mined

Post by Rseding91 »

There's no event as that would fire all the time and cause a large drain for very little gain similar to an entity damaged event.
If you want to get ahold of me I'm almost always on Discord.
apriori
Filter Inserter
Filter Inserter
Posts: 282
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Re: Detecting when resources are mined

Post by apriori »

Thank you guys.
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.
Post Reply

Return to “Modding help”