ResoniteModdingGroup / MonkeyLoader.GamePacks.Resonite

MonkeyLoader Game Pack which provides hooks for Resonite mods.
https://resonitemoddinggroup.github.io/MonkeyLoader.GamePacks.Resonite/
GNU Lesser General Public License v3.0
14 stars 2 forks source link

Mod setting standalone facets failing to load with latest MonkeyLoader from source #56

Closed Nytra closed 1 month ago

Nytra commented 1 month ago

Using MonkeyLoader compiled from https://github.com/MonkeyModdingTroop/MonkeyLoader/tree/a1b68ad0e12066ffd4c238fdefa79b3db3008245

This is failing to get the config key from the mod:

if (mod.TryGet<IDefiningConfigKey>().ByPartialId(partialId, out var modConfigKey))
    return modConfigKey;
10:09:00.652 (186 FPS)  [INFO]  [MonkeyLoader|Resonite Game Pack|ModSettingStandaloneFacet] Loaded a mod setting standalone facet!
10:09:00.652 (186 FPS)  [DEBUG] [MonkeyLoader|Resonite Game Pack|ModSettingStandaloneFacet] Config Key FullId: BoundedUIX.MonkeyToggles.DevToolSelectableUIX
10:09:00.652 (186 FPS)  [DEBUG] [MonkeyLoader|Resonite Game Pack|ModSettingStandaloneFacet] Partial Id: MonkeyToggles.DevToolSelectableUIX
10:09:00.652 (186 FPS)  [ERROR] [MonkeyLoader|Resonite Game Pack|ModSettingStandaloneFacet] Could not sync a config key with a standalone facet! Comment text: BoundedUIX.MonkeyToggles.DevToolSelectableUIX
Banane9 commented 1 month ago

Oh yes - you'll have to make sure that the partial id starts with Config. now. So for existing facets that's gonna need upgrade logic 😅

Nytra commented 1 month ago

Is there another way to do it without needing to upgrade the facets? If the Config. part is always constant could it just be omitted and still work anyway?

Banane9 commented 1 month ago

Hmmmm, the system behind it is too generic for that I think. But all we need to add is a check to prefix Config. if it doesn't start with that 🤔