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
This commit is contained in:
UnknownShadow200 2021-04-12 18:42:38 +10:00
parent 82e4364396
commit 2103670c55

View File

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