Miner is_mining field

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
foxmadnes
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Dec 01, 2024 10:40 pm
Contact:

Miner is_mining field

Post by foxmadnes »

Hi!

I'm working on a small mod I have not released, and I wanted to count the number of actively mining miners at any given point. I noticed that crafters have a shared is_crafting field, so I'm wondering if we can add a similar field/API for all the different miners. I imagine this could be helpful for other mods in the same way is_crafting is likely helpful.

I suppose I might be able to deduce it based on the electricity draw (and might try that in a bit), but that seemed very involved for answering what felt like a quick question about the entity.
curiosity
Filter Inserter
Filter Inserter
Posts: 587
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Miner is_mining field

Post by curiosity »

Why mess around with electricity draw if you can just check the status?

And then is_crafting doesn't work like that. It shows if the machine is in a middle of a craft, not its activity.
Post Reply

Return to “Modding interface requests”