0

added 'color_light' option to lighting mode

This commit is contained in:
Aaron Griffith
2011-09-19 23:36:21 -04:00
parent b5c86b6bca
commit 426c4e9c05
4 changed files with 122 additions and 25 deletions

View File

@@ -91,7 +91,7 @@ def _find_file(filename, mode="rb", verbose=False):
for jarpath in jarpaths:
if os.path.exists(jarpath):
jar = zipfile.ZipFile(jarpath)
for jarfilename in [filename, 'misc/' + filename]:
for jarfilename in [filename, 'misc/' + filename, 'environment/' + filename]:
try:
if verbose: logging.info("Found %s in '%s'", jarfilename, jarpath)
return jar.open(jarfilename)
@@ -2278,6 +2278,20 @@ def getBiomeData(worlddir, chunkX, chunkY):
currentBiomeData = data
return data
lightcolor = None
lightcolor_checked = False
def loadLightColor():
global lightcolor, lightcolor_checked
if not lightcolor_checked:
lightcolor_checked = True
try:
lightcolor = list(_load_image("light_normal.png").getdata())
except:
logging.warning("Light color image could not be found.")
lightcolor = None
return lightcolor
# This set holds block ids that require special pre-computing. These are typically
# things that require ancillary data to render properly (i.e. ladder plus orientation)
# A good source of information is: