put the extract methods back onto MCLevel

This commit is contained in:
David Vierra 2011-07-23 22:21:28 -10:00
parent 225f813d28
commit daf593378b

View File

@ -468,6 +468,8 @@ def extractSchematicFrom(sourceLevel, box):
return tempSchematic return tempSchematic
MCLevel.extractSchematic = extractSchematicFrom
import tempfile import tempfile
def extractZipSchematicFrom(sourceLevel, box, zipfilename): def extractZipSchematicFrom(sourceLevel, box, zipfilename):
#converts classic blocks to alpha #converts classic blocks to alpha
@ -514,6 +516,8 @@ def extractZipSchematicFrom(sourceLevel, box, zipfilename):
import shutil import shutil
shutil.rmtree(filename) shutil.rmtree(filename)
MCLevel.extractZipSchematic = extractZipSchematicFrom
from zipfile import ZipFile, ZIP_STORED from zipfile import ZipFile, ZIP_STORED
def zipdir(basedir, archivename): def zipdir(basedir, archivename):
assert os.path.isdir(basedir) assert os.path.isdir(basedir)