From 7bce2bdc14cf266d7ff6ff1f15a5a1cd794d324d Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Thu, 7 Jul 2016 16:01:28 +0200 Subject: [PATCH] [kill_history] Add debug for coloring asserts --- mods/kill_history/init.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mods/kill_history/init.lua b/mods/kill_history/init.lua index c00ab6b..eeacae5 100644 --- a/mods/kill_history/init.lua +++ b/mods/kill_history/init.lua @@ -77,7 +77,16 @@ kill_history.blame_duration = tonumber(minetest.setting_get("kill_history.blame_ -- Little utility function to decode colors function kill_history.get_colour(coltab) - assert(coltab and coltab.red ~= nil and coltab.green ~= nil and coltab.blue ~= nil) + minetest.log("action", "[KillHistory] Assert debug : ") + minetest.log("action", "[KillHistory] \t - R: " .. dump(coltab.red)) + minetest.log("action", "[KillHistory] \t - G: " .. dump(coltab.green)) + minetest.log("action", "[KillHistory] \t - B: " .. dump(coltab.blue)) + minetest.log("action", "[KillHistory] \t - RGB: " .. string.gsub(dump(coltab), '\n', '')) + assert(coltab.red) + assert(coltab.green) + assert(coltab.blue) + assert(coltab) +-- assert(coltab and coltab.red ~= nil and coltab.green ~= nil and coltab.blue ~= nil) return coltab.blue + coltab.green * 255 + coltab.red * 255 * 255 end