Skip to content

Commit

Permalink
Children now inherit the settings that determine whether they are mou…
Browse files Browse the repository at this point in the history
…ntable by anyone/their master from their parent on birth
  • Loading branch information
rheirman committed Aug 6, 2021
1 parent 190c29b commit 0c046b7
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 1 deletion.
Binary file modified 1.3/Assemblies/GiddyUpCore.dll
Binary file not shown.
1 change: 1 addition & 0 deletions 1.3/Source/Giddy-up-Core/GiddyUpCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<Compile Include="Harmony\ArmorUtility.cs" />
<Compile Include="Harmony\GenDraw_DrawAimPie.cs" />
<Compile Include="Harmony\PawnUIOverlay.cs" />
<Compile Include="Harmony\PawnUtility.cs" />
<Compile Include="Harmony\Pawn_RotationTracker.cs" />
<Compile Include="Harmony\Projectile_Launch.cs" />
<Compile Include="Harmony\SelfDefenceUtility.cs" />
Expand Down
26 changes: 26 additions & 0 deletions 1.3/Source/Giddy-up-Core/Harmony/PawnUtility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using HarmonyLib;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace GiddyUpCore.Harmony
{
[HarmonyPatch(typeof(PawnUtility), "TrySpawnHatchedOrBornPawn")]
class PawnUtility_TrySpawnHatchedOrBornPawn
{
static void Postfix(Pawn pawn, Thing motherOrEgg)
{
if(motherOrEgg is Pawn mother)
{
var pawnData = Base.Instance.GetExtendedDataStorage().GetExtendedDataFor(pawn);
var motherData = Base.Instance.GetExtendedDataStorage().GetExtendedDataFor(mother);
pawnData.mountableByAnyone = motherData.mountableByAnyone;
pawnData.mountableByMaster = motherData.mountableByMaster;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b4e9e998f0e259346ad24cc5b2e8e6dd8a59cd27
9f3d77dc20ee72d3a1001e7b0c325a2173691521
Binary file not shown.
Binary file modified 1.3/Source/Giddy-up-Core/obj/Debug/GiddyUpCore.dll
Binary file not shown.
22 changes: 22 additions & 0 deletions News/UpdateFeatures.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,26 @@ Cheers,
Roolo
</content>
</HugsLib.UpdateFeatureDef>
<HugsLib.UpdateFeatureDef ParentName="UpdateFeatureBase_GiddyUpCore">
<defName>GiddyUpCore_4_1_1</defName>
<assemblyVersion>4.1.1</assemblyVersion>
<content>
I've gotten some useful feedback after the latest updates, so I've implemented the following changes/fixes:
Ride and roll:
- Changed: non-pennable mounts will now also be brought to the nearest pen when entering a forbid riding area.
- Pawns will always prioritize mounting the mount that is following them to prevent the mount from being left behind.
- Changed: The tame job is now done mounted to prevent the mount from being left roaming.
- Children now inherit the settings that determine whether they are mountable by anyone/their master from their parent on birth. (only works for mammals though)

Caravan:
- Fixed: Issue with caravan mounts being roped when leaving the map.

As you might know I'm not really active as modder anymore, but I do intend to keep all my mods alive. The reason I'm no longer active is because I'm working on my own game: &lt;color=orange&gt;&lt;b&gt;Cursed Crew&lt;/b&gt;&lt;/color&gt;. If you like my work, be sure to check it out! You can find a link to Cursed Crew the mod page of every mod I created.

Enjoy the update!

Cheers,
Roolo
</content>
</HugsLib.UpdateFeatureDef>
</Defs>

0 comments on commit 0c046b7

Please sign in to comment.