about summary refs log tree commit diff stats
path: root/AnodyneArchipelago/ArchipelagoManager.cs
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-05-25 15:00:56 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-05-25 15:00:56 -0400
commit6a9ff88b6c07a7f7d236da008f8a328418c49571 (patch)
tree1e1d4c16321661eac5a9dce18e748f6ef61079c4 /AnodyneArchipelago/ArchipelagoManager.cs
parent955399d1d873a68fafd703c878533d330a720e5b (diff)
downloadanodyne-archipelago-6a9ff88b6c07a7f7d236da008f8a328418c49571.tar.gz
anodyne-archipelago-6a9ff88b6c07a7f7d236da008f8a328418c49571.tar.bz2
anodyne-archipelago-6a9ff88b6c07a7f7d236da008f8a328418c49571.zip
Trade items, trade locations, windmill, some AP bugs
Diffstat (limited to 'AnodyneArchipelago/ArchipelagoManager.cs')
-rw-r--r--AnodyneArchipelago/ArchipelagoManager.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/AnodyneArchipelago/ArchipelagoManager.cs b/AnodyneArchipelago/ArchipelagoManager.cs index 7c67114..4570c39 100644 --- a/AnodyneArchipelago/ArchipelagoManager.cs +++ b/AnodyneArchipelago/ArchipelagoManager.cs
@@ -107,6 +107,8 @@ namespace AnodyneArchipelago
107 NetworkItem item = _session.Items.AllItemsReceived[i]; 107 NetworkItem item = _session.Items.AllItemsReceived[i];
108 _itemsToCollect.Enqueue(item); 108 _itemsToCollect.Enqueue(item);
109 } 109 }
110
111 _itemIndex = _session.Items.AllItemsReceived.Count;
110 } 112 }
111 113
112 if (_itemsToCollect.Count > 0 && (GlobalState.Dialogue == null || GlobalState.Dialogue == "") && !GlobalState.ScreenTransition && Plugin.Player != null && GlobalState.black_overlay.alpha == 0f) 114 if (_itemsToCollect.Count > 0 && (GlobalState.Dialogue == null || GlobalState.Dialogue == "") && !GlobalState.ScreenTransition && Plugin.Player != null && GlobalState.black_overlay.alpha == 0f)
@@ -132,7 +134,7 @@ namespace AnodyneArchipelago
132 134
133 private void HandleItem(NetworkItem item) 135 private void HandleItem(NetworkItem item)
134 { 136 {
135 if (item.Player == _session.ConnectionInfo.Slot) 137 if (item.Player == _session.ConnectionInfo.Slot && item.Location >= 0)
136 { 138 {
137 string itemKey = $"ArchipelagoLocation-{item.Location}"; 139 string itemKey = $"ArchipelagoLocation-{item.Location}";
138 if (GlobalState.events.GetEvent(itemKey) > 0) 140 if (GlobalState.events.GetEvent(itemKey) > 0)
@@ -213,6 +215,14 @@ namespace AnodyneArchipelago
213 cardTreasure.GetTreasure(); 215 cardTreasure.GetTreasure();
214 GlobalState.SpawnEntity(cardTreasure); 216 GlobalState.SpawnEntity(cardTreasure);
215 } 217 }
218 else if (itemName == "Cardboard Box")
219 {
220 GlobalState.events.SetEvent("ReceivedCardboardBox", 1);
221 }
222 else if (itemName == "Biking Shoes")
223 {
224 GlobalState.events.SetEvent("ReceivedBikingShoes", 1);
225 }
216 226
217 string message; 227 string message;
218 if (item.Player == _session.ConnectionInfo.Slot) 228 if (item.Player == _session.ConnectionInfo.Slot)