public void Update() { requestMovieEndEvent.Poll(); endMovieEvent.Poll(); festivalPropRemovalEvent.Poll(); demolishStableEvent.Poll(); requestSpouseSleepEvent.Poll(); requestPetWarpHomeEvent.Poll(); grangeMutex.Update(Game1.getOnlineFarmers()); demolishLock.Update(); buildLock.Update(Game1.getOnlineFarmers()); movieMutex.Update(Game1.getOnlineFarmers()); if (grangeMutex.IsLockHeld() && Game1.activeClickableMenu == null) { grangeMutex.ReleaseLock(); } foreach (ReadyCheck value in readyChecks.Values) { value.Update(); } if (Game1.IsMasterGame && proposals.Count() > 0) { proposals.Filter((KeyValuePair <long, Proposal> pair) => playerIsOnline(pair.Key) && playerIsOnline(pair.Value.receiver.UID)); } Proposal proposal = GetIncomingProposal(); if (proposal != null && proposal.canceled.Value) { proposal.cancelConfirmed.Value = true; } if (Game1.dialogueUp) { return; } if (proposal != null) { if (!handleIncomingProposal(proposal)) { proposal.responseMessageKey.Value = genderedKey("Strings\\UI:Proposal_PlayerBusy", Game1.player); proposal.response.Value = ProposalResponse.Rejected; } } else if (Game1.activeClickableMenu == null && GetOutgoingProposal() != null) { Game1.activeClickableMenu = new PendingProposalDialog(); } }
public void doneTossing(Farmer who) { who.forceTimePass = false; resetForPlayerEntry(who.currentLocation); who.CanMove = true; who.forceCanMove(); who.faceDirection(0); drawOnTop = false; doEmote(20); if (!who.friendshipData.ContainsKey(base.Name)) { who.friendshipData.Add(base.Name, new Friendship(250)); } who.talkToFriend(this); Game1.playSound("tinyWhip"); if (mutex.IsLockHeld()) { mutex.ReleaseLock(); } }
public void Update() { requestLeoMove.Poll(); requestMovieEndEvent.Poll(); endMovieEvent.Poll(); ringPhoneEvent.Poll(); festivalPropRemovalEvent.Poll(); demolishStableEvent.Poll(); requestSpouseSleepEvent.Poll(); requestHorseWarpEvent.Poll(); kickOutOfMinesEvent.Poll(); requestPetWarpHomeEvent.Poll(); requestNutDrop.Poll(); requestAddCharacterEvent.Poll(); addCharacterEvent.Poll(); addQiGemsToTeam.Poll(); grangeMutex.Update(Game1.getOnlineFarmers()); returnedDonationsMutex.Update(Game1.getOnlineFarmers()); ordersBoardMutex.Update(Game1.getOnlineFarmers()); qiChallengeBoardMutex.Update(Game1.getOnlineFarmers()); junimoChestMutex.Update(Game1.getOnlineFarmers()); demolishLock.Update(); buildLock.Update(Game1.getOnlineFarmers()); movieMutex.Update(Game1.getOnlineFarmers()); goldenCoconutMutex.Update(Game1.getOnlineFarmers()); if (grangeMutex.IsLockHeld() && Game1.activeClickableMenu == null) { grangeMutex.ReleaseLock(); } foreach (SpecialOrder specialOrder in specialOrders) { specialOrder.Update(); } foreach (ReadyCheck value in readyChecks.Values) { value.Update(); } if (Game1.IsMasterGame && proposals.Count() > 0) { proposals.Filter((KeyValuePair <long, Proposal> pair) => playerIsOnline(pair.Key) && playerIsOnline(pair.Value.receiver.UID)); } Proposal proposal = GetIncomingProposal(); if (proposal != null && proposal.canceled.Value) { proposal.cancelConfirmed.Value = true; } if (Game1.dialogueUp) { return; } if (proposal != null) { if (!handleIncomingProposal(proposal)) { proposal.responseMessageKey.Value = genderedKey("Strings\\UI:Proposal_PlayerBusy", Game1.player); proposal.response.Value = ProposalResponse.Rejected; } } else if (Game1.activeClickableMenu == null && GetOutgoingProposal() != null) { Game1.activeClickableMenu = new PendingProposalDialog(); } }