ruby: add FEATURE/ice map tile materials

develop
jj 2013-10-14 01:58:55 +02:00
parent 3d7661e7e9
commit 1bd6d5f96d
1 changed files with 14 additions and 2 deletions

@ -231,11 +231,23 @@ module DFHack
mat_index = df.world.world_data.region_details[idx].lava_stone mat_index = df.world.world_data.region_details[idx].lava_stone
MaterialInfo.new(0, mat_index) 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 # TODO
#when :PLANT #when :PLANT
#when :GRASS_DARK, :GRASS_DEAD, :GRASS_DRY, :GRASS_LIGHT #when :GRASS_DARK, :GRASS_DEAD, :GRASS_DRY, :GRASS_LIGHT
#when :FEATURE
#when :FROZEN_LIQUID
#when :CONSTRUCTION #when :CONSTRUCTION
else # AIR ASHES BROOK CAMPFIRE DRIFTWOOD FIRE HFS MAGMA POOL RIVER else # AIR ASHES BROOK CAMPFIRE DRIFTWOOD FIRE HFS MAGMA POOL RIVER
MaterialInfo.new(-1, -1) MaterialInfo.new(-1, -1)