Updated Docs

This commit is contained in:
Cooldude2606
2020-04-01 00:01:40 +01:00
parent 95af6cfc34
commit c9534de868
115 changed files with 23355 additions and 6604 deletions

View File

@@ -1,4 +1,5 @@
--greets players on join
--- Greets players on join
-- @addon greetings
local Event = require 'utils.event' --- @dep utils.event
local Game = require 'utils.game' --- @dep utils.event

View File

@@ -13,7 +13,7 @@ require 'config.expcore.command_general_parse'
Commands.new_command('admin-chat','Sends a message in chat that only admins can see.')
:add_param('message',false)
:enable_auto_concat()
:set_flag('admin_only',true)
:set_flag('admin_only')
:add_alias('ac')
:register(function(player,message,raw)
local player_name_colour = format_chat_player_name(player)

View File

@@ -14,7 +14,7 @@ Commands.new_command('toggle-cheat-mode','Toggles cheat mode for your player, or
:set_defaults{player=function(player)
return player -- default is the user using the command
end}
:set_flag('admin_only',true)
:set_flag('admin_only')
:register(function(player,action_player,raw)
action_player.cheat_mode = not action_player.cheat_mode
end)

View File

@@ -63,7 +63,7 @@ end
Commands.new_command('interface','Sends an innovation to be ran and returns the result.')
:add_param('innovation',false)
:enable_auto_concat()
:set_flag('admin_only',true)
:set_flag('admin_only')
:register(function(player,innovation,raw)
if not innovation:find('%s') and not innovation:find('return') then
-- if there are no spaces and return is not present then return is appended to the start

View File

@@ -15,7 +15,7 @@ local format_chat_player_name, format_chat_colour_localized = _C.format_chat_pla
Commands.new_command('assign-role','Assigns a role to a player')
:add_param('player',false,'player-role')
:add_param('role',false,'role')
:set_flag('admin-only',true)
:set_flag('admin-only')
:add_alias('rpromote','assign','role','add-role')
:register(function(player,action_player,role,raw)
local player_highest = Roles.get_player_highest_role(player)
@@ -33,7 +33,7 @@ end)
Commands.new_command('unassign-role','Unassigns a role from a player')
:add_param('player',false,'player-role')
:add_param('role',false,'role')
:set_flag('admin-only',true)
:set_flag('admin-only')
:add_alias('rdemote','unassign','rerole','remove-role')
:register(function(player,action_player,role,raw)
local player_highest = Roles.get_player_highest_role(player)

View File

@@ -23,7 +23,7 @@ Commands.new_command('teleport','Teleports a player to another player.')
:add_param('from_player',false,'player-alive')
:add_param('to_player',false,'player-online')
:add_alias('tp')
:set_flag('admin_only',true)
:set_flag('admin_only')
:register(function(player,from_player,to_player,raw)
if from_player.index == to_player.index then
-- return if attempting to teleport to self
@@ -40,7 +40,7 @@ end)
-- @tparam LuaPlayer player the player that will be teleported, must be alive
Commands.new_command('bring','Teleports a player to you.')
:add_param('player',false,'player-alive')
:set_flag('admin_only',true)
:set_flag('admin_only')
:register(function(player,from_player,raw)
if from_player.index == player.index then
-- return if attempting to teleport to self
@@ -58,7 +58,7 @@ end)
Commands.new_command('goto','Teleports you to a player.')
:add_param('player',false,'player-online')
:add_alias('tp-me','tpme')
:set_flag('admin_only',true)
:set_flag('admin_only')
:register(function(player,to_player,raw)
if to_player.index == player.index then
-- return if attempting to teleport to self

View File

@@ -38,7 +38,7 @@ local function check_player_permissions(player,action)
end
--- Button to toggle the auto launch on a rocket silo
-- @elemeent toggle_launch
-- @element toggle_launch
local toggle_launch =
Gui.element{
type = 'sprite-button',