mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Merge branch 'wip' into testing
This commit is contained in:
@@ -106,7 +106,7 @@ local function run_custom_command(command)
|
|||||||
-- runs the command
|
-- runs the command
|
||||||
local success, err = pcall(command_calls[command.name],command,args)
|
local success, err = pcall(command_calls[command.name],command,args)
|
||||||
if not success then error(err) end
|
if not success then error(err) end
|
||||||
player_return({'commands.command-ran'},defines.text_color.info)
|
if err ~= commands.error then player_return({'commands.command-ran'},defines.text_color.info) end
|
||||||
game.write_file('commands.log','\n'..game.tick
|
game.write_file('commands.log','\n'..game.tick
|
||||||
..' Player: '..player_name
|
..' Player: '..player_name
|
||||||
..' Used command: '..command.name
|
..' Used command: '..command.name
|
||||||
@@ -114,8 +114,10 @@ local function run_custom_command(command)
|
|||||||
, true, 0)
|
, true, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
commands._add_command = commands.add_command
|
-- this is a set of constants you can use
|
||||||
commands._expgaming = true
|
commands._add_command = commands.add_command --if you dont want to use the custom commands interface
|
||||||
|
commands._expgaming = true --if you want to test if the custom commands are present
|
||||||
|
commands.error = 'COMMAND_ERROR' --if returned during a custom command, Command Complete message not printed
|
||||||
--- Used to define commands
|
--- Used to define commands
|
||||||
-- @usage inputs = {'player','reason',true}
|
-- @usage inputs = {'player','reason',true}
|
||||||
-- commands.add_command('ban','bans a player',inputs,function() return end)
|
-- commands.add_command('ban','bans a player',inputs,function() return end)
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
[commands]
|
[commands]
|
||||||
unauthorized=401 - Unauthorized: Access is denied due to invalid credentials
|
unauthorized=401 - Unauthorized: Access is denied due to invalid credentials
|
||||||
invalid-inputs=Invalid Input, /__1__ __2__
|
invalid-inputs=Invalid Input, /__1__ __2__
|
||||||
|
invalid-range=Invalid Range, Min: __1__, Max: __2__
|
||||||
|
invalid-length=Invalid Length, Max: __1__
|
||||||
invalid-player=Invaild Player Name, __1__ ,try using tab key to auto-complete the name
|
invalid-player=Invaild Player Name, __1__ ,try using tab key to auto-complete the name
|
||||||
|
offline-player=Player is offline, Command Failed To Run
|
||||||
|
dead-player=Player is dead, Command Failed To Run
|
||||||
command-ran=Command Complete
|
command-ran=Command Complete
|
||||||
|
|
||||||
[ranking]
|
[ranking]
|
||||||
|
|||||||
Reference in New Issue
Block a user