Allow external handling of internal ACS functions from other ports #2965
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a feature geared towards allowing mods to handle certain ACS functions that will never be ported to GZDoom due to how they're handled internally. For example, Zandronum's multiplayer gamemodes can be recreated entirely via ZScript giving no reason to bake them in; however, Zandronum maps that rely on these ACS functions will be unusable. This is a huge barrier for gamemodes like Invasion because while all classes and gamemode handling can be ported properly, the ACS functions will never be able to. This PR allows you to hook up these ACS functions to your own custom API, finally resolving the largest hurdle to compatibility with other ports.
I'm going to mark this as a draft for now since I want to discuss realistically what should and shouldn't be allowed to be handled. While some functionality is a given (gamemode getters/setters), others are less clear like the database functionality. While technically GZDoom doesn't support this and someone could easily set up their own database handling by hooking into these functions, it's also possible it'll be added in the future and hooking these functions up to that would be much smarter. Other functions can easily be baked into GZDoom, they just need to be merged over correctly.
The current list of handled functions is not complete and is likely to change. I mostly want to get this up now to gather some thoughts on it before fully committing since I'm also not sure how smart it is to expose the internals of ACS like this.