diff --git a/commands/misc.lua b/commands/misc.lua index f94c0748..c0c97f80 100644 --- a/commands/misc.lua +++ b/commands/misc.lua @@ -112,8 +112,8 @@ commands.add_command( p = log end end - if param > 50 then player.print("[ERROR] Value is too big.", Color.fail) return end if param == nil then player.print("[ERROR] Must specify radius!", Color.fail) return end + if param > 50 then player.print("[ERROR] Value is too big.", Color.fail) return end if not _a.generate_map then _a.generate_map = true @@ -292,8 +292,9 @@ commands.add_command( p = log end end - if param > 500 then player.print("[ERROR] Value is too big.", Color.warning) return end - if param == nil then player.print("[ERROR] Must specify radius!", Color.warning) return end + if param == nil then player.print("[ERROR] Must specify radius!", Color.fail) return end + if param > 500 then player.print("[ERROR] Value is too big.", Color.fail) return end + local radius = {{x = -param, y = -param}, {x = param, y = param}} or {{x = -1, y = -1}, {x = 1, y = 1}} for _, entity in pairs(player.surface.find_entities_filtered{area = radius, type = "corpse"}) do player.print("Cleared biter-corpses.", Color.success) diff --git a/utils/color_presets.lua b/utils/color_presets.lua index 897768ab..36ca2684 100644 --- a/utils/color_presets.lua +++ b/utils/color_presets.lua @@ -157,6 +157,6 @@ return { [30] = {r = 0.093, g = 0.768, b = 0.172}, -- admin success = {r = 0, g = 255, b = 0}, warning = {r = 255, g = 255, b = 0}, - fail = {r = 255, g = 0, b = 0}, + fail = {r = 255, g = 51, b = 51}, info = {r = 255, g = 255, b = 255} }