Start work on server-side saving worlds

This commit includes a a few more changes because I'm too lazy to
clean them up:
 - fix chunk modification times
 - improve command line arguments
 - load multiple chunks at once
This commit is contained in:
Joscha 2017-04-15 23:49:59 +00:00
parent e7f85ff421
commit 9e5b5f874a
6 changed files with 195 additions and 47 deletions

View file

@ -36,6 +36,9 @@ class ClientChunkPool(ChunkPool):
if diffs:
self._client.send_changes(diffs)
def load(self, pos):
raise Exception
def load_list(self, coords):
coords = [pos for pos in coords if pos not in self._chunks]
if coords:
@ -43,6 +46,6 @@ class ClientChunkPool(ChunkPool):
def unload_list(self, coords):
if coords:
#self.save_changes()
self._client.unload_chunks(coords)
super().unload_list(coords)
super().unload_list(coords)