Skip to content

Simplify the loading process of custom prefabs - #3

Closed
Segually wants to merge 3 commits into
eris-webserv:mainfrom
Segually:main
Closed

Simplify the loading process of custom prefabs#3
Segually wants to merge 3 commits into
eris-webserv:mainfrom
Segually:main

Conversation

@Segually

Copy link
Copy Markdown
Contributor

New `Register(itemFullId, worldObjPath, Assembly, ResourceName, AssetName) overload.
Old one is also kept for backwards compatibility

should simplify the process.

Add EquipmentPrefabPatch to intercept ResourceControl.AsyncInstantiateEquipment(string, Action) using a HarmonyTargetMethod that locates the correct overload via reflection. The prefix checks for empty paths and delegates to WorldPrefabManager.Instance.TryInvokeByObjPath, preventing the original method from running when the prefab is handled. This targets the equipment/helmet loading path (SharedCreature → LiteModel.ApplyHat) and includes an XML summary comment.
@Segually Segually closed this by deleting the head repository Apr 25, 2026
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.

1 participant