From d4ec3eefbb43027d96f898749c200cc43e121724 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Fri, 14 Jan 2022 01:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0#=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 66de546c..268553ff 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -976,7 +976,7 @@ local userG={ -- collectgarbage=collectgarbage, math={},string={},table={},bit={},coroutine={}, - debug={"No way."},package={"No way."},io={"No way."},os={"No way."}, + debug={},package={},io={},os={}, } function userG.print(...) local args,L={...},{} @@ -999,6 +999,11 @@ TABLE.complete(string,userG.string)userG.string.dump=nil TABLE.complete(table,userG.table) TABLE.complete(bit,userG.bit) TABLE.complete(coroutine,userG.coroutine) +local dangerousLibMeta={__index=function()error("No way.")end} +setmetatable(userG.debug,dangerousLibMeta) +setmetatable(userG.package,dangerousLibMeta) +setmetatable(userG.io,dangerousLibMeta) +setmetatable(userG.os,dangerousLibMeta) --Puzzle box local first_key={}