Skip to content

Commit

Permalink
use getname instead of tostring to avoid boxing
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed Dec 10, 2023
1 parent 36c1b30 commit a279fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YAMS-LIB/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }",
Expand Down

0 comments on commit a279fad

Please sign in to comment.