Closed K07H closed 6 years ago
CraftTreeHandler.AddCraftingNode(CraftTree.Type.Constructor, techType, "Vehicles");
Works fine for me, as far as simple crafting goes.
I think he means added by other mods with harmony
Yes I'm talking about Subnautica mods. I never said I was talking about SML Helper mods.
Why go through the trouble of manually patching that when SMLHelper offers a simple and reliable way to do it? If the problem has been solved, why would any modder waste time solving the problem from scratch? That's basically re-inventing the wheel at that point.
It's the same reason you don't see everyone writing their own mod loader. Everyone just uses QMods because it solves the problem reliably.
Why? Is not the question that needs answering. What if? Is the one @primesonic
That is a totally different question, to which I would answer that you don't want to force people into using this library. Also, there isn't any problem: I add my item to the CraftTree without any difficulty and with only few lines. I don't need the 10 level of indirections that SML Helper provide (hundreds of lines of codes and numerous classes), it's way more simple to add my node with Harmony.
The problem is that I can't do it, because SML Helper v2 is taking ownership of Subnautica CraftTree (instead of manipulating the tree like I do).
Actually I wrote SML Helper v2, but I think this issue should be reported for v1.7 as well. I didn't test. EDIT: Yep, just tested and this issue also occurs on version 1.7.
Should be fixed in the 2.0NodeHandling branch
Ok tell me if you need help. I can provide my source code if you want, it's only few lines of codes (about 20 are required to add new nodes to existing CraftTrees).
Pull Request https://github.com/ahk1221/SMLHelper/pull/45 contains the proposed changes to resolve this. This change reverts the underlying handling of the craft tree patch back to the style used in 1,x where the individual scheme methods are patched with in-place alterations done to their CraftNode result.
@K07H Look at the Pull Request. This is already compatible with current mods that update existing craft trees. But since you mentioned encountering this issue on the Mobile Vehicle Bay. we need more info to figure out what is going on.
If you have a code snippet to share that can point to potential conflicts, that will be helpful.
The pull request was merged, but I don't recommend closing this until @K07H does further testing
Yeah
The fix seems to be working from what I tested. I guess you can close this now.
With actual state of development, SML Helper is overwriting entries of the Mobile Vehicle Bay added by other mods. This happens because SML Helper is taking ownership of game's CraftTree (thus CraftNodes) by overriding the CraftTree method "Get()" instead of manipulating the CraftTree directly.