diff options
| -rw-r--r-- | ArchipelagoManager.cs | 10 | ||||
| -rw-r--r-- | GameplayPatches.cs | 6 |
2 files changed, 16 insertions, 0 deletions
| diff --git a/ArchipelagoManager.cs b/ArchipelagoManager.cs index b295f2a..5aebffa 100644 --- a/ArchipelagoManager.cs +++ b/ArchipelagoManager.cs | |||
| @@ -71,6 +71,16 @@ namespace ManifoldGardenArchipelago | |||
| 71 | _session.Locations.CompleteLocationChecks(_session.Locations.GetLocationIdFromName("Manifold Garden", locationName)); | 71 | _session.Locations.CompleteLocationChecks(_session.Locations.GetLocationIdFromName("Manifold Garden", locationName)); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | public void SendGoal() | ||
| 75 | { | ||
| 76 | _session.Socket.SendPacket(new StatusUpdatePacket() | ||
| 77 | { | ||
| 78 | Status = ArchipelagoClientState.ClientGoal, | ||
| 79 | }); | ||
| 80 | |||
| 81 | Plugin.notificationManager.AddMessage("You completed your goal!"); | ||
| 82 | } | ||
| 83 | |||
| 74 | public void Update() | 84 | public void Update() |
| 75 | { | 85 | { |
| 76 | if (_session == null) | 86 | if (_session == null) |
| diff --git a/GameplayPatches.cs b/GameplayPatches.cs index b2b8e54..03e3f13 100644 --- a/GameplayPatches.cs +++ b/GameplayPatches.cs | |||
| @@ -259,6 +259,12 @@ namespace ManifoldGardenArchipelago | |||
| 259 | { | 259 | { |
| 260 | static void Postfix(LevelSystems newLevel) | 260 | static void Postfix(LevelSystems newLevel) |
| 261 | { | 261 | { |
| 262 | if (newLevel.levelName == "World_905_EndingCollapseCutscene_Optimized") | ||
| 263 | { | ||
| 264 | Plugin.archipelagoManager.SendGoal(); | ||
| 265 | return; | ||
| 266 | } | ||
| 267 | |||
| 262 | Plugin.slotSave.VisitedScenes.Add(newLevel.levelName); | 268 | Plugin.slotSave.VisitedScenes.Add(newLevel.levelName); |
| 263 | 269 | ||
| 264 | if (GameData.listenersByScene.TryGetValue(newLevel.levelName, out var listeners)) | 270 | if (GameData.listenersByScene.TryGetValue(newLevel.levelName, out var listeners)) |
