-
Notifications
You must be signed in to change notification settings - Fork 98
Flag Dream Block Support #849
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
base: dev
Are you sure you want to change the base?
Conversation
omg it does not work This reverts commit 4b23c5a.
|
I don't think editing entities at the Everest level are a thing we do anymore 🤔 |
|
it's even worse to do this at the helper level |
|
As the description highlights, we're talking of a change impacting anyone extending DreamBlock and hooking certain heavily-hooked methods like DashCoroutine, and the description confirms that some mods indeed were broken If we do want this (@ Everest Team?) the issues with mod compatibility will definitely have to be addressed beforehand 🤔 and if the goal is adding flag support for all the modded dream blocks out there, their plugins should be updated as well |
This PR aims to add flag support to the dream block.
In this case, activated and deactivated dream block can appears at the same time,
which vanilla Celeste, Everest and some of mods do not support.
What did vanilla do:
playerHasDreamDashfor only visual.Session.Inventory.DreamDashwhich is global.Inventory.DreamDashand assume all dream block is activated or not actoivated, then happily read Tracker[DreamBlock] (mainly used inCollidemethod series).To change this:
DreamBlock.Activatedto represent the dream block's actual state (actually a property to readInventory.DreamDashdirectly)Player.DreamDashCheckPlayer.DashCoroutinePlayer.DreamDashUpdateto use that property.Collidemethod with ours and hope that it can work with all mods.Inventory.DreamDash.What did Everest and mods do:
Inventory.DreamDashso they can't get flag support automatically. (can work as before)Inventory.DreamDash, it should work, asDreamBlock.Activatedis a property that can read it.DreamBlock.Activateseries, it can in wrong visual state.To change this:
DreamBlock.Activateseries is Obsolete.DreamBlock.Activated.DreamBlock.Activateseries still works fine in old map, so we don't need to migrate them all/quickly.Finally, we are prepared to add flag support.
DreamBlock.Flag.DreamBlock.Activated.NoInliningfor hooks.flagStateto save current flag state. only whenflagStateis changed, we can try to update visuals to match state.Update.ActivatedPlusfor extensibility. It's designed for non-visual state.For performance reason, add
Level.HasNewDreamBlock.Inventory.DreamDash. Ignore it when there's flag dream block.Add
DreamBlockPatchto indicate if this patch has been applied.Info
it's actually what did Reverse Helper do.It's designed for the extensibility.It's because of the compatibility.feel free to ask me.
it's impossible to track if an field is changed.
Level.HasNewDreamBlock.What should we do
Tested CelesteTAS
100%.tasChecked 2A Cutscene and it looks good
wrote a test map and it looks good
Tested Mod List is the same as Ja's IL Hook Viewer
- Communal Helper - crashed
- More Lock Block - didn't work (apparently)
Main IL Changes And Mod Compatibility
DreamBlock.Added
Added new method call after
Inventory.DreamDashto replace it with correct stateshould be good in 95% cases
it's not clean tbh
DreamBlock.Update
Update flag state every frame
should be good in 99.9% cases
Player.DreamDashCheck
Replace all
Collides with custom oneRemove
Inventory.DreamDashconditionallyShould be good, because nobody loves to hook it.
More Lock Block was broken.
Tera Helper is not broken, but they should change their hook.
Player.DashCoroutine
Replace one
Collides with custom oneRemove
Inventory.DreamDashconditionallyCommunalhelper was broken.
Player.DreamDashUpdate
Replace one
Collides with custom oneThere's no
Inventory.DreamDash.No mods was broken.