From 4d91b92a33d9d40e36ed084e4e4d47e630275ecc Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 27 Sep 2021 01:16:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8Fcubefield=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E7=A7=98=E5=AF=86=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_cubefield.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parts/scenes/app_cubefield.lua b/parts/scenes/app_cubefield.lua index 05247cf7..4af56d7c 100644 --- a/parts/scenes/app_cubefield.lua +++ b/parts/scenes/app_cubefield.lua @@ -202,7 +202,12 @@ function scene.update(dt) end ct=ct-1 if ct==0 then - score=0 + local t=love.system.getClipboardText() + if type(t)=='string'then + t=t:lower():match("^s=(%d+)$") + t=t and tonumber(t)and tonumber(t)>0 and tonumber(t)<=8000 and int(tonumber(t)) + end + score=type(t)=='number'and t or 0 life=1000 play,menu=true,false inv=90