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
Mining entity stopped because remaining ore is 0
-
- Burner Inserter
- Posts: 10
- Joined: Tue Apr 05, 2016 12:13 pm
- Contact:
Re: Mining entity stopped because remaining ore is 0
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.
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
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
Re: Mining entity stopped because remaining ore is 0
This is the Modding help subforum. He is trying to find a way to do it in code, for a mod.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.
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.
- Phillip_Lynx
- Filter Inserter
- Posts: 541
- Joined: Mon Jul 21, 2014 6:00 pm
- Contact:
Re: Mining entity stopped because remaining ore is 0
Or do some fancy things with combinators and chest .
(Or are miners capable to conecct directly to the circuit network?)
(Or are miners capable to conecct directly to the circuit network?)
Re: Mining entity stopped because remaining ore is 0
Damn! I usualy search the "new posts" and i did not realize this is the mod-forum!
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)
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
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
-
- Burner Inserter
- Posts: 10
- Joined: Tue Apr 05, 2016 12:13 pm
- Contact:
Re: Mining entity stopped because remaining ore is 0
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.
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.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: Mining entity stopped because remaining ore is 0
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.
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"