mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
move 'devtools:console' binding handler to __vc_on_hud_open
This commit is contained in:
parent
e842b217da
commit
f4f479d389
4 changed files with 10 additions and 11 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue