Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
[kill_history] Add debug for coloring asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymkwi committed Jul 7, 2016
1 parent a604c78 commit 7bce2bd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mods/kill_history/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7bce2bd

Please sign in to comment.