develop
Japa 2013-06-28 21:22:11 +05:30
commit b9634098a9
1 changed files with 3 additions and 2 deletions

@ -93,12 +93,13 @@ function makeMaterialDef(transparency,emitance,radius,flags)
return {tr=transparency,em=emitance,rad=radius,flags=flg} return {tr=transparency,em=emitance,rad=radius,flags=flg}
end end
function colorFrom16(col16) function colorFrom16(col16)
return copyall(df.global.enabler.ccolor[col16]) local col=df.global.enabler.ccolor[col16]
return {col[0],col[1],col[2]}
end end
function addGems() function addGems()
for k,v in pairs(df.global.world.raws.inorganics) do for k,v in pairs(df.global.world.raws.inorganics) do
if v.material.flags.IS_GEM then if v.material.flags.IS_GEM then
addMaterial("INORGANIC:"..v.id,colorFrom16(v.material.build_color[0])) addMaterial("INORGANIC:"..v.id,colorFrom16(v.material.tile_color[0]+v.material.tile_color[2]*8))
end end
end end
end end