Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Syrchalis authored Oct 21, 2018
1 parent d0042d8 commit cb1042b
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModMetaData>
<name>[SYR] Individuality</name>
<author>Syrchalis</author>
<targetVersion>0.19.2009</targetVersion>
<targetVersion>1.0.2059</targetVersion>
<url>https://ludeon.com/forums/index.php?topic=43449</url>
<description>Adds new traits, rebalances vanilla traits and allows pawns to have randomized stats.

Expand Down
2 changes: 1 addition & 1 deletion About/ModSync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModSyncNinjaData>
<ID>49aabcd6-be2a-4475-aeb7-1814db779576</ID>
<ModName>[SYR] Individuality</ModName>
<Version>1.1.2</Version>
<Version>1.1.4</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>Syrchalis</Owner>
Expand Down
Binary file modified Assemblies/SyrTraits.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Languages/English/Keyed/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<IndividualityTooltip>View natural variations</IndividualityTooltip>
<SyrTraitsSettingsCategory>Individuality</SyrTraitsSettingsCategory>

<SyrTraitsTraitCount>Amount of traits pawns spawn with (default: 2-3)</SyrTraitsTraitCount>
<SyrTraitsTraitCount>Amount of traits pawns spawn with</SyrTraitsTraitCount>
<SyrTraitsTraitCountWarning>Warning: Only 5 traits can be displayed, enable "tiny trait font" to view up to 8</SyrTraitsTraitCountWarning>
<SyrTraitsTraitsTinyFont>Tiny trait font</SyrTraitsTraitsTinyFont>
<SyrTraitsTraitsTinyFontTooltip>This allows up to 8 traits to be displayed in the character window</SyrTraitsTraitsTinyFontTooltip>
Expand Down
2 changes: 1 addition & 1 deletion Source/SyrTraits/CompIndividuality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override void PostSpawnSetup(bool respawningAfterLoad)
else if (pawn.story.bodyType == BodyTypeDefOf.Thin)
BodyWeight = GenMath.RoundTo(Rand.Range(-30, -10), 5);
else if (pawn.story.bodyType == BodyTypeDefOf.Female)
BodyWeight = GenMath.RoundTo(Rand.Range(-10, 0), 5);
BodyWeight = GenMath.RoundTo(Rand.Range(-15, 5), 5);
BodyWeight = Mathf.Clamp(BodyWeight, -30, 50);
}
if (BodyWeight == -39)
Expand Down
2 changes: 1 addition & 1 deletion Source/SyrTraits/IndividualityCardUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void DrawIndividualityCard(Rect rect, Pawn pawn)
num += rect3.height + 2f;
}
Rect rect4 = new Rect(20f, num, rect.width - 20f, 24f);
Widgets.Label(rect4, "BodyWeight".Translate() + ": " + (comp.BodyWeight + 70) + " kg (" + pawn.story.bodyType + ")");
Widgets.Label(rect4, "BodyWeight".Translate() + ": " + ((comp.BodyWeight + 70) * pawn.BodySize) + " kg (" + pawn.story.bodyType + ")");
TipSignal BodyWeightTooltip = "BodyWeightTooltip".Translate();
TooltipHandler.TipRegion(rect4, BodyWeightTooltip);
if (Mouse.IsOver(rect4))
Expand Down
2 changes: 1 addition & 1 deletion Source/SyrTraits/InteractionWorker_RomanceAttemptPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace SyrTraits
[HarmonyPatch(typeof(InteractionWorker_RomanceAttempt), "RandomSelectionWeight")]
public static class InteractionWorker_RomanceAttemptPatch
{
[HarmonyPriority(Priority.Last)]
[HarmonyPriority(Priority.VeryLow)]
[HarmonyPostfix]
public static void RandomSelectionWeight_Postfix(ref float __result, Pawn initiator, Pawn recipient)
{
Expand Down
9 changes: 6 additions & 3 deletions Source/SyrTraits/ThoughtWorker_DisfiguredPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ public static class ThoughtWorker_DisfiguredPatch
[HarmonyPostfix]
public static void ThoughtWorker_Disfigured_Postfix(ref ThoughtState __result, Pawn pawn, Pawn other)
{
int num = other.story.traits.DegreeOfTrait(TraitDefOf.Beauty);
if (num == -1 || num == -2)
if (other?.story?.traits != null && other.story.traits.HasTrait(TraitDefOf.Beauty))
{
__result = false;
int num = other.story.traits.DegreeOfTrait(TraitDefOf.Beauty);
if (num == -1 || num == -2)
{
__result = false;
}
}
}
}
Expand Down
Binary file not shown.
Binary file modified Source/SyrTraits/obj/Release/SyrTraits.dll
Binary file not shown.

0 comments on commit cb1042b

Please sign in to comment.