Skip to content

Commit

Permalink
Synced ChoiceLetter_AcceptCreepJoiner (#477)
Browse files Browse the repository at this point in the history
It was synced by `PersistentDialog` syncing if the dialog was opened by interacting with the joiner pawn. However, it is not synced when interacted using the choice letter (which this PR fixes).

Preferably, we'd disable the dialog opening when interacted (and only allow through choice letter) since it opens it for all players, and is rather disruptive. However, I'm leaving it for another PR.
  • Loading branch information
SokyranTheDragon authored Jul 14, 2024
1 parent 8b74f83 commit ffa6080
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Client/Syncing/Game/SyncDelegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ private static void InitChoiceLetters()
// Growth moment for a child
CloseDialogsForExpiredLetters.RegisterDefaultLetterChoice(AccessTools.Method(typeof(SyncDelegates), nameof(PickRandomTraitAndPassions)), typeof(ChoiceLetter_GrowthMoment));
SyncMethod.Register(typeof(ChoiceLetter_GrowthMoment), nameof(ChoiceLetter_GrowthMoment.MakeChoices)).ExposeParameter(1);

// Creep joiner
SyncMethod.LambdaInGetter(typeof(ChoiceLetter_AcceptCreepJoiner), nameof(ChoiceLetter_AcceptCreepJoiner.Choices), 0); // Accept joiner
SyncMethod.LambdaInGetter(typeof(ChoiceLetter_AcceptCreepJoiner), nameof(ChoiceLetter_AcceptCreepJoiner.Choices), 1); // Arrest joiner
CloseDialogsForExpiredLetters.RegisterDefaultLetterChoice(
SyncMethod.LambdaInGetter(typeof(ChoiceLetter_AcceptCreepJoiner), nameof(ChoiceLetter_AcceptCreepJoiner.Choices), 2)
.method); // Reject joiner
}

static void SyncBabyToChildLetter(ChoiceLetter_BabyToChild letter)
Expand Down

0 comments on commit ffa6080

Please sign in to comment.