diff --git a/About/About.xml b/About/About.xml index c61240e..4c0f2cd 100644 --- a/About/About.xml +++ b/About/About.xml @@ -8,6 +8,7 @@
  • 1.2
  • 1.3
  • 1.4
  • +
  • 1.5
  • Heremeus.MedicalDissection Medical Dissection adds a dissection table to the game, allowing your doctors to train on human corpses. You can add the mod to an existing save. diff --git a/LoadFolders.xml b/LoadFolders.xml index 3dee349..41d1f94 100644 --- a/LoadFolders.xml +++ b/LoadFolders.xml @@ -19,4 +19,9 @@
  • Common
  • v1.4
  • + +
  • /
  • +
  • Common
  • +
  • v1.5
  • +
    \ No newline at end of file diff --git a/Source/HMDissection/Assembly-CSharp.dll b/Source/HMDissection/Assembly-CSharp.dll new file mode 100644 index 0000000..db6bf58 Binary files /dev/null and b/Source/HMDissection/Assembly-CSharp.dll differ diff --git a/Source/HMDissection/DissectionDefOf.cs b/Source/HMDissection/DissectionDefOf.cs index 0a4e6cf..ff8ebf8 100644 --- a/Source/HMDissection/DissectionDefOf.cs +++ b/Source/HMDissection/DissectionDefOf.cs @@ -20,8 +20,20 @@ public static class DissectionDefOf public static TaleDef DissectedEnemyWithoutPassionTale; public static RecipeDef DissectHumanRecipe; public static HediffDef DissectedHediff; - public static BodyPartDef Lung; public static JobDef DoDissectionBill; public static WorkTypeDef MedicalTraining; + + public static TraitDef Cannibal; + + public static BodyPartDef Arm; + public static BodyPartDef Leg; + public static BodyPartDef Jaw; + public static BodyPartDef Brain; + public static BodyPartDef Eye; + public static BodyPartDef Heart; + public static BodyPartDef Liver; + public static BodyPartDef Lung; + public static BodyPartDef Stomach; + } } diff --git a/Source/HMDissection/DissectionUtility.cs b/Source/HMDissection/DissectionUtility.cs index 1c50b2d..64af0a3 100644 --- a/Source/HMDissection/DissectionUtility.cs +++ b/Source/HMDissection/DissectionUtility.cs @@ -12,15 +12,15 @@ internal static class DissectionUtility { public static readonly HashSet DissectableBodyParts = new HashSet { - BodyPartDefOf.Arm, - BodyPartDefOf.Leg, - BodyPartDefOf.Jaw, - BodyPartDefOf.Brain, - BodyPartDefOf.Eye, - BodyPartDefOf.Heart, - BodyPartDefOf.Liver, + DissectionDefOf.Arm, + DissectionDefOf.Leg, + DissectionDefOf.Jaw, + DissectionDefOf.Brain, + DissectionDefOf.Eye, + DissectionDefOf.Heart, + DissectionDefOf.Liver, DissectionDefOf.Lung, - BodyPartDefOf.Stomach + DissectionDefOf.Stomach }; } } diff --git a/Source/HMDissection/HMDissection.csproj b/Source/HMDissection/HMDissection.csproj index 53170a4..7b074fc 100644 --- a/Source/HMDissection/HMDissection.csproj +++ b/Source/HMDissection/HMDissection.csproj @@ -17,7 +17,7 @@ false none false - ..\..\v1.4\Assemblies\ + ..\..\v1.5\Assemblies\ DEBUG;TRACE prompt 4 @@ -73,6 +73,11 @@ + + + + + call "$(ProjectDir)..\..\CopyModFolder.exe" diff --git a/Source/HMDissection/Toils_Dissection.cs b/Source/HMDissection/Toils_Dissection.cs index cefe6ce..07461f9 100644 --- a/Source/HMDissection/Toils_Dissection.cs +++ b/Source/HMDissection/Toils_Dissection.cs @@ -20,10 +20,8 @@ public static Toil StripCorpse(TargetIndex corpseIndex) Job curJob = actor.jobs.curJob; Thing thing = curJob.GetTarget(corpseIndex).Thing; Designation designation = actor.Map.designationManager.DesignationOn(thing, DesignationDefOf.Strip); - if (designation != null) - { - designation.Delete(); - } + designation?.Delete(); + if (thing is IStrippable strippable) { strippable.Strip(); @@ -132,11 +130,7 @@ public static Toil FinishRecipeAndStartStoringCorpse(TargetIndex corpseIndex) } else if (curJob.bill.GetStoreMode() == BillStoreModeDefOf.SpecificStockpile) { - StoreUtility.TryFindBestBetterStoreCellForIn(corpse, actor, actor.Map, StoragePriority.Unstored, actor.Faction, curJob.bill.GetStoreZone().slotGroup, out bestStoreCell, true); - } - else - { - Log.ErrorOnce("Unknown store mode", 9158246); + StoreUtility.TryFindBestBetterStoreCellForIn(corpse, actor, actor.Map, StoragePriority.Unstored, actor.Faction, curJob.bill.GetSlotGroup(), out bestStoreCell, true); } if (bestStoreCell.IsValid) @@ -250,7 +244,7 @@ private static void ApplyThoughts(Pawn worker, Corpse corpse) if (worker.needs.mood != null) { List thoughts = new List(); - if (worker.skills.GetSkill(SkillDefOf.Medicine).passion == Passion.None && !worker.story.traits.HasTrait(TraitDefOf.Cannibal) && !worker.story.traits.HasTrait(TraitDefOf.Psychopath)) + if (worker.skills.GetSkill(SkillDefOf.Medicine).passion == Passion.None && !worker.story.traits.HasTrait(DissectionDefOf.Cannibal) && !worker.story.traits.HasTrait(TraitDefOf.Psychopath)) { thoughts.Add(DissectionDefOf.DissectionNoPassion); } diff --git a/Source/HMDissection/UnityEngine.CoreModule.dll b/Source/HMDissection/UnityEngine.CoreModule.dll new file mode 100644 index 0000000..83b2b0a Binary files /dev/null and b/Source/HMDissection/UnityEngine.CoreModule.dll differ diff --git a/Source/HMDissection/UnityEngine.dll b/Source/HMDissection/UnityEngine.dll new file mode 100644 index 0000000..d45693c Binary files /dev/null and b/Source/HMDissection/UnityEngine.dll differ diff --git a/v1.5/Assemblies/HMDissection.dll b/v1.5/Assemblies/HMDissection.dll new file mode 100644 index 0000000..c38e205 Binary files /dev/null and b/v1.5/Assemblies/HMDissection.dll differ