From 5d77d8475af7aff27eb026a4b56065387c024165 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 4 Nov 2017 22:42:24 -0400 Subject: Massive changes * New error messages for missing dependencies * Removed useless art_serverchanger entity * Added a sweet ascii logo * Added Skills * Minor fixes to cl_inventory tracker * Changed a few prints to use logging module --- gamemode/shared/animations/move_evade.lua | 2 ++ gamemode/shared/animations/swing_axe.lua | 2 ++ gamemode/shared/animations/swing_fists.lua | 2 ++ gamemode/shared/animations/swing_hammer.lua | 2 ++ gamemode/shared/animations/swing_knife.lua | 2 ++ gamemode/shared/animations/swing_mele.lua | 2 ++ gamemode/shared/log.lua | 49 +++++++++++------------------ 7 files changed, 31 insertions(+), 30 deletions(-) (limited to 'gamemode/shared') diff --git a/gamemode/shared/animations/move_evade.lua b/gamemode/shared/animations/move_evade.lua index a5595aa..c4afa59 100644 --- a/gamemode/shared/animations/move_evade.lua +++ b/gamemode/shared/animations/move_evade.lua @@ -1,3 +1,5 @@ +nrequire("sh_animations.lua") + RegisterLuaAnimation('evade_left', { FrameData = { { diff --git a/gamemode/shared/animations/swing_axe.lua b/gamemode/shared/animations/swing_axe.lua index 60133b5..9e8ddb4 100644 --- a/gamemode/shared/animations/swing_axe.lua +++ b/gamemode/shared/animations/swing_axe.lua @@ -1,3 +1,5 @@ +nrequire("sh_animations.lua") + RegisterLuaAnimation('axe_swing_up', { FrameData = { { diff --git a/gamemode/shared/animations/swing_fists.lua b/gamemode/shared/animations/swing_fists.lua index b0c77b5..8c0f106 100644 --- a/gamemode/shared/animations/swing_fists.lua +++ b/gamemode/shared/animations/swing_fists.lua @@ -1,3 +1,5 @@ +nrequire("sh_animations.lua") + RegisterLuaAnimation('fist_swing_up', { FrameData = { { diff --git a/gamemode/shared/animations/swing_hammer.lua b/gamemode/shared/animations/swing_hammer.lua index efb8e34..2152709 100644 --- a/gamemode/shared/animations/swing_hammer.lua +++ b/gamemode/shared/animations/swing_hammer.lua @@ -1,3 +1,5 @@ +nrequire("sh_animations.lua") + RegisterLuaAnimation('hammer_swing_up', { FrameData = { { diff --git a/gamemode/shared/animations/swing_knife.lua b/gamemode/shared/animations/swing_knife.lua index f0bdec1..cf78bb5 100644 --- a/gamemode/shared/animations/swing_knife.lua +++ b/gamemode/shared/animations/swing_knife.lua @@ -1,3 +1,5 @@ +nrequire("sh_animations.lua") + RegisterLuaAnimation('knife_swing_up', { FrameData = { { diff --git a/gamemode/shared/animations/swing_mele.lua b/gamemode/shared/animations/swing_mele.lua index a0cd065..4a38876 100644 --- a/gamemode/shared/animations/swing_mele.lua +++ b/gamemode/shared/animations/swing_mele.lua @@ -1,3 +1,5 @@ +nrequire("sh_animations.lua") + RegisterLuaAnimation('swing_onehand_left', { FrameData = { { diff --git a/gamemode/shared/log.lua b/gamemode/shared/log.lua index 92bb349..618fd0c 100644 --- a/gamemode/shared/log.lua +++ b/gamemode/shared/log.lua @@ -2,39 +2,28 @@ local fn = nrequire("fn.lua") local col = nrequire("colortheme.lua") local log = {} +local domain +if SERVER then + domain = "[SERVER]" +elseif CLIENT then + domain = "[CLIENT]" +end -log.debug = fn.compose( - fn.curry( - MsgC, - col.console.cyan - ), - fn.curry( - string.format, - "[DEBUG] %s\n" - ) -) +function log.debug(...) + MsgC(col.console.gray,domain,"[DEBUG]",...,"\n") +end -log.info = fn.compose( - fn.curry( - MsgC, - col.console.blue - ), - fn.curry( - string.format, - "[INFO] %s\n" - ) -) +function log.info(...) + MsgC(col.console.cyan,domain,"[INFO]",...,"\n") +end -log.warn = fn.compose( - fn.curry( - MsgC, - col.console.yellow - ), - fn.curry( - string.format, - "[WARNING] %s\n" - ) -) +function log.warn(...) + MsgC(col.console.yellow,domain,"[WARNING]",...,"\n") +end + +function log.error(...) + MsgC(col.console.red,domain,"[ERROR]",...,"\n") +end log.report = fn.curry( file.Append, -- cgit v1.2.3-70-g09d2