2019-02-03 09:02:54 +02:00
|
|
|
local Global = require 'utils.global'
|
2019-01-30 05:52:43 +02:00
|
|
|
local Rank = require 'features.rank_system'
|
2019-01-02 17:34:17 +02:00
|
|
|
local Report = require 'features.report'
|
|
|
|
local Utils = require 'utils.core'
|
|
|
|
local Game = require 'utils.game'
|
|
|
|
local Event = require 'utils.event'
|
|
|
|
local Command = require 'utils.command'
|
2019-01-30 21:42:42 +02:00
|
|
|
local Color = require 'resources.color_presets'
|
2019-01-30 05:52:43 +02:00
|
|
|
local Ranks = require 'resources.ranks'
|
2019-01-02 17:34:17 +02:00
|
|
|
|
2019-02-04 18:37:23 +02:00
|
|
|
local loadstring = loadstring
|
2019-01-02 17:34:17 +02:00
|
|
|
|
|
|
|
--- A table of players with tpmode turned on
|
2019-02-03 09:02:54 +02:00
|
|
|
local tp_players = {}
|
|
|
|
|
|
|
|
Global.register(
|
|
|
|
{
|
|
|
|
tp_players = tp_players
|
|
|
|
},
|
|
|
|
function(tbl)
|
|
|
|
tp_players = tbl.tp_players
|
|
|
|
end
|
|
|
|
)
|
2019-01-02 17:34:17 +02:00
|
|
|
|
2019-02-22 22:03:02 +02:00
|
|
|
--- Informs the actor that there is no target. Acts as a central place where this message can be changed.
|
|
|
|
local function print_no_target(target_name)
|
|
|
|
Game.player_print({'common.fail_no_target', target_name}, Color.fail)
|
|
|
|
end
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
--- Sends a message to all online admins
|
|
|
|
local function admin_chat(args, player)
|
|
|
|
Utils.print_admins(args.msg, player)
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Runs a command silently. Traps and prints errors for the player/server
|
|
|
|
local function silent_command(args, player)
|
|
|
|
local p
|
|
|
|
if player then
|
|
|
|
p = player.print
|
|
|
|
else
|
|
|
|
p = print
|
|
|
|
end
|
|
|
|
|
|
|
|
local func, err = loadstring(args.str)
|
|
|
|
if not func then
|
|
|
|
p(err)
|
2019-02-04 18:37:23 +02:00
|
|
|
return
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
local _, err2 = pcall(func)
|
|
|
|
if err2 then
|
|
|
|
local i = err2:find('\n')
|
2019-02-04 18:37:23 +02:00
|
|
|
if i then
|
|
|
|
p(err2:sub(1, i))
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
i = err2:find('%s')
|
|
|
|
if i then
|
|
|
|
p(err2:sub(i + 1))
|
|
|
|
end
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Toggles cheat mode for a player
|
|
|
|
local function toggle_cheat_mode(_, player)
|
|
|
|
player.cheat_mode = not player.cheat_mode
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.toggle_cheat_mode', tostring(player.cheat_mode)})
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
|
2019-02-22 22:03:02 +02:00
|
|
|
--- Promote someone to regular
|
|
|
|
local function add_regular(args)
|
2019-03-03 22:50:19 +02:00
|
|
|
local target_ident = args.player
|
|
|
|
local target, target_name = Utils.validate_player(target_ident)
|
2019-01-02 17:34:17 +02:00
|
|
|
|
2019-03-03 22:50:19 +02:00
|
|
|
if not target then
|
|
|
|
print_no_target(target_ident)
|
2019-01-30 21:42:42 +02:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2019-02-22 22:03:02 +02:00
|
|
|
if Rank.less_than(target_name, Ranks.guest) then
|
|
|
|
Game.player_print({'admin_commands.regular_add_fail_probation'}, Color.fail)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local success = Rank.increase_player_rank_to(target_name, Ranks.regular)
|
|
|
|
if success then
|
2019-02-23 19:31:28 +02:00
|
|
|
game.print({'admin_commands.regular_add_success', Utils.get_actor(), target_name}, Color.info)
|
2019-03-03 22:50:19 +02:00
|
|
|
target.print({'admin_commands.regular_add_notify_target'}, Color.warning)
|
2019-02-22 22:03:02 +02:00
|
|
|
else
|
|
|
|
Game.player_print({'admin_commands.regular_add_fail', target_name, Rank.get_player_rank_name(target_name)}, Color.fail)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Demote someone from regular
|
|
|
|
local function remove_regular(args)
|
2019-03-03 22:50:19 +02:00
|
|
|
local target_ident = args.player
|
|
|
|
local target, target_name = Utils.validate_player(target_ident)
|
2019-02-22 22:03:02 +02:00
|
|
|
|
2019-03-03 22:50:19 +02:00
|
|
|
if not target then
|
|
|
|
print_no_target(target_ident)
|
|
|
|
return
|
2019-02-22 22:03:02 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
if Rank.equal(target_name, Ranks.regular) then
|
|
|
|
local _, new_rank = Rank.reset_player_rank(target_name)
|
2019-02-23 19:31:28 +02:00
|
|
|
game.print({'admin_commands.regular_remove_success', Utils.get_actor(), target_name, new_rank}, Color.info)
|
2019-03-03 22:50:19 +02:00
|
|
|
if target then
|
|
|
|
target.print({'admin_commands.regular_remove_notify_target'}, Color.warning)
|
2019-03-02 19:20:56 +02:00
|
|
|
end
|
2019-02-22 22:03:02 +02:00
|
|
|
else
|
|
|
|
local rank_name = Rank.get_player_rank_name(target_name)
|
|
|
|
Game.player_print({'admin_commands.regular_remove_fail', target_name, rank_name}, Color.fail)
|
2019-01-30 05:52:43 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-02-24 15:25:14 +02:00
|
|
|
--- Put someone on probation
|
2019-02-22 22:03:02 +02:00
|
|
|
local function probation_add(args)
|
2019-03-03 22:50:19 +02:00
|
|
|
local target_ident = args.player
|
|
|
|
local target, target_name = Utils.validate_player(target_ident)
|
2019-01-30 21:42:42 +02:00
|
|
|
|
2019-03-03 22:50:19 +02:00
|
|
|
if not target then
|
|
|
|
print_no_target(target_ident)
|
|
|
|
return
|
2019-01-30 21:42:42 +02:00
|
|
|
end
|
2019-01-30 05:52:43 +02:00
|
|
|
|
2019-02-22 22:03:02 +02:00
|
|
|
if Rank.equal(target_name, Ranks.admin) then
|
|
|
|
Game.player_print({'admin_commands.probation_add_fail_admin'}, Color.fail)
|
2019-03-03 22:50:19 +02:00
|
|
|
if target then
|
|
|
|
target.print({'admin_commands.probation_warn_admin', Utils.get_actor()}, Color.warning)
|
2019-03-02 19:20:56 +02:00
|
|
|
end
|
2019-02-22 22:03:02 +02:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local success = Rank.decrease_player_rank_to(target_name, Ranks.probation)
|
|
|
|
if success then
|
2019-02-23 19:31:28 +02:00
|
|
|
game.print({'admin_commands.probation_add_success', Utils.get_actor(), target_name}, Color.info)
|
2019-03-03 22:50:19 +02:00
|
|
|
if target then
|
|
|
|
target.print({'admin_commands.probation_add_notify_target'}, Color.warning)
|
2019-03-02 19:20:56 +02:00
|
|
|
end
|
2019-02-22 22:03:02 +02:00
|
|
|
else
|
|
|
|
Game.player_print({'admin_commands.probation_add_fail', target_name}, Color.fail)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-02-24 15:25:14 +02:00
|
|
|
--- Remove someone from probation
|
2019-02-22 22:03:02 +02:00
|
|
|
local function probation_remove(args)
|
2019-03-03 22:50:19 +02:00
|
|
|
local target_ident = args.player
|
|
|
|
local target, target_name = Utils.validate_player(target_ident)
|
2019-02-22 22:03:02 +02:00
|
|
|
|
2019-03-03 22:50:19 +02:00
|
|
|
if not target then
|
|
|
|
print_no_target(target_ident)
|
|
|
|
return
|
2019-02-22 22:03:02 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
if Rank.equal(target_name, Ranks.probation) then
|
|
|
|
Rank.reset_player_rank(target_name)
|
2019-02-23 19:31:28 +02:00
|
|
|
game.print({'admin_commands.probation_remove_success', Utils.get_actor(), target_name}, Color.info)
|
2019-03-03 22:50:19 +02:00
|
|
|
if target then
|
|
|
|
target.print({'admin_commands.probation_remove_notify_target'}, Color.warning)
|
2019-03-02 19:20:56 +02:00
|
|
|
end
|
2019-02-22 22:03:02 +02:00
|
|
|
else
|
|
|
|
Game.player_print({'admin_commands.probation_remove_fail', target_name}, Color.fail)
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Displays reported players
|
|
|
|
local function show_reports(_, player)
|
|
|
|
Report.show_reports(player)
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Places a target in jail (a permissions group which is unable to act aside from chatting)
|
|
|
|
local function jail_player(args, player)
|
2019-03-03 22:50:19 +02:00
|
|
|
local target_ident = args.player
|
|
|
|
local target = Utils.validate_player(target_ident)
|
|
|
|
|
|
|
|
if not target then
|
|
|
|
print_no_target(target_ident)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
Report.jail(target, player)
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Removes a target from jail
|
|
|
|
local function unjail_player(args, player)
|
2019-03-02 19:20:56 +02:00
|
|
|
local target_ident = args.player
|
2019-03-03 22:50:19 +02:00
|
|
|
local target = Utils.validate_player(target_ident)
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
if not target then
|
2019-03-02 19:20:56 +02:00
|
|
|
print_no_target(target_ident)
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
2019-03-03 22:50:19 +02:00
|
|
|
Report.unjail(target, player)
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
--- Creates a rectangle of water below an admin
|
|
|
|
local function pool(_, player)
|
|
|
|
local t = {}
|
|
|
|
local p = player.position
|
|
|
|
for x = p.x - 3, p.x + 3 do
|
|
|
|
for y = p.y + 2, p.y + 7 do
|
|
|
|
table.insert(t, {name = 'water', position = {x, y}})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
player.surface.set_tiles(t)
|
|
|
|
player.surface.create_entity {name = 'fish', position = {p.x + 0.5, p.y + 5}}
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Takes a target and teleports them to player
|
|
|
|
local function invoke(args, player)
|
2019-03-02 19:20:56 +02:00
|
|
|
local target_ident = args.player
|
2019-03-03 22:50:19 +02:00
|
|
|
local target = Utils.validate_player(target_ident)
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
if not target then
|
2019-03-02 19:20:56 +02:00
|
|
|
print_no_target(target_ident)
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
2019-03-03 22:50:19 +02:00
|
|
|
|
2019-05-02 17:29:55 +02:00
|
|
|
local pos = player.surface.find_non_colliding_position('character', player.position, 50, 1)
|
2019-01-02 17:34:17 +02:00
|
|
|
if not pos then
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.invoke_fail_no_location'})
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
|
|
|
target.teleport({pos.x, pos.y}, player.surface)
|
2019-03-03 22:50:19 +02:00
|
|
|
game.print({'admin_commands.invoke_announce', target.name})
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
--- Takes a target and teleports player to target. (admin only)
|
|
|
|
local function teleport_player(args, player)
|
2019-03-02 19:20:56 +02:00
|
|
|
local target_ident = args.player
|
2019-03-03 22:50:19 +02:00
|
|
|
local target = Utils.validate_player(target_ident)
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
if not target then
|
2019-03-02 19:20:56 +02:00
|
|
|
print_no_target(target_ident)
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
2019-03-02 19:20:56 +02:00
|
|
|
|
|
|
|
local target_name = target.name
|
2019-01-02 17:34:17 +02:00
|
|
|
local surface = target.surface
|
2019-05-02 17:29:55 +02:00
|
|
|
local pos = surface.find_non_colliding_position('character', target.position, 50, 1)
|
2019-01-02 17:34:17 +02:00
|
|
|
if not pos then
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.tp_fail_no_location'})
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
|
|
|
player.teleport(pos, surface)
|
2019-03-03 22:50:19 +02:00
|
|
|
game.print({'admin_commands.tp_player_announce', target_name})
|
|
|
|
Game.player_print({'admin_commands.tp_player_success', target_name})
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
--- Takes a selected entity and teleports player to it
|
|
|
|
local function teleport_location(_, player)
|
|
|
|
if not player.selected then
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.tp_ent_fail_no_ent'})
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
2019-05-02 17:29:55 +02:00
|
|
|
local pos = player.surface.find_non_colliding_position('character', player.selected.position, 50, 1)
|
2019-01-02 17:34:17 +02:00
|
|
|
if not pos then
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.tp_fail_no_location'})
|
2019-01-02 17:34:17 +02:00
|
|
|
return
|
|
|
|
end
|
|
|
|
player.teleport(pos)
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.tp_end_success'})
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
|
2019-02-03 09:02:54 +02:00
|
|
|
--- If a player is in the tp_players list, remove ghosts they place and teleport them to that position
|
2019-01-02 17:34:17 +02:00
|
|
|
local function built_entity(event)
|
|
|
|
local index = event.player_index
|
|
|
|
|
2019-02-03 09:02:54 +02:00
|
|
|
if tp_players[index] then
|
2019-01-02 17:34:17 +02:00
|
|
|
local entity = event.created_entity
|
|
|
|
|
|
|
|
if not entity or not entity.valid or entity.type ~= 'entity-ghost' then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2019-05-16 12:10:56 +02:00
|
|
|
game.get_player(index).teleport(entity.position)
|
2019-01-02 17:34:17 +02:00
|
|
|
entity.destroy()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Adds/removes players from the tp_players table (admin only)
|
|
|
|
local function toggle_tp_mode(_, player)
|
|
|
|
local index = player.index
|
2019-02-03 09:02:54 +02:00
|
|
|
local toggled = tp_players[index]
|
2019-01-02 17:34:17 +02:00
|
|
|
|
|
|
|
if toggled then
|
2019-02-03 09:02:54 +02:00
|
|
|
tp_players[index] = nil
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.tp_mode_off'})
|
2019-01-02 17:34:17 +02:00
|
|
|
else
|
2019-02-03 09:02:54 +02:00
|
|
|
tp_players[index] = true
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.tp_mode_on'})
|
2019-01-02 17:34:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Takes argument from the tp command and calls the appropriate function
|
|
|
|
local function teleport_command(args, player)
|
|
|
|
local arg = args['mode|player']
|
|
|
|
if not arg then
|
|
|
|
teleport_location(nil, player)
|
|
|
|
elseif arg == 'mode' then
|
|
|
|
toggle_tp_mode(nil, player)
|
|
|
|
else
|
|
|
|
teleport_player({player = arg}, player)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-01-24 01:34:29 +02:00
|
|
|
--- Revives ghosts around the player
|
|
|
|
local function revive_ghosts(args, player)
|
|
|
|
local radius = args.radius
|
|
|
|
local pos = player.position
|
2019-01-31 02:38:43 +02:00
|
|
|
for _, e in pairs(player.surface.find_entities_filtered {area = {{pos.x - radius, pos.y - radius}, {pos.x + radius, pos.y + radius}}, type = 'entity-ghost'}) do
|
|
|
|
e.revive()
|
2019-01-24 01:34:29 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-02-14 19:33:47 +02:00
|
|
|
--- Destroys the player's selected entity
|
|
|
|
local function destroy_selected(_, player)
|
2019-02-02 08:04:41 +02:00
|
|
|
local ent = player.selected
|
|
|
|
if ent then
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.destroy_success', ent.localised_name})
|
2019-02-02 08:04:41 +02:00
|
|
|
ent.destroy()
|
|
|
|
else
|
2019-03-03 22:50:19 +02:00
|
|
|
Game.player_print({'admin_commands.destroy_fail'})
|
2019-02-02 08:04:41 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-01-08 22:58:12 +02:00
|
|
|
-- Event registrations
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
Event.add(defines.events.on_built_entity, built_entity)
|
|
|
|
|
2019-01-08 22:58:12 +02:00
|
|
|
-- Command registrations
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
Command.add(
|
|
|
|
'a',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.a'},
|
2019-01-02 17:34:17 +02:00
|
|
|
arguments = {'msg'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
2019-01-02 17:34:17 +02:00
|
|
|
capture_excess_arguments = true,
|
|
|
|
allowed_by_server = true
|
|
|
|
},
|
|
|
|
admin_chat
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
2019-02-25 17:17:45 +02:00
|
|
|
'dc',
|
2019-01-02 17:34:17 +02:00
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.dc'},
|
2019-01-02 17:34:17 +02:00
|
|
|
arguments = {'str'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
2019-01-02 17:34:17 +02:00
|
|
|
capture_excess_arguments = true,
|
|
|
|
allowed_by_server = true
|
|
|
|
},
|
|
|
|
silent_command
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'hax',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.hax'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin
|
2019-01-02 17:34:17 +02:00
|
|
|
},
|
|
|
|
toggle_cheat_mode
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'regular',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.regular'},
|
2019-02-22 22:03:02 +02:00
|
|
|
arguments = {'player'},
|
|
|
|
required_rank = Ranks.admin,
|
|
|
|
allowed_by_server = true
|
|
|
|
},
|
|
|
|
add_regular
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'regular-remove',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.regular_remove'},
|
2019-02-22 22:03:02 +02:00
|
|
|
arguments = {'player'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
|
|
|
allowed_by_server = true
|
2019-01-02 17:34:17 +02:00
|
|
|
},
|
2019-02-22 22:03:02 +02:00
|
|
|
remove_regular
|
2019-01-02 17:34:17 +02:00
|
|
|
)
|
|
|
|
|
2019-01-30 05:52:43 +02:00
|
|
|
Command.add(
|
|
|
|
'probation',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.probation'},
|
2019-02-22 22:03:02 +02:00
|
|
|
arguments = {'player'},
|
|
|
|
required_rank = Ranks.admin,
|
|
|
|
allowed_by_server = true
|
|
|
|
},
|
|
|
|
probation_add
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'probation-remove',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.probation_remove'},
|
2019-02-22 22:03:02 +02:00
|
|
|
arguments = {'player'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
|
|
|
allowed_by_server = true
|
|
|
|
},
|
2019-02-22 22:03:02 +02:00
|
|
|
probation_remove
|
2019-01-30 05:52:43 +02:00
|
|
|
)
|
|
|
|
|
2019-01-02 17:34:17 +02:00
|
|
|
Command.add(
|
|
|
|
'showreports',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.showreports'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin
|
2019-01-02 17:34:17 +02:00
|
|
|
},
|
|
|
|
show_reports
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'jail',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.jail'},
|
2019-01-02 17:34:17 +02:00
|
|
|
arguments = {'player'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
2019-01-02 17:34:17 +02:00
|
|
|
allowed_by_server = true
|
|
|
|
},
|
|
|
|
jail_player
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'unjail',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.unjail'},
|
2019-01-02 17:34:17 +02:00
|
|
|
arguments = {'player'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
2019-01-02 17:34:17 +02:00
|
|
|
allowed_by_server = true
|
|
|
|
},
|
|
|
|
unjail_player
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'pool',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.pool'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin
|
2019-01-02 17:34:17 +02:00
|
|
|
},
|
|
|
|
pool
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'invoke',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.invoke'},
|
2019-01-02 17:34:17 +02:00
|
|
|
arguments = {'player'},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin
|
2019-01-02 17:34:17 +02:00
|
|
|
},
|
|
|
|
invoke
|
|
|
|
)
|
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'tp',
|
|
|
|
{
|
2019-03-02 19:20:56 +02:00
|
|
|
description = {'command_description.tp'},
|
2019-01-02 17:34:17 +02:00
|
|
|
arguments = {'mode|player'},
|
|
|
|
default_values = {['mode|player'] = false},
|
2019-01-30 05:52:43 +02:00
|
|
|
required_rank = Ranks.admin,
|
2019-03-03 22:50:19 +02:00
|
|
|
custom_help_text = {'command_custom_help.tp'}
|
2019-01-02 17:34:17 +02:00
|
|
|
},
|
|
|
|
teleport_command
|
|
|
|
)
|
2019-01-24 01:34:29 +02:00
|
|
|
|
|
|
|
Command.add(
|
|
|
|
'revive-ghosts',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.revive_ghosts'},
|
2019-01-24 01:34:29 +02:00
|
|
|
arguments = {'radius'},
|
|
|
|
default_values = {radius = 10},
|
2019-02-08 23:21:35 +02:00
|
|
|
required_rank = Ranks.admin
|
2019-01-24 01:34:29 +02:00
|
|
|
},
|
|
|
|
revive_ghosts
|
|
|
|
)
|
2019-02-08 22:19:30 +02:00
|
|
|
|
2019-02-02 08:04:41 +02:00
|
|
|
Command.add(
|
|
|
|
'destroy',
|
|
|
|
{
|
2019-03-04 00:13:56 +02:00
|
|
|
description = {'command_description.destroy'},
|
2019-02-09 00:09:47 +02:00
|
|
|
required_rank = Ranks.admin
|
2019-02-02 08:04:41 +02:00
|
|
|
},
|
2019-02-14 19:33:47 +02:00
|
|
|
destroy_selected
|
2019-02-02 08:04:41 +02:00
|
|
|
)
|