Skip to content

Json enum extensions - #818

Merged
ArchangelWTF merged 3 commits into
4.1.x-devfrom
json-enum-extensions
Jul 22, 2026
Merged

Json enum extensions#818
ArchangelWTF merged 3 commits into
4.1.x-devfrom
json-enum-extensions

Conversation

@CJ-SPT

@CJ-SPT CJ-SPT commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This is a two part PR that must be merged with the modules PR of the same name.

The goal of this PR is to provide an easier way to extend enums than having to write their own pre-patchers and understanding the pitfalls that come with using libs like Mono.Cecil or AsmResolver.

  • Removes the ability to use raw pre-patchers on the server. It's unnecessary for the server, we have full control of this code. An Enum extension abstraction through Json is enough.
  • Implements Json based Enum extensions for the server, using a Json file that replaces the former prepatcher dll in the same location keyed by mod guid.
  • Implements the required backend code for the new pre-patchers http request
  • Server Enum extensions are loaded directly by the server at start due to needing them early
  • Client Enum extensions must be loaded and added to the injected singleton ClientEnumDefinitions manually by mod authors. This singleton only exists if the mod loader is enabled.

@CJ-SPT
CJ-SPT requested a review from ArchangelWTF July 22, 2026 05:16

@ArchangelWTF ArchangelWTF left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the migration docs on the wiki will need updating

@ArchangelWTF
ArchangelWTF merged commit c898c2c into 4.1.x-dev Jul 22, 2026
2 of 5 checks passed
@ArchangelWTF
ArchangelWTF deleted the json-enum-extensions branch July 22, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants