public static bool ResolveApparelGraphicsOriginal(PawnGraphicSet __instance)
        {
            __instance.ClearCache();
            __instance.apparelGraphics.Clear();
            List <Apparel> OriginalItems = new List <Apparel>();

            foreach (Apparel current in __instance.pawn.apparel.WornApparelInDrawOrder)
            {
                ApparelGraphicRecord item;
                if (current.GetComp <CompFactionColor>() != null)
                {
                    if ((ApparelGraphicGetterFC.TryGetGraphicApparelModded(current, __instance.pawn.story.bodyType, out item)))
                    {
                        if (current.GetComp <ApparelDetailDrawer>() != null && !current.Spawned)
                        {
                            OriginalItems.Add(current);
                        }

                        __instance.apparelGraphics.Add(item);
                    }
                }
                else if (ApparelGraphicRecordGetter.TryGetGraphicApparel(current, __instance.pawn.story.bodyType, out item))
                {
                    __instance.apparelGraphics.Add(item);
                }
            }
            //    Corruption.AfflictionDrawerUtility.DrawChaosOverlays(this.pawn);
            //foreach (Apparel app in OriginalItems)
            //{
            //    ApparelDetailDrawer.DrawDetails(__instance.pawn, app);
            //}
            return(false);
        }
Exemple #2
0
        public void ResolveApparelGraphicsOriginal()
        {
            this.ClearCache();
            this.apparelGraphics.Clear();
            List <Apparel> OriginalItems = new List <Apparel>();

            foreach (Apparel current in this.pawn.apparel.WornApparelInDrawOrder)
            {
                ApparelGraphicRecord item;
                if (current.GetComp <CompFactionColor>() != null)
                {
                    if ((ApparelGraphicGetterFC.TryGetGraphicApparelModded(current, this.pawn.story.BodyType, out item)))
                    {
                        if (current.GetComp <ApparelDetailDrawer>() != null && !current.Spawned)
                        {
                            OriginalItems.Add(current);
                        }

                        this.apparelGraphics.Add(item);
                    }
                }

                else if (ApparelGraphicRecordGetter.TryGetGraphicApparel(current, this.pawn.story.BodyType, out item))
                {
                    this.apparelGraphics.Add(item);
                }
            }
            Corruption.AfflictionDrawerUtility.DrawChaosOverlays(this.pawn);
            foreach (Apparel app in OriginalItems)
            {
                ApparelDetailDrawer.DrawDetails(this.pawn, app);
            }
        }
Exemple #3
0
        public void ResolveApparelGraphicsModded()
        {
            this.ClearCache();
            this.apparelGraphics.Clear();


            List <ApparelGraphicRecord> ApparelDetails = new List <ApparelGraphicRecord>();
            List <Apparel> OriginalItems = new List <Apparel>();

            foreach (Apparel current in this.pawn.apparel.WornApparelInDrawOrder)
            {
                ApparelGraphicRecord item;
                if (current.AllComps.Any(i => i.GetType() == typeof(CompFactionColor)))
                {
                    if (this.pawn.def.race.intelligence <= Intelligence.ToolUser)
                    {
                        btype = BodyType.Male;
                    }
                    else
                    {
                        btype = this.pawn.story.BodyType;
                    }
                    if (ApparelGraphicGetterFC.TryGetGraphicApparelModded(current, btype, out item))
                    {
                        this.apparelGraphics.Add(item);
                        if (current.GetComp <ApparelDetailDrawer>() != null && !current.Spawned)
                        {
                            //         current.GetComp<ApparelDetailDrawer>().PostSpawnSetup();
                            //         ApparelGraphicRecord detail;
                            //         ApparelDetailDrawer.ReturnApparelDetails(current, out detail);
                            //         this.apparelGraphics.Add(detail);
                            OriginalItems.Add(current);
                        }
                    }
                }
                else if (current.AllComps.Any(i => i.GetType() == typeof(CompRenderToolUserApparel)))
                {
                    btype = BodyType.Male;

                    //   ApparelGraphicGetterFC.TryGetGraphicApparelModded(current, btype, out item, current.DrawColor, current.DrawColorTwo);
                    //   this.apparelGraphics.Add(item);
                }
                else if (ApparelGraphicRecordGetter.TryGetGraphicApparel(current, this.pawn.story.BodyType, out item))
                {
                    this.apparelGraphics.Add(item);
                }
            }
            //      Corruption.AfflictionDrawerUtility.DrawChaosOverlays(this.pawn);
            foreach (Apparel app in OriginalItems)
            {
                ApparelDetailDrawer.DrawDetails(this.pawn, app);
            }
        }