Refactor of commands

This commit is contained in:
Cooldude2606
2019-03-01 20:24:23 +00:00
parent e547f76d6f
commit 62dcfe8694
288 changed files with 5364 additions and 1067 deletions

View File

@@ -0,0 +1,18 @@
--- A full ranking system for factorio.
-- @module ExpGamingCommands.kill@4.0.0
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
local Game = require('FactorioStdLib.Game')
--- Kills a player of a lower rank
-- @command kill
-- @param player the player to be killed
commands.add_command('kill', 'Kills a player. No player name kills yourself.', {
['player']={false,'player-rank-alive'}
}, function(event,args)
local _player = Game.get_player(event)
local player = args.player
if player then player.character.die()
else _player.character.die() end
end).default_admin_only = true