Added debug_text function, established debug flag

This commit is contained in:
Jeremy Smitherman
2018-12-26 20:32:38 -06:00
parent 004536f4d5
commit a23baf00e8
2 changed files with 33 additions and 30 deletions
+17 -6
View File
@@ -1,14 +1,25 @@
-- Development mode. This module is defined and configured with a base config
-- in the game install Scripts folder in development mode.
if HOGGIT and HOGGIT.script_base then
dofile(HOGGIT.script_base..[[\HOGGIT\lib\error_handling.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\lib\logging.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\lib\utils.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\lib\spawner.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\lib\communication.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\lib\group.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\hoggit\error_handling.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\hoggit\logging.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\hoggit\utils.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\hoggit\spawner.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\hoggit\communication.lua]])
dofile(HOGGIT.script_base..[[\HOGGIT\hoggit\group.lua]])
else
-- The dist version of this framework starts with this file in the minification, so we need to define the top
-- level module right here.
HOGGIT = {}
end
if trigger.misc.getUserFlag(9999) then
trigger.action.outText("DEBUG MODE ON", 10)
HOGGIT.debug = true
HOGGIT.debug_text = function(text, time)
trigger.action.outText(text, time)
end
else
HOGGIT.debug = false
HOGGIT.debug_text = function()end
end