This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Source/VFECore/AnimalBehaviours/Comps/CompNoTamingDecay.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Verse; | ||
using System.Linq; | ||
using RimWorld; | ||
|
||
namespace AnimalBehaviours | ||
{ | ||
public class CompNoTamingDecay : ThingComp | ||
{ | ||
|
||
|
||
public CompProperties_NoTamingDecay Props | ||
{ | ||
get | ||
{ | ||
return (CompProperties_NoTamingDecay)this.props; | ||
} | ||
} | ||
|
||
|
||
public override void PostSpawnSetup(bool respawningAfterLoad) | ||
{ | ||
|
||
AnimalCollectionClass.AddNoTamingDecayAnimalToList(this.parent.def); | ||
|
||
|
||
} | ||
|
||
|
||
} | ||
} | ||
|
17 changes: 17 additions & 0 deletions
17
Source/VFECore/AnimalBehaviours/Comps/CompProperties/CompProperties_NoTamingDecay.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
| ||
using Verse; | ||
|
||
namespace AnimalBehaviours | ||
{ | ||
public class CompProperties_NoTamingDecay : CompProperties | ||
{ | ||
|
||
|
||
public CompProperties_NoTamingDecay() | ||
{ | ||
this.compClass = typeof(CompNoTamingDecay); | ||
} | ||
|
||
|
||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Source/VFECore/AnimalBehaviours/Harmony/TrainableUtility_TamenessCanDecay_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using HarmonyLib; | ||
using RimWorld; | ||
using System.Reflection; | ||
using Verse; | ||
using System.Reflection.Emit; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using System.Linq; | ||
using System; | ||
using Verse.AI; | ||
using RimWorld.Planet; | ||
|
||
|
||
|
||
namespace AnimalBehaviours | ||
{ | ||
|
||
|
||
[HarmonyPatch(typeof(TrainableUtility))] | ||
[HarmonyPatch("TamenessCanDecay")] | ||
|
||
public static class VanillaExpandedFramework_TrainableUtility_TamenessCanDecay_Patch | ||
{ | ||
[HarmonyPrefix] | ||
public static bool RemoveTamenessDecayCheck(ThingDef def) | ||
|
||
{ | ||
if (AnimalCollectionClass.IsNoTamingDecayAnimal(def)) | ||
{ | ||
return false; | ||
|
||
} | ||
else return true; | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters