DBM Event Register Needs Review #95
Labels
🐛 Bug
Something isn't working
help wanted
Extra attention is needed
Low Priority
This issue will not be worked on unless there are no high or medium tasks left
The whole event manager probably needs complete rewriting, because registershorttermevents was a hacky addition and and apparently has actually been broken for years. Fortunately no mods currently seem affected by the breakage since the way it's broken doesn't affect way most mods register/unregister events. As such this task is mostly for tracking purposes for when this is eventually modularized.
Intent: DBM was supposed to support better registering and unregistering events at both core and mod level in short term. Meaning events don't stay registered all the time and wasting CPU.
Function: Register short term events is supposed to be stand alone from register events regular (which is intended mostly for events that stay registered all the time). Unregister short term events is supposed to only clear the short term events that were registered.
Actuality: Register short term events shoves short term events into same table as long term events. Unregister short term event that's also a long term event just nukes both. Fortunately there is no mod that actually does this (not even core thankfully)
Likely need: Because every part of event handler runs through a single table for registered events, probably still need a single table tracking what's registered (long or short term). However when long or short term events are actually registered THESE should probably each be in their own table. Then when unregistering short term events, We remove any events in short term table that aren't also in long term table from the main event tracker table.. Something like
The text was updated successfully, but these errors were encountered: