mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Fix to Group.get
This commit is contained in:
@@ -3,10 +3,10 @@ function _log(...) log(...) end -- do not remove this is used for smaller verbos
|
|||||||
Manager = require("FactorioSoftmodManager")
|
Manager = require("FactorioSoftmodManager")
|
||||||
Manager.setVerbose{
|
Manager.setVerbose{
|
||||||
selfInit=true, -- called while the manager is being set up
|
selfInit=true, -- called while the manager is being set up
|
||||||
moduleLoad=false, -- when a module is required by the manager
|
moduleLoad=true, -- when a module is required by the manager
|
||||||
moduleInit=false, -- when and within the initation of a module
|
moduleInit=true, -- when and within the initation of a module
|
||||||
modulePost=false, -- when and within the post of a module
|
modulePost=true, -- when and within the post of a module
|
||||||
moduleEnv=false, -- during module runtime, this is a global option set within each module for fine control
|
moduleEnv=true, -- during module runtime, this is a global option set within each module for fine control
|
||||||
eventRegistered=false, -- when a module registers its event handlers
|
eventRegistered=false, -- when a module registers its event handlers
|
||||||
errorCaught=true, -- when an error is caught during runtime
|
errorCaught=true, -- when an error is caught during runtime
|
||||||
output=Manager._verbose -- can be: can be: print || log || other function
|
output=Manager._verbose -- can be: can be: print || log || other function
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ end
|
|||||||
function Group.get(mixed)
|
function Group.get(mixed)
|
||||||
if is_type(mixed,'table') and not mixed.__self and mixed._raw_group then return mixed end
|
if is_type(mixed,'table') and not mixed.__self and mixed._raw_group then return mixed end
|
||||||
if is_type(mixed,'table') and mixed.__self and mixed.name then mixed = mixed.name end
|
if is_type(mixed,'table') and mixed.__self and mixed.name then mixed = mixed.name end
|
||||||
if game and game.players[mixed] then mixed = game.players[mixed].permission_group.name end
|
if game and Game.get_player(mixed) then mixed = Game.get_player(mixed).permission_group.name end
|
||||||
local rtn = Group.groups[mixed]
|
local rtn = Group.groups[mixed]
|
||||||
if not rtn and game.permissions.get_group(mixed) then
|
if not rtn and game.permissions.get_group(mixed) then
|
||||||
rtn = setmetatable({disallow={},name=mixed,_raw_group=game.permissions.get_group(mixed)},{
|
rtn = setmetatable({disallow={},name=mixed,_raw_group=game.permissions.get_group(mixed)},{
|
||||||
|
|||||||
Reference in New Issue
Block a user