Short update:
Finally, I’ve accomplished a major roadmap item:
- ✅ Game exit hooks. A mod might need to know a player is about to exit the game. I’m going to implement two-phases game exit process:
- First, all concerned mods are queried (asynchronously) whether they allow exiting. This is a moment when you mod could ask a user some confirmation.
- Second, (if all concerned mods asynchronously confirmed) all concerned mods receive pre-exit hook. This is a moment for your mod to make clean up, save subconfig and so on.
The API had to be reworked several times, but eventually I’m quite happy with it:
- strongly typed C# delegates
- runtime args and return types validation
- firmly split definition registration, invocation, and subscription.
Going on with implementing all the cool stuff pre-documented in (the tutorial)[https://penal-engineer-mod-api-docs.pages.dev/]:
- ⌛ XML loaders of mods.
Stay tuned!