diff --git a/1.3/Assemblies/Vampire.dll b/1.3/Assemblies/Vampire.dll index bf81399..ac1ebd1 100644 Binary files a/1.3/Assemblies/Vampire.dll and b/1.3/Assemblies/Vampire.dll differ diff --git a/1.3/Defs/_BloodNeedExceptions/BloodNeedExceptions.xml b/1.3/Defs/_BloodNeedExceptions/BloodNeedExceptions.xml new file mode 100644 index 0000000..7227553 --- /dev/null +++ b/1.3/Defs/_BloodNeedExceptions/BloodNeedExceptions.xml @@ -0,0 +1,25 @@ + + + + + + + ExceptionsList + + Put Thing Classes and Race Defs (ThingDefs) for things that you do not want to have blood meters in this exception list definition. + +
  • ProjectJedi.PawnGhost
  • +
    + +
  • Mech_Centipede
  • +
  • Mech_Lancer
  • +
  • Mech_Scyther
  • +
  • Mech_Pikeman
  • +
  • Mech_Termite
  • +
  • Megascarab
  • +
  • Spelopede
  • +
  • Megaspider
  • +
    +
    + +
    \ No newline at end of file diff --git a/About/About.xml b/About/About.xml index 01cca06..3c6ae1c 100644 --- a/About/About.xml +++ b/About/About.xml @@ -28,7 +28,7 @@
  • jecrell.jecstools
  • Dubwise.DubsBadHygiene
  • - 1.23.0.2 (08-09-2021) + 1.23.1.0 (08-17-2021) Adds vampires to RimWorld. @@ -49,6 +49,10 @@ Michael Cailler, Jigsawjohn , Daniel Schott, Penelope Charli Whitman, Jerome Gon ======================== Changelog ======================== +1.23.1.0 (08-17-2021) +======================== +Added an exceptions xml file for controlling what races do not provide blood + 1.23.0.2 (08-09-2021) ======================== Small fix to prevent red errors relating to Advanced Animal Framework diff --git a/About/Changelog.txt b/About/Changelog.txt index 0a7e05a..b983846 100644 --- a/About/Changelog.txt +++ b/About/Changelog.txt @@ -1,3 +1,7 @@ +1.23.1.0 (08-17-2021) +======================== +Added an exceptions xml file for controlling what races do not provide blood + 1.23.0.2 (08-09-2021) ======================== Small fix to prevent red errors relating to Advanced Animal Framework diff --git a/About/Manifest.xml b/About/Manifest.xml index ba832aa..69712dc 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@  RimOfMadness-Vampires - 1.23.0.2 + 1.23.1.0
  • jecrell.jecstools
  • diff --git a/About/Version.txt b/About/Version.txt index 0854944..a568db0 100644 --- a/About/Version.txt +++ b/About/Version.txt @@ -1 +1 @@ -1.23.0.2 +1.23.1.0 diff --git a/Source/Vampires/Defs/BloodNeedExceptions.cs b/Source/Vampires/Defs/BloodNeedExceptions.cs new file mode 100644 index 0000000..756b22a --- /dev/null +++ b/Source/Vampires/Defs/BloodNeedExceptions.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using Verse; +using UnityEngine; + +namespace Vampire +{ + public class BloodNeedExceptions : Def + { + public List thingClasses = null; + public List raceThingDefs = null; + } +} diff --git a/Source/Vampires/HarmonyPatches/HarmonyPatches_Needs.cs b/Source/Vampires/HarmonyPatches/HarmonyPatches_Needs.cs index 5cc824d..218468d 100644 --- a/Source/Vampires/HarmonyPatches/HarmonyPatches_Needs.cs +++ b/Source/Vampires/HarmonyPatches/HarmonyPatches_Needs.cs @@ -62,10 +62,25 @@ public static void ShouldHaveNeed_Vamp(Pawn_NeedsTracker __instance, NeedDef nd, string typeString = p.GetType().ToString(); //////Log.Message(typeString); - if (p.GetType().ToString() == "ProjectJedi.PawnGhost") + /// + if (DefDatabase.GetNamedSilentFail("ExceptionsList") is Vampire.BloodNeedExceptions exceptionList) { - __result = false; - return; + foreach (string s in exceptionList.thingClasses) + { + if (p?.GetType()?.ToString() == s) + { + __result = false; + return; + } + } + foreach (ThingDef d in exceptionList.raceThingDefs) + { + if (p?.def == d) + { + __result = false; + return; + } + } } } } diff --git a/Source/Vampires/Vampire.csproj b/Source/Vampires/Vampire.csproj index ee520d2..00db022 100644 --- a/Source/Vampires/Vampire.csproj +++ b/Source/Vampires/Vampire.csproj @@ -49,7 +49,7 @@ False - ..\..\..\..\BadHygiene.dll + ..\..\..\BadHygiene.dll False @@ -73,6 +73,7 @@ +