From c4d572d962410da3bddfc7bb41a697819c0f51f6 Mon Sep 17 00:00:00 2001 From: Miepee Date: Fri, 14 Jun 2024 12:44:32 +0200 Subject: [PATCH] change debug return value back --- YAMS-LIB/ExtensionMethods.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/YAMS-LIB/ExtensionMethods.cs b/YAMS-LIB/ExtensionMethods.cs index 5a98e87..d2a07aa 100644 --- a/YAMS-LIB/ExtensionMethods.cs +++ b/YAMS-LIB/ExtensionMethods.cs @@ -23,19 +23,18 @@ public static string GetGMLCode(this UndertaleCode code) return Decompiler.Decompile(code, decompileContext); } - public static bool ReplaceGMLInCode(this UndertaleCode code, string textToReplace, string replacementText, bool ignoreErrors = false) + public static void ReplaceGMLInCode(this UndertaleCode code, string textToReplace, string replacementText, bool ignoreErrors = false) { var codeText = Decompiler.Decompile(code, decompileContext); if (!codeText.Contains(textToReplace)) { if (ignoreErrors) - return false; + return; throw new ApplicationException($"The text \"{textToReplace}\" was not found in \"{code.Name.Content}\"!"); } codeText = codeText.Replace(textToReplace, replacementText); code.ReplaceGML(codeText, gmData); - return true; } public static void PrependGMLInCode(this UndertaleCode code, string prependedText)