Skip to content

Commit

Permalink
Fix issues due to _NewTemp methods, fixes heater/cooler temperature c…
Browse files Browse the repository at this point in the history
…hanges (#472)

This should fix changing heater/cooler temperature settings as well as giving the players time to rename stillborn pawns (normally would be 1 tick in this situation).
  • Loading branch information
SokyranTheDragon authored Jul 14, 2024
1 parent b23cbfa commit c0a7ef8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Client/Syncing/Game/SyncDelegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static void SetBabyName(ChoiceLetter_BabyBirth letter)
}

// If the baby ended up being stillborn, the timer to name them is 1 tick. This patch is here to allow players in MP to actually change their name.
[MpPostfix(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome))]
[MpPostfix(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome_NewTemp))]
static void GiveTimeToNameStillborn(Thing __result)
{
if (Multiplayer.Client != null && __result is Pawn pawn && pawn.health.hediffSet.HasHediff(HediffDefOf.Stillborn))
Expand Down
2 changes: 1 addition & 1 deletion Source/Client/Syncing/Game/SyncMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static void Init()
SyncMethod.Register(typeof(Building_SunLamp), nameof(Building_SunLamp.MakeMatchingGrowZone));
SyncMethod.Register(typeof(Building_ShipComputerCore), nameof(Building_ShipComputerCore.TryLaunch));
SyncMethod.Register(typeof(CompPower), nameof(CompPower.TryManualReconnect));
SyncMethod.Register(typeof(CompTempControl), nameof(CompTempControl.InterfaceChangeTargetTemperature));
SyncMethod.Register(typeof(CompTempControl), nameof(CompTempControl.InterfaceChangeTargetTemperature_NewTemp));
SyncMethod.Register(typeof(CompTransporter), nameof(CompTransporter.CancelLoad), Array.Empty<SyncType>());
SyncMethod.Register(typeof(MapPortal), nameof(MapPortal.CancelLoad));
SyncMethod.Register(typeof(StorageSettings), nameof(StorageSettings.CopyFrom)).ExposeParameter(0);
Expand Down

0 comments on commit c0a7ef8

Please sign in to comment.