Allow option in mining-drill prototype to place anywhere

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
kiwiwikikwi
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Jun 19, 2019 1:04 am
Contact:

Allow option in mining-drill prototype to place anywhere

Post by kiwiwikikwi »

Just a small request-- I'm trying to make a farming mod and this would be a really useful feature. Ideally my custom miner would work on "plant" resource categories, but not "seed" resource categories, but I'd like to allow the user to set up their farming operation before waiting for their seeds to turn into plants. I could do this through control, but I also think it would be a reasonable option for the prototype in general for more complicated setups where resources may be dynamic :).

Thank you!
Rseding91
Factorio Staff
Factorio Staff
Posts: 14597
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow option in mining-drill prototype to place anywhere

Post by Rseding91 »

I could add a flag to allow this but the mining drill won't start working when a resource is placed under it because we would have to do an entity search every time a resource entity is created and that would be a lot of wasted CPU time.
If you want to get ahold of me I'm almost always on Discord.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3724
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Allow option in mining-drill prototype to place anywhere

Post by DaveMcW »

Rseding91 wrote: Wed Jul 03, 2019 5:49 pmwe would have to do an entity search every time a resource entity is created and that would be a lot of wasted CPU time.
How about an update_mining_drills flag in LuaSurface.create_entity{} to do the search only when needed?
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Allow option in mining-drill prototype to place anywhere

Post by darkfrei »

Rseding91 wrote: Wed Jul 03, 2019 5:49 pm I could add a flag to allow this but the mining drill won't start working when a resource is placed under it because we would have to do an entity search every time a resource entity is created and that would be a lot of wasted CPU time.
Is here some mining_drill_entity.working_state? How to get if the mining drill goes to unlimited idle state?
Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Allow option in mining-drill prototype to place anywhere

Post by Boodals »

Maybe make update_connections or whatever its called work on mining drills? Then just let modders worry about updating miners. I assume its already a problem if you spawn some resources under existing mining drills that have ran out of resources.
Post Reply

Return to “Modding interface requests”