Skip to content

Commit

Permalink
Merge pull request #101 from Rim-Of-Madness-Team/dev
Browse files Browse the repository at this point in the history
1.28.0.2 Update; Elder Things Fangs fix
  • Loading branch information
jecrell authored Nov 25, 2022
2 parents 3f426b9 + 4de8010 commit e72dc2b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 11 deletions.
Binary file modified 1.4/Assemblies/Vampire.dll
Binary file not shown.
6 changes: 5 additions & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<li>jecrell.jecstools</li>
<li>Dubwise.DubsBadHygiene</li>
</loadAfter>
<description>1.28.0.1 (11-17-2022)
<description>1.28.0.2 (11-25-2022)

Adds vampires to RimWorld.

Expand All @@ -50,6 +50,10 @@ Darcilyn Lynds (darci.andel), Luke Salinas, RainerWingel , Noisy Koi, Lea Stanna
========================
Changelog
========================
1.28.0.2 (11-25-2022)
========================
Elder Thing vampires no longer show errors when contracting vampirism

1.28.0.1 (11-17-2022)
========================
Biotech users can feed vampires hemogen packs, fixed job giver bug, fixed translation bug
Expand Down
4 changes: 4 additions & 0 deletions About/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.28.0.2 (11-25-2022)
========================
Elder Thing vampires no longer show errors when contracting vampirism

1.28.0.1 (11-17-2022)
========================
Biotech users can feed vampires hemogen packs, fixed job giver bug, fixed translation bug
Expand Down
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>RimOfMadness-Vampires</identifier>
<version>1.28.0.1</version>
<version>1.28.0.2</version>
<dependencies>
<li>jecrell.jecstools</li>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion About/Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.28.0.1
1.28.0.2
25 changes: 22 additions & 3 deletions Source/Code/Utilities/VampireGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,28 @@ public static bool TryGiveVampirismHediffFromSire(Pawn pawn, Pawn sire, bool fir

public static void AddFangsHediff(Pawn pawn)
{
var tongue = pawn.RaceProps.body.GetPartsWithDef(DefDatabase<BodyPartDef>.GetNamed("Tongue")).FirstOrDefault();
pawn.health.RestorePart(tongue);
pawn.health.AddHediff(pawn.VampComp().Bloodline.fangsHediff, tongue);
if (pawn != null)
{
if (pawn.RaceProps?.body?.GetPartsWithDef(DefDatabase<BodyPartDef>.
GetNamed("Tongue"))?.FirstOrDefault() is { } tongue)
{
pawn.health.RestorePart(tongue);
pawn.health.AddHediff(pawn.VampComp().Bloodline.fangsHediff, tongue);
}
//Elder things have an 'eating tube' instead of a tongue
else if (pawn.def.defName == "Alien_ElderThing_Race_Standard")
{
if (pawn.RaceProps?.body?.GetPartsWithDef(DefDatabase<BodyPartDef>.
GetNamed("ElderThing_EatingTube"))?.FirstOrDefault() is { } eatingTube)
{
pawn.health.RestorePart(eatingTube);
pawn.health.AddHediff(pawn.VampComp().Bloodline.fangsHediff, eatingTube);
}
else Log.Error("ROM Vampires Error - Unable to add fangs to Elder Thing: No '??? body part record for " + pawn.LabelShort);
}
else Log.Error("ROM Vampires Error - Unable to add fangs: No 'tongue' body part record for " + pawn.LabelShort);
}
else Log.Error("ROM Vampires Error - Unable to add fangs: Attempted to add fangs to non-existent pawn");
}

//public static void AddTongueHediff(Pawn pawn)
Expand Down
10 changes: 5 additions & 5 deletions updateinfo
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
==============================

Rim of Madness - Vampires Update
v1.28.0.0 (10-29-2022)
v1.28.0.2 (11-25-2022)
====================

Updates for RimWorld 1.4; Fixes bed coffin coloration issues; Neck wounds are cleaned after biting
Elder Thing vampires no longer show errors when contracting vampirism
--------------------

Download now on...
Expand All @@ -25,9 +25,9 @@ Discuss the mod on...
[img width=260]https://raw.githubusercontent.com/Rim-Of-Madness-Team/Rim-of-Madness---Vampires/master/About/Preview.png[/img]
[hr]
[b]Rim of Madness - Vampires
Version: 1.28.0.0
Updated: 10-29-2022
Description: [color=orange]Updates for RimWorld 1.4; Fixes bed coffin coloration issues; Neck wounds are cleaned after biting[/color]
Version: 1.28.0.2
Updated: 11-25-2022
Description: [color=orange]Elder Thing vampires no longer show errors when contracting vampirism[/color]
[hr]
[b]Download now on...[/b]
[url=https://www.patreon.com/posts/73953554]Patreon[/url]
Expand Down

0 comments on commit e72dc2b

Please sign in to comment.