mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
21 lines
465 B
Lua
21 lines
465 B
Lua
local DebugView = require 'utils.debug.main_view'
|
|
|
|
commands.add_command(
|
|
'debug',
|
|
'Opens the debugger',
|
|
function(_, player)
|
|
local player = game.player
|
|
local p
|
|
if player then
|
|
p = player.print
|
|
if not player.admin then
|
|
p('Only admins can use this command.')
|
|
return
|
|
end
|
|
else
|
|
p = player.print
|
|
end
|
|
DebugView.open_dubug(player)
|
|
end
|
|
)
|