mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Minor bug fixes
This commit is contained in:
@@ -26,7 +26,7 @@ return {
|
|||||||
'modules.addons.chat-popups',
|
'modules.addons.chat-popups',
|
||||||
'modules.addons.damage-popups',
|
'modules.addons.damage-popups',
|
||||||
'modules.addons.death-logger',
|
'modules.addons.death-logger',
|
||||||
'modules.addons.advanced-starting-items',
|
'modules.addons.advanced-start',
|
||||||
'modules.addons.spawn-area',
|
'modules.addons.spawn-area',
|
||||||
'modules.addons.compilatron',
|
'modules.addons.compilatron',
|
||||||
'modules.addons.scorched-earth',
|
'modules.addons.scorched-earth',
|
||||||
@@ -35,10 +35,10 @@ return {
|
|||||||
-- GUI
|
-- GUI
|
||||||
'modules.commands.debug',
|
'modules.commands.debug',
|
||||||
-- Config Files
|
-- Config Files
|
||||||
'config.command_auth_admin', -- commands tagged with admin_only are blocked for non admins
|
'config.expcore-commands.auth_admin', -- commands tagged with admin_only are blocked for non admins
|
||||||
'config.command_auth_roles', -- commands must be allowed via the role config
|
'config.expcore-commands.auth_roles', -- commands must be allowed via the role config
|
||||||
'config.command_auth_runtime_disable', -- allows commands to be enabled and disabled during runtime
|
'config.expcore-commands.auth_runtime_disable', -- allows commands to be enabled and disabled during runtime
|
||||||
'config.permission_groups', -- loads some predefined permission groups
|
'config.permission_groups', -- loads some predefined permission groups
|
||||||
'config.roles', -- loads some predefined roles
|
'config.roles', -- loads some predefined roles
|
||||||
'expcore.gui.test'
|
'expcore.gui.test' -- loads multiple gui defines to test the gui system
|
||||||
}
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[command-auth]
|
|
||||||
admin-only=This command is for (game) admins only!
|
|
||||||
command-disabled=This command has been disabled by management!
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local Roles = require 'expcore.roles'
|
local Roles = require 'expcore.roles'
|
||||||
local auto_complete = ext_require('expcore.common','auto_complete')
|
local auto_complete = ext_require('expcore.common','auto_complete')
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
Commands.add_parse('role',function(input,player,reject)
|
Commands.add_parse('role',function(input,player,reject)
|
||||||
if not input then return end
|
if not input then return end
|
||||||
@@ -26,7 +26,7 @@ ext_require = require('expcore.common').ext_require
|
|||||||
|
|
||||||
-- Please go to config/file_loader.lua to edit the files that are loaded
|
-- Please go to config/file_loader.lua to edit the files that are loaded
|
||||||
log('[INFO] Getting file loader config')
|
log('[INFO] Getting file loader config')
|
||||||
local files = require 'config.file_loader'
|
local files = require 'config._file_loader'
|
||||||
|
|
||||||
-- Loads all files from the config and logs that they are loaded
|
-- Loads all files from the config and logs that they are loaded
|
||||||
local total_file_count = string.format('%3d',#files)
|
local total_file_count = string.format('%3d',#files)
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ end
|
|||||||
|
|
||||||
LeftFrames.toggle_button =
|
LeftFrames.toggle_button =
|
||||||
Buttons.new_button()
|
Buttons.new_button()
|
||||||
:set_tooltip('Close Windows')
|
:set_tooltip{'expcore-gui.left-button-tooltip'}
|
||||||
:set_caption('<')
|
:set_caption('<')
|
||||||
:on_click(function(player,element)
|
:on_click(function(player,element)
|
||||||
for _,define in pairs(LeftFrames.frames) do
|
for _,define in pairs(LeftFrames.frames) do
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
[expcore-commands]
|
|
||||||
unauthorized=401 - Unbefugt: Zugang verweigert. Du hast keinen Zugriff auf diese Befehle!
|
|
||||||
reject-number-range=ungültige Reichweite, Min: __1__, Max: __2__
|
|
||||||
reject-string-max-length=ungültige Länge, Max: __1__
|
|
||||||
reject-player=ungültiger Spieler Name, __1__ , Versuche "Tab" zu benutzen, damit sich der Name automatisch vervollständigt.
|
|
||||||
reject-player-online=Der betroffene Spieler ist offline, Befehl konnte nicht ausgeführt werden.
|
|
||||||
reject-player-alive=Der betroffene Spieler ist Tod, Befehl konnte nicht ausgeführt werden.
|
|
||||||
invalid-inputs=ungültige Eingabe, /__1__ __2__
|
|
||||||
command-ran=Befehl ausgeführt.
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
time-symbol-days-short=__1__d
|
|
||||||
|
|
||||||
[expcore-commands]
|
|
||||||
unauthorized=Unauthorized, Access is denied due to invalid credentials
|
|
||||||
reject-string-options=Invalid Option, Must be one of: __1__
|
|
||||||
reject-string-max-length=Invalid Length, Max: __1__
|
|
||||||
reject-number=Invalid Number.
|
|
||||||
reject-number-range=Invalid Range, Min (inclusive): __1__, Max (inclusive): __2__
|
|
||||||
reject-player=Invaild Player Name, __1__ ,try using tab key to auto-complete the name
|
|
||||||
reject-player-online=Player is offline.
|
|
||||||
reject-player-alive=Player is dead.
|
|
||||||
reject-force=Invaild Force Name.
|
|
||||||
reject-surface=Invaild Surface Name.
|
|
||||||
invalid-inputs=Invalid Input, /__1__ __2__
|
|
||||||
invalid-param=Invalid Param "__1__"; __2__
|
|
||||||
command-help=__1__ - __2__
|
|
||||||
command-ran=Command Complete
|
|
||||||
command-fail=Command failed to run: __1__
|
|
||||||
command-error-log-format=[ERROR] command/__1__ :: __2__
|
|
||||||
|
|
||||||
[expcore-roles]
|
|
||||||
error-log-format-flag=[ERROR] roleFlag/__1__ :: __2__
|
|
||||||
error-log-format-promote=[ERROR] rolePromote/__1__ :: __2__
|
|
||||||
game-message-assign=__1__ has been assigned to __2__ by __3__
|
|
||||||
game-message-unassign=__1__ has been unassigned from __2__ by __3__
|
|
||||||
reject-role=Invalid Role Name.
|
|
||||||
reject-player-role=Player has a higher role.
|
|
||||||
|
|
||||||
[gui_util]
|
|
||||||
button_tooltip=Shows / hides the Toolbar Gui buttons.
|
|
||||||
|
|
||||||
[expcore-gui]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[expcore-commands]
|
|
||||||
unauthorized=401 - Onbevoegd: toegang wordt geweigerd vanwege ongeldige inloggegevens
|
|
||||||
reject-number-range=Onjuiste radius, Min: __1__, Max: __2__
|
|
||||||
reject-string-max-length=Onjuiste lengte, Max: __1__
|
|
||||||
reject-player=Onjuiste naam, __1__ , probeer tab te gebruiken om de naam automatisch in te vullen
|
|
||||||
reject-player-online=Speler is offline.
|
|
||||||
reject-player-alive=Speler is dood.
|
|
||||||
invalid-inputs=Onjuiste invoer, /__1__ __2__
|
|
||||||
command-ran=Commando uitgevoerd.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[expcore-commands]
|
|
||||||
unauthorized=401 - Otillåten: Tillgång nekas på grund av otillräcklig säkerhetsprövning.
|
|
||||||
reject-number-range=Invalid räckvid, Min: __1__, Max: __2__
|
|
||||||
reject-string-max-length=ogiltig längd, Max: __1__
|
|
||||||
reject-player=Ogiltigt spelarnamn, __1__ , försök använda tab-tangenten för att auto-slutföra namn.
|
|
||||||
reject-player-online=Spelare är offline. Kommando misslyckades med att köras.
|
|
||||||
reject-player-alive=Spelare är död. Kommando misslyckades med att köras.
|
|
||||||
invalid-inputs=Igiltig inmatning, /__1__ __2__
|
|
||||||
command-ran=Kommandot slutfört
|
|
||||||
@@ -1,38 +1,56 @@
|
|||||||
[exp-commands]
|
[expcom-kill]
|
||||||
kill-already-dead=You are already dead.
|
already-dead=You are already dead.
|
||||||
admin-chat-format=[Admin Chat] __1__: __2__
|
|
||||||
tp-no-position-found=No position to teleport to was found, please try again later.
|
[expcom-admin-chat]
|
||||||
tp-to-self=Player can not be teleported to themselves.
|
format=[Admin Chat] __1__: __2__
|
||||||
chelp-title=Help results for "__1__":
|
|
||||||
chelp-footer=[__1__ results found; page __2__ of __3__]
|
[expcom-tp]
|
||||||
chelp-format=/__1__ __2__ - __3__ __4__
|
no-position-found=No position to teleport to was found, please try again later.
|
||||||
chelp-alias=Alias: __1__
|
to-self=Player can not be teleported to themselves.
|
||||||
chelp-out-of-range=__1__ is an invalid page number.
|
|
||||||
roles-higher-role=The role you tried to assign is higher than your highest.
|
[expcom-chelp]
|
||||||
roles-list=All roles are: __1__
|
title=Help results for "__1__":
|
||||||
roles-list-player=__1__ has: __2__
|
footer=[__1__ results found; page __2__ of __3__]
|
||||||
roles-list-element=__1__, __2__
|
format=/__1__ __2__ - __3__ __4__
|
||||||
jail-give=__1__ was jailed by __2__. Reason: __3__
|
alias=Alias: __1__
|
||||||
jail-remove=__1__ was unjailed by __2__.
|
out-of-range=__1__ is an invalid page number.
|
||||||
jail-already-jailed=__1__ is already in jail.
|
|
||||||
jail-not-jailed=__1__ is not currently in jail.
|
[expcom-roles]
|
||||||
jail-temp-ban=__1__ was temp banned until next reset by __2__. Reason: __3__
|
higher-role=The role you tried to assign is higher than your highest.
|
||||||
jail-temp-ban-clear=__1__ was cleared from temp banned by __2__.
|
list=All roles are: __1__
|
||||||
jail-not-temp-banned=__1__ is not currently temp banned.
|
list-player=__1__ has: __2__
|
||||||
jail-already-banned=__1__ is already banned.
|
list-element=__1__, __2__
|
||||||
report-player-immune=This player can not be reported.
|
|
||||||
report-non-admin=__1__ was reported for __2__.
|
[expcom-jail]
|
||||||
report-admin=__1__ was reported by __2__ for __3__.
|
give=__1__ was jailed by __2__. Reason: __3__
|
||||||
report-already-reported=You can only report a player once, you can ask a moderator to clear this report.
|
remove=__1__ was unjailed by __2__.
|
||||||
report-not-reported=The player had no reports on them.
|
already-jailed=__1__ is already in jail.
|
||||||
report-player-count-title=The following players have reports against them:
|
not-jailed=__1__ is not currently in jail.
|
||||||
report-player-report-title=__1__ has the following reports agasinst them:
|
temp-ban=__1__ was temp banned until next reset by __2__. Reason: __3__
|
||||||
report-list=__1__: __2__
|
temp-ban-clear=__1__ was cleared from temp banned by __2__.
|
||||||
report-removed=__1__ has one or more reports removed by __2__.
|
not-temp-banned=__1__ is not currently temp banned.
|
||||||
warnings-received=__1__ recived a warning from __2__ for __3__.
|
already-banned=__1__ is already banned.
|
||||||
warnings-player=__1__ has __2__ warnings and __3__/__4__ script warnings.
|
|
||||||
warnings-list-tilte=The following player have this many warnings (and this many script warnings):
|
[expcom-report]
|
||||||
warnings-list=__1__: __2__ (__3__/__4__)
|
player-immune=This player can not be reported.
|
||||||
warnings-cleared=__1__ had all they warnings cleared by __2__.
|
non-admin=__1__ was reported for __2__.
|
||||||
spawn-unavailable=They was a problem getting you to spawn, please try again later.
|
admin=__1__ was reported by __2__ for __3__.
|
||||||
repair-result=__1__ entites were revived and __2__ were healed to max health.
|
already-reported=You can only report a player once, you can ask a moderator to clear this report.
|
||||||
|
not-reported=The player had no reports on them.
|
||||||
|
player-count-title=The following players have reports against them:
|
||||||
|
player-report-title=__1__ has the following reports agasinst them:
|
||||||
|
list=__1__: __2__
|
||||||
|
removed=__1__ has one or more reports removed by __2__.
|
||||||
|
|
||||||
|
[expcom-warnings]
|
||||||
|
received=__1__ recived a warning from __2__ for __3__.
|
||||||
|
player=__1__ has __2__ warnings and __3__/__4__ script warnings.
|
||||||
|
list-tilte=The following player have this many warnings (and this many script warnings):
|
||||||
|
list=__1__: __2__ (__3__/__4__)
|
||||||
|
cleared=__1__ had all they warnings cleared by __2__.
|
||||||
|
|
||||||
|
[expcom-spawn]
|
||||||
|
unavailable=They was a problem getting you to spawn, please try again later.
|
||||||
|
|
||||||
|
[expcom-repair]
|
||||||
|
result=__1__ entites were revived and __2__ were healed to max health.
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
time-symbol-days-short=__1__d
|
time-symbol-days-short=__1__d
|
||||||
|
color-tag=[color=__1__]__2__[/color]
|
||||||
|
|
||||||
[expcore-commands]
|
[expcore-commands]
|
||||||
unauthorized=Unauthorized, Access is denied due to invalid credentials
|
unauthorized=Unauthorized, Access is denied due to invalid credentials
|
||||||
@@ -27,6 +28,7 @@ reject-role=Invalid Role Name.
|
|||||||
reject-player-role=Player has a higher role.
|
reject-player-role=Player has a higher role.
|
||||||
|
|
||||||
[gui_util]
|
[gui_util]
|
||||||
button_tooltip=Shows / hides the Toolbar Gui buttons.
|
button_tooltip=Shows/hides the toolbar.
|
||||||
|
|
||||||
[expcore-gui]
|
[expcore-gui]
|
||||||
|
left-button-tooltip=Hide all open windows.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
--- Adds a better method of player starting items based on production levels.
|
--- Adds a better method of player starting items based on production levels.
|
||||||
local Event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
local Game = require 'utils.game'
|
local Game = require 'utils.game'
|
||||||
local config = require 'config.advanced_starting_items'
|
local config = require 'config.advanced_start'
|
||||||
local items = config.items
|
local items = config.items
|
||||||
|
|
||||||
Event.add(defines.events.on_player_created, function(event)
|
Event.add(defines.events.on_player_created, function(event)
|
||||||
@@ -9,15 +9,13 @@ Global.register(config,function(tbl)
|
|||||||
config = tbl
|
config = tbl
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local white = Colours.white
|
|
||||||
local black = Colours.black
|
|
||||||
Event.add(defines.events.on_player_created,function(event)
|
Event.add(defines.events.on_player_created,function(event)
|
||||||
local player = Game.get_player_by_index(event.player_index)
|
local player = Game.get_player_by_index(event.player_index)
|
||||||
local color = 'white'
|
local color = 'white'
|
||||||
if config.players[player.name] then
|
if config.players[player.name] then
|
||||||
color = config.players[player.name]
|
color = config.players[player.name]
|
||||||
else
|
else
|
||||||
while not config.disallow[color] do
|
while config.disallow[color] do
|
||||||
color = table.get_random_dictionary_entry(Colours,true)
|
color = table.get_random_dictionary_entry(Colours,true)
|
||||||
end
|
end
|
||||||
color = Colours[color]
|
color = Colours[color]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
Commands.new_command('admin-chat','Sends a message in chat that only admins can see.')
|
Commands.new_command('admin-chat','Sends a message in chat that only admins can see.')
|
||||||
:add_param('message',false) -- the message to send in the admin chat
|
:add_param('message',false) -- the message to send in the admin chat
|
||||||
@@ -11,7 +11,7 @@ Commands.new_command('admin-chat','Sends a message in chat that only admins can
|
|||||||
local player_name_colour = format_chat_player_name(player)
|
local player_name_colour = format_chat_player_name(player)
|
||||||
for _,return_player in pairs(game.connected_players) do
|
for _,return_player in pairs(game.connected_players) do
|
||||||
if return_player.admin then
|
if return_player.admin then
|
||||||
return_player.print{'exp-commands.admin-chat-format',player_name_colour,message}
|
return_player.print{'expcom-admin-chat.format',player_name_colour,message}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return Commands.success -- prevents command complete message from showing
|
return Commands.success -- prevents command complete message from showing
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
Commands.new_command('toggle-cheat-mode','Toggles cheat mode for your player, or another player.')
|
Commands.new_command('toggle-cheat-mode','Toggles cheat mode for your player, or another player.')
|
||||||
:add_param('player',true,'player') -- player to toggle chest mode of, can be nil for self
|
:add_param('player',true,'player') -- player to toggle chest mode of, can be nil for self
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local move_items = ext_require('expcore.common','move_items')
|
local move_items = ext_require('expcore.common','move_items')
|
||||||
require 'config.command_parse_roles'
|
require 'config.expcore-commands.parse_roles'
|
||||||
|
|
||||||
Commands.new_command('clear-inventory','Clears a players inventory')
|
Commands.new_command('clear-inventory','Clears a players inventory')
|
||||||
:add_param('player',false,'player-role-alive')
|
:add_param('player',false,'player-role-alive')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local Global = require 'utils.global'
|
local Global = require 'utils.global'
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
local results_per_page = 5
|
local results_per_page = 5
|
||||||
|
|
||||||
@@ -42,9 +42,9 @@ Commands.new_command('chelp','Searches for a keyword in all commands you are all
|
|||||||
-- adds the new command to the page
|
-- adds the new command to the page
|
||||||
page_count = page_count + 1
|
page_count = page_count + 1
|
||||||
found = found + 1
|
found = found + 1
|
||||||
local alias_format = #command_data.aliases > 0 and {'exp-commands.chelp-alias',table.concat(command_data.aliases,', ')} or ''
|
local alias_format = #command_data.aliases > 0 and {'expcom-chelp.alias',table.concat(command_data.aliases,', ')} or ''
|
||||||
table.insert(pages[current_page],{
|
table.insert(pages[current_page],{
|
||||||
'exp-commands.chelp-format',
|
'expcom-chelp.format',
|
||||||
command_data.name,
|
command_data.name,
|
||||||
command_data.description,
|
command_data.description,
|
||||||
command_data.help,
|
command_data.help,
|
||||||
@@ -60,15 +60,15 @@ Commands.new_command('chelp','Searches for a keyword in all commands you are all
|
|||||||
end
|
end
|
||||||
-- print the requested page
|
-- print the requested page
|
||||||
keyword = keyword == '' and '<all>' or keyword
|
keyword = keyword == '' and '<all>' or keyword
|
||||||
Commands.print({'exp-commands.chelp-title',keyword},'cyan')
|
Commands.print({'expcom-chelp.title',keyword},'cyan')
|
||||||
if pages[page] then
|
if pages[page] then
|
||||||
for _,command in pairs(pages[page]) do
|
for _,command in pairs(pages[page]) do
|
||||||
Commands.print(command)
|
Commands.print(command)
|
||||||
end
|
end
|
||||||
Commands.print({'exp-commands.chelp-footer',found,page,#pages},'cyan')
|
Commands.print({'expcom-chelp.footer',found,page,#pages},'cyan')
|
||||||
else
|
else
|
||||||
Commands.print({'exp-commands.chelp-footer',found,page,#pages},'cyan')
|
Commands.print({'expcom-chelp.footer',found,page,#pages},'cyan')
|
||||||
return Commands.error{'exp-commands.chelp-out-of-range',page}
|
return Commands.error{'expcom-chelp.out-of-range',page}
|
||||||
end
|
end
|
||||||
-- blocks command complete message
|
-- blocks command complete message
|
||||||
return Commands.success
|
return Commands.success
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local JailControl = require 'modules.addons.jail-control'
|
local JailControl = require 'modules.addons.jail-control'
|
||||||
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
||||||
require 'config.command_parse_roles'
|
require 'config.expcore-commands.parse_roles'
|
||||||
|
|
||||||
Commands.new_command('jail','Puts a player into jail and removes all other roles.')
|
Commands.new_command('jail','Puts a player into jail and removes all other roles.')
|
||||||
:add_param('player',false,'player-role')
|
:add_param('player',false,'player-role')
|
||||||
@@ -12,9 +12,9 @@ Commands.new_command('jail','Puts a player into jail and removes all other roles
|
|||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
if JailControl.jail_player(action_player,player.name) then
|
if JailControl.jail_player(action_player,player.name) then
|
||||||
game.print{'exp-commands.jail-give',action_player_name_color,by_player_name_color,reason}
|
game.print{'expcom-jail.give',action_player_name_color,by_player_name_color,reason}
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.jail-already-jailed',action_player_name_color}
|
return Commands.error{'expcom-jail.already-jailed',action_player_name_color}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -26,9 +26,9 @@ Commands.new_command('unjail','Puts a player into jail and removes all other rol
|
|||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
if JailControl.unjail_player(action_player,player.name) then
|
if JailControl.unjail_player(action_player,player.name) then
|
||||||
game.print{'exp-commands.jail-remove',action_player_name_color,by_player_name_color}
|
game.print{'expcom-jail.remove',action_player_name_color,by_player_name_color}
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.jail-not-jailed',action_player_name_color}
|
return Commands.error{'expcom-jail.not-jailed',action_player_name_color}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -40,9 +40,9 @@ Commands.new_command('temp-ban','Temp bans a player until the next reset; this r
|
|||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
if JailControl.temp_ban_player(action_player,player.name,reason) then
|
if JailControl.temp_ban_player(action_player,player.name,reason) then
|
||||||
game.print{'exp-commands.jail-temp-ban',action_player_name_color,by_player_name_color,reason}
|
game.print{'expcom-jail.temp-ban',action_player_name_color,by_player_name_color,reason}
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.jail-already-banned',action_player_name_color}
|
return Commands.error{'expcom-jail.already-banned',action_player_name_color}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -54,8 +54,8 @@ Commands.new_command('clear-temp-ban','Removes temp ban from a player; this will
|
|||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
if JailControl.clear_temp_ban_player(action_player,player.name) then
|
if JailControl.clear_temp_ban_player(action_player,player.name) then
|
||||||
game.print{'exp-commands.jail-temp-ban-clear',action_player_name_color,by_player_name_color}
|
game.print{'expcom-jail.temp-ban-clear',action_player_name_color,by_player_name_color}
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.jail-not-temp-banned',action_player_name_color}
|
return Commands.error{'expcom-jail.not-temp-banned',action_player_name_color}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local Roles = require 'expcore.roles'
|
local Roles = require 'expcore.roles'
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
require 'config.command_parse_roles'
|
require 'config.expcore-commands.parse_roles'
|
||||||
|
|
||||||
Commands.new_command('kill','Kills yourself or another player.')
|
Commands.new_command('kill','Kills yourself or another player.')
|
||||||
:add_param('player',true,'player-role-alive') -- the player to kill, must be alive to be valid
|
:add_param('player',true,'player-role-alive') -- the player to kill, must be alive to be valid
|
||||||
@@ -14,7 +14,7 @@ end}
|
|||||||
:register(function(player,action_player,raw)
|
:register(function(player,action_player,raw)
|
||||||
if not action_player then
|
if not action_player then
|
||||||
-- can only be nil if no player given and the user is dead
|
-- can only be nil if no player given and the user is dead
|
||||||
return Commands.error{'exp-commands.kill-already-dead'}
|
return Commands.error{'expcom-kill.already-dead'}
|
||||||
end
|
end
|
||||||
if player == action_player then
|
if player == action_player then
|
||||||
action_player.character.die()
|
action_player.character.die()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local config = require 'config.repair'
|
local config = require 'config.repair'
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
local max_time_to_live = 4294967295 -- unit32 max
|
local max_time_to_live = 4294967295 -- unit32 max
|
||||||
Commands.new_command('repair','Repairs entities on your force around you')
|
Commands.new_command('repair','Repairs entities on your force around you')
|
||||||
@@ -40,5 +40,5 @@ Commands.new_command('repair','Repairs entities on your force around you')
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return Commands.success{'exp-commands.repair-result',revive_count,heal_count}
|
return Commands.success{'expcom-repair.result',revive_count,heal_count}
|
||||||
end)
|
end)
|
||||||
@@ -2,14 +2,14 @@ local Roles = require 'expcore.roles'
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local ReportsControl = require 'modules.addons.reports-control'
|
local ReportsControl = require 'modules.addons.reports-control'
|
||||||
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
Commands.new_command('report','Reports a player and notifies moderators')
|
Commands.new_command('report','Reports a player and notifies moderators')
|
||||||
:add_param('player',false,function(input,player,reject)
|
:add_param('player',false,function(input,player,reject)
|
||||||
input = Commands.parse('player',input,player,reject)
|
input = Commands.parse('player',input,player,reject)
|
||||||
if not input then return end
|
if not input then return end
|
||||||
if Roles.player_has_flag(input,'report-immune') then
|
if Roles.player_has_flag(input,'report-immune') then
|
||||||
return reject{'exp-commands.report-player-immune'}
|
return reject{'expcom-report.player-immune'}
|
||||||
else
|
else
|
||||||
return input
|
return input
|
||||||
end
|
end
|
||||||
@@ -21,10 +21,10 @@ end)
|
|||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
if ReportsControl.report_player(action_player,reason,player.name) then
|
if ReportsControl.report_player(action_player,reason,player.name) then
|
||||||
game.print{'exp-commands.report-non-admin',action_player_name_color,reason}
|
game.print{'expcom-report.non-admin',action_player_name_color,reason}
|
||||||
Roles.print_to_roles_higher('Trainee',{'exp-commands.report-admin',action_player_name_color,by_player_name_color,reason})
|
Roles.print_to_roles_higher('Trainee',{'expcom-report.admin',action_player_name_color,by_player_name_color,reason})
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.report-already-reported'}
|
return Commands.error{'expcom-report.already-reported'}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -35,18 +35,18 @@ Commands.new_command('get-reports','Gets a list of all reports that a player has
|
|||||||
if action_player then
|
if action_player then
|
||||||
local reports = ReportsControl.get_player_reports(action_player)
|
local reports = ReportsControl.get_player_reports(action_player)
|
||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
Commands.print{'exp-commands.report-player-report-title',action_player_name_color}
|
Commands.print{'expcom-report.player-report-title',action_player_name_color}
|
||||||
for player_name,reason in pairs(reports) do
|
for player_name,reason in pairs(reports) do
|
||||||
local by_player_name_color = format_chat_player_name(player_name)
|
local by_player_name_color = format_chat_player_name(player_name)
|
||||||
Commands.print{'exp-commands.report-list',by_player_name_color,reason}
|
Commands.print{'expcom-report.list',by_player_name_color,reason}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local user_reports = ReportsControl.user_reports
|
local user_reports = ReportsControl.user_reports
|
||||||
Commands.print{'exp-commands.report-player-count-title'}
|
Commands.print{'expcom-report.player-count-title'}
|
||||||
for player_name,reports in pairs(user_reports) do
|
for player_name,reports in pairs(user_reports) do
|
||||||
local player_name_color = format_chat_player_name(player_name)
|
local player_name_color = format_chat_player_name(player_name)
|
||||||
local report_count = ReportsControl.count_player_reports(player_name)
|
local report_count = ReportsControl.count_player_reports(player_name)
|
||||||
Commands.print{'exp-commands.report-list',player_name_color,report_count}
|
Commands.print{'expcom-report.list',player_name_color,report_count}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -57,14 +57,14 @@ Commands.new_command('clear-reports','Clears all reports from a player or just t
|
|||||||
:register(function(player,action_player,from_player,raw)
|
:register(function(player,action_player,from_player,raw)
|
||||||
if from_player then
|
if from_player then
|
||||||
if not ReportsControl.remove_player_report(action_player,from_player.name) then
|
if not ReportsControl.remove_player_report(action_player,from_player.name) then
|
||||||
return Commands.error{'exp-commands.report-not-reported'}
|
return Commands.error{'expcom-report.not-reported'}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not ReportsControl.clear_player_reports(action_player) then
|
if not ReportsControl.clear_player_reports(action_player) then
|
||||||
return Commands.error{'exp-commands.report-not-reported'}
|
return Commands.error{'expcom-report.not-reported'}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
game.print{'exp-commands.report-removed',action_player_name_color,by_player_name_color}
|
game.print{'expcom-report.removed',action_player_name_color,by_player_name_color}
|
||||||
end)
|
end)
|
||||||
@@ -16,7 +16,7 @@ Commands.new_command('assign-role','Assigns a role to a player')
|
|||||||
if player_highest.index < role.index then
|
if player_highest.index < role.index then
|
||||||
Roles.assign_player(action_player,role,player.name)
|
Roles.assign_player(action_player,role,player.name)
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.roles-higher-role'}
|
return Commands.error{'expcom-roles.higher-role'}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ Commands.new_command('unassign-role','Unassigns a role from a player')
|
|||||||
if player_highest.index < role.index then
|
if player_highest.index < role.index then
|
||||||
Roles.unassign_player(action_player,role,player.name)
|
Roles.unassign_player(action_player,role,player.name)
|
||||||
else
|
else
|
||||||
return Commands.error{'exp-commands.roles-higher-role'}
|
return Commands.error{'expcom-roles.higher-role'}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ Commands.new_command('list-roles','Lists all roles in they correct order')
|
|||||||
:add_alias('lsroles','roles')
|
:add_alias('lsroles','roles')
|
||||||
:register(function(player,action_player,raw)
|
:register(function(player,action_player,raw)
|
||||||
local roles = Roles.config.order
|
local roles = Roles.config.order
|
||||||
local message = {'exp-commands.roles-list'}
|
local message = {'expcom-roles.list'}
|
||||||
if action_player then
|
if action_player then
|
||||||
roles = Roles.get_player_roles(action_player)
|
roles = Roles.get_player_roles(action_player)
|
||||||
end
|
end
|
||||||
@@ -48,13 +48,13 @@ Commands.new_command('list-roles','Lists all roles in they correct order')
|
|||||||
local colour = role.custom_color or Colours.white
|
local colour = role.custom_color or Colours.white
|
||||||
local role_name = format_chat_colour_localized(role.name,colour)
|
local role_name = format_chat_colour_localized(role.name,colour)
|
||||||
if index == 1 then
|
if index == 1 then
|
||||||
message = {'exp-commands.roles-list',role_name}
|
message = {'expcom-roles.list',role_name}
|
||||||
if action_player then
|
if action_player then
|
||||||
local player_name_colour = format_chat_player_name(action_player)
|
local player_name_colour = format_chat_player_name(action_player)
|
||||||
message = {'exp-commands.roles-list-player',player_name_colour,role_name}
|
message = {'expcom-roles.list-player',player_name_colour,role_name}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
message = {'exp-commands.roles-list-element',message,role_name}
|
message = {'expcom-roles.list-element',message,role_name}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return Commands.success(message)
|
return Commands.success(message)
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ Commands.new_command('go-to-spawn','Teleport to spawn')
|
|||||||
:add_alias('spawn','tp-spawn')
|
:add_alias('spawn','tp-spawn')
|
||||||
:register(function(player,action_player)
|
:register(function(player,action_player)
|
||||||
if not action_player then
|
if not action_player then
|
||||||
return Commands.error{'exp-commands.spawn-unavailable'}
|
return Commands.error{'expcom-spawn.unavailable'}
|
||||||
elseif action_player == player then
|
elseif action_player == player then
|
||||||
if not teleport(player) then
|
if not teleport(player) then
|
||||||
return Commands.error{'exp-commands.spawn-unavailable'}
|
return Commands.error{'expcom-spawn.unavailable'}
|
||||||
end
|
end
|
||||||
elseif Roles.player_allowed(player,'command/go-to-spawn/always') then
|
elseif Roles.player_allowed(player,'command/go-to-spawn/always') then
|
||||||
if not teleport(action_player) then
|
if not teleport(action_player) then
|
||||||
return Commands.error{'exp-commands.spawn-unavailable'}
|
return Commands.error{'expcom-spawn.unavailable'}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return Commands.error{'expcore-commands.unauthorized'}
|
return Commands.error{'expcore-commands.unauthorized'}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
local Roles = require 'expcore.roles'
|
local Roles = require 'expcore.roles'
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
require 'config.command_parse_roles'
|
require 'config.expcore-commands.parse_roles'
|
||||||
|
|
||||||
Commands.new_command('tag','Sets your player tag.')
|
Commands.new_command('tag','Sets your player tag.')
|
||||||
:add_param('tag',false,'string-max-length',20) -- new tag for your player max 20 char
|
:add_param('tag',false,'string-max-length',20) -- new tag for your player max 20 char
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local Commands = require 'expcore.commands'
|
local Commands = require 'expcore.commands'
|
||||||
require 'config.command_parse_general'
|
require 'config.expcore-commands.parse_general'
|
||||||
|
|
||||||
local function teleport(from_player,to_player)
|
local function teleport(from_player,to_player)
|
||||||
local surface = to_player.surface
|
local surface = to_player.surface
|
||||||
@@ -18,11 +18,11 @@ Commands.new_command('teleport','Teleports a player to another player.')
|
|||||||
:register(function(player,from_player,to_player,raw)
|
:register(function(player,from_player,to_player,raw)
|
||||||
if from_player.index == to_player.index then
|
if from_player.index == to_player.index then
|
||||||
-- return if attempting to teleport to self
|
-- return if attempting to teleport to self
|
||||||
return Commands.error{'exp-commands.tp-to-self'}
|
return Commands.error{'expcom-tp.to-self'}
|
||||||
end
|
end
|
||||||
if not teleport(from_player,to_player) then
|
if not teleport(from_player,to_player) then
|
||||||
-- return if the teleport failed
|
-- return if the teleport failed
|
||||||
return Commands.error{'exp-commands.tp-no-position-found'}
|
return Commands.error{'expcom-tp.no-position-found'}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -32,11 +32,11 @@ Commands.new_command('bring','Teleports a player to you.')
|
|||||||
:register(function(player,from_player,raw)
|
:register(function(player,from_player,raw)
|
||||||
if from_player.index == player.index then
|
if from_player.index == player.index then
|
||||||
-- return if attempting to teleport to self
|
-- return if attempting to teleport to self
|
||||||
return Commands.error{'exp-commands.tp-to-self'}
|
return Commands.error{'expcom-tp.to-self'}
|
||||||
end
|
end
|
||||||
if not teleport(from_player,player) then
|
if not teleport(from_player,player) then
|
||||||
-- return if the teleport failed
|
-- return if the teleport failed
|
||||||
return Commands.error{'exp-commands.tp-no-position-found'}
|
return Commands.error{'expcom-tp.no-position-found'}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -47,10 +47,10 @@ Commands.new_command('goto','Teleports you to a player.')
|
|||||||
:register(function(player,to_player,raw)
|
:register(function(player,to_player,raw)
|
||||||
if to_player.index == player.index then
|
if to_player.index == player.index then
|
||||||
-- return if attempting to teleport to self
|
-- return if attempting to teleport to self
|
||||||
return Commands.error{'exp-commands.tp-to-self'}
|
return Commands.error{'expcom-tp.to-self'}
|
||||||
end
|
end
|
||||||
if not teleport(player,to_player) then
|
if not teleport(player,to_player) then
|
||||||
-- return if the teleport failed
|
-- return if the teleport failed
|
||||||
return Commands.error{'exp-commands.tp-no-position-found'}
|
return Commands.error{'expcom-tp.no-position-found'}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -2,7 +2,7 @@ local Commands = require 'expcore.commands'
|
|||||||
local WarningsControl = require 'modules.addons.warnings-control'
|
local WarningsControl = require 'modules.addons.warnings-control'
|
||||||
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
|
||||||
local config = require 'config.warnings'
|
local config = require 'config.warnings'
|
||||||
require 'config.command_parse_roles'
|
require 'config.expcore-commands.parse_roles'
|
||||||
|
|
||||||
Commands.new_command('give-warning','Gives a warning to a player; may lead to automatic script action.')
|
Commands.new_command('give-warning','Gives a warning to a player; may lead to automatic script action.')
|
||||||
:add_param('player',false,'player-role')
|
:add_param('player',false,'player-role')
|
||||||
@@ -13,7 +13,7 @@ Commands.new_command('give-warning','Gives a warning to a player; may lead to au
|
|||||||
WarningsControl.add_warnings(action_player,player.name)
|
WarningsControl.add_warnings(action_player,player.name)
|
||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
game.print{'exp-commands.warnings-received',action_player_name_color,by_player_name_color,reason}
|
game.print{'expcom-warnings.received',action_player_name_color,by_player_name_color,reason}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Commands.new_command('get-warnings','Gets the number of warnings a player has. If no player then lists all players and the number of warnings they have.')
|
Commands.new_command('get-warnings','Gets the number of warnings a player has. If no player then lists all players and the number of warnings they have.')
|
||||||
@@ -24,7 +24,7 @@ Commands.new_command('get-warnings','Gets the number of warnings a player has. I
|
|||||||
local warnings = WarningsControl.get_warnings(action_player)
|
local warnings = WarningsControl.get_warnings(action_player)
|
||||||
local script_warnings = WarningsControl.get_temp_warnings(action_player)
|
local script_warnings = WarningsControl.get_temp_warnings(action_player)
|
||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
Commands.print{'exp-commands.warnings-player',action_player_name_color,warnings,script_warnings,config.temp_warning_limit}
|
Commands.print{'expcom-warnings.player',action_player_name_color,warnings,script_warnings,config.temp_warning_limit}
|
||||||
else
|
else
|
||||||
local rtn = {}
|
local rtn = {}
|
||||||
local user_warnings = WarningsControl.user_warnings
|
local user_warnings = WarningsControl.user_warnings
|
||||||
@@ -38,10 +38,10 @@ Commands.new_command('get-warnings','Gets the number of warnings a player has. I
|
|||||||
end
|
end
|
||||||
rtn[player_name][2] = #warnings
|
rtn[player_name][2] = #warnings
|
||||||
end
|
end
|
||||||
Commands.print{'exp-commands.warnings-list-tilte'}
|
Commands.print{'expcom-warnings.list-tilte'}
|
||||||
for player_name,warnings in pairs(rtn) do
|
for player_name,warnings in pairs(rtn) do
|
||||||
local player_name_color = format_chat_player_name(player_name)
|
local player_name_color = format_chat_player_name(player_name)
|
||||||
Commands.print{'exp-commands.warnings-list',player_name_color,warnings[1],warnings[2],config.temp_warning_limit}
|
Commands.print{'expcom-warnings.list',player_name_color,warnings[1],warnings[2],config.temp_warning_limit}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -53,5 +53,5 @@ Commands.new_command('clear-warnings','Clears all warnings (and script warnings)
|
|||||||
WarningsControl.clear_temp_warnings(action_player,player.name)
|
WarningsControl.clear_temp_warnings(action_player,player.name)
|
||||||
local action_player_name_color = format_chat_player_name(action_player)
|
local action_player_name_color = format_chat_player_name(action_player)
|
||||||
local by_player_name_color = format_chat_player_name(player)
|
local by_player_name_color = format_chat_player_name(player)
|
||||||
game.print{'exp-commands.warnings-cleared',action_player_name_color,by_player_name_color}
|
game.print{'expcom-warnings.cleared',action_player_name_color,by_player_name_color}
|
||||||
end)
|
end)
|
||||||
Reference in New Issue
Block a user