From 2816a76f5ab21dac4d388abe762bd4d5d2cbf0c1 Mon Sep 17 00:00:00 2001 From: "Squishy (C6H12O6+NaCl+H2O)" <106439598+SweetSea-ButImNotSweet@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:45:21 +0700 Subject: [PATCH] Fix bugs and small changes to other thing --- parts/gameFuncs.lua | 2 +- parts/gameTables.lua | 2 +- parts/player/draw.lua | 2 +- parts/player/init.lua | 4 ++-- parts/scenes/dict.lua | 2 +- parts/scenes/mod.lua | 3 +++ 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/parts/gameFuncs.lua b/parts/gameFuncs.lua index 9f7090fc..dbcfcf78 100644 --- a/parts/gameFuncs.lua +++ b/parts/gameFuncs.lua @@ -998,7 +998,7 @@ do-- function resetGameData(args) coroutine.yield() local counter=0 - do + if GAME.modUsed then SFX.play('collect',.2) TEXT.show(GAME.modApplyAt,640,26,45,'spin') for _=1,90 do coroutine.yield() end diff --git a/parts/gameTables.lua b/parts/gameTables.lua index 1251a49a..5af867b2 100644 --- a/parts/gameTables.lua +++ b/parts/gameTables.lua @@ -402,7 +402,7 @@ do-- Mod data {no=5,id="HG",name="hideGhost", key="u",x=800,y=230,color='lV', func =function(P) P.gameEnv.ghost=false end, - funcA1=_lockVfunc('ghost'), + funcA1=function(P) P.gameEnv.ghost=false; P.gameEnv.__lock('ghost') end, }, {no=6,id="HD",name="hidden", key="i",x=920,y=230,color='lP', diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 259b884d..60e3016c 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -787,7 +787,7 @@ function draw.norm(P,repMode) gc_scale(P.size) -- Draw username - if usingMod() and P.frameRun>480 then + if GAME.modUsed and P.frameRun>480 or true then setFont(30) gc_setColor(GROUP_COLORS[P.group]) GC.mStr(P.username or USERS.getUsername(P.uid),300,-60) diff --git a/parts/player/init.lua b/parts/player/init.lua index b5d74918..975f5a57 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -181,7 +181,7 @@ local function _executeMod(P) if not GAME.modCodeList then GAME.modCodeList={} end if not GAME.modCodeList[P.id] then GAME.modCodeList[P.id]={} end - if not GAME.applyModTask then + if not GAME.applyModsTask then function GAME.applyModsTask() while GAME.playing do for _,p in pairs(GAME.modCodeList) do @@ -190,8 +190,8 @@ local function _executeMod(P) coroutine.yield() end -- Kill mod patching function when game stopped - TABLE.clear(GAME.modCodeList) TASK.removeTask_code(GAME.applyModsTask) + TABLE.clear(GAME.modCodeList) GAME.modCodeList=nil GAME.applyModsTask=nil end diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index bad3648b..f899977b 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -210,7 +210,7 @@ function scene.keyDown(key) CHAR.controller.xboxX,CHAR.controller.xboxY,CHAR.controller.xboxA,CHAR.controller.xboxB, CHAR.icon.help,CHAR.icon.copy,CHAR.icon.globe,CHAR.key.winMenu) ):split('\n'), - currentFontSize, + 20, 'rainbow' ) diff --git a/parts/scenes/mod.lua b/parts/scenes/mod.lua index c0602dd3..ed3d22d0 100644 --- a/parts/scenes/mod.lua +++ b/parts/scenes/mod.lua @@ -23,6 +23,9 @@ function scene.enter() scene.widgetList.unranked.hide=scoreValid() BG.set('tunnel') end +function scene.back() + GAME.modUsed=usingMod() +end function scene.mouseMove(x,y) selected=false