From 05808e4587dd09f272d47fa147c5d9157c16a5fc Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 10 Apr 2021 16:18:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=87=86=E5=A4=87=E7=BC=93=E5=AD=98=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.lua | 2 +- parts/net.lua | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/main.lua b/main.lua index f34549a9..b09beac8 100644 --- a/main.lua +++ b/main.lua @@ -34,7 +34,7 @@ love.keyboard.setTextInput(false) love.mouse.setVisible(false) --Create directories -for _,v in next,{"conf","record","replay"}do +for _,v in next,{"conf","record","replay","cache"}do local info=fs.getInfo(v) if not info then fs.createDirectory(v) diff --git a/parts/net.lua b/parts/net.lua index 96c75de2..4e468177 100644 --- a/parts/net.lua +++ b/parts/net.lua @@ -141,15 +141,13 @@ function NET.storeUserInfo(res) local user=USERS[res.uid] if not user then user={} - user.email=res.email - user.name=res.username USERS[res.uid]=user - else - user.email=res.email - user.name=res.username - if not user.motto then user.motto=res.motto end - if not user.avatar then user.avatar=res.avatar end end + user.uid=res.uid + user.email=res.email + user.username=res.username + user.motto=res.motto + user.avatar=res.avatar --Get own name if res.uid==USER.uid then