Skip to content

Commit fb77c76

Browse files
Cutscene improvements
1 parent 2ecaf6e commit fb77c76

File tree

2 files changed

+23
-38
lines changed

2 files changed

+23
-38
lines changed

ProdigalArchipelago/ItemPatcher.cs

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> inst
580580
[HarmonyPatch(nameof(SpecialInteract.InteractWith))]
581581
class SpecialInteract_InteractWith_Patch
582582
{
583-
static bool Prefix(SpecialInteract __instance, List<GameMaster.Speech> ___Chatter)
583+
static bool Prefix(SpecialInteract __instance, List<GameMaster.Speech> ___Chatter, Animator ___ANIM)
584584
{
585585
if (Archipelago.Enabled && __instance.INTERACTABLE == SpecialInteract.INT.SKIP_BOOK)
586586
{
@@ -647,6 +647,28 @@ static bool Prefix(SpecialInteract __instance, List<GameMaster.Speech> ___Chatte
647647
return false;
648648
}
649649

650+
if (Archipelago.Enabled && __instance.INTERACTABLE == SpecialInteract.INT.WATERPILLARDG)
651+
{
652+
if (!GameMaster.GM.Save.Data.Chests.Contains(230))
653+
{
654+
___ANIM.SetBool("ACTIVE", false);
655+
Archipelago.AP.CollectItem(230);
656+
__instance.StartCoroutine(AcquTime());
657+
return false;
658+
}
659+
}
660+
661+
if (Archipelago.Enabled && __instance.INTERACTABLE == SpecialInteract.INT.EARTHPILLARDG)
662+
{
663+
if (!GameMaster.GM.Save.Data.Chests.Contains(235))
664+
{
665+
___ANIM.SetBool("ACTIVE", false);
666+
Archipelago.AP.CollectItem(235);
667+
__instance.StartCoroutine(AcquTime());
668+
return false;
669+
}
670+
}
671+
650672
return true;
651673
}
652674

@@ -747,33 +769,15 @@ static bool KnuckleCheck()
747769
}
748770
return GameMaster.GM.Save.Data.BSlot == PlayerCharacter.Item.RustKnuckle2;
749771
}
750-
}
751-
752-
[HarmonyPatch(typeof(SpecialInteract))]
753-
[HarmonyPatch("AcquTime")]
754-
class SpecialInteract_AcquTime_Patch
755-
{
756-
static bool Prefix(List<GameMaster.Speech> ___Chatter, ref IEnumerator __result)
757-
{
758-
if (Archipelago.Enabled)
759-
{
760-
___Chatter.Clear();
761-
__result = AcquTime();
762-
return false;
763-
}
764-
return true;
765-
}
766772

767773
static IEnumerator AcquTime()
768774
{
769-
GameMaster.GM.CUTSCENE(true);
770775
yield return new WaitForSeconds(0.25f);
771776
while (GameMaster.GM.UI.SPEAKING())
772777
{
773778
yield return null;
774779
}
775780
GameMaster.GM.PC.Anim.SetBool("ITEM", false);
776-
GameMaster.GM.CUTSCENE(false);
777781
}
778782
}
779783

ProdigalArchipelago/WorldPatcher.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -366,25 +366,6 @@ static IEnumerator CastleEntry()
366366
MotherBrain.MB.DespawnAllNPCS();
367367
GameMaster.GM.CUTSCENE(true);
368368
yield return new WaitForSeconds(2);
369-
GameMaster.GM.PC.AnimDirection(MotherBrain.Direction.Left);
370-
GameMaster.GM.PC.WalkTo(new Vector3(520, -352, 0), 1, 1);
371-
while (!GameMaster.GM.PC.MovementDone)
372-
{
373-
yield return null;
374-
}
375-
GameMaster.GM.PC.AnimDirection(MotherBrain.Direction.Up);
376-
GameMaster.GM.PC.WalkTo(new Vector3(520, -248, 0), 1, 1);
377-
while (!GameMaster.GM.PC.MovementDone)
378-
{
379-
yield return null;
380-
}
381-
GameMaster.GM.CutsceneZoneLoad(10, new Vector2(472, -1048));
382-
yield return new WaitForSeconds(2);
383-
GameMaster.GM.PC.WalkTo(new Vector3(472, -904, 0), 1, 1);
384-
while (!GameMaster.GM.PC.MovementDone)
385-
{
386-
yield return null;
387-
}
388369
GameMaster.GM.CUTSCENE(false);
389370
}
390371
}

0 commit comments

Comments
 (0)