Merge remote-tracking branch 'jjyg/master' into 0.34.11-r4

develop
expwnent 2013-10-19 20:28:30 -04:00
commit ef9d3b1521
1 changed files with 15 additions and 3 deletions

@ -175,7 +175,7 @@ module DFHack
# return the RegionMapEntry (from designation.biome)
def region_map_entry
b = designation.biome
b = mapblock.region_offset[designation.biome]
wd = df.world.world_data
# region coords + [[-1, -1], [0, -1], ..., [1, 1]][b]
@ -231,11 +231,23 @@ module DFHack
mat_index = df.world.world_data.region_details[idx].lava_stone
MaterialInfo.new(0, mat_index)
when :FEATURE
if designation.feature_local
mx = mapblock.region_pos.x
my = mapblock.region_pos.y
df.decode_mat(df.world.world_data.feature_map[mx/16][my/16].features.feature_init[mx%16][my%16][mapblock.local_feature])
elsif designation.feature_global
df.decode_mat(df.world.world_data.underground_regions[mapblock.global_feature].feature_init)
else
MaterialInfo.new(-1, -1)
end
when :FROZEN_LIQUID
MaterialInfo.new('WATER')
# TODO
#when :PLANT
#when :GRASS_DARK, :GRASS_DEAD, :GRASS_DRY, :GRASS_LIGHT
#when :FEATURE
#when :FROZEN_LIQUID
#when :CONSTRUCTION
else # AIR ASHES BROOK CAMPFIRE DRIFTWOOD FIRE HFS MAGMA POOL RIVER
MaterialInfo.new(-1, -1)