Minnor fixes around the place

This commit is contained in:
Cooldude2606
2018-10-13 00:10:17 +01:00
parent 7cb517e4aa
commit 43df8e6a56
9 changed files with 57 additions and 24 deletions

View File

@@ -483,7 +483,6 @@ end)
script.on_event(defines.events.on_player_joined_game,function(event)
local player = Game.get_player(event)
log(serpent.line(event))
local highest = Role.get_highest(player) or Role.meta.default
Group.assign(player,highest.group)
player.tag=highest.tag

View File

@@ -2,9 +2,9 @@ local Role = self
commands.add_validation('player-rank',function(value,event)
local player,err = commands.validate['player'](value)
return err and commands.error(err)
or Role.get_highest(player).index > Role.get_highest(event).index and player
or commands.error{'ExpGamingCore_Command.error-player-rank'}
if err then return commands.error(err) end
local rtn = Role.get_highest(player).index > Role.get_highest(event).index and player or nil
if not rtn then return commands.error{'ExpGamingCore_Command.error-player-rank'} end return rtn
end)
commands.add_validation('player-rank-online',function(value,event)