Page 1 of 1

query if chunk is currently in generation queue, remove it

Posted: Mon May 15, 2017 11:34 pm
by sparr
I would like to be able to check if a chunk is currently in the queue to be generated.

I would also like to be able to take a chunk out of the queue.

And while we're on the subject... I'd like an event that fires when a chunk goes into the queue, with the option to return False from the event handler which would cause the chunk to be de-queued.

Re: query if chunk is currently in generation queue, remove it

Posted: Tue May 16, 2017 2:11 am
by Rseding91
What's the use-case for this?

Re: query if chunk is currently in generation queue, remove it

Posted: Tue May 16, 2017 3:41 pm
by sparr
I'm working on https://github.com/sparr/factorio-mod-w ... ontrol.lua

I call chunks "master" and "slave" to indicate whether data will be copied from or to them.

When a master chunk is generated, if its slave is in the queue I'd like to remove it from the queue.

When a slave chunk gets queued, I'd like to queue-or-copy the master, and then abort putting the slave chunk in the queue.

Re: query if chunk is currently in generation queue, remove it

Posted: Sun Mar 25, 2018 7:07 am
by sparr
Bump?

Re: query if chunk is currently in generation queue, remove it

Posted: Wed Apr 10, 2019 10:13 pm
by sparr
Another year, another bump! I'm working on fixing some bugs in this mod and would love to have this feature to fix a race condition.