From 9ec7cdb0702654ae67bd9a1b8280ca1a2dc88ac0 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 27 Aug 2021 23:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A8=A1=E5=BC=8F=E6=8E=92=E8=A1=8C=E6=A6=9C?= =?UTF-8?q?=E7=9A=84=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 711f4561..67fb37b9 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -674,6 +674,28 @@ local commands={}do "Usage: rmconf [key]", }, } + commands.rmrecord={ + code=function(modeName) + if #modeName>0 then + if MODES[modeName]then + MODES[modeName].records={} + log{C.Y,("Succesfully erased records of "..modeName)} + love.filesystem.remove("record/"..modeName..".rec") + else + log{C.R,"No mode called "..modeName} + end + else + log{C.R,"Usage: rmrecord [modeName]"} + end + end, + description="Erase records of a mode", + details={ + "Erase records of a mode", + "Useful if you have a record list corrupted", + "", + "Usage: rmrecord [modeName]", + }, + } commands.unlockall={ code=function(bool) if bool=="sure"then