1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-07-15 01:24:37 +02:00

Expand doc

This commit is contained in:
Matthew Heguy
2019-02-14 12:33:47 -05:00
parent 39db9fe397
commit f478b6578b

View File

@ -331,13 +331,14 @@ local function revive_ghosts(args, player)
end end
end end
local function destroy(_, player) --- Destroys the player's selected entity
local function destroy_selected(_, player)
local ent = player.selected local ent = player.selected
if ent then if ent then
Game.player_print(ent.name .. ' destroyed') Game.player_print(ent.name .. ' destroyed')
ent.destroy() ent.destroy()
else else
Game.player_print('Nothing found to destroy.') Game.player_print('Nothing found to destroy. (You must have an entity under your cursor when you hit enter)')
end end
end end
@ -513,8 +514,8 @@ Command.add(
Command.add( Command.add(
'destroy', 'destroy',
{ {
description = 'Destroys the entity under your cursor', description = 'Destroys the entity under your cursor when you run this command',
required_rank = Ranks.admin required_rank = Ranks.admin
}, },
destroy destroy_selected
) )