diff --git a/features/debug_commands.lua b/features/debug_commands.lua new file mode 100644 index 00000000..01189c07 --- /dev/null +++ b/features/debug_commands.lua @@ -0,0 +1,22 @@ +local Command = require 'utils.command' +local Ranks = require 'resources.ranks' + +Command.add( + 'reveal', + { + description = {'command_description.reveal'}, + arguments = {'radius'}, + default_values = {radius = 500}, + required_rank = Ranks.admin, + debug_only = true, + allowed_by_server = true + }, + function(args, p) + local radius = args.radius + if not p then + p = {force = game.forces.player, surface = game.surfaces.redmew or game.surfaces.nauvis, position = {x = 0, y = 0}} + end + local pos = p.position + p.force.chart(p.surface, {{pos.x - radius, pos.y - radius}, {pos.x + radius, pos.y + radius}}) + end +)