Multiplayer icon indicating copy to clipboard operation
Multiplayer copied to clipboard

Fix SyncAction causing mods to load resources too early

Open SokyranTheDragon opened this issue 9 months ago • 0 comments

Whenever we patch methods for SyncAction, it would cause any non-vanilla types to attempt to load their static data. This caused them to load resources like graphics, which failed and caused issues with those mods.

I've fixed it by delaying patching of any non-vanilla methods whose declaring types have StaticConstructorOnStartup attribute on them.

I've decided to let unaffected methods be patched early in case patching those early was by design due to anything I may be unaware of.

Currently, this should fix issues with Moving Bases from Vanilla Expanded Framework.

SokyranTheDragon avatar Apr 01 '25 13:04 SokyranTheDragon