From 368a326b409d18b23f0a5ccbd99bca7a8588231a Mon Sep 17 00:00:00 2001 From: Warmist Date: Fri, 28 Jun 2013 17:22:24 +0300 Subject: [PATCH] Fix for gems not getting right color. --- plugins/rendermax/rendermax.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/rendermax/rendermax.lua b/plugins/rendermax/rendermax.lua index df2619864..cbd7b3536 100644 --- a/plugins/rendermax/rendermax.lua +++ b/plugins/rendermax/rendermax.lua @@ -93,12 +93,13 @@ function makeMaterialDef(transparency,emitance,radius,flags) return {tr=transparency,em=emitance,rad=radius,flags=flg} end 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 function addGems() for k,v in pairs(df.global.world.raws.inorganics) do 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