From f8e17e720f0de8b807dadc590e5b5df4f854937d Mon Sep 17 00:00:00 2001 From: Xertis <118364459+Xertis@users.noreply.github.com> Date: Sat, 15 Jun 2024 09:48:08 +0300 Subject: [PATCH 1/2] Added a new console command --- res/scripts/stdcmd.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/res/scripts/stdcmd.lua b/res/scripts/stdcmd.lua index 0db4d208..f9546284 100644 --- a/res/scripts/stdcmd.lua +++ b/res/scripts/stdcmd.lua @@ -13,6 +13,15 @@ function build_scheme(command) return str end +console.add_command( + "clear", + "Clears the console", + function () + document = Document.new("core:console") + document.log.text = "" + end +) + console.add_command( "help name:str=''", "Show help infomation for the specified command", From c1ad17e7868b7ad528f3845045d5eef54873fc8c Mon Sep 17 00:00:00 2001 From: Xertis <118364459+Xertis@users.noreply.github.com> Date: Sat, 15 Jun 2024 10:00:03 +0300 Subject: [PATCH 2/2] Update stdcmd.lua --- res/scripts/stdcmd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/scripts/stdcmd.lua b/res/scripts/stdcmd.lua index f9546284..33f5721b 100644 --- a/res/scripts/stdcmd.lua +++ b/res/scripts/stdcmd.lua @@ -17,7 +17,7 @@ console.add_command( "clear", "Clears the console", function () - document = Document.new("core:console") + local document = Document.new("core:console") document.log.text = "" end )