Allow option in mining-drill prototype to place anywhere

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: 16761
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: 3753
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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16761
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

OK, I've added this for 2.1.
If you want to get ahold of me I'm almost always on Discord.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 490
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

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

Post by protocol_1903 »

Boodals wrote: Sun Jul 07, 2019 2:49 pm 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.
For future reference, update_connections works on mining drills (I do not know if/when this changed but it's worked since 1.1)
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903

Buy me a coffee
Post Reply

Return to “Implemented mod requests”