More bugs

This commit is contained in:
Cooldude2606
2017-10-16 20:45:18 +01:00
parent 3448925aa8
commit 90a96ff7df
2 changed files with 2 additions and 3 deletions

View File

@@ -51,7 +51,6 @@ local function load_command(command)
--is the command all ready loaded
if commands.commands[command.name] then return end
--start loading command
global.exp_core.commands[command.name] = command
debug_write({'COMMAND','LOAD'},command.name)
--add command to game
debug_write({'COMMAND','LOAD'},command)
@@ -106,5 +105,5 @@ function get_commands(rank)
end
return to_return
end
Event.register(Event.soft_init,function() global.exp_core.commands = {} for command_name,command in pairs(Exp_commands) do load_command(command) end end)
Event.register(Event.soft_init,function() global.exp_core.commands = Exp_commands for command_name,command in pairs(Exp_commands) do load_command(command) end end)
Event.register(defines.events.on_player_joined_game,function() for command_name,command in pairs(Exp_commands) do load_command(command) end end)

View File

@@ -31,7 +31,7 @@ end)
--runs the preset callback with the uuid
define_command('socket',{'server.socket-command-help'},{'uuid','args'},function(player,event,args)
if global.exp_core.server.callbacks[args[1]] then
server.queue_callback(global.exp_core.server.callbacks[args[1].fun],{unpack(args,2)},args[1])
server.queue_callback(global.exp_core.server.callbacks[args[1]].fun,{unpack(args,2)},args[1])
end
end)
--this is used when changing permission groups when the person does not have permsion to, can also be used to split a large event accross multiple ticks