From 4879eb1d78520ce0ac9b0bb0ef5244cf65ad7c99 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Wed, 4 Jan 2017 23:27:36 -0500 Subject: Started refactoring item and inventory system --- gamemode/shared/log.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gamemode/shared/log.lua (limited to 'gamemode/shared/log.lua') diff --git a/gamemode/shared/log.lua b/gamemode/shared/log.lua new file mode 100644 index 0000000..63d3e0e --- /dev/null +++ b/gamemode/shared/log.lua @@ -0,0 +1,23 @@ + +local fn = nrequire("fn.lua") +local col = nrequire("colortheme.lua") +local log = {} + +log.debug = fn.curry( + fn.curry( + MsgC, + col.console.cyan), + fn.curry( + string.format, + "[DEBUG] %s")) + +log.warn = fn.compose( + fn.curry( + MsgC, + col.console.yellow), + debug.traceback, + fn.curry( + ErrorNoHalt, + "[WARNING]")) + +return log -- cgit v1.2.3-70-g09d2