From e5773132b1fb0aa390c604174f1339db587c7d1d Mon Sep 17 00:00:00 2001 From: Miepee Date: Fri, 5 Jul 2024 13:35:32 +0200 Subject: [PATCH] Make skipping cutscenes skip tower activation cutscene Fix #193 --- YAMS-LIB/patches/qol/GameplayCutsceneSkip.cs | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/YAMS-LIB/patches/qol/GameplayCutsceneSkip.cs b/YAMS-LIB/patches/qol/GameplayCutsceneSkip.cs index 2866d11..3e7630e 100644 --- a/YAMS-LIB/patches/qol/GameplayCutsceneSkip.cs +++ b/YAMS-LIB/patches/qol/GameplayCutsceneSkip.cs @@ -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;"); } }