move 'devtools:console' binding handler to __vc_on_hud_open
This commit is contained in:
@@ -269,7 +269,7 @@ function _rules.clear()
|
||||
_rules.create("allow-cheats", true)
|
||||
end
|
||||
|
||||
function __vc_create_hud_rules()
|
||||
function __vc_on_hud_open()
|
||||
_rules.create("allow-content-access", hud._is_content_access(), function(value)
|
||||
hud._set_content_access(value)
|
||||
input.set_enabled("player.pick", value)
|
||||
@@ -295,6 +295,14 @@ function __vc_create_hud_rules()
|
||||
_rules.create("allow-debug-cheats", true, function(value)
|
||||
hud._set_debug_cheats(value)
|
||||
end)
|
||||
input.add_callback("devtools.console", function()
|
||||
if hud.is_paused() then
|
||||
return
|
||||
end
|
||||
time.post_runnable(function()
|
||||
hud.show_overlay("core:console", false, {"console"})
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
local RULES_FILE = "world:rules.toml"
|
||||
|
||||
Reference in New Issue
Block a user