You are on page 1of 7

PATCHING Verse.PawnGenerator Void GenerateTraits(Verse.

Pawn, PawnGenerationRequest)
L_0000: Local var #0 System.Collections.Generic.List`1[[RimWorld.TraitEntry,
Assembly-CSharp, Version=0.17.6362.34601, Culture=neutral, PublicKeyToken=null]]
L_0000: Local var #1 System.Int32
L_0000: Local var #2 RimWorld.TraitEntry
L_0000: Local var #3 System.Collections.Generic.List`1[[RimWorld.TraitEntry,
Assembly-CSharp, Version=0.17.6362.34601, Culture=neutral, PublicKeyToken=null]]
L_0000: Local var #4 System.Int32
L_0000: Local var #5 RimWorld.TraitEntry
L_0000: Local var #6 System.Int32
L_0000: Local var #7 RimWorld.Trait
L_0000: Local var #8 System.Int32
L_0000: Local var #9 RimWorld.Trait
L_0000: Local var #10 System.Single
L_0000: Local var #11 Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549
L_0000: Local var #12 Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A
L_0000: ldarg 0
L_0006: call Void GenerateTraitsPrefix(Verse.Pawn)
L_000b: newobj Void .ctor()
L_0010: stloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0012: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0014: ldarg.0
L_0015: stfld Verse.Pawn pawn
L_001a: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_001c: ldfld Verse.Pawn pawn
L_0021: ldfld RimWorld.Pawn_StoryTracker story
L_0026: brtrue Label #2
L_002b: br Label #0
L_0030: Label #2
L_0030: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0032: ldfld Verse.Pawn pawn
L_0037: ldfld RimWorld.Pawn_StoryTracker story
L_003c: ldfld RimWorld.Backstory childhood
L_0041: ldfld System.Collections.Generic.List`1[RimWorld.TraitEntry] forcedTraits
L_0046: brfalse Label #3
L_004b: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_004d: ldfld Verse.Pawn pawn
L_0052: ldfld RimWorld.Pawn_StoryTracker story
L_0057: ldfld RimWorld.Backstory childhood
L_005c: ldfld System.Collections.Generic.List`1[RimWorld.TraitEntry] forcedTraits
L_0061: stloc.0
L_0062: ldc.i4.0
L_0063: stloc.1
L_0064: br Label #4
L_0069: Label #8
L_0069: ldloc.0
L_006a: ldloc.1
L_006b: callvirt RimWorld.TraitEntry get_Item(Int32)
L_0070: stloc.2
L_0071: ldloc.2
L_0072: ldfld RimWorld.TraitDef def
L_0077: brtrue Label #5
L_007c: ldstr "Null forced trait def on "
L_0081: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0083: ldfld Verse.Pawn pawn
L_0088: ldfld RimWorld.Pawn_StoryTracker story
L_008d: ldfld RimWorld.Backstory childhood
L_0092: call System.String Concat(System.Object, System.Object)
L_0097: call Void Error(System.String)
L_009c: br Label #6
L_00a1: Label #5
L_00a1: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_00a3: ldfld Verse.Pawn pawn
L_00a8: ldfld RimWorld.Pawn_StoryTracker story
L_00ad: ldfld RimWorld.TraitSet traits
L_00b2: ldloc.2
L_00b3: ldfld RimWorld.TraitDef def
L_00b8: callvirt Boolean HasTrait(RimWorld.TraitDef)
L_00bd: brtrue Label #7
L_00c2: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_00c4: ldfld Verse.Pawn pawn
L_00c9: ldfld RimWorld.Pawn_StoryTracker story
L_00ce: ldfld RimWorld.TraitSet traits
L_00d3: ldloc.2
L_00d4: ldfld RimWorld.TraitDef def
L_00d9: ldloc.2
L_00da: ldfld System.Int32 degree
L_00df: ldc.i4.0
L_00e0: newobj Void .ctor(TraitDef, Int32, Boolean)
L_00e5: callvirt Void GainTrait(RimWorld.Trait)
L_00ea: Label #6
L_00ea: Label #7
L_00ea: ldloc.1
L_00eb: ldc.i4.1
L_00ec: add
L_00ed: stloc.1
L_00ee: Label #4
L_00ee: ldloc.1
L_00ef: ldloc.0
L_00f0: callvirt Int32 get_Count()
L_00f5: blt Label #8
L_00fa: Label #3
L_00fa: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_00fc: ldfld Verse.Pawn pawn
L_0101: ldfld RimWorld.Pawn_StoryTracker story
L_0106: ldfld RimWorld.Backstory adulthood
L_010b: brfalse Label #9
L_0110: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0112: ldfld Verse.Pawn pawn
L_0117: ldfld RimWorld.Pawn_StoryTracker story
L_011c: ldfld RimWorld.Backstory adulthood
L_0121: ldfld System.Collections.Generic.List`1[RimWorld.TraitEntry] forcedTraits
L_0126: brfalse Label #10
L_012b: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_012d: ldfld Verse.Pawn pawn
L_0132: ldfld RimWorld.Pawn_StoryTracker story
L_0137: ldfld RimWorld.Backstory adulthood
L_013c: ldfld System.Collections.Generic.List`1[RimWorld.TraitEntry] forcedTraits
L_0141: stloc.3
L_0142: ldc.i4.0
L_0143: stloc.s 4 (System.Int32)
L_0145: br Label #11
L_014a: Label #15
L_014a: ldloc.3
L_014b: ldloc.s 4 (System.Int32)
L_014d: callvirt RimWorld.TraitEntry get_Item(Int32)
L_0152: stloc.s 5 (RimWorld.TraitEntry)
L_0154: ldloc.s 5 (RimWorld.TraitEntry)
L_0156: ldfld RimWorld.TraitDef def
L_015b: brtrue Label #12
L_0160: ldstr "Null forced trait def on "
L_0165: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0167: ldfld Verse.Pawn pawn
L_016c: ldfld RimWorld.Pawn_StoryTracker story
L_0171: ldfld RimWorld.Backstory adulthood
L_0176: call System.String Concat(System.Object, System.Object)
L_017b: call Void Error(System.String)
L_0180: br Label #13
L_0185: Label #12
L_0185: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0187: ldfld Verse.Pawn pawn
L_018c: ldfld RimWorld.Pawn_StoryTracker story
L_0191: ldfld RimWorld.TraitSet traits
L_0196: ldloc.s 5 (RimWorld.TraitEntry)
L_0198: ldfld RimWorld.TraitDef def
L_019d: callvirt Boolean HasTrait(RimWorld.TraitDef)
L_01a2: brtrue Label #14
L_01a7: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_01a9: ldfld Verse.Pawn pawn
L_01ae: ldfld RimWorld.Pawn_StoryTracker story
L_01b3: ldfld RimWorld.TraitSet traits
L_01b8: ldloc.s 5 (RimWorld.TraitEntry)
L_01ba: ldfld RimWorld.TraitDef def
L_01bf: ldloc.s 5 (RimWorld.TraitEntry)
L_01c1: ldfld System.Int32 degree
L_01c6: ldc.i4.0
L_01c7: newobj Void .ctor(TraitDef, Int32, Boolean)
L_01cc: callvirt Void GainTrait(RimWorld.Trait)
L_01d1: Label #13
L_01d1: Label #14
L_01d1: ldloc.s 4 (System.Int32)
L_01d3: ldc.i4.1
L_01d4: add
L_01d5: stloc.s 4 (System.Int32)
L_01d7: Label #11
L_01d7: ldloc.s 4 (System.Int32)
L_01d9: ldloc.3
L_01da: callvirt Int32 get_Count()
L_01df: blt Label #15
L_01e4: Label #9
L_01e4: Label #10
L_01e4: ldc.i4.2
L_01e5: ldc.i4.3
L_01e6: call Int32 RangeInclusive(Int32, Int32)
L_01eb: stloc.s 6 (System.Int32)
L_01ed: ldarga.s 1
L_01ef: call Boolean get_AllowGay()
L_01f4: brfalse Label #16
L_01f9: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_01fb: ldfld Verse.Pawn pawn
L_0200: call Boolean HasAnyLovePartnerOfTheSameGender(Verse.Pawn)
L_0205: brtrue Label #17
L_020a: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_020c: ldfld Verse.Pawn pawn
L_0211: call Boolean HasAnyExLovePartnerOfTheSameGender(Verse.Pawn)
L_0216: brfalse Label #18
L_021b: Label #17
L_021b: ldsfld RimWorld.TraitDef Gay
L_0220: ldsfld RimWorld.TraitDef Gay
L_0225: call Int32 RandomTraitDegree(RimWorld.TraitDef)
L_022a: ldc.i4.0
L_022b: newobj Void .ctor(TraitDef, Int32, Boolean)
L_0230: stloc.s 7 (RimWorld.Trait)
L_0232: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0234: ldfld Verse.Pawn pawn
L_0239: ldfld RimWorld.Pawn_StoryTracker story
L_023e: ldfld RimWorld.TraitSet traits
L_0243: ldloc.s 7 (RimWorld.Trait)
L_0245: callvirt Void GainTrait(RimWorld.Trait)
L_024a: Label #16
L_024a: Label #18
L_024a: br Label #19
L_024f: Label #50
L_024f: newobj Void .ctor()
L_0254: stloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0256: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0258: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_025a: stfld Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549 <>f__ref$1353
L_025f: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0261: ldarg.0
L_0262: call RimWorld.TraitDef GenerateTraitsValidator(Verse.Pawn)
L_0267: stfld RimWorld.TraitDef newTraitDef
L_026c: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_026e: ldfld Verse.Pawn pawn
L_0273: ldfld RimWorld.Pawn_StoryTracker story
L_0278: ldfld RimWorld.TraitSet traits
L_027d: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_027f: ldfld RimWorld.TraitDef newTraitDef
L_0284: callvirt Boolean HasTrait(RimWorld.TraitDef)
L_0289: brfalse Label #20
L_028e: br Label #21
L_0293: Label #20
L_0293: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0295: ldfld RimWorld.TraitDef newTraitDef
L_029a: ldsfld RimWorld.TraitDef Gay
L_029f: bne.un Label #22
L_02a4: ldarga.s 1
L_02a6: call Boolean get_AllowGay()
L_02ab: brtrue Label #23
L_02b0: br Label #24
L_02b5: Label #23
L_02b5: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_02b7: ldfld Verse.Pawn pawn
L_02bc: call Boolean HasAnyLovePartnerOfTheOppositeGender(Verse.Pawn)
L_02c1: brtrue Label #25
L_02c6: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_02c8: ldfld Verse.Pawn pawn
L_02cd: call Boolean HasAnyExLovePartnerOfTheOppositeGender(Verse.Pawn)
L_02d2: brfalse Label #26
L_02d7: Label #25
L_02d7: br Label #27
L_02dc: Label #22
L_02dc: Label #26
L_02dc: ldarga.s 1
L_02de: call RimWorld.Faction get_Faction()
L_02e3: brfalse Label #28
L_02e8: call RimWorld.Faction get_OfPlayerSilentFail()
L_02ed: brfalse Label #29
L_02f2: ldarga.s 1
L_02f4: call RimWorld.Faction get_Faction()
L_02f9: call RimWorld.Faction get_OfPlayer()
L_02fe: call Boolean HostileTo(RimWorld.Faction, RimWorld.Faction)
L_0303: brfalse Label #30
L_0308: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_030a: ldfld RimWorld.TraitDef newTraitDef
L_030f: ldfld System.Boolean allowOnHostileSpawn
L_0314: brtrue Label #31
L_0319: br Label #32
L_031e: Label #28
L_031e: Label #29
L_031e: Label #30
L_031e: Label #31
L_031e: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0320: ldfld Verse.Pawn pawn
L_0325: ldfld RimWorld.Pawn_StoryTracker story
L_032a: ldfld RimWorld.TraitSet traits
L_032f: ldfld System.Collections.Generic.List`1[RimWorld.Trait] allTraits
L_0334: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0336: ldftn Boolean <>m__8EB(RimWorld.Trait)
L_033c: newobj Void .ctor(Object, IntPtr)
L_0341: call Boolean Any[Trait](System.Collections.Generic.List`1[RimWorld.Trait],
System.Predicate`1[RimWorld.Trait])
L_0346: brtrue Label #33
L_034b: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_034d: ldfld RimWorld.TraitDef newTraitDef
L_0352: ldfld System.Collections.Generic.List`1[RimWorld.TraitDef]
conflictingTraits
L_0357: brfalse Label #34
L_035c: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_035e: ldfld RimWorld.TraitDef newTraitDef
L_0363: ldfld System.Collections.Generic.List`1[RimWorld.TraitDef]
conflictingTraits
L_0368: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_036a: ldftn Boolean <>m__8EC(RimWorld.TraitDef)
L_0370: newobj Void .ctor(Object, IntPtr)
L_0375: call Boolean Any[TraitDef]
(System.Collections.Generic.List`1[RimWorld.TraitDef],
System.Predicate`1[RimWorld.TraitDef])
L_037a: brfalse Label #35
L_037f: Label #33
L_037f: br Label #36
L_0384: Label #34
L_0384: Label #35
L_0384: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0386: ldfld RimWorld.TraitDef newTraitDef
L_038b: ldfld System.Collections.Generic.List`1[Verse.WorkTypeDef]
requiredWorkTypes
L_0390: brfalse Label #37
L_0395: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0397: ldfld Verse.Pawn pawn
L_039c: ldfld RimWorld.Pawn_StoryTracker story
L_03a1: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_03a3: ldfld RimWorld.TraitDef newTraitDef
L_03a8: ldfld System.Collections.Generic.List`1[Verse.WorkTypeDef]
requiredWorkTypes
L_03ad: callvirt Boolean
OneOfWorkTypesIsDisabled(System.Collections.Generic.List`1[Verse.WorkTypeDef])
L_03b2: brfalse Label #38
L_03b7: br Label #39
L_03bc: Label #37
L_03bc: Label #38
L_03bc: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_03be: ldfld Verse.Pawn pawn
L_03c3: ldfld RimWorld.Pawn_StoryTracker story
L_03c8: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_03ca: ldfld RimWorld.TraitDef newTraitDef
L_03cf: ldfld Verse.WorkTags requiredWorkTags
L_03d4: callvirt Boolean WorkTagIsDisabled(WorkTags)
L_03d9: brfalse Label #40
L_03de: br Label #41
L_03e3: Label #40
L_03e3: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_03e5: ldfld RimWorld.TraitDef newTraitDef
L_03ea: call Int32 RandomTraitDegree(RimWorld.TraitDef)
L_03ef: stloc.s 8 (System.Int32)
L_03f1: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_03f3: ldfld Verse.Pawn pawn
L_03f8: ldfld RimWorld.Pawn_StoryTracker story
L_03fd: ldfld RimWorld.Backstory childhood
L_0402: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0404: ldfld RimWorld.TraitDef newTraitDef
L_0409: ldloc.s 8 (System.Int32)
L_040b: callvirt Boolean DisallowsTrait(RimWorld.TraitDef, Int32)
L_0410: brtrue Label #42
L_0415: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0417: ldfld Verse.Pawn pawn
L_041c: ldfld RimWorld.Pawn_StoryTracker story
L_0421: ldfld RimWorld.Backstory adulthood
L_0426: brfalse Label #43
L_042b: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_042d: ldfld Verse.Pawn pawn
L_0432: ldfld RimWorld.Pawn_StoryTracker story
L_0437: ldfld RimWorld.Backstory adulthood
L_043c: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_043e: ldfld RimWorld.TraitDef newTraitDef
L_0443: ldloc.s 8 (System.Int32)
L_0445: callvirt Boolean DisallowsTrait(RimWorld.TraitDef, Int32)
L_044a: brfalse Label #44
L_044f: Label #42
L_044f: br Label #45
L_0454: Label #43
L_0454: Label #44
L_0454: ldloc.s 12 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey54A)
L_0456: ldfld RimWorld.TraitDef newTraitDef
L_045b: ldloc.s 8 (System.Int32)
L_045d: ldc.i4.0
L_045e: newobj Void .ctor(TraitDef, Int32, Boolean)
L_0463: stloc.s 9 (RimWorld.Trait)
L_0465: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0467: ldfld Verse.Pawn pawn
L_046c: ldfld Verse.AI.Pawn_MindState mindState
L_0471: brfalse Label #46
L_0476: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_0478: ldfld Verse.Pawn pawn
L_047d: ldfld Verse.AI.Pawn_MindState mindState
L_0482: ldfld Verse.MentalBreaker mentalBreaker
L_0487: brfalse Label #47
L_048c: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_048e: ldfld Verse.Pawn pawn
L_0493: ldfld Verse.AI.Pawn_MindState mindState
L_0498: ldfld Verse.MentalBreaker mentalBreaker
L_049d: callvirt Single get_BreakThresholdExtreme()
L_04a2: stloc.s 10 (System.Single)
L_04a4: ldloc.s 10 (System.Single)
L_04a6: ldloc.s 9 (RimWorld.Trait)
L_04a8: ldsfld RimWorld.StatDef MentalBreakThreshold
L_04ad: callvirt Single OffsetOfStat(RimWorld.StatDef)
L_04b2: add
L_04b3: stloc.s 10 (System.Single)
L_04b5: ldloc.s 10 (System.Single)
L_04b7: ldloc.s 9 (RimWorld.Trait)
L_04b9: ldsfld RimWorld.StatDef MentalBreakThreshold
L_04be: callvirt Single MultiplierOfStat(RimWorld.StatDef)
L_04c3: mul
L_04c4: stloc.s 10 (System.Single)
L_04c6: ldloc.s 10 (System.Single)
L_04c8: ldc.r4 40
L_04cd: ble.un Label #48
L_04d2: br Label #49
L_04d7: Label #46
L_04d7: Label #47
L_04d7: Label #48
L_04d7: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_04d9: ldfld Verse.Pawn pawn
L_04de: ldfld RimWorld.Pawn_StoryTracker story
L_04e3: ldfld RimWorld.TraitSet traits
L_04e8: ldloc.s 9 (RimWorld.Trait)
L_04ea: callvirt Void GainTrait(RimWorld.Trait)
L_04ef: Label #19
L_04ef: Label #21
L_04ef: Label #24
L_04ef: Label #27
L_04ef: Label #32
L_04ef: Label #36
L_04ef: Label #39
L_04ef: Label #41
L_04ef: Label #45
L_04ef: Label #49
L_04ef: ldloc.s 11 (Verse.PawnGenerator+<GenerateTraits>c__AnonStorey549)
L_04f1: ldfld Verse.Pawn pawn
L_04f6: ldfld RimWorld.Pawn_StoryTracker story
L_04fb: ldfld RimWorld.TraitSet traits
L_0500: ldfld System.Collections.Generic.List`1[RimWorld.Trait] allTraits
L_0505: callvirt Int32 get_Count()
L_050a: ldloc.s 6 (System.Int32)
L_050c: blt Label #50
L_0511: br Label #0
L_0516: Label #0
L_0516: ret
DONE

You might also like