Page 1 of 1

Allow deleting chunk instantly for migration scripts

Posted: Sun Mar 17, 2019 6:23 am
by Optera
Problem:
Migration scripts updating existing surface(s) to new biomes, e.g. when adding alien biomes mid game or updating to a new map generator, take a lot of memory when generating temporary surfaces as deleting chunks will only happen after they complete.

Suggestion:
Add a method similar to force_generate_chunk_requests() for chunk deletion to forcefully purge chunks within the same tick.
This method could be limited to work only within migration scripts if it'd cause issues in control phase.

Re: Allow deleting chunk instantly for migration scripts

Posted: Wed Oct 21, 2020 8:31 pm
by Rseding91
Sorry but this isn't going to happen. Nothing in the game logic assumes chunks can be invalidated during a tick so literally every place that touches them would have to be guarded against the possibility that one disappears during any Lua call and that's just not going to happen.