整理代码
This commit is contained in:
@@ -132,7 +132,7 @@ function profile.report(n)
|
|||||||
if #out>0 then
|
if #out>0 then
|
||||||
sz=sz.." | "..table.concat(out," | \n | ").." | \n"
|
sz=sz.." | "..table.concat(out," | \n | ").." | \n"
|
||||||
end
|
end
|
||||||
return"\n"..sz..row
|
return "\n"..sz..row
|
||||||
end
|
end
|
||||||
|
|
||||||
local switch=false
|
local switch=false
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ local themeColor={
|
|||||||
}
|
}
|
||||||
|
|
||||||
function THEME.calculate(Y,M,D)
|
function THEME.calculate(Y,M,D)
|
||||||
if not Y then Y,M,D=os.date"%Y",os.date"%m",os.date"%d"end
|
if not Y then Y,M,D=os.date("%Y"),os.date("%m"),os.date("%d")end
|
||||||
--Festival calculate within one statement
|
--Festival calculate within one statement
|
||||||
return
|
return
|
||||||
--Christmas
|
--Christmas
|
||||||
@@ -84,7 +84,7 @@ function THEME.getThemeColor(theme)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function THEME.fresh()
|
function THEME.fresh()
|
||||||
THEME.set(THEME.calculate(os.date"%Y",os.date"%m",os.date"%d"))
|
THEME.set(THEME.calculate(os.date("%Y"),os.date("%m"),os.date("%d")))
|
||||||
end
|
end
|
||||||
|
|
||||||
return THEME
|
return THEME
|
||||||
@@ -55,7 +55,7 @@ do--Connect
|
|||||||
res,err=SOCK:receive("*l")
|
res,err=SOCK:receive("*l")
|
||||||
if not res then readCHN:push(err)return end
|
if not res then readCHN:push(err)return end
|
||||||
if not ctLen and res:find("length")then
|
if not ctLen and res:find("length")then
|
||||||
ctLen=tonumber(res:match"%d+")
|
ctLen=tonumber(res:match("%d+"))
|
||||||
end
|
end
|
||||||
until res==""
|
until res==""
|
||||||
|
|
||||||
|
|||||||
3
main.lua
3
main.lua
@@ -10,12 +10,11 @@
|
|||||||
|
|
||||||
|
|
||||||
--Var leak check
|
--Var leak check
|
||||||
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k)print(debug.traceback():match"\n.-\n\t(.-): ")rawset(self,k,v)end})
|
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k)print(debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v)end})
|
||||||
|
|
||||||
--Declaration
|
--Declaration
|
||||||
goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage
|
goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage
|
||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
DBP=print--Use this in temporary code, easy to find and remove
|
|
||||||
TIME=love.timer.getTime
|
TIME=love.timer.getTime
|
||||||
YIELD=coroutine.yield
|
YIELD=coroutine.yield
|
||||||
SYSTEM=love.system.getOS()
|
SYSTEM=love.system.getOS()
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ function generateLine(hole)
|
|||||||
end
|
end
|
||||||
function freshDate(mode)
|
function freshDate(mode)
|
||||||
if not mode then mode=""end
|
if not mode then mode=""end
|
||||||
local date=os.date"%Y/%m/%d"
|
local date=os.date("%Y/%m/%d")
|
||||||
if STAT.date~=date then
|
if STAT.date~=date then
|
||||||
STAT.date=date
|
STAT.date=date
|
||||||
STAT.todayTime=0
|
STAT.todayTime=0
|
||||||
|
|||||||
@@ -181,8 +181,8 @@ scene.widgetList={
|
|||||||
WIDGET.newSelector{name="fall", x=410, y=230,w=220,color='Y',list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},disp=CUSval("fall"),code=CUSsto("fall")},
|
WIDGET.newSelector{name="fall", x=410, y=230,w=220,color='Y',list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},disp=CUSval("fall"),code=CUSsto("fall")},
|
||||||
|
|
||||||
--Else
|
--Else
|
||||||
WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color='Y',list=BG.getList(),disp=CUSval"bg",code=function(i)CUSTOMENV.bg=i BG.set(i)end},
|
WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color='Y',list=BG.getList(),disp=CUSval("bg"),code=function(i)CUSTOMENV.bg=i BG.set(i)end},
|
||||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color='Y',list=BGM.getList(),disp=CUSval"bgm",code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color='Y',list=BGM.getList(),disp=CUSval("bgm"),code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||||
|
|
||||||
--Copy/Paste/Start
|
--Copy/Paste/Start
|
||||||
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color='lR',font=25,code=pressKey"cC"},
|
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color='lR',font=25,code=pressKey"cC"},
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function scene.keyDown(key)
|
|||||||
if testButton(9)then
|
if testButton(9)then
|
||||||
SCN.go('music')
|
SCN.go('music')
|
||||||
end
|
end
|
||||||
elseif key=="0"then
|
elseif key=="3"then
|
||||||
if testButton(10)then
|
if testButton(10)then
|
||||||
SCN.go('lang')
|
SCN.go('lang')
|
||||||
end
|
end
|
||||||
@@ -185,7 +185,7 @@ scene.widgetList={
|
|||||||
WIDGET.newButton{name="manual", x=2480,y=570,w=800,h=100, color='lC',font=40,align='L',edge=30,code=pressKey","},
|
WIDGET.newButton{name="manual", x=2480,y=570,w=800,h=100, color='lC',font=40,align='L',edge=30,code=pressKey","},
|
||||||
|
|
||||||
WIDGET.newButton{name="music", x=130,y=80,w=200,h=90, color='lO',font=35,code=pressKey"2"},
|
WIDGET.newButton{name="music", x=130,y=80,w=200,h=90, color='lO',font=35,code=pressKey"2"},
|
||||||
WIDGET.newButton{name="lang", x=300,y=80,w=90,h=90, color='lN',font=40,code=pressKey"0",fText=TEXTURE.earth},
|
WIDGET.newButton{name="lang", x=300,y=80,w=90,h=90, color='lN',font=40,code=pressKey"3",fText=TEXTURE.earth},
|
||||||
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color='lB',font=35,align='R',edge=30,code=pressKey"x"},
|
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color='lB',font=35,align='R',edge=30,code=pressKey"x"},
|
||||||
WIDGET.newButton{name="back", x=1390,y=670,w=600,h=70, color='lR',font=40,align='L',edge=30,code=backScene},
|
WIDGET.newButton{name="back", x=1390,y=670,w=600,h=70, color='lR',font=40,align='L',edge=30,code=backScene},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ end
|
|||||||
function scene.keyDown(k)
|
function scene.keyDown(k)
|
||||||
if k=="escape"then
|
if k=="escape"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
elseif kb.isDown"s"then
|
elseif kb.isDown("s")then
|
||||||
if k=="l"then
|
if k=="l"then
|
||||||
loadGame('sprintLock',true)
|
loadGame('sprintLock',true)
|
||||||
elseif k=="f"then
|
elseif k=="f"then
|
||||||
|
|||||||
@@ -28,20 +28,24 @@ return STRING.split([=[
|
|||||||
联网对战房间内添加设置入口,未准备就能修改设置
|
联网对战房间内添加设置入口,未准备就能修改设置
|
||||||
房间列表界面支持点选和平滑滚动
|
房间列表界面支持点选和平滑滚动
|
||||||
未获取到用户头像时显示默认方块头像,设置添加省流开关(不加载头像)
|
未获取到用户头像时显示默认方块头像,设置添加省流开关(不加载头像)
|
||||||
|
新BGM:Hope(用于master-ex)
|
||||||
新背景:Blockfall(用于无尽和自定义游戏默认)
|
新背景:Blockfall(用于无尽和自定义游戏默认)
|
||||||
|
新背景:Blockspace(用于master-ex)
|
||||||
自定义游戏菜单新增重置按钮
|
自定义游戏菜单新增重置按钮
|
||||||
自定义场地三个鼠标键均可自定义颜色
|
自定义场地三个鼠标键均可自定义颜色
|
||||||
改动:
|
改动:
|
||||||
|
存档管理功能移至命令行改为手动删文件清除,说明位于词典内
|
||||||
微调网战房间内ui,全员准备后会有提示
|
微调网战房间内ui,全员准备后会有提示
|
||||||
自定义场地三个鼠标键均可自定义颜色
|
自定义场地三个鼠标键均可自定义颜色
|
||||||
更改游戏图标
|
|
||||||
未知用户头像使用和uid对应的方块图标
|
未知用户头像使用和uid对应的方块图标
|
||||||
简化进入控制台的方法
|
简化进入控制台的方法
|
||||||
取消鼠标右键返回
|
取消鼠标右键返回
|
||||||
|
更改游戏图标
|
||||||
Ospin
|
Ospin
|
||||||
代码:
|
代码:
|
||||||
升级doGC模块,调整命令集
|
升级doGC模块,调整命令集
|
||||||
升级控件模块,支持给部分控件开关声音,属性配置代码整理
|
升级控件模块,支持给部分控件开关声音,属性配置代码整理
|
||||||
|
整理代码习惯,常量字符串全部改用单引号
|
||||||
修复:
|
修复:
|
||||||
触屏虚拟按键松开后按钮还亮着
|
触屏虚拟按键松开后按钮还亮着
|
||||||
旋转机制的一个错误设计导致高速经典转不动
|
旋转机制的一个错误设计导致高速经典转不动
|
||||||
@@ -50,6 +54,7 @@ return STRING.split([=[
|
|||||||
模式禁止mod也会显示开了什么mod
|
模式禁止mod也会显示开了什么mod
|
||||||
谜题数据解析时错误解析最后的空白符
|
谜题数据解析时错误解析最后的空白符
|
||||||
blackhole和blockrain背景不适配大小屏幕
|
blackhole和blockrain背景不适配大小屏幕
|
||||||
|
游戏结束相关文本问题
|
||||||
Ospin
|
Ospin
|
||||||
|
|
||||||
0.14.5: 晨 Morn
|
0.14.5: 晨 Morn
|
||||||
@@ -1267,7 +1272,7 @@ return STRING.split([=[
|
|||||||
|
|
||||||
0.8.8: Space BG Update
|
0.8.8: Space BG Update
|
||||||
new:
|
new:
|
||||||
background now is cool space with "planets" and "stars", instead of falling tetrominos
|
background now is cool space with "planets" and "stars", instead of falling tetrominoes
|
||||||
no black side in any screen size
|
no black side in any screen size
|
||||||
adjustable waiting time before start
|
adjustable waiting time before start
|
||||||
ajustable maxnext count
|
ajustable maxnext count
|
||||||
|
|||||||
Reference in New Issue
Block a user