Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not really rewrite mod system #1072

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
478eb07
Test
SweetSea-ButImNotSweet Jan 1, 2024
b3ca43f
Final push
SweetSea-ButImNotSweet Jan 2, 2024
7723288
small update
SweetSea-ButImNotSweet Jan 3, 2024
8252f85
Fix some bugs
SweetSea-ButImNotSweet Jan 4, 2024
e6f416e
Shorten code, remove ``unranked``
SweetSea-ButImNotSweet Jan 4, 2024
47fc75b
Modify some mods' behavior
SweetSea-ButImNotSweet Jan 4, 2024
b8ec5df
Fix redundant "end"
SweetSea-ButImNotSweet Jan 4, 2024
1117b53
Fix bug (again)
SweetSea-ButImNotSweet Jan 4, 2024
c47ddf2
Merge remote-tracking branch 'upstream/main' into mod-patch
SweetSea-ButImNotSweet Jan 5, 2024
72d5e46
Change "modSystem" to "modApplyAt"
SweetSea-ButImNotSweet Jan 6, 2024
4c3abc4
Add TABLE.newWithLockMetamethod()
SweetSea-ButImNotSweet Jan 6, 2024
f0a45b8
Change most mods' configuration
SweetSea-ButImNotSweet Jan 6, 2024
2cd330f
Modify how executing mods again
SweetSea-ButImNotSweet Jan 6, 2024
6873317
Fix mods, update UI
SweetSea-ButImNotSweet Jan 6, 2024
3825b7c
Add VI translation
SweetSea-ButImNotSweet Jan 6, 2024
869135a
Add English translation
SweetSea-ButImNotSweet Jan 6, 2024
766b32b
Final update
SweetSea-ButImNotSweet Jan 6, 2024
70558e8
Add viewLog
SweetSea-ButImNotSweet Jan 6, 2024
6594b4a
Fix viewLog
SweetSea-ButImNotSweet Jan 6, 2024
d09f5b0
update viewlog
SweetSea-ButImNotSweet Jan 7, 2024
898539c
update viewLog
SweetSea-ButImNotSweet Jan 7, 2024
65c050f
Small update for viewLog
SweetSea-ButImNotSweet Jan 7, 2024
2816a76
Fix bugs and small changes to other thing
SweetSea-ButImNotSweet Jan 7, 2024
d61372c
Small tweak
SweetSea-ButImNotSweet Jan 7, 2024
3cda61b
Add a short delay before displaying username
SweetSea-ButImNotSweet Jan 7, 2024
dc8488f
Clean-up
SweetSea-ButImNotSweet Jan 7, 2024
5361742
Resolves change requests
SweetSea-ButImNotSweet Jan 8, 2024
888f2f6
Resolve change requests part 2
SweetSea-ButImNotSweet Jan 8, 2024
f2686fb
Resolve change requests part 3
SweetSea-ButImNotSweet Jan 8, 2024
c20e4ac
Add short delay before showing nickname (again)
SweetSea-ButImNotSweet Jan 8, 2024
9c47e95
Revert the default username from SweetSea to <nil>
SweetSea-ButImNotSweet Jan 8, 2024
4928f19
Remove an unused arg
SweetSea-ButImNotSweet Jan 8, 2024
97b1abb
Resolve change request part Tetra
SweetSea-ButImNotSweet Jan 9, 2024
d399f3c
Moving part 1
SweetSea-ButImNotSweet Jan 11, 2024
519687a
Moving part 2
SweetSea-ButImNotSweet Jan 11, 2024
c143e8e
Moving part 3
SweetSea-ButImNotSweet Jan 11, 2024
58648f7
Remove some texts (most deprecated)
SweetSea-ButImNotSweet Jan 11, 2024
378d88c
Small edit to manual_vi
SweetSea-ButImNotSweet Jan 11, 2024
44ff5e8
Merge branch 'main' of https://github.com/26F-Studio/Techmino into mo…
SweetSea-ButImNotSweet Jan 21, 2024
387bbfa
Moving changes to #1085
SweetSea-ButImNotSweet Jan 21, 2024
271769c
Merge branch 'main' into mod-patch
SweetSea-ButImNotSweet Jun 6, 2024
c6903c8
Merge branch 'main' of https://github.com/26F-Studio/Techmino into mo…
SweetSea-ButImNotSweet Nov 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix some bugs
  • Loading branch information
SweetSea-ButImNotSweet committed Jan 4, 2024
commit 8252f85720cf2a9a824e247f0f33826f1fa4374f
2 changes: 2 additions & 0 deletions parts/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ do-- function DATA.saveReplay()
seed=GAME.seed,
setting=GAME.setting,
mod=_getModList(),
modPatch=GAME.modPatch,
tasUsed=GAME.tasUsed,
}
if GAME.curMode.savePrivate then
Expand Down Expand Up @@ -393,6 +394,7 @@ function DATA.parseReplayData(fileName,fileData,ifFull)
seed=metaData.seed,
setting=metaData.setting,
mod=metaData.mod,
modPatch=metaData.modPatch,
tasUsed=metaData.tasUsed,
}
if ifFull then rep.data=fileData end
Expand Down
8 changes: 0 additions & 8 deletions parts/gameFuncs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -666,14 +666,6 @@ function gameOver()
end
end
end

-- Kill mod patching function
if GAME.ApplyModsTask then
TASK.removeTask_code(GAME.ApplyModsTask)
TABLE.cut(GAME.modCodeList)
GAME.modCodeList=nil
GAME.ApplyModsTask=nil
end
end
function trySave()
if not GAME.statSaved and PLAYERS[1] and PLAYERS[1].type=='human' and (PLAYERS[1].frameRun>300 or GAME.result) then
Expand Down
7 changes: 6 additions & 1 deletion parts/player/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,17 @@ local function _loadGameEnv(P)-- Load gameEnv

if not GAME.ApplyModsTask then
GAME.ApplyModsTask=function()
while true do
while GAME.playing do
for _,p in pairs(GAME.modCodeList) do
for _,c in pairs(p) do pcall(c) end
end
coroutine.yield()
end
-- Kill mod patching function when game stopped
TASK.removeTask_code(GAME.ApplyModsTask)
TABLE.cut(GAME.modCodeList)
GAME.modCodeList=nil
GAME.ApplyModsTask=nil
end
TASK.new(GAME.ApplyModsTask)
end
Expand Down
Loading