Closed thailyn closed 10 months ago
Thats quirky - I imagine there are quite a few things which rely on pawns having a "valid" pawn kind def. I can patch this, but I feel like the mod in question should probably add a placeholder pawn kind def.
I had a look at solving this, I don't like what I'd need to do to fix it. I'm going to leave this for now, pawns w/o pawn kinds don't make much sense.
I am using this mod with a HAR race that (as far as I can tell, looking through the other mod's XML defs) does not have an associated
PawnKindDef
. The consequence of this is pawns with that race do not get aLoadoutComponent
comp class added to them, as the code that looks for races starts fromPawnKindDefs
:https://github.com/simplyWiri/Loadout-Compositing/blob/450d71ca11039d266ae293b816876dc4cba633fd/Source/Patches/Notify_LoadedLevelChanged_Patch.cs#L16-L21
The result is various parts of this mod trigger errors when doing things related to the pawn, since the
IsValidLoadoutHolder
method returns true for these races. For example, when trying to open that pawn's tag list or inThinkNode_LoadoutRealisation.TryIssueJobPackage
, the mod throws NREs becausepawn.TryGetComp<LoadoutComponent>()
returns a null value, but is assumed to be not null (the latter throws an error about every time that pawn tries to find something to do, it seems).