diff --git a/assets/game/mechanicLib/mino/actions.lua b/assets/game/mechanicLib/mino/actions.lua index b9e9e8c0..43a4d1c7 100644 --- a/assets/game/mechanicLib/mino/actions.lua +++ b/assets/game/mechanicLib/mino/actions.lua @@ -40,7 +40,6 @@ local function move(P,dir,canBuffer) end end local function pressMove(P,dir) - -- WARNING: Has early return local d=dir=='L' and -1 or 1 local SET=P.settings @@ -49,12 +48,12 @@ local function pressMove(P,dir) P.moveDir=d end P.moveCharge=getCharge(P.moveCharge,SET.dblMoveChrg,SET) - if not SET.dblMoveStep then return end -- [Early return] + if SET.dblMoveStep then move(P,dir,true) end else P.moveDir=d P.moveCharge=0 + move(P,dir,true) end - move(P,dir,true) end local function releaseMove(P,dir) local invD=dir=='L' and 'R' or 'L' @@ -136,11 +135,11 @@ actions.softDrop={ } actions.hardDrop={ press=function(P) - if P.hdLockMTimer~=0 or P.hdLockATimer~=0 then + if P.mhdlTimer~=0 or P.ahdlTimer~=0 then P:playSound('rotate_failed') elseif P.hand then if not P.deathTimer then - P.hdLockMTimer=P.settings.hdLockM + P.mhdlTimer=P.settings.mhdl P:minoDropped() else P.deathTimer=ceil(P.deathTimer/2.6) diff --git a/assets/game/mechanicLib/puyo/actions.lua b/assets/game/mechanicLib/puyo/actions.lua index d475dd0a..4832f32f 100644 --- a/assets/game/mechanicLib/puyo/actions.lua +++ b/assets/game/mechanicLib/puyo/actions.lua @@ -38,7 +38,6 @@ local function move(P,dir,canBuffer) end end local function pressMove(P,dir) - -- WARNING: Has early return local d=dir=='L' and -1 or 1 local SET=P.settings @@ -47,12 +46,12 @@ local function pressMove(P,dir) P.moveDir=d end P.moveCharge=getCharge(P.moveCharge,SET.dblMoveChrg,SET) - if not SET.dblMoveStep then return end -- [Early return] + if SET.dblMoveStep then move(P,dir,true) end else P.moveDir=d P.moveCharge=0 + move(P,dir,true) end - move(P,dir,true) end local function releaseMove(P,dir) local invD=dir=='L' and 'R' or 'L' @@ -134,10 +133,10 @@ actions.softDrop={ } actions.hardDrop={ press=function(P) - if P.hdLockMTimer~=0 or P.hdLockATimer~=0 then + if P.mhdlTimer~=0 or P.ahdlTimer~=0 then P:playSound('rotate_failed') elseif P.hand and not P.deathTimer then - P.hdLockMTimer=P.settings.hdLockM + P.mhdlTimer=P.settings.mhdl P:puyoDropped() else P.keyBuffer.hardDrop=true diff --git a/assets/game/minoPlayer.lua b/assets/game/minoPlayer.lua index 226ff929..bf76799e 100644 --- a/assets/game/minoPlayer.lua +++ b/assets/game/minoPlayer.lua @@ -1448,8 +1448,8 @@ function MP:updateFrame() local SET=self.settings -- Hard-drop lock - if self.hdLockATimer>0 then self.hdLockATimer=self.hdLockATimer-1 end - if self.hdLockMTimer>0 then self.hdLockMTimer=self.hdLockMTimer-1 end + if self.ahdlTimer>0 then self.ahdlTimer=self.ahdlTimer-1 end + if self.mhdlTimer>0 then self.mhdlTimer=self.mhdlTimer-1 end -- Current controlling piece if not self.deathTimer then @@ -1550,7 +1550,7 @@ function MP:updateFrame() if self.handY==self.ghostY then self.lockTimer=self.lockTimer-1 if self.lockTimer<=0 then - self.hdLockATimer=self.settings.hdLockA + self.ahdlTimer=self.settings.ahdl self:minoDropped() end break @@ -1947,11 +1947,11 @@ local baseEnv={ script=false, allowTransform=true, - -- May be overrode with user setting - asd=122, -- Auto shift delay - asp=26, -- Auto shift period - adp=26, -- Auto drop period - ash=26, -- Auto Shift Halt, discharge asd when piece spawn + -- Control + asd=122, -- *Auto shift delay + asp=26, -- *Auto shift period + adp=26, -- *Auto drop period + ash=26, -- *Auto Shift Halt, discharge asd when piece spawn entryChrg='on', -- on/off/full/cancel charge when move before spawn wallChrg='on', -- on/off/full/cancel charge when move towards wall stopMoveWhenSpawn=false, -- Stop moving when piece spawn @@ -1968,12 +1968,14 @@ local baseEnv={ initMove='buffer', -- buffer/hold to do initial move initRotate='buffer', -- buffer/hold to do initial rotate initHold='buffer', -- buffer/hold to do initial hold - hdLockA=1000, -- Harddrop lock (auto) - hdLockM=100, -- Harddrop lock (manual) + ahdl=1000, -- *Auto harddrop lock + mhdl=100, -- *Manual harddrop lock + + -- Other IRSpushUp=true, -- Use bottom-align when IRS or suffocate skin='mino_plastic', particles=true, - shakeness=.26, + shakeness=.26, -- * inputDelay=0, } local soundEventMeta={ @@ -2074,8 +2076,8 @@ function MP:initialize() self.moveCharge=0 self.downCharge=false - self.hdLockATimer=0 - self.hdLockMTimer=0 + self.ahdlTimer=0 + self.mhdlTimer=0 self.keyBuffer={ move=false, diff --git a/assets/game/puyoPlayer.lua b/assets/game/puyoPlayer.lua index a0475ee3..dce7ecd0 100644 --- a/assets/game/puyoPlayer.lua +++ b/assets/game/puyoPlayer.lua @@ -920,8 +920,8 @@ function PP:updateFrame() local SET=self.settings -- Hard-drop lock - if self.hdLockATimer>0 then self.hdLockATimer=self.hdLockATimer-1 end - if self.hdLockMTimer>0 then self.hdLockMTimer=self.hdLockMTimer-1 end + if self.ahdlTimer>0 then self.ahdlTimer=self.ahdlTimer-1 end + if self.mhdlTimer>0 then self.mhdlTimer=self.mhdlTimer-1 end -- Controlling piece if not self.deathTimer then @@ -1047,7 +1047,7 @@ function PP:updateFrame() if self.handY==self.ghostY then self.lockTimer=self.lockTimer-1 if self.lockTimer<=0 then - self.hdLockATimer=self.settings.hdLockA + self.ahdlTimer=self.settings.ahdl self:puyoDropped() end break @@ -1288,8 +1288,8 @@ local baseEnv={ dblMoveRelInvRedir=true, initMove='buffer', initRotate='buffer', - hdLockA=1000, - hdLockM=100, + ahdl=1000, + mhdl=100, IRSpushUp=true, skin='puyo_jelly', particles=true, @@ -1379,8 +1379,8 @@ function PP:initialize() self.moveCharge=0 self.downCharge=false - self.hdLockATimer=0 - self.hdLockMTimer=0 + self.ahdlTimer=0 + self.mhdlTimer=0 self.keyBuffer={ move=false, diff --git a/assets/language/lang_en.lua b/assets/language/lang_en.lua index 145d32c4..d0d92175 100644 --- a/assets/language/lang_en.lua +++ b/assets/language/lang_en.lua @@ -74,8 +74,8 @@ return { setting_asp="ASP", setting_adp="ADP", setting_ash="AS Halt", - setting_hdLockA="Auto hard-drop lock", - setting_hdLockM="Manual hard-drop lock", + setting_ahdl="Auto harddrop lock", + setting_mhdl="Manual harddrop lock", setting_shakeness="Shakiness", setting_hitWavePower="Hitwave Power", diff --git a/assets/language/lang_zh.lua b/assets/language/lang_zh.lua index c26b1471..cba03cfb 100644 --- a/assets/language/lang_zh.lua +++ b/assets/language/lang_zh.lua @@ -74,8 +74,8 @@ return { setting_asp="自动重复周期", setting_adp="软降重复周期", setting_ash="自动移动阻止", - setting_hdLockA="自动硬降锁", - setting_hdLockM="手动硬降锁", + setting_ahdl="自动硬降锁", + setting_mhdl="手动硬降锁", setting_shakeness="场地晃动", setting_hitWavePower="冲击波强度", diff --git a/assets/scene/setting_out.lua b/assets/scene/setting_out.lua index a2634ee7..a433c15c 100644 --- a/assets/scene/setting_out.lua +++ b/assets/scene/setting_out.lua @@ -60,12 +60,12 @@ scene.widgetList={ {name='S4',type='button_invis',pos={1,0},x=-200,y=60,w=150,h=100,cornerR=20,fontSize=70,text=CHAR.icon.controller,sound_trigger='move',code=function() if page~='4' then SCN.swapTo('setting_out','none',4) end end}, -- Controls - {name='1',type='slider', pos={0,0},x=340, y=220,w=650, fontSize=40,text=LANG'setting_asd', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'asd'), valueShow=sliderShow_time, code=function(v) SETTINGS.game_mino.asd=v; SETTINGS.game_mino.asp=math.min(SETTINGS.game_mino.asp,SETTINGS.game_mino.asd); SETTINGS.game_mino.ash=math.min(SETTINGS.game_mino.ash,SETTINGS.game_mino.asd) end}, - {name='1',type='slider', pos={0,0},x=340, y=300,w=300, fontSize=40,text=LANG'setting_asp', widthLimit=260,axis={0,120,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'asp'), valueShow=sliderShow_time, code=function(v) SETTINGS.game_mino.asp=v; SETTINGS.game_mino.asd=math.max(SETTINGS.game_mino.asd,SETTINGS.game_mino.asp) end}, - {name='1',type='slider', pos={0,0},x=340, y=380,w=250, fontSize=40,text=LANG'setting_adp', widthLimit=260,axis={0,100,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'adp'), valueShow=sliderShow_time, code=TABLE.func_setVal(SETTINGS.game_mino,'adp')}, - {name='1',type='slider', pos={0,0},x=340, y=460,w=650, fontSize=30,text=LANG'setting_ash', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'ash'), valueShow=sliderShow_time, code=function(v) SETTINGS.game_mino.ash=v; SETTINGS.game_mino.asd=math.max(SETTINGS.game_mino.asd,SETTINGS.game_mino.ash) end}, - {name='1',type='slider', pos={0,0},x=340, y=540,w=650, fontSize=30,text=LANG'setting_hdLockA', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'hdLockA'), valueShow=sliderShow_time, code=TABLE.func_setVal(SETTINGS.game_mino,'hdLockA')}, - {name='1',type='slider', pos={0,0},x=340, y=620,w=650, fontSize=30,text=LANG'setting_hdLockM', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'hdLockM'), valueShow=sliderShow_time, code=TABLE.func_setVal(SETTINGS.game_mino,'hdLockM')}, + {name='1',type='slider', pos={0,0},x=340, y=220,w=650, fontSize=40,text=LANG'setting_asd', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'asd'), valueShow=sliderShow_time, code=function(v) SETTINGS.game_mino.asd=v; SETTINGS.game_mino.asp=math.min(SETTINGS.game_mino.asp,SETTINGS.game_mino.asd); SETTINGS.game_mino.ash=math.min(SETTINGS.game_mino.ash,SETTINGS.game_mino.asd) end}, + {name='1',type='slider', pos={0,0},x=340, y=300,w=300, fontSize=40,text=LANG'setting_asp', widthLimit=260,axis={0,120,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'asp'), valueShow=sliderShow_time, code=function(v) SETTINGS.game_mino.asp=v; SETTINGS.game_mino.asd=math.max(SETTINGS.game_mino.asd,SETTINGS.game_mino.asp) end}, + {name='1',type='slider', pos={0,0},x=340, y=380,w=250, fontSize=40,text=LANG'setting_adp', widthLimit=260,axis={0,100,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'adp'), valueShow=sliderShow_time, code=TABLE.func_setVal(SETTINGS.game_mino,'adp')}, + {name='1',type='slider', pos={0,0},x=340, y=460,w=650, fontSize=40,text=LANG'setting_ash', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'ash'), valueShow=sliderShow_time, code=function(v) SETTINGS.game_mino.ash=v; SETTINGS.game_mino.asd=math.max(SETTINGS.game_mino.asd,SETTINGS.game_mino.ash) end}, + {name='1',type='slider', pos={0,0},x=340, y=540,w=650, fontSize=40,text=LANG'setting_ahdl', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'ahdl'), valueShow=sliderShow_time, code=TABLE.func_setVal(SETTINGS.game_mino,'ahdl')}, + {name='1',type='slider', pos={0,0},x=340, y=620,w=650, fontSize=40,text=LANG'setting_mhdl', widthLimit=260,axis={0,260,1},smooth=true,disp=TABLE.func_getVal(SETTINGS.game_mino,'mhdl'), valueShow=sliderShow_time, code=TABLE.func_setVal(SETTINGS.game_mino,'mhdl')}, {name='1',type='button', pos={0,0},x=500, y=720,w=360, h=80,cornerR=10, fontSize=40,text=LANG'setting_keymapping', code=WIDGET.c_goScn('keyset_out','fadeHeader')}, {name='1',type='switch', pos={0,0},x=360, y=820,h=40, labelPos='right',fontSize=40,text=LANG'setting_enableTouching', disp=TABLE.func_getVal(SETTINGS.system,'touchControl'),code=TABLE.func_revVal(SETTINGS.system,'touchControl')}, {name='1',type='button', pos={0,0},x=500, y=900,w=360, h=80,cornerR=10, fontSize=40,text=LANG'setting_touching', code=WIDGET.c_goScn'keyset_touch_out',visibleTick=function() return page=='1' and SETTINGS.system.touchControl end}, @@ -75,7 +75,7 @@ scene.widgetList={ {name='2',type='slider_fill',pos={0,0},x=340, y=300,w=650, fontSize=40,text=LANG'setting_bgm', widthLimit=260, disp=TABLE.func_getVal(SETTINGS.system,'bgmVol'), code=TABLE.func_setVal(SETTINGS.system,'bgmVol')}, {name='2',type='slider_fill',pos={0,0},x=340, y=380,w=650, fontSize=40,text=LANG'setting_sfx', widthLimit=260, disp=TABLE.func_getVal(SETTINGS.system,'sfxVol'), code=TABLE.func_setVal(SETTINGS.system,'sfxVol')}, {name='2',type='slider_fill',pos={0,0},x=340, y=460,w=650, fontSize=40,text=LANG'setting_vib', widthLimit=260, disp=TABLE.func_getVal(SETTINGS.system,'vibVol'), code=TABLE.func_setVal(SETTINGS.system,'vibVol')}, - {name='2',type='switch', pos={0,0},x=390, y=540,h=45, fontSize=40,text=LANG'setting_autoMute',widthLimit=550,labelPos='right', disp=TABLE.func_getVal(SETTINGS.system,'autoMute'), code=TABLE.func_revVal(SETTINGS.system,'autoMute')}, + {name='2',type='switch', pos={0,0},x=390, y=540,h=45, fontSize=40,text=LANG'setting_autoMute',widthLimit=550,labelPos='right', disp=TABLE.func_getVal(SETTINGS.system,'autoMute'), code=TABLE.func_revVal(SETTINGS.system,'autoMute')}, -- Video {name='3',type='slider_fill',pos={0,0},x=340, y=220,w=500,h=30,text=LANG'setting_hitWavePower',widthLimit=260,axis={0,1}, disp=TABLE.func_getVal(SETTINGS.system,'hitWavePower'), code=TABLE.func_setVal(SETTINGS.system,'hitWavePower')}, diff --git a/assets/settings.lua b/assets/settings.lua index 52a8e055..3720f0e9 100644 --- a/assets/settings.lua +++ b/assets/settings.lua @@ -33,8 +33,8 @@ local settings={ asp=20, adp=20, ash=26, - hdLockA=200, - hdLockM=62, + ahdl=200, + mhdl=62, -- Video shakeness=.6, @@ -45,8 +45,8 @@ local settings={ asp=20, adp=20, ash=26, - hdLockA=200, - hdLockM=62, + ahdl=200, + mhdl=62, -- Video shakeness=.6,