Skip to content

Add world prefab and crafting injection managers - #1

Merged
eris-webserv merged 1 commit into
eris-webserv:mainfrom
Segually:main
Mar 29, 2026
Merged

Add world prefab and crafting injection managers#1
eris-webserv merged 1 commit into
eris-webserv:mainfrom
Segually:main

Conversation

@Segually

Copy link
Copy Markdown
Contributor

Initialize and wire up two new item systems. Base.GamePlugin now initializes WorldPrefabManager and CraftingInjectionManager (with startup timing logs).

Added CraftingInjectionManager which lets mods inject items into vanilla crafting lists via a Harmony postfix on inventory_ctr.GetCraftList; insertions are idempotent and support inserting after a specific item.

Added WorldPrefabManager which allows registering AssetBundle prefabs for world-placeable items (keyed by item id or World_obj_path) and patches both overloads of ResourceControl.AsyncInstantiateWorldObjectPrefab to supply mod prefabs, instantiating cached assets safely. Includes simple reset/initialize helpers and Harmony patches to integrate with the game.

Initialize and wire up two new item systems. Base.GamePlugin now initializes WorldPrefabManager and CraftingInjectionManager (with startup timing logs). Added CraftingInjectionManager which lets mods inject items into vanilla crafting lists via a Harmony postfix on inventory_ctr.GetCraftList; insertions are idempotent and support inserting after a specific item. Added WorldPrefabManager which allows registering AssetBundle prefabs for world-placeable items (keyed by item id or World_obj_path) and patches both overloads of ResourceControl.AsyncInstantiateWorldObjectPrefab to supply mod prefabs, instantiating cached assets safely. Includes simple reset/initialize helpers and Harmony patches to integrate with the game.
@eris-webserv

Copy link
Copy Markdown
Owner

I'll do some local cleanup when I get the time. This is much appreciated.

The next build of HAMH will have these changes probably.

@eris-webserv
eris-webserv merged commit 44b1910 into eris-webserv:main Mar 29, 2026
1 of 2 checks passed
@Segually

Copy link
Copy Markdown
Contributor Author

@eris-webserv there is a huge issue with it when you remove an item using a custom prefab it will not delete until you reload that chunk or reload your slot
also not sure if weapons and hats work or not.

@Segually

Copy link
Copy Markdown
Contributor Author

@eris-webserv there is a huge issue with it when you remove an item using a custom prefab it will not delete until you reload that chunk or reload your slot also not sure if weapons and hats work or not.

actually i'm not sure, it seems like it only has a chance? to do it, idk.

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