djkrose / 7DTD-ScriptingMod

Adds scripting support and other useful functionality to 7 Days To Die dedicated server
19 stars 10 forks source link

Commands should be able to process unloaded chunks #20

Open djkrose opened 7 years ago

djkrose commented 7 years ago

It should be possible for all built-in commands like dj-export, dj-import, dj-repair, dj-regen to load affected chunks on demand if they are not yet loaded. This way, repairs and import/exports could be done even if no player is near.

Chunks must be properly unloaded after the operation, except when the chunk got used by other players in the meantime.

The loading ans processing on unlloaded chunks must run in a background thread.

For dj-repair this must be an option, or even completely disabled, because it could take a significant long time to repair all chunks.

exaSR commented 6 years ago

+1 on this one.

Although from your source code I could not see any reason why a chunk to regen must be loaded (in ChunkCache)...