From 2103670c5540f934dda2b0d7066263288e1d84ac Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 12 Apr 2021 18:42:38 +1000 Subject: [PATCH] Fix lb/gb help saying 'Type a number for the texture' instead of 'Type a number for the top texture' (Thanks artania) This happened because SendStepHelp accidentally modified the global helpSections - it was supposed to only modify the message sent to the player when creating a sprite block --- MCGalaxy/Commands/CPE/CustomBlockCommand.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs index cd9548502..f768e296a 100644 --- a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs +++ b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs @@ -735,14 +735,16 @@ namespace MCGalaxy.Commands.CPE { static void SendStepHelp(Player p, bool global) { int step = GetStep(p, global); - string[] help = helpSections[stepsHelp[step]]; + string[] help = helpSections[stepsHelp[step]]; + BlockDefinition bd = GetBD(p, global); - BlockDefinition bd = GetBD(p, global); - if (step == 4 && bd.Shape == 0) - help[0] = help[0].Replace("top texture", "texture"); - - for (int i = 0; i < help.Length; i++) - p.Message(help[i]); + for (int i = 0; i < help.Length; i++) { + string msg = help[i]; + // TODO: Ugly hardcoding, but not really worth doing properly + if (step == 4 && bd.Shape == 0) msg = msg.Replace("top texture", "texture"); + + p.Message(msg); + } p.Message("&f--------------------------"); }