From a279fad48725d89a39bcf2fd3b2464d6b69f3c55 Mon Sep 17 00:00:00 2001 From: Miepee Date: Sun, 10 Dec 2023 17:05:28 +0100 Subject: [PATCH] use getname instead of tostring to avoid boxing --- YAMS-LIB/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YAMS-LIB/Program.cs b/YAMS-LIB/Program.cs index 6f9a83c..4e17ae1 100644 --- a/YAMS-LIB/Program.cs +++ b/YAMS-LIB/Program.cs @@ -2374,7 +2374,7 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te $"text2 = \"{seedObject.Patches.LockedPBombText.Description}\" }} scr_powerbomb_character_event()", ItemEnum.PBombLauncher => "event_inherited(); if (active) " + "{ global.PBombLauncher = 1; global.maxpbombs += global.PBombLauncherExpansion; global.pbombs = global.maxpbombs; }", - var x when x.ToString().StartsWith("DNA") => "event_inherited(); if (active) { global.dna++; check_areaclear(); }", + var x when Enum.GetName(x).StartsWith("DNA") => "event_inherited(); if (active) { global.dna++; check_areaclear(); }", ItemEnum.Bombs => "btn1_name = \"Fire\"; event_inherited(); if (active) { global.bomb = 1; global.hasBombs = 1; }", ItemEnum.Powergrip =>"event_inherited(); if (active) { global.powergrip = 1; global.hasPowergrip = 1; }", ItemEnum.Spiderball => "btn1_name = \"Aim\"; event_inherited(); if (active) { global.spiderball = 1; global.hasSpiderball = 1; }",