vegapnk / RJW-Genes

Rimworld Biotech Genes related to RJW
MIT License
24 stars 28 forks source link

"Empathic Lifeforce" breaks the UI #66

Closed Stars22223 closed 8 months ago

Stars22223 commented 8 months ago

The "Empathic Lifeforce" gene is currently broken in that you can't save it using the xenotype editor. When you add it to your xenotype (I tested this right after world generation) and click "save and apply", the editor instead of saving it and closing the window will glitch out. The UI is completely unusable after it. If you go back and regenerate the world, the UI is usable again, but adding this new xenotype onto any colonist will break it again.

Tested with only those 2 genes (Fertilin' and Empathic Lifeforce). Turned off all mods except RJW and RJW-Genes.

Log: Error while generating pawn. Rethrowing. Exception: System.MissingMethodException: Default constructor not found for type RJW_Genes.Gene_LifeForce_Empath at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.Activator.CreateInstance (System.Type type) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 at RimWorld.GeneMaker.MakeGene (Verse.GeneDef def, Verse.Pawn pawn) [0x00000] in <95de19971c5d40878d8742747904cdcd>:0 at RimWorld.Pawn_GeneTracker.AddGene (Verse.GeneDef geneDef, System.Boolean xenogene) [0x0001a] in <95de19971c5d40878d8742747904cdcd>:0 at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GenerateGenes_Patch1(Verse.Pawn,RimWorld.XenotypeDef,Verse.PawnGenerationRequest) at Verse.PawnGenerator.TryGenerateNewPawnInternal (Verse.PawnGenerationRequest& request, System.String& error, System.Boolean ignoreScenarioRequirements, System.Boolean ignoreValidator) [0x00338] in <95de19971c5d40878d8742747904cdcd>:0 at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GenerateNewPawnInternal_Patch4(Verse.PawnGenerationRequest&) at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00188] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.PawnGenerator.GeneratePawn (Verse.PawnGenerationRequest request) [0x00007] in <95de19971c5d40878d8742747904cdcd>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.PawnGenerator:GeneratePawn (Verse.PawnGenerationRequest) Verse.StartingPawnUtility:NewGeneratedStartingPawn (int) Verse.StartingPawnUtility:RegenerateStartingPawnInPlace (int) Verse.StartingPawnUtility:RandomizeInPlace (Verse.Pawn) RimWorld.Page_ConfigureStartingPawns:RandomizeCurPawn () RimWorld.Page_ConfigureStartingPawns:<DrawXenotypeEditorButton>b__26_0 () RimWorld.Dialog_CreateXenotype:AcceptInner () RimWorld.Dialog_CreateXenotype:Accept () RimWorld.GeneCreationDialogBase:DoBottomButtons (UnityEngine.Rect) RimWorld.Dialog_CreateXenotype:DoBottomButtons (UnityEngine.Rect) RimWorld.GeneCreationDialogBase:DoWindowContents (UnityEngine.Rect) Verse.Window:InnerWindowOnGUI (int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

vegapnk commented 8 months ago

Thanks for the report ! Unfortunately, I can reproduce it.