更易读的进房版本检测
This commit is contained in:
@@ -9,6 +9,12 @@ local gc_print,gc_printf=gc.print,gc.printf
|
||||
local NET=NET
|
||||
local fetchTimer
|
||||
|
||||
local compatibleVer={
|
||||
"V0.15.2",
|
||||
"V0.15.3",
|
||||
"V0.15.4",
|
||||
}
|
||||
|
||||
local roomList=WIDGET.newListBox{name="roomList",x=50,y=50,w=800,h=440,lineH=40,drawF=function(ifSel,id,item)
|
||||
setFont(35)
|
||||
if ifSel then
|
||||
@@ -72,7 +78,7 @@ function scene.keyDown(key)
|
||||
elseif roomList:getLen()>0 and key=="return"then
|
||||
local R=roomList:getSel()
|
||||
if NET.getlock('fetchRoom')or not R then return end
|
||||
if R.roomInfo.version:find("^V0%.15%.[234]$")then
|
||||
if TABLE.find(compatibleVer,R.roomInfo.version)then
|
||||
NET.enterRoom(R,passwordBox.value)
|
||||
else
|
||||
MES.new('error',"Version doesn't compatible 版本不兼容")
|
||||
|
||||
Reference in New Issue
Block a user