Restart mining drill

Place to get help with not working mods / modding interface.
Post Reply
hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Restart mining drill

Post by hreintke »

Hi,

- I have a mining drill which took all the ore below it.
- Put new ore beneath it with "surface.create_entity({name="copper-ore", amount=ore, position={game.player.position.x+x, game.player.position.y+y}})"
- I see it correctly displayed, the mining drill shows "expected resources"

But the mining drill does not start to take the new created ore.
When destructed and a new drill is placed on the same location, it does begin.
Saving an reload of the game dos not solve it.

Is there a specific action needed to restart ?

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2636
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Restart mining drill

Post by steinio »

You need to remove and rebuild it. The position is burned up and will not be rescanned until you build a new miner.
Image

Transport Belt Repair Man

View unread Posts

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: Restart mining drill

Post by hreintke »

Did some further testing.

Looks like it is not that the drill doesn't "see" the ore but that it cannot move it to the belt.
Just rotating the drill 4 times makes it work.

See the picture, the drill has mined the ore but is not putting it on the belt.
The yellow dots are from the bottleneck mod, also showing "output full"
drill.JPG
drill.JPG (102.41 KiB) Viewed 2967 times

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Restart mining drill

Post by Aeternus »

Looking at the bottom mines in that screenshot, those also show yellow without any ore beneath them. Makes me suspect the bottleneck mod shows mines as yellow for ore shortages too, since mines do not have any input.

It's probably an optimization thing. If a mine has run out of ore, shut it down and never recheck it, since in vanilla there is no condition under which that mine could ever become active again.


hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: Restart mining drill

Post by hreintke »

@darkfrei
Thanks, Setting the drill active first to false then to true made it get back to work.

@Aeternus
The drills you see with yellow do have resources beneath them (I checked).
Bottleneck shows red when no resources available( and green when all is running OK)

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Restart mining drill

Post by darkfrei »

hreintke wrote:@darkfrei
Thanks, Setting the drill active first to false then to true made it get back to work.
Nice!

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Restart mining drill

Post by eradicator »

Most likely cause: The game sends the drill into sleep mode after it's finished, to save CPU power. As adding new resources isn't a possible action in vanilla. You might try to ask if this can be fixed as a "bug". Otherwise any change to the drill will probably get it back into active state. Drill.active = Drill.active might even work, and preserves the actual active state in case some other mod made it inactive on purpose.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3170
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Restart mining drill

Post by Bilka »

You can use https://lua-api.factorio.com/latest/Lua ... onnections to wake up the mining drill.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”