ZipSchematic mostly works for reading from.

createChunk does nothing and deleteChunk probably causes an error, but importing them works neatly
This commit is contained in:
David Vierra 2010-11-16 03:51:06 -10:00
parent b346c83f4b
commit 29533b4acf

View File

@ -3042,8 +3042,8 @@ class MCAlphaDimension (MCInfdevOldLevel):
class ZipSchematic (MCInfdevOldLevel): class ZipSchematic (MCInfdevOldLevel):
def __init__(self, filename): def __init__(self, filename):
tempdir = tempfile.mkdtemp("schematic") tempdir = tempfile.mktemp("schematic")
self.filename = filename
self.worldDir = tempdir self.worldDir = tempdir
#used to limit memory usage #used to limit memory usage
@ -3084,6 +3084,9 @@ class ZipSchematic (MCInfdevOldLevel):
def _saveChunk(self, chunk): def _saveChunk(self, chunk):
raise NotImplemented, "Cannot save zipfiles yet!" raise NotImplemented, "Cannot save zipfiles yet!"
def saveInPlace(self):
raise NotImplemented, "Cannot save zipfiles yet!"
def preloadChunkPaths(self): def preloadChunkPaths(self):
info( u"Scanning for chunks..." ) info( u"Scanning for chunks..." )
self._presentChunksDict = {} self._presentChunksDict = {}