diff --git a/1.3/Assemblies/VFECore.dll b/1.3/Assemblies/VFECore.dll index 2efb2ad0..34a799f5 100644 Binary files a/1.3/Assemblies/VFECore.dll and b/1.3/Assemblies/VFECore.dll differ diff --git a/Source/VFECore/AnimalBehaviours/Comps/CompGraphicByStyle.cs b/Source/VFECore/AnimalBehaviours/Comps/CompGraphicByStyle.cs index ca85cdda..3ccd29a7 100644 --- a/Source/VFECore/AnimalBehaviours/Comps/CompGraphicByStyle.cs +++ b/Source/VFECore/AnimalBehaviours/Comps/CompGraphicByStyle.cs @@ -35,7 +35,7 @@ public override void CompTick() if (changeGraphicsCounter > Props.changeGraphicsInterval) { this.ChangeTheGraphics(); - + changeGraphicsCounter = 0; } base.CompTick(); } @@ -46,9 +46,12 @@ public override void PostSpawnSetup(bool respawningAfterLoad) Pawn pawn = this.parent as Pawn; this.pawn_renderer = pawn.Drawer.renderer; - GraphicData dessicatedgraphicdata = new GraphicData(); - dessicatedgraphicdata.texPath = Props.dessicatedTxt; - dessicatedGraphic = dessicatedgraphicdata.Graphic; + if (Props.changeDesiccatedGraphic) { + GraphicData dessicatedgraphicdata = new GraphicData(); + dessicatedgraphicdata.texPath = Props.dessicatedTxt; + dessicatedGraphic = dessicatedgraphicdata.Graphic; + } + this.ChangeTheGraphics(); } @@ -90,7 +93,11 @@ public void ChangeTheGraphics() try { Graphic_Multi nakedGraphic = (Graphic_Multi)GraphicDatabase.Get(Props.newImagePath, ShaderDatabase.Cutout, vector, Color.white); - this.pawn_renderer.graphics.dessicatedGraphic = dessicatedGraphic; + if (Props.changeDesiccatedGraphic) + { + this.pawn_renderer.graphics.dessicatedGraphic = dessicatedGraphic; + + } this.pawn_renderer.graphics.ResolveAllGraphics(); this.pawn_renderer.graphics.nakedGraphic = nakedGraphic; (this.pawn_renderer.graphics.nakedGraphic.data = new GraphicData()).shadowData = pawn.ageTracker.CurKindLifeStage.bodyGraphicData.shadowData; @@ -110,8 +117,12 @@ public void ChangeTheGraphics() try { - Graphic_Multi nakedGraphic = (Graphic_Multi)this.parent.def.graphic; - this.pawn_renderer.graphics.dessicatedGraphic = pawn.ageTracker.CurKindLifeStage.dessicatedBodyGraphicData.Graphic; + Graphic nakedGraphic = (Graphic_Multi)GraphicDatabase.Get(pawn.ageTracker.CurKindLifeStage.bodyGraphicData.texPath, ShaderDatabase.Cutout, vector, Color.white); + if (Props.changeDesiccatedGraphic) + { + this.pawn_renderer.graphics.dessicatedGraphic = pawn.ageTracker.CurKindLifeStage.dessicatedBodyGraphicData.Graphic; + + } this.pawn_renderer.graphics.ResolveAllGraphics(); this.pawn_renderer.graphics.nakedGraphic = nakedGraphic; (this.pawn_renderer.graphics.nakedGraphic.data = new GraphicData()).shadowData = pawn.ageTracker.CurKindLifeStage.bodyGraphicData.shadowData; diff --git a/Source/VFECore/AnimalBehaviours/Comps/CompProperties/CompProperties_GraphicByStyle.cs b/Source/VFECore/AnimalBehaviours/Comps/CompProperties/CompProperties_GraphicByStyle.cs index 9500ac18..70d2198b 100644 --- a/Source/VFECore/AnimalBehaviours/Comps/CompProperties/CompProperties_GraphicByStyle.cs +++ b/Source/VFECore/AnimalBehaviours/Comps/CompProperties/CompProperties_GraphicByStyle.cs @@ -14,6 +14,7 @@ public CompProperties_GraphicByStyle() public StyleCategoryDef style; public string newImagePath; + public bool changeDesiccatedGraphic = false; public string dessicatedTxt; public int changeGraphicsInterval = 2000;