Skip to content

Commit

Permalink
Make skipping cutscenes skip tower activation cutscene
Browse files Browse the repository at this point in the history
Fix #193
  • Loading branch information
Miepee committed Jul 5, 2024
1 parent 003304f commit e577313
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions YAMS-LIB/patches/qol/GameplayCutsceneSkip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,28 @@ public static void Apply(UndertaleData gmData, GlobalDecompileContext decompileC
""");
gmData.Code.ByName("gml_Object_oA5MainSwitch_Step_0").ReplaceGMLInCode("instance_create(x, y, oA5BotSpawnCutscene)",
"instance_create(x, y, oA5BotSpawnCutscene); if (global.skipCutscenes) statetime = 319");

// Skip tower activation cutscene to not have to wait a long time
gmData.Code.ByName("gml_Object_oArea4PowerSwitch_Step_0").ReplaceGMLInCode("""
if (oCharacter.x < 320)
{
with (oCharacter)
x += 1
}
""",
"""
if (oCharacter.x < 320)
{
with (oCharacter)
x += 1
}
if (oCharacter.x == 320 && global.skipCutscenes)
{
instance_create(320, 144, oA4SwitchCables);
statetime = 119;
}
""");
gmData.Code.ByName("gml_Object_oArea4PowerSwitch_Step_0").ReplaceGMLInCode("mus_change(musArea4A)", "mus_change(musArea4A); if (global.skipCutscenes) statetime = 319;");
}
}

0 comments on commit e577313

Please sign in to comment.