First pass at RW 1.5
A first pass at RW 1.5. This PR doesn't address new 1.5 or Anomaly features.
Dialog_BeginRitualwas refactored and there's a new generic typePawnRoleSelectionWidgetBase<RoleType>which needs patching. Not sure how to handle it so for now ritual handling inSyncDelegatesis commented outOutfitandFoodRestrictionare nowApparelPolicyandFoodPolicy, subclasses of a new classPolicyISlotGroups are missing a sync worker for now- There were some signature changes and some code was moved around
- Dev mode stuff was moved to a new namespace
LudeonTK - Todos are marked with a
// todo for 1.5comment
The commit message has some more details.
@SokyranTheDragon do you remember why Dialog_BeginRitual.CannotAssignReason needed an RNG patch in MultiplayerStatic?
@Zetrith I believe Dialog_BeginRitual.CannotAssignReason and RitualRoleAssignments.CanEverSpectate both received the RNG patch due to #306. Basically both can end up calling PreceptComp_UnwillingToDo_Chance.MemberWillingToDo, which calls Rand.Value in interface, causing a desync.
I've opted into not patching PreceptComp_UnwillingToDo_Chance.MemberWillingToDo, as there could have been other precepts (in future update or modded precepts) that would had the same issue.
There are 2 other methods that could have been patched as well (RitualSpectatorFilter_WillWitnessExecution.Allowed and Ideo.MemberWillingToDo), but I believe that I've patched code that will run only in interface (as opposed to other places that could run from either interface or simulation, as simulation doesn't need the RNG patch to work).
diff --git a/Source/Client/Debug/DebugActions.cs b/Source/Client/Debug/DebugActions.cs
index d363131..638bd90 100644
--- a/Source/Client/Debug/DebugActions.cs
+++ b/Source/Client/Debug/DebugActions.cs
@@ -302,9 +302,9 @@ namespace Multiplayer.Client
// We only care about transpiled methods that aren't part of MP.
var query = Multiplayer.harmony.GetPatchedMethods()
- .Where(m => !m.DeclaringType.Namespace.StartsWith("Multiplayer") &&
- !Harmony.GetPatchInfo(m).Transpilers.NullOrEmpty());
-
+ .Where(m => !(m.DeclaringType.Namespace?.StartsWith("Multiplayer") ?? false)
+ && !Harmony.GetPatchInfo(m).Transpilers.NullOrEmpty());
+
foreach (var method in query) {
builder.Append(GetMethodHash(method));
builder.Append(" ");
This should get the hash dump working to get us the list of changes.
List of changed methods that new review so far, there are some that are missing/extra due to renames:
- [x] RimWorld.Pawn_DraftController:set_Drafted
- [x] RimWorld.Pawn_OutfitTracker:set_CurrentApparelPolicy
- [x] RimWorld.Pawn_FoodRestrictionTracker:set_CurrentFoodPolicy
- [x] RimWorld.Pawn_PlayerSettings:set_AreaRestrictionInPawnCurrentMap
- [x] RimWorld.Pawn_PlayerSettings:set_Master
- [x] RimWorld.StorageSettings:set_Priority
- [x] Verse.AI.Pawn_JobTracker:TryTakeOrderedJob
- [x] RimWorld.Bill_Production:SetStoreMode
- [x] RimWorld.Bill_Production:SetIncludeGroup
- [x] RimWorld.Area_Allowed:set_RenamableLabel
- [x] RimWorld.MainTabWindow_Research:DoBeginResearch
- [x] RimWorld.OutfitDatabase:MakeNewOutfit
- [x] RimWorld.OutfitDatabase:TryDelete
- [x] RimWorld.FoodRestrictionDatabase:MakeNewFoodRestriction
- [x] RimWorld.FoodRestrictionDatabase:TryDelete
- [x] RimWorld.Building_Bed:set_Medical
- [x] RimWorld.CompAssignableToPawn_Throne:TryUnassignPawn
- [ ] RimWorld.PawnColumnWorker_Designator:SetValue
- [ ] RimWorld.PawnColumnWorker_Sterilize:SetValue
- [x] RimWorld.Building_Grave:EjectContents
- [x] RimWorld.Building_AncientCryptosleepCasket:EjectContents
- [x] RimWorld.Building_Crate:EjectContents
- [x] RimWorld.CompPower:TryManualReconnect
- [x] RimWorld.CompTempControl:InterfaceChangeTargetTemperature
- [x] RimWorld.Planet.CaravanFormingUtility:RemovePawnFromCaravan
- [x] RimWorld.Planet.CaravanFormingUtility:LateJoinFormingCaravan
- [x] RimWorld.Planet.SettleInEmptyTileUtility:Settle
- [x] RimWorld.Planet.SettleInExistingMapUtility:Settle
- [x] RimWorld.Planet.SettlementUtility:Attack
- [ ] Verse.Verb_LaunchProjectileStaticOneUse:OrderForceTarget
- [ ] RimWorld.RoyalTitlePermitWorker_CallLaborers:OrderForceTarget
- [ ] RimWorld.Building_VoidMonolith:OrderForceTarget
- [ ] RimWorld.CompInteractable:OrderForceTarget
- [ ] RimWorld.CompAnalyzable:OrderForceTarget
- [ ] RimWorld.CompDisableUnnaturalCorpse:OrderForceTarget
- [ ] RimWorld.CompGoldenCube:OrderForceTarget
- [ ] RimWorld.CompLabyrinthDoor:OrderForceTarget
- [ ] RimWorld.CompNociosphere:OrderForceTarget
- [ ] RimWorld.CompObeliskDeactivationInteractor:OrderForceTarget
- [ ] RimWorld.CompUsable:OrderForceTarget
- [ ] RimWorld.CompTargetable:OrderForceTarget
- [ ] RimWorld.RoyalTitlePermitWorker_CallLaborers:CallLaborers
- [x] RimWorld.IdeoDevelopmentUtility:ApplyChangesToIdeo
- [x] RimWorld.CompPawnSpawnOnWakeup:Spawn
- [x] RimWorld.CompDamageOnInterval:Damage
- [x] RimWorld.CompDissolution:<CompGetGizmosExtra>b__28_2
- [x] RimWorld.CompExplosive:<CompGetGizmosExtra>b__32_0
- [x] RimWorld.CompHackable:<CompGetGizmosExtra>b__22_0
- [x] RimWorld.CompHackable:<CompGetGizmosExtra>b__22_1
- [x] RimWorld.CompPollutionPump:Pump
- [ ] RimWorld.CompApparelVerbOwner_Charged:<CompGetWornGizmosExtra>b__15_0
- [x] RimWorld.CompEquippableAbilityReloadable:<CompGetEquippedGizmosExtra>b__21_0
- [x] Verse.Pawn:<GetGizmos>b__293_0
- [x] Verse.Pawn:<GetGizmos>b__293_1
- [x] Verse.Pawn:<GetGizmos>b__293_2
- [x] Verse.Pawn:<GetGizmos>b__293_3
- [x] Verse.Pawn:<GetGizmos>b__293_6
- [x] Verse.Pawn:<GetGizmos>b__293_7
- [x] RimWorld.CompCanBeDormant:WakeUp
- [x] RimWorld.Blueprint_Build:ChangeStyleOfAllSelected
- [x] RimWorld.CompTurretGun:<CompGetGizmosExtra>b__37_1
- [x] RimWorld.Building_GeneExtractor:<GetGizmos>b__38_2
- [x] RimWorld.Building_GeneExtractor:Finish
- [x] RimWorld.Building_GrowthVat:<GetGizmos>b__85_6
- [x] Verse.Hediff_VatLearning:Learn
- [x] RimWorld.Building_MechGestator:<GetGizmos>b__32_0
- [x] RimWorld.CompMechCarrier:TrySpawnPawns
- [x] RimWorld.CompMechPowerCell:<CompGetGizmosExtra>b__11_0
- [x] RimWorld.CompMechPowerCell:<CompGetGizmosExtra>b__11_1
- [x] RimWorld.CompGenepackContainer:<CompGetGizmosExtra>b__28_1
- [x] RimWorld.HealthCardUtility:CreateSurgeryBill
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass19_0:<GotoLocationOption>b__0
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_2:<AddHumanlikeOrders>b__1
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_7:<AddHumanlikeOrders>b__8
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_7:<AddHumanlikeOrders>b__7
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_10:<AddHumanlikeOrders>b__9
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_0:<AddHumanlikeOrders>b__10
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_11:<AddHumanlikeOrders>b__12
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass11_29:<AddHumanlikeOrders>b__42
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass10_6:<AddDraftedOrders>b__3
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass10_7:<AddDraftedOrders>b__4
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass10_8:<AddDraftedOrders>b__5
- [ ] RimWorld.FloatMenuMakerMap+<>c__DisplayClass10_10:<AddDraftedOrders>b__6
- [x] RimWorld.ITab_Bills+<>c__DisplayClass10_3:<FillTab>b__2
- [x] RimWorld.Pawn_PlayerSettings:<GetGizmos>b__34_1
- [x] RimWorld.Building_TurretGun:<GetGizmos>b__70_2
- [x] RimWorld.Building_Door:<GetGizmos>b__69_1
- [x] Verse.PriorityWork:<GetGizmos>b__17_0
- [x] RimWorld.Building_TurretGun:<GetGizmos>b__70_1
- [x] Verse.UnfinishedThing:<GetGizmos>b__28_0
- [x] RimWorld.CompTempControl:<CompGetGizmosExtra>b__11_2
- [x] RimWorld.CompRefuelable:<CompGetGizmosExtra>b__44_1
- [x] RimWorld.CompRefuelable:<CompGetGizmosExtra>b__44_2
- [x] RimWorld.CompRefuelable:<CompGetGizmosExtra>b__44_3
- [x] RimWorld.CompRefuelable:<CompGetGizmosExtra>b__44_4
- [x] RimWorld.CompRefuelable:<CompGetGizmosExtra>b__44_5
- [x] RimWorld.CompTreeConnection:<CompGetGizmosExtra>b__73_1
- [x] RimWorld.CompTreeConnection:<CompGetGizmosExtra>b__73_2
- [x] RimWorld.CompTreeConnection:<CompGetGizmosExtra>b__73_3
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_1
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_3
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_5
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_6
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_7
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_8
- [x] RimWorld.CompBiosculpterPod:<CompGetGizmosExtra>b__91_9
- [x] RimWorld.ITab_Pawn_Visitor+<>c__DisplayClass8_1:<DoPrisonerTab>b__5
- [x] RimWorld.ITab_Pawn_Visitor+<>c__DisplayClass7_0:<DoSlaveTab>b__6
- [x] RimWorld.CompSendSignalOnCountdown:<CompGetGizmosExtra>b__7_0
- [x] RimWorld.CompRechargeable:<CompGetGizmosExtra>b__11_0
- [x] RimWorld.Ability+<>c__DisplayClass82_0:<QueueCastingJob>b__0
- [x] RimWorld.Ability+<>c__DisplayClass84_0:<QueueCastingJob>b__0
- [x] RimWorld.CompInteractableRocketswarmLauncher+<>c__DisplayClass4_0:<TargetLocation>b__0
- [ ] MechanitorUtility+<>c__DisplayClass21_1:<GetMechGizmos>b__1
- [ ] MechanitorUtility+<>c__DisplayClass21_0:<GetMechGizmos>b__2
- [x] Verse.CompGlower+<>c__DisplayClass31_1:<CompGetGizmosExtra>b__2
- [x] Verse.CompGlower+<>c__DisplayClass31_2:<CompGetGizmosExtra>b__3
- [x] RimWorld.StorageGroupUtility+<>c__DisplayClass5_0:<StorageGroupMemberGizmos>b__2
- [x] RimWorld.StorageGroupUtility+<>c__DisplayClass5_0:<StorageGroupMemberGizmos>b__0
- [x] RimWorld.HumanOvum:<GetGizmos>b__3_1
- [x] Verse.Pawn+<>c__DisplayClass293_0:<GetGizmos>b__5
- [x] RimWorld.LordJob_Ritual:Cancel
- [x] RimWorld.LordJob_Ritual+<>c__DisplayClass104_0:<GetPawnGizmos>b__0
- [x] RimWorld.LordJob_BestowingCeremony+<>c__DisplayClass45_0:<GetPawnGizmos>b__2
- [x] RimWorld.LordJob_BestowingCeremony+<>c__DisplayClass45_0:<GetPawnGizmos>b__0
- [x] RimWorld.LordToil_BestowingCeremony_Wait:<ExtraFloatMenuOptions>b__7_0
- [x] RimWorld.Command_BestowerCeremony:ProcessInput
- [x] RimWorld.Dialog_BeginRitual+<>c__DisplayClass52_0:<DrawRoleSelection>b__0
- [x] RimWorld.Dialog_BeginRitual+<>c__DisplayClass52_2:<DrawRoleSelection>b__3
- [x] RimWorld.Dialog_BeginRitual+<>c__DisplayClass52_1:<DrawRoleSelection>b__4
- [x] RimWorld.RitualRoleAssignments:TryAssignSpectate
- [x] RimWorld.ChoiceLetter_AcceptJoiner:<get_Choices>b__7_0
- [x] RimWorld.ChoiceLetter_AcceptJoiner:<get_Choices>b__7_1
- [x] RimWorld.ChoiceLetter_GrowthMoment:MakeChoices
- [x] RimWorld.GeneUIUtility+<>c__DisplayClass25_0:<DoDebugButton>b__4
- [x] RimWorld.GeneUIUtility+<>c__DisplayClass25_0:<DoDebugButton>b__5
- [x] Verse.DebugToolsPawns+<>c__DisplayClass55_0:<Options_SetPrimary>b__0
- [x] Verse.DebugToolsPawns+<>c__DisplayClass55_1:<Options_SetPrimary>b__3
- [x] Verse.DebugToolsPawns+<>c__DisplayClass54_0:<Options_Wear>b__0
- [x] Verse.DebugToolsPawns+<>c__DisplayClass54_1:<Options_Wear>b__3
- [x] Verse.DebugToolsPawns+<>c__DisplayClass56_0:<Options_GiveToInventory>b__0
- [x] Verse.DebugToolsPawns+<>c__DisplayClass56_1:<Options_GiveToInventory>b__3
- [x] Verse.DebugToolsPawns+<>c__DisplayClass53_0:<PawnGearDevOptions>b__3
- [x] Verse.DebugTools_Health+<>c__DisplayClass6_0:<Options_Hediff_BodyParts>b__0
- [x] Verse.DebugTools_Health+<>c__DisplayClass6_1:<Options_Hediff_BodyParts>b__2
- [ ] RimWorld.GenConstruct:CanPlaceBlueprintAt
- [ ] Verse.GenSpawn:WipeAndRefundExistingThings
- [ ] Verse.GenSpawn:SpawnBuildingAsPossible
- [ ] RimWorld.WorkGiver_ConstructDeliverResourcesToBlueprints:NoCostFrameMakeJobFor
- [ ] Verse.Thing:DeSpawn
- [ ] Verse.ListerThings:Add
- [ ] Verse.AI.Pawn_JobTracker:StartJob
- [ ] Verse.Game:LoadGame
- [ ] Verse.GenSpawn:Spawn
- [ ] Verse.Window:InnerWindowOnGUI
- [ ] RimWorld.Dialog_Trade:DoWindowContents
- [ ] RimWorld.Page_ModsConfig:DoWindowContents
- [ ] Verse.GizmoGridDrawer:DrawGizmoGrid
- [ ] Verse.Pawn:get_IsColonist
- [ ] RimWorld.Ideo:RecacheColonistBelieverCount
- [ ] Verse.MapPawns:get_AnyPawnBlockingMapRemoval
- [ ] Verse.LetterStack:ReceiveLetter
- [ ] RimWorld.Dialog_BeginRitual:.ctor
- [ ] RimWorld.Apparel:get_WornGraphicPath
- [ ] RimWorld.CharacterCardUtility:DoTopStack
- [ ] RimWorld.Pawn_GeneTracker:Notify_GenesChanged
- [ ] RimWorld.SituationalThoughtHandler:Notify_SituationalThoughtsDirty
- [ ] RimWorld.StatWorker:GetValue
- [ ] Verse.Thing:IDNumberFromThingID
For reference: hashes_14.txt hashes_15.txt
I notice a lot of the hash changes are due to the renames themselves, doesn't affect the patches so far, at least I have yet to find a transpiler issue. I'll continue later, feel free to mark them as checked.
I'm finishing up with Yayo's Animation update, will check the PR once done with that.
Anyway, one thing that's on my mind - did the WealthWatcher issue get resolved/is the MP fix for it still needed? If it's still an issue it may be worth reporting on RW development Discord, especially since devs are rather active now, fixing everything up before official 1.5 release.
On that same note - were there any other vanilla bug fixes we implemented that may have gotten fixed in 1.5? Or was that the only one?
Anyway, one thing that's on my mind - did the
WealthWatcherissue get resolved/is the MP fix for it still needed? If it's still an issue it may be worth reporting on RW development Discord, especially since devs are rather active now, fixing everything up before official 1.5 release.
It was fixed in vanilla and the patch was removed in 023cbb4
Yup, got it. I just wanted to make sure.
I've partially went through the list @notfood posted. I've marked several of the methods that are (or should be almost definitely) safe as-is. Here's some additional info/findings:
A big portion of the methods had no visible changes when comparing 1.4 and 1.5, or had minor changes (like methods they call having extra arguments, which were filled by default values).
There were some that had slight changes, but won't affect syncing. For example, the call to RimWorld.CompAssignableToPawn_Throne:TryUnassignPawn keeps track of the pawn whose throne it was - but only if the throne was uninstalled (not relevant to our sync call).
Methods which may open confirmation dialogs (somewhat unsafe to sync, will need some extra work):
RimWorld.PawnColumnWorker_Designator:SetValue
RimWorld.PawnColumnWorker_Sterilize:SetValue
The methods in RimWorld.FloatMenuMakerMap will need to be looked into a bit deeper, as that class is just a mess.
I've skipped all ITargetingSource:OrderForceTarget calls, as basically all of them are new methods. Some of the old code will need different handling (like the permit for calling laborer).
Additional notes/potential changes:
RimWorld.CompTempControl now has the target temperature stored as property. Instead of syncing the lambda, we can now sync RimWorld.CompTempControl:set_TargetTemperature, which would allow us to not bother syncing RimWorld.CompTempControl:b__11_2. We could also remove syncing of RimWorld.CompTempControl:InterfaceChangeTargetTemperature, but it would result in 2 sync method calls each time the temperature is changed (change offset, followed by clamping the value).
RimWorld.CompEquippableAbilityReloadable (previously RimWorld.CompReloadable in 1.4) - RimWorld.CompEquippableAbilityReloadable:b__21_0 syncing can be replaced with syncing either RimWorld.CompEquippableAbilityReloadable:set_RemainingCharges or RimWorld.Ability:set_RemainingCharges.
RimWorld.CompCanBeDormant:WakeUp - also will need to sync RimWorld.CompCanBeDormant:ToSleep (dev mode)
RimWorld.Building_TurretGun:b__70_1 - could likely be replaced by just syncing RimWorld.Building_TurretGun:ResetForcedTarget