0

Merge branch 'counterpillow/18prep' into 18prep

Conflicts:
	overviewer_core/textures.py
This commit is contained in:
Aaron Griffith
2011-09-11 15:43:19 -04:00
2 changed files with 44 additions and 1 deletions

View File

@@ -1785,6 +1785,26 @@ def generate_special_texture(blockID, data):
composite.alpha_over(img,dw_right, (6,3),dw_right) # bottom right
return generate_texture_tuple(img, blockID)
if blockID == 106: # vine
img = Image.new("RGBA", (24,24), bgcolor)
raw_texture = terrain_images[143]
# print "vine is facing: %d" % data
if data == 2: # don't trust these values - found by sheer luck.
tex = transform_image_side(raw_texture)
composite.alpha_over(img, tex, (0,6), tex)
return generate_texture_tuple(img, blockID)
if data == 3:
tex = transform_image_side(raw_texture).transpose(Image.FLIP_LEFT_RIGHT)
composite.alpha_over(img, tex, (12,6), tex)
return generate_texture_tuple(img, blockID)
if data == 4:
tex = transform_image_side(raw_texture).transpose(Image.FLIP_LEFT_RIGHT)
composite.alpha_over(img, tex, (0,0), tex)
return generate_texture_tuple(img, blockID)
if data == 5:
tex = transform_image_side(raw_texture)
composite.alpha_over(img, tex, (12,0), tex)
return generate_texture_tuple(img, blockID)
return None
@@ -2044,6 +2064,22 @@ def convert_data(blockID, data):
elif data == 7: data = 9
elif data == 8: data = 6
elif data == 9: data = 3
if blockID == 106: # vine
if _north == 'upper-left':
if data == 2: data = 5
elif data == 3: data = 4
elif data == 4: data = 2
elif data == 5: data = 3
elif _north == 'upper-right':
if data == 2: data = 3
elif data == 3: data = 2
elif data == 4: data = 5
elif data == 5: data = 4
elif _north == 'lower-right':
if data == 2: data = 4
elif data == 3: data = 5
elif data == 4: data = 3
elif data == 5: data = 2
return data
def tintTexture(im, c):
@@ -2138,7 +2174,8 @@ def getBiomeData(worlddir, chunkX, chunkY):
special_blocks = set([ 2, 6, 9, 17, 18, 20, 26, 23, 27, 28, 29, 31, 33,
34, 35, 43, 44, 50, 51, 53, 54, 55, 58, 59, 61, 62,
63, 64, 65, 66, 67, 68, 71, 75, 76, 79, 85, 86, 90,
91, 92, 93, 94, 96, 98, 99, 100, 101, 102, 108, 109])
91, 92, 93, 94, 96, 98, 99, 100, 101, 102, 106, 108,
109])
# this is a map of special blockIDs to a list of all
# possible values for ancillary data that it might have.
@@ -2191,6 +2228,7 @@ special_map[99] = range(11) # huge brown mushroom, side, corner, etc, piece
special_map[100] = range(11) # huge red mushroom, side, corner, etc, piece
special_map[101]= range(16) # iron bars, all the possible combination, uses pseudo data
special_map[102]= range(16) # glass panes, all the possible combination, uses pseudo data
special_map[106] = (2,3,4,5) # vine, orientation
special_map[108]= range(4) # red stairs, orientation
special_map[109]= range(4) # stonebrick stairs, orientation