Skip to content

Commit

Permalink
Rename LB lavabrightness and lampbrightness to lavalight and lamplight
Browse files Browse the repository at this point in the history
Also display lavalight and lamplight colors in /mi env if set
  • Loading branch information
Goodlyay committed May 18, 2024
1 parent c6d0e03 commit 2f8aa7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions MCGalaxy/Commands/CPE/CustomBlockCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class BlockDefinitionsArgs
p.Message(" Order: " + def.InventoryOrder);
}
if (def.Brightness > 0) {
string word = def.UseLampBrightness ? "LampBrightness" : "LavaBrightness";
string word = def.UseLampBrightness ? "LampLight" : "LavaLight";
p.Message(" {0}: {1}", word, def.Brightness);
}
}
Expand Down Expand Up @@ -556,17 +556,17 @@ class BlockDefinitionsArgs
order == def.RawID ? "default" : order.ToString());
return true;

case "lavabrightness":
case "lavalight":
int brightness = 0;
if (!CommandParser.GetInt(p, value, "lavabrightness", ref brightness, 0, 15)) {
if (!CommandParser.GetInt(p, value, "lava light", ref brightness, 0, 15)) {
SendEditHelp(p, arg); return false;
}
def.SetBrightness(brightness, false);
break;

case "lampbrightness":
case "lamplight":
int sunBrightness = 0;
if (!CommandParser.GetInt(p, value, "lampbrightness", ref sunBrightness, 0, 15)) {
if (!CommandParser.GetInt(p, value, "lamp light", ref sunBrightness, 0, 15)) {
SendEditHelp(p, arg); return false;
}
def.SetBrightness(sunBrightness, true);
Expand Down Expand Up @@ -883,11 +883,11 @@ class BlockDefinitionsArgs
"The default position of a block is its ID.",
"A position of 0 hides the block from the inventory." }
},
{ "lavabrightness", new string[] { "Type a number (0-15) for the lava brightness of the block.",
{ "lavalight", new string[] { "Type a number (0-15) for the lava brightness of the block.",
"You need Fancy Lighting to see differences between 1 and 15.",
"The block will glow using the \"lavalight\" env color" }
},
{ "lampbrightness", new string[] { "Type a number (0-15) for the lamp brightness of the block.",
{ "lamplight", new string[] { "Type a number (0-15) for the lamp brightness of the block.",
"You need Fancy Lighting to see differences between 1 and 15.",
"The block will glow using the \"lamplight\" env color" }
},
Expand Down
6 changes: 5 additions & 1 deletion MCGalaxy/Commands/Information/CmdMapInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ static IGame GetAssociatedGame(string map)

p.Message("Colors: &eFog {0}, &eSky {1}, &eClouds {2}, &eSunlight {3}, &eShadowlight {4}",
Color(cfg.FogColor), Color(cfg.SkyColor),
Color(cfg.CloudColor), Color(cfg.LightColor), Color(cfg.ShadowColor));
Color(cfg.CloudColor), Color(cfg.LightColor), Color(cfg.ShadowColor));
if (cfg.LavaLightColor != "" || cfg.LampLightColor != "") {
p.Message("Fancy colors: &eLavaLight {0}, &eLampLight {1}",
Color(cfg.LavaLightColor), Color(cfg.LampLightColor));
}
p.Message("Water level: &b{0}&S, Bedrock offset: &b{1}&S, Clouds height: &b{2}&S, Max fog distance: &b{3}",
data.Get(EnvProp.EdgeLevel), data.Get(EnvProp.SidesOffset),
data.Get(EnvProp.CloudsLevel), data.Get(EnvProp.MaxFog));
Expand Down

0 comments on commit 2f8aa7c

Please sign in to comment.