Skip to content

Commit

Permalink
DEBUG_VIEW_ON_BY_DEFAULT
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-A-Rocha committed Aug 1, 2024
1 parent 678691c commit 6111544
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions newmodels_reborn/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<script src="scripts/optional/update_checker/s_update_checker.lua" type="server"/>

<!-- Debugging / Testing -->
<script src="scripts/optional/debug/g_debug.lua" type="shared"/>
<script src="scripts/optional/debug/c_debug.lua" type="client"/>
<script src="scripts/optional/debug/s_debug.lua" type="server"/>

Expand Down
5 changes: 4 additions & 1 deletion newmodels_reborn/scripts/optional/debug/c_debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ local function toggleDebugView(cmd)
outputChatBox(cmd .. " => " .. tostring(enabled))
end
addCommandHandler("newmodelsdebug", toggleDebugView, false)
executeCommandHandler("newmodelsdebug")

if (DEBUG_VIEW_ON_BY_DEFAULT) then
executeCommandHandler("newmodelsdebug")
end
3 changes: 3 additions & 0 deletions newmodels_reborn/scripts/optional/debug/g_debug.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Turn this off if you don't want the debug view to be turned on by default
-- or get rid of the debugging scripts entirely if you do not need them.
DEBUG_VIEW_ON_BY_DEFAULT = true

0 comments on commit 6111544

Please sign in to comment.