Mining entity stopped because remaining ore is 0

Place to get help with not working mods / modding interface.
Post Reply
PrgSkidmark
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Apr 05, 2016 12:13 pm
Contact:

Mining entity stopped because remaining ore is 0

Post by PrgSkidmark »

Is there a way to ask if a mining drill entity is stopped because remaining ore = 0?
I'm not sure if I have to get the ore count within the drills boundary because I don't see a method to call.
Thanks,
Doug

User avatar
Tepalus
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Mon Mar 14, 2016 2:47 pm
Contact:

Re: Mining entity stopped because remaining ore is 0

Post by Tepalus »

A way to ask?

Do you want to see how much ores are left while hovering with the mouse over the drill or do you want an pop-up which tells you, there is a empty drill?

At the moment you can see how much ore is left by hovering with the mouse over the drill and you can see how much ore is in each square by hovering over the square.
Factorio in a Nutshell
try and error, try and error, try and success
once again it is friday, once again i'm waiting for the news
hour for hour for hour it goes, where it stops nobody knows

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Mining entity stopped because remaining ore is 0

Post by daniel34 »

Tepalus wrote:A way to ask?

Do you want to see how much ores are left while hovering with the mouse over the drill or do you want an pop-up which tells you, there is a empty drill?

At the moment you can see how much ore is left by hovering with the mouse over the drill and you can see how much ore is in each square by hovering over the square.
This is the Modding help subforum. He is trying to find a way to do it in code, for a mod.

I don't think there is a way to get that information directly from the mining drill, but surface.count_entities_filtered should do the trick.
Search the mining area of the drill and filter by type "resource", this will give you the amount of resources in the given area and also includes modded resources.
quick links: log file | graphical issues | wiki

User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: Mining entity stopped because remaining ore is 0

Post by Phillip_Lynx »

Or do some fancy things with combinators and chest :).

(Or are miners capable to conecct directly to the circuit network?)

User avatar
Tepalus
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Mon Mar 14, 2016 2:47 pm
Contact:

Re: Mining entity stopped because remaining ore is 0

Post by Tepalus »

Damn! I usualy search the "new posts" and i did not realize this is the mod-forum! :o

But i have a non-mod idea: Just make a intelligent chest and inserters. One inserter takes ore from the belt and puts it into the chest and one who takes the ore from the chest and puts it on the belt.
Connect the chest to a lamp which turns red when the chest is empty and is yellow when there are less than 200 ores and is green when there are more than 200 ores. (perfectly done when fast inserter puts in chest and normal inserter puts on the belt)
Factorio in a Nutshell
try and error, try and error, try and success
once again it is friday, once again i'm waiting for the news
hour for hour for hour it goes, where it stops nobody knows

PrgSkidmark
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Apr 05, 2016 12:13 pm
Contact:

Re: Mining entity stopped because remaining ore is 0

Post by PrgSkidmark »

I figured I would have to check the ore count under the drill. I'll check the resource count then and check.
The position of the drill is dead center right?
The goal is to deconstruct the drills automatically as they exhaust all the ore. I've got it currently deconstructing all drills in my area as I walk. I just need to say if ore count == 0.
Drills are easy to build, and I'm not sure why I want to accomplish this and return them to my inventory. But, it's just a start of a mod.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: Mining entity stopped because remaining ore is 0

Post by Arch666Angel »

There is a mod, automatic deconstruction which, like the name says, automatically deconstructs miners if they ran dry. So maybe you want to take a look into that mod and the code.

Post Reply

Return to “Modding help”