From 3d68b8793c2ddd169257927286be66cc0243a0f1 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Sat, 28 Oct 2023 00:07:46 +0200 Subject: [PATCH] Fix suit issues when collecting while item is inactive (#106) --- YAMS-LIB/Program.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/YAMS-LIB/Program.cs b/YAMS-LIB/Program.cs index a2f296d..09fd90b 100644 --- a/YAMS-LIB/Program.cs +++ b/YAMS-LIB/Program.cs @@ -2561,7 +2561,6 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te ItemEnum.Screwattack => "event_inherited(); if (active) { global.screwattack = 1; global.hasScrewattack = 1; } with (oCharacter) sfx_stop(spinjump_sound);", ItemEnum.Varia => """ event_inherited() - global.hasVaria = 1; global.SuitChange = !global.skipItemFanfare; // If any Metroid exists, force suit cutscene to be off if (!((instance_number(oMAlpha) <= 0) && (instance_number(oMGamma) <= 0) && (instance_number(oMZeta) <= 0) && (instance_number(oMOmega) <= 0))) @@ -2575,6 +2574,7 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te global.SuitChangeGravity = 0; if (active) { + global.hasVaria = 1; with (oCharacter) alarm[1] = 1; } @@ -2585,7 +2585,6 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te ItemEnum.ProgressiveJump => "event_inherited(); if (active) { if (global.hasSpacejump) exit; else if (global.hasHijump) { global.spacejump = 1; global.hasSpacejump = 1; } else { global.hijump = 1; global.hasHijump = 1; } }", ItemEnum.Gravity => """ event_inherited(); - global.hasGravity = 1; global.SuitChange = !global.skipItemFanfare; // If any Metroid exists, force suit cutscene to be off if (!((instance_number(oMAlpha) <= 0) && (instance_number(oMGamma) <= 0) && (instance_number(oMZeta) <= 0) && (instance_number(oMOmega) <= 0))) @@ -2599,6 +2598,7 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te global.SuitChangeGravity = 1; if (active) { + global.hasGravity = 1; with (oCharacter) alarm[4] = 1; } @@ -2615,19 +2615,19 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te global.SuitChange = 0; global.SuitChangeX = x; global.SuitChangeY = y; - if (global.hasGravity) exit - else if (global.hasVaria) - { - global.hasGravity = 1; - global.SuitChangeGravity = 1; - } - else - { - global.hasVaria = 1; - global.SuitChangeGravity = 0; - } if (active) { + if (global.hasGravity) exit + else if (global.hasVaria) + { + global.hasGravity = 1; + global.SuitChangeGravity = 1; + } + else + { + global.hasVaria = 1; + global.SuitChangeGravity = 0; + } with (oCharacter) if (global.hasGravity) alarm[4] = 1;