Skip to content

Commit

Permalink
put everything in the item and dialog queue rather than attempting to…
Browse files Browse the repository at this point in the history
… unlock in place
  • Loading branch information
alwaysintreble committed Jan 3, 2024
1 parent debc774 commit d89d0e2
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions Archipelago/ArchipelagoClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private static void OnMessageReceived(LogMessage message)
case ItemSendLogMessage itemSendMessage:
if (itemSendMessage.IsRelatedToActivePlayer)
{
if (!itemSendMessage.IsReceiverTheActivePlayer && !ItemsAndLocationsHandler.HasDialog(itemSendMessage.Item.Location))
if (!ItemsAndLocationsHandler.HasDialog(itemSendMessage.Item.Location))
{
Console.WriteLine($"adding {itemSendMessage.Item.ToReadableString()} to dialog queue.");
DialogQueue.Enqueue(itemSendMessage.Item.ToReadableString(itemSendMessage.Receiver.Alias));
Expand Down Expand Up @@ -282,24 +282,7 @@ private static void OnItemReceived(ReceivedItemsHelper helper)
if (helper.Index < ServerData.Index) return;

ServerData.Index++;
if (RandomizerStateManager.IsSafeTeleportState() &&
!Manager<PauseManager>.Instance.IsPaused)
{
try
{
ItemsAndLocationsHandler.Unlock(itemToUnlock.Item);
}
catch (Exception e)
{
Debug.Log(e);
ItemQueue.Enqueue(itemToUnlock.Item);
}
}
else
ItemQueue.Enqueue(itemToUnlock.Item);
if (itemToUnlock.Player.Equals(Session.ConnectionInfo.Slot) &&
ItemsAndLocationsHandler.HasDialog(itemToUnlock.Location))
return;
ItemQueue.Enqueue(itemToUnlock.Item);
DialogQueue.Enqueue(itemToUnlock.ToReadableString());
}

Expand Down

0 comments on commit d89d0e2

Please sign in to comment.