Converted Modules To Use Roles

This commit is contained in:
Cooldude2606
2018-09-29 17:28:07 +01:00
parent 96784009b6
commit e50bd509f8
48 changed files with 277 additions and 1146 deletions

View File

@@ -1,4 +1,4 @@
--- Adds a temp ban function to the admin set, requires ExpGamingCore.Ranking to work.
--- Adds a temp ban function to the admin set, requires ExpGamingCore.Role to work.
-- @module ExpGamingAdmin.KicTempBan@4.0.0
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
@@ -7,7 +7,7 @@
-- Module Require
local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
local Server = require('ExpGamingCore.Server@^4.0.0')
local Ranking = require('ExpGamingCore.Ranking@^4.0.0')
local Role = require('ExpGamingCore.Role@^4.0.0')
local Game = require('FactorioStdLib.Game@^0.8.0')
local Color = require('FactorioStdLib.Color@^0.8.0')
local Sync -- ExpGamingCore.Sync@^4.0.0
@@ -36,8 +36,9 @@ function Admin.temp_ban(player,by_player,reason)
} end
game.print({'ExpGamingAdmin.temp-ban',player.name,by_player_name,reason},defines.textcolor.info)
if Admin.move_inventory then Admin.move_inventory(player) end
Ranking.meta.last_jail = player.name
Server.interface(Ranking.give_rank,true,player,'Jail',by_player_name)
Role.meta.last_jail = player.name
Server.interface(Role.unassign,true,player,Role.get(player),by_player_name)
Server.interface(Role.assign,true,player,'Jail',by_player_name)
end
Admin.add_action('Temp Ban',Admin.temp_ban)