Introduction
Add a central structure to safely manage illegal status between multiple mods.
Description of the feature
From Discord:
I think we need to add something like this to SOD.Common: AddIllegalStatusTimer(string key, float duration) and CancelIllegalStatusTimer(string key)
because there's a bunch of bugs that can come up if you set illegal status and something prevents you from un-setting it, or if multiple mods are trying to manage illegal status at once
On further thought, also add the ability to check active illegal status timers.
void AddIllegalStatus(string key, float duration?); // auto removes if duration is specified
void RemoveIllegalStatus(string key);
Feature usage
Use this feature instead of forcing the status to be illegal or not illegal in-game, which is prone to causing errors, especially when multiple mods are trying to manage it at once.
Dependencies and Prerequisites
No.
Implementation details
Discussed further on Discord, will use a simple Dictionary.
Introduction Add a central structure to safely manage illegal status between multiple mods.
Description of the feature From Discord:
On further thought, also add the ability to check active illegal status timers.
Feature usage Use this feature instead of forcing the status to be illegal or not illegal in-game, which is prone to causing errors, especially when multiple mods are trying to manage it at once.
Dependencies and Prerequisites No.
Implementation details Discussed further on Discord, will use a simple Dictionary.