Add toggleable infinite height in Infinite mode (#961)
* Add toggleable infinite height in Infinite mode * Use font size 25 for infinite mode
This commit is contained in:
37
parts/eventsets/infinite.lua
Normal file
37
parts/eventsets/infinite.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
return {
|
||||||
|
mesDisp=function(P)
|
||||||
|
setFont(45)
|
||||||
|
GC.mStr(("%d"):format(P.stat.atk),63,190)
|
||||||
|
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
||||||
|
mText(TEXTOBJ.atk,63,243)
|
||||||
|
mText(TEXTOBJ.eff,63,363)
|
||||||
|
|
||||||
|
local opacity=math.max(.4,MATH.expApproach(1,.36,2*(P.stat.time-P.modeData.lastChange)))
|
||||||
|
if #P.field>15 then opacity=opacity*.7 end
|
||||||
|
setFont(25)
|
||||||
|
GC.setColor(1,1,1,opacity)
|
||||||
|
GC.mStr(P.modeData.infHeight and text.infHeightOn or text.infHeightOff,300,80)
|
||||||
|
setFont(20)
|
||||||
|
GC.mStr(text.infHeightHint,300,120)
|
||||||
|
end,
|
||||||
|
task=function(P)
|
||||||
|
P.modeData.infHeight=false
|
||||||
|
P.modeData.lastChange=0
|
||||||
|
end,
|
||||||
|
fkey1=function(P)
|
||||||
|
P.modeData.infHeight=not P.modeData.infHeight
|
||||||
|
P.modeData.lastChange=P.stat.time
|
||||||
|
end,
|
||||||
|
hook_drop=function(P)
|
||||||
|
local heightTarget=P.field and #P.field+8 or 20
|
||||||
|
local env=P.gameEnv
|
||||||
|
if P.modeData.infHeight then
|
||||||
|
env.fieldH=math.max(env.fieldH,heightTarget)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- if not infHeight, then only decrease height
|
||||||
|
if env.fieldH==20 then return end
|
||||||
|
env.fieldH=math.max(20,math.min(env.fieldH,heightTarget))
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -40,6 +40,9 @@ return {
|
|||||||
maxspeed="MAX SPEED!",
|
maxspeed="MAX SPEED!",
|
||||||
speedup="Speed Up!",
|
speedup="Speed Up!",
|
||||||
missionFailed="Wrong Clear",
|
missionFailed="Wrong Clear",
|
||||||
|
infHeightOn="Infinite Height ON",
|
||||||
|
infHeightOff="Infinite Height OFF",
|
||||||
|
infHeightHint="Toggle with Function 1 key",
|
||||||
|
|
||||||
speedLV="Speed Level",
|
speedLV="Speed Level",
|
||||||
piece="Piece",line="Lines",atk="Attack",eff="Efficiency",
|
piece="Piece",line="Lines",atk="Attack",eff="Efficiency",
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ return {
|
|||||||
maxspeed="¡Máx. Velocidad!",
|
maxspeed="¡Máx. Velocidad!",
|
||||||
speedup="¡Más rápido!",
|
speedup="¡Más rápido!",
|
||||||
missionFailed="Misión Fallida",
|
missionFailed="Misión Fallida",
|
||||||
|
-- infHeightOn="Infinite Height ON",
|
||||||
|
-- infHeightOff="Infinite Height OFF",
|
||||||
|
-- infHeightHint="Toggle with Function 1 key",
|
||||||
|
|
||||||
speedLV="Veloc. de juego",
|
speedLV="Veloc. de juego",
|
||||||
piece="Piezas",line="Líneas",atk="Ataque",eff="Eficiencia",
|
piece="Piezas",line="Líneas",atk="Ataque",eff="Eficiencia",
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ return {
|
|||||||
maxspeed="Vitesse maximale !",
|
maxspeed="Vitesse maximale !",
|
||||||
speedup="Accélérez !",
|
speedup="Accélérez !",
|
||||||
missionFailed="Mission échouée",
|
missionFailed="Mission échouée",
|
||||||
|
-- infHeightOn="Infinite Height ON",
|
||||||
|
-- infHeightOff="Infinite Height OFF",
|
||||||
|
-- infHeightHint="Toggle with Function 1 key",
|
||||||
|
|
||||||
speedLV="niveau de vitesse",
|
speedLV="niveau de vitesse",
|
||||||
piece="Pièce",line="Lignes",atk="Attaque",eff="Efficacité",
|
piece="Pièce",line="Lignes",atk="Attaque",eff="Efficacité",
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ return {
|
|||||||
maxspeed="KECEPATAN MAXIMUM!",
|
maxspeed="KECEPATAN MAXIMUM!",
|
||||||
speedup="Percepatkan!",
|
speedup="Percepatkan!",
|
||||||
missionFailed="Salah",
|
missionFailed="Salah",
|
||||||
|
infHeightOn="Ketinggian Tak Terhingga ON",
|
||||||
|
infHeightOff="Ketinggian Tak Terhingga OFF",
|
||||||
|
infHeightHint="Ubah dengan tombol Fungsi 1",
|
||||||
|
|
||||||
speedLV="Kecptn lvl",
|
speedLV="Kecptn lvl",
|
||||||
piece="Blok",line="Baris",atk="Baris Terkirim",eff="Efisiensi",
|
piece="Blok",line="Baris",atk="Baris Terkirim",eff="Efisiensi",
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ return {
|
|||||||
maxspeed="最高速度!",
|
maxspeed="最高速度!",
|
||||||
speedup="スピードアップ!",
|
speedup="スピードアップ!",
|
||||||
missionFailed="ミッション失敗",
|
missionFailed="ミッション失敗",
|
||||||
|
-- infHeightOn="Infinite Height ON",
|
||||||
|
-- infHeightOff="Infinite Height OFF",
|
||||||
|
-- infHeightHint="Toggle with Function 1 key",
|
||||||
|
|
||||||
speedLV="レベル",
|
speedLV="レベル",
|
||||||
piece="ミノ数",line="line数",atk="火力",eff="効率",
|
piece="ミノ数",line="line数",atk="火力",eff="効率",
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ return {
|
|||||||
maxspeed="Velocidade máxima!",
|
maxspeed="Velocidade máxima!",
|
||||||
speedup="Mais rápido!",
|
speedup="Mais rápido!",
|
||||||
missionFailed="Missão falha",
|
missionFailed="Missão falha",
|
||||||
|
-- infHeightOn="Infinite Height ON",
|
||||||
|
-- infHeightOff="Infinite Height OFF",
|
||||||
|
-- infHeightHint="Toggle with Function 1 key",
|
||||||
|
|
||||||
speedLV="Nível de velocidade",
|
speedLV="Nível de velocidade",
|
||||||
piece="Peça",line="Linhas",atk="Ataque",eff="Eficiência",
|
piece="Peça",line="Linhas",atk="Ataque",eff="Eficiência",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
local x,v=CHAR.icon.crossMark,CHAR.icon.checkMark
|
||||||
return {
|
return {
|
||||||
fallback='en',
|
fallback='en',
|
||||||
loadText={
|
loadText={
|
||||||
@@ -38,6 +39,9 @@ return {
|
|||||||
maxspeed="!!!",
|
maxspeed="!!!",
|
||||||
speedup="~!~",
|
speedup="~!~",
|
||||||
missionFailed="-X_X-",
|
missionFailed="-X_X-",
|
||||||
|
infHeightOn="∞↑ "..v,
|
||||||
|
infHeightOff="∞↑ "..x,
|
||||||
|
infHeightHint=v.."/"..x..": F₁",
|
||||||
|
|
||||||
win=": )",
|
win=": )",
|
||||||
lose=": (",
|
lose=": (",
|
||||||
@@ -61,7 +65,7 @@ return {
|
|||||||
|
|
||||||
loadError_errorMode="'$1' ↑x!: no load mode '$2'",
|
loadError_errorMode="'$1' ↑x!: no load mode '$2'",
|
||||||
loadError_read="'$1' ↑x!: read failed",
|
loadError_read="'$1' ↑x!: read failed",
|
||||||
loadError_noFile="'$1' ↑oading failed no file:",
|
loadError_noFile="'$1' loading failed no file:",
|
||||||
loadError_other="'$1' ↑x!: $2",
|
loadError_other="'$1' ↑x!: $2",
|
||||||
loadError_unknown="'$1' ↑x!: unknown reason",
|
loadError_unknown="'$1' ↑x!: unknown reason",
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,7 @@ return {
|
|||||||
env={
|
env={
|
||||||
drop=1e99,lock=1e99,
|
drop=1e99,lock=1e99,
|
||||||
infHold=true,
|
infHold=true,
|
||||||
mesDisp=function(P)
|
|
||||||
setFont(45)
|
|
||||||
GC.mStr(("%d"):format(P.stat.atk),63,190)
|
|
||||||
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
|
|
||||||
mText(TEXTOBJ.atk,63,243)
|
|
||||||
mText(TEXTOBJ.eff,63,363)
|
|
||||||
end,
|
|
||||||
bg='blockfall',bgm='infinite',
|
bg='blockfall',bgm='infinite',
|
||||||
|
eventSet='infinite'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user