Import level classes where they're needed instead of in mclevelbase.py. This lets us run each file individually, e.g. for doctests.

This commit is contained in:
David Vierra 2011-12-20 05:39:05 -10:00
parent 56a9d56679
commit 3e1520ee02
6 changed files with 6 additions and 1 deletions

View File

@ -87,6 +87,7 @@ Spawn = "Spawn"
__all__ = ["MCIndevLevel"] __all__ = ["MCIndevLevel"]
from level import EntityLevel, extractLightMap
class MCIndevLevel(EntityLevel): class MCIndevLevel(EntityLevel):
""" IMPORTANT: self.Blocks and self.Data are indexed with [x,z,y] via axis """ IMPORTANT: self.Blocks and self.Data are indexed with [x,z,y] via axis

View File

@ -17,6 +17,8 @@ from os.path import join, dirname, basename
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
warn, error, info, debug = log.warn, log.error, log.info, log.debug warn, error, info, debug = log.warn, log.error, log.info, log.debug
from level import MCLevel, EntityLevel, extractLightMap
#infinite #infinite
Level = 'Level' Level = 'Level'
BlockData = 'BlockData' BlockData = 'BlockData'

View File

@ -11,6 +11,7 @@ import re
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
warn, error, info, debug = log.warn, log.error, log.info, log.debug warn, error, info, debug = log.warn, log.error, log.info, log.debug
from level import MCLevel
class MCJavaLevel(MCLevel): class MCJavaLevel(MCLevel):

View File

@ -110,4 +110,3 @@ else:
saveFileDir = os.path.join(minecraftDir, u"saves") saveFileDir = os.path.join(minecraftDir, u"saves")
from level import MCLevel, EntityLevel, extractLightMap

View File

@ -298,6 +298,7 @@ class PocketChunksFile(object):
return coords return coords
from infiniteworld import InfdevChunk, ChunkedLevelMixin from infiniteworld import InfdevChunk, ChunkedLevelMixin
from level import MCLevel
class PocketWorld(ChunkedLevelMixin, MCLevel): class PocketWorld(ChunkedLevelMixin, MCLevel):
Height = 128 Height = 128

View File

@ -5,6 +5,7 @@ Created on Jul 22, 2011
''' '''
from mclevelbase import * from mclevelbase import *
import shutil import shutil
from level import MCLevel, EntityLevel
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
warn, error, info, debug = log.warn, log.error, log.info, log.debug warn, error, info, debug = log.warn, log.error, log.info, log.debug