Page 1 of 1
Allow option in mining-drill prototype to place anywhere
Posted: Wed Jun 19, 2019 1:11 am
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!
Re: Allow option in mining-drill prototype to place anywhere
Posted: Wed Jul 03, 2019 5:49 pm
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.
Re: Allow option in mining-drill prototype to place anywhere
Posted: Wed Jul 03, 2019 7:55 pm
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?
Re: Allow option in mining-drill prototype to place anywhere
Posted: Wed Jul 03, 2019 8:23 pm
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?
Re: Allow option in mining-drill prototype to place anywhere
Posted: Sun Jul 07, 2019 2:49 pm
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.