neitsa/PrepareLanding

Missing enum setting labels for enum UnityEngine.KeyCode

VilcsiTH opened this issue · 3 comments

Warning appears right after loading, in the main menu. No other mods used, apart from dependencies.

[HugsLib][warn] Missing enum setting labels for enum UnityEngine.KeyCode
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
HugsLib.Utils.ModLogger:Warning (string,object[])
HugsLib.Settings.ModSettingsPack:GetHandle<UnityEngine.KeyCode> (string,string,string,UnityEngine.KeyCode,HugsLib.Settings.SettingHandle/ValueIsValid,string)
PrepareLanding.GameOptions:OnDefLoaded ()
PrepareLanding.RimWorldEventHandler:OnDefsLoaded ()
PrepareLanding.PrepareLanding:DefsLoaded ()
HugsLib.HugsLibController:OnDefsLoaded ()
HugsLib.HugsLibController:LoadReloadInitialize ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()

Thank you for the issue. I know about the problem but really don't know how to solve it. This might be a no brainer though.

The key codes come directly from Unity but for an unknown reason, Rimworld doesn't display them correctly and don't like them. I'll probably request help from other modders.

I've tried fixing it myself aswell, but found no easy way. During research I found that SimpleSidearms had a similar issue, which was fixed by adding some lines to the Language XML.

Issue is, their errors were much more straightforward, with "enum SimpleSidearms.Globals+Preset" needing "PresetCustom", "Preset0", and so on, titles, descriptions and labels. I tried experimenting by hardcoding "KeyCode" or "UnityEngine.KeyCode" into the translation XML, but no luck. Came up empty handed after asking and searching around the modding discord aswell, sadly.

Staying on the topic of XMLs, I took a look at the KeyBindings XML but it looks completely fine, although they do not show up in-game for me using the keybinds configurator from the options menu. Apart from that, my guess was that in GameOptions.cs the public SettingHandle<KeyCode> PrepareLandingHotKey { get; private set; } line needs to be rewritten, but nothing that would fit in there came to my mind at the time.

This can be solved by adding a translation xml of your own language