From 6e7c6b94f41d1121330e6d12fcd797ad2775cd95 Mon Sep 17 00:00:00 2001 From: cmod31 Date: Sun, 19 Feb 2023 12:10:49 +0100 Subject: [PATCH] some bugfixes and reformating --- src/scene-scripts/console.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scene-scripts/console.cs b/src/scene-scripts/console.cs index 7ff5a38..1693dcf 100644 --- a/src/scene-scripts/console.cs +++ b/src/scene-scripts/console.cs @@ -21,7 +21,6 @@ public partial class console : CanvasLayer } public void OnLineEditTextSubmitted(string command) { - command = command.ToLower(); line.Clear(); if (command.Length != 0) textblock.AddText("\n>" + command); Variant args; @@ -29,23 +28,24 @@ public partial class console : CanvasLayer { int i = command.IndexOf(" ") + 1; args = command.Substring(i); - Call(command.Split(' ')[0], args); + Call(command.Split(' ')[0].ToLower(), args); } if (command.Split(' ').Length > 2) { int i = command.IndexOf(" ") + 1; args = command.Substring(i).Split(' '); - Callv(command.Split(' ')[0], args.AsGodotArray()); + Callv(command.Split(' ')[0].ToLower(), args.AsGodotArray()); } - else Call(command); + else Call(command.ToLower()); } + public void help() { textblock.AddText("\n============ Help ============"); textblock.AddText("\n1. consoleclear - Clears the console"); - textblock.AddText("\n2. speed - Multiplies the player speed by the given value"); + textblock.AddText("\n2. speed - Multiplies the player speed by the given value"); textblock.AddText("\n3. playername - Renames the player"); } public void consoleclear() => textblock.Clear();