mirror of
				https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
				synced 2024-08-14 23:57:25 +00:00 
			
		
		
		
	hack around removed traits
721156233a/1.5/Source/DefOf/VanillaTraitDefOf.cs
			
			
This commit is contained in:
		
							parent
							
								
									95263ed0e0
								
							
						
					
					
						commit
						642536fc46
					
				
					 3 changed files with 31 additions and 6 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
using System.Collections.Generic;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using Verse;
 | 
			
		||||
using static RimWorld.TraitDefOf;
 | 
			
		||||
using static rjw.VanillaTraitDefOf;
 | 
			
		||||
 | 
			
		||||
namespace RJW_PlasticSurgeries
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -11,10 +11,9 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
        /// <inheritdoc />
 | 
			
		||||
        public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
 | 
			
		||||
        {
 | 
			
		||||
            /* if (!pawn.story.traits.HasTrait(Beauty) ||
 | 
			
		||||
            if (!pawn.story.traits.HasTrait(Beauty) ||
 | 
			
		||||
                pawn.story.traits.HasTrait(Beauty) && pawn.story.traits.GetTrait(Beauty).Degree < 2)
 | 
			
		||||
                yield return pawn.RaceProps.body.corePart; */
 | 
			
		||||
            return new HashSet<BodyPartRecord>();
 | 
			
		||||
                yield return pawn.RaceProps.body.corePart;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc />
 | 
			
		||||
| 
						 | 
				
			
			@ -42,14 +41,14 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
        /// <param name="severity">the new severity of the pawn's Beautiful trait</param>
 | 
			
		||||
        protected void SurgeryX(Pawn pawn, int severity)
 | 
			
		||||
        {
 | 
			
		||||
            /* if (pawn.story.traits.HasTrait(Beauty))
 | 
			
		||||
            if (pawn.story.traits.HasTrait(Beauty))
 | 
			
		||||
            {
 | 
			
		||||
                pawn.story.traits.allTraits.FindAll(t => Beauty.ConflictsWith(t))
 | 
			
		||||
                    .ForEach(t => pawn.story.traits.RemoveTrait(t));
 | 
			
		||||
                pawn.story.traits.RemoveTrait(pawn.story.traits.allTraits.Find(t => t.def == Beauty));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            pawn.story.traits.GainTrait(new Trait(Beauty, severity)); */
 | 
			
		||||
            pawn.story.traits.GainTrait(new Trait(Beauty, severity));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										26
									
								
								Source/RJW_PlasticSurgeries/1.5/VanillaTraitDefOf.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								Source/RJW_PlasticSurgeries/1.5/VanillaTraitDefOf.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace rjw
 | 
			
		||||
{
 | 
			
		||||
    [DefOf]
 | 
			
		||||
    public static class VanillaTraitDefOf
 | 
			
		||||
    {
 | 
			
		||||
        public static TraitDef Tough;
 | 
			
		||||
 | 
			
		||||
        public static TraitDef Nerves;
 | 
			
		||||
 | 
			
		||||
        public static TraitDef Beauty;
 | 
			
		||||
 | 
			
		||||
        public static TraitDef TooSmart;
 | 
			
		||||
 | 
			
		||||
        public static TraitDef NaturalMood;
 | 
			
		||||
 | 
			
		||||
        public static TraitDef Cannibal;
 | 
			
		||||
 | 
			
		||||
        static VanillaTraitDefOf()
 | 
			
		||||
        {
 | 
			
		||||
            DefOfHelper.EnsureInitializedInCtor(typeof(VanillaTraitDefOf));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue