public static void Postfix(Outfit value, Pawn_OutfitTracker __instance) { if (value is AwesomeInventoryLoadout loadout) { __instance.pawn.SetLoadout(loadout); } }
public static void Postfix(Outfit value, Pawn_OutfitTracker __instance) { if (__instance != null) { if (value is AwesomeInventoryLoadout loadout) { __instance.pawn.SetLoadout(loadout); } else { __instance.pawn.GetComp <CompAwesomeInventoryLoadout>()?.RemoveLoadout(); } } }