sumghai / Replimat

Distributed food replicator system for RimWorld
Other
11 stars 11 forks source link

Cannot build Replimat cadaver processor #84

Closed hithererybear closed 7 months ago

hithererybear commented 7 months ago

Describe the bug:
Mod conflict with Humanoid Alien Races causes cadaver processor to disappear from map when colonist completes the build process. Same behavior when placing via God mode. Cannot be loaded via Scenario Editor.

Note: these errors also occur with only Core, all DLCs, Replimat and Harmony running:

Failed to find Verse.ThingDef named alCorpse_Human. There are 2938 defs of this type loaded.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.DefDatabase`1<Verse.ThingDef>:GetNamed (string,bool)
Verse.ThingDef:Named (string)
Replimat.Building_ReplimatCorpseRecycler/<>c:<GetParentStoreSettings>b__21_1 (Verse.ThingDef)
System.Collections.Generic.HashSet`1<Verse.ThingDef>:RemoveWhere (System.Predicate`1<Verse.ThingDef>)
Replimat.Building_ReplimatCorpseRecycler:GetParentStoreSettings ()
RimWorld.StorageSettings:.ctor (RimWorld.IStoreSettingsParent)
Replimat.Building_ReplimatCorpseRecycler:PostMake ()
Verse.ThingMaker:MakeThing (Verse.ThingDef,Verse.ThingDef)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Designator_Build.DesignateSingleCell_Patch0 (RimWorld.Designator_Build,Verse.IntVec3)
Verse.DesignatorManager:ProcessInputEvents ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.MapInterface.HandleMapClicks_Patch1 (RimWorld.MapInterface)
RimWorld.UIRoot_Play:UIRootOnGUI ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.OnGUI_Patch1 (Verse.Root)
StatRequest for null def.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
RimWorld.StatRequest:For (Verse.BuildableDef,Verse.ThingDef,RimWorld.QualityCategory)
RimWorld.StatWorker:GetValueAbstract (Verse.BuildableDef,Verse.ThingDef)
RimWorld.StatExtension:GetStatValueAbstract (Verse.BuildableDef,RimWorld.StatDef,Verse.ThingDef)
Replimat.Building_ReplimatCorpseRecycler/<>c:<GetParentStoreSettings>b__21_1 (Verse.ThingDef)
System.Collections.Generic.HashSet`1<Verse.ThingDef>:RemoveWhere (System.Predicate`1<Verse.ThingDef>)
Replimat.Building_ReplimatCorpseRecycler:GetParentStoreSettings ()
RimWorld.StorageSettings:.ctor (RimWorld.IStoreSettingsParent)
Replimat.Building_ReplimatCorpseRecycler:PostMake ()
Verse.ThingMaker:MakeThing (Verse.ThingDef,Verse.ThingDef)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Designator_Build.DesignateSingleCell_Patch0 (RimWorld.Designator_Build,Verse.IntVec3)
Verse.DesignatorManager:ProcessInputEvents ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.MapInterface.HandleMapClicks_Patch1 (RimWorld.MapInterface)
RimWorld.UIRoot_Play:UIRootOnGUI ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.OnGUI_Patch1 (Verse.Root)

Expected behavior:

  1. Colonist can successfully build a cadaver processor, or player can add a cadaver processor via God mode or Scenario Editor.

Steps to reproduce:

  1. Attempt to build the cadaver processor, add via Scenario Editor, or place via God mode.

Additional information:

  1. Debug logs upon loading Rimworld: https://gist.github.com/HugsLibRecordKeeper/471df92bce9c996bba2e6d9a7384c26e
  2. Debug logs upon loading quickstart map: https://gist.github.com/HugsLibRecordKeeper/e3f5131382af9593232eaa10e82501cf

System and Game Configuration

Operating System: Microsoft Windows 10 (64-bit) Physical RAM: 32GB RimWorld base game version: RimWorld 1.5.4063 rev1072 RimWorld DLCs loaded: Royalty, Ideology, Biotech, Anamoly Replimat mod version: 1.5.1 Replimat mod downloaded from: Steam Workshop Your mod list:

  1. Harmony v 2.3.1
  2. Core
  3. Royalty
  4. Ideology
  5. Biotech
  6. Anamoly
  7. HugsLib v 11.0.3
  8. Humanoid Alien Races version unknown, last updated on 04.11.2024. Noted as 1.5 compatible
  9. Replimat v 1.5.1

Declaration

I hereby verify that:

hithererybear commented 7 months ago

Attempting to find which mod causes the cadaver processor to not load. Please stay tuned.

hithererybear commented 7 months ago

Conflict is with the Humanoid Alien Races mod. Editing original bug listing.

sumghai commented 7 months ago

The issue isn't a conflict between Replimat and HAR, but rather, Replimat and the Anomaly DLC.

It looks like some of the corpses from the DLC don't have meat amounts, so that may be what's disrupting the Cadaver Processor's internal filter code. I'll see what I can do.

sumghai commented 7 months ago

I cleaned up the logic for the Cadaver Processor's corpse type filtering code, so that unnatural human corpses from the Anomaly DLC should no longer throw errors.

sumghai commented 7 months ago

I spoke a wee bit too soon - there was similar code in the HAR/Anomaly side of things that also needed fixing. Should be good now.