From d55d920bf98da61eb7ddafcfde4c183788761348 Mon Sep 17 00:00:00 2001 From: Jacky720 <32578221+Jacky720@users.noreply.github.com> Date: Mon, 23 May 2022 16:31:50 -0400 Subject: [PATCH] Resolve reviews --- UndertaleModLib/Compiler/Parser.cs | 13 ++++++------- .../CommunityScripts/FancyRoomSelect.csx | 9 ++++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/UndertaleModLib/Compiler/Parser.cs b/UndertaleModLib/Compiler/Parser.cs index ec1ade59f..fe5f6a672 100644 --- a/UndertaleModLib/Compiler/Parser.cs +++ b/UndertaleModLib/Compiler/Parser.cs @@ -693,14 +693,13 @@ private static Statement ParseFunction(CompileContext context) result.Children.Add(ParseStatement(context)); if (expression) return result; - else // Whatever you call non-anonymous + else // Whatever you call non-anonymous definitions { - Statement trueresult = new Statement(Statement.StatementKind.Assign, new Lexer.Token(TokenKind.Assign)); - trueresult.Children.Add(destination); - trueresult.Children.Add(new Statement(Statement.StatementKind.Token, trueresult.Token)); - trueresult.Children.Add(result); - return trueresult; - + Statement trueResult = new Statement(Statement.StatementKind.Assign, new Lexer.Token(TokenKind.Assign)); + trueResult.Children.Add(destination); + trueResult.Children.Add(new Statement(Statement.StatementKind.Token, trueResult.Token)); + trueResult.Children.Add(result); + return trueResult; } } diff --git a/UndertaleModTool/CommunityScripts/FancyRoomSelect.csx b/UndertaleModTool/CommunityScripts/FancyRoomSelect.csx index fb6e459a2..fc28e0e82 100644 --- a/UndertaleModTool/CommunityScripts/FancyRoomSelect.csx +++ b/UndertaleModTool/CommunityScripts/FancyRoomSelect.csx @@ -407,8 +407,15 @@ selector_active = 0 exiting = 0 ", Data); +string version; +if (Data.GMS2_3) + version = "2.3"; +else if (gms2) + version = "2"; +else + version = "1"; -ScriptMessage("Successfully applied for Gamemaker " + (Data.GMS2_3 ? "2.3" : (gms2 ? "2" : "1")) + @" +ScriptMessage(@$"Successfully applied for Gamemaker {version} Controls: - F3: open/close menu - Escape: close menu