Skip to content

Commit

Permalink
Fix lb/gb help saying 'Type a number for the texture' instead of 'Typ…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
UnknownShadow200 committed Apr 12, 2021
1 parent 82e4364 commit 2103670
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions MCGalaxy/Commands/CPE/CustomBlockCommand.cs
Expand Up @@ -735,14 +735,16 @@ internal static class CustomBlockCommand {

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--------------------------");
}

Expand Down

0 comments on commit 2103670

Please sign in to comment.