From 471084b80cf504939877442d5f9001e95680a517 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 7 Sep 2018 17:54:51 +0100 Subject: [PATCH] Forgot that server.interface was taken --- modules/ExpGamingCore/Server/src/commands.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ExpGamingCore/Server/src/commands.lua b/modules/ExpGamingCore/Server/src/commands.lua index dd08aee0..75af3a8f 100644 --- a/modules/ExpGamingCore/Server/src/commands.lua +++ b/modules/ExpGamingCore/Server/src/commands.lua @@ -10,8 +10,8 @@ local Game = require('FactorioStdLib.Game') local Server = Server -Server.interface = {} -function Server.add_to_interface(loadAs,callback) Server.interface[loadAs] = callback end +Server.interfaceCallbacks = {} +function Server.add_to_interface(loadAs,callback) Server.interfaceCallbacks[loadAs] = callback end function Server.add_module_to_interface(loadAs,moduleName,version) local moduleName = module_name or version and moduleName..'@'..version or moduleName or error('No module name supplied') @@ -38,7 +38,7 @@ commands.add_command('interface',{'Server.interface-description'}, { env.tile = game.player.surface.get_tile(game.player.position) end -- adds custom callbacks to the interface - for name,callback in pairs(Server.interface) do env[name] = callback() end + for name,callback in pairs(Server.interfaceCallbacks) do env[name] = callback() end -- runs the function local success, err = Server.interface(callback,false,env) -- if there is an error then it will remove the stacktrace and return the error