No Errors on startup of modules

This commit is contained in:
Cooldude2606
2018-09-03 19:28:18 +01:00
parent e825dfe326
commit 480b548f5f
78 changed files with 631 additions and 138 deletions

View File

@@ -31,7 +31,7 @@ function Admin.create_reason(reason,name)
if not string.find(string.lower(reason),string.lower(name)) then reason = reason..' - '..name end
if Sync and Sync.info.date ~= '0000/00/00' and not string.find(string.lower(reason),Sync.info.date) then reason = reason..' - '..Sync.info.date end
if not string.find(string.lower(reason),'appeal') then reason = reason..' - Vist www.explosivegaming.nl to appeal.' end
return reason end
return reason
end
function Admin.open(player,pre_select_player,pre_select_action)
@@ -43,7 +43,7 @@ function Admin.allowed(player)
if Ranking then
local lowest_admin_power = Ranking.get_group('Admin').lowest.power
return lowest_admin_power >= Ranking.get_rank(player).power
else return player.admin
else return player.admin end
end
function Admin.set_banned(player,set)
@@ -81,7 +81,7 @@ function Admin.clear_player(player,by_player)
if Ranking.get_rank(player).group.name == 'Jail' then Server.interface(Ranking.revert,true,player,by_player) end
if Sync then Sync.emit_embeded{
title='Player Clear',
color=Color.to_hex(defines.text_color.low),
color=Color.to_hex(defines.textcolor.low),
description='A player had their reports and warnings cleared.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,

View File

@@ -9,12 +9,10 @@
"ExpGaming",
"Admin"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"FactorioStdLib": "^0.8.0",
"ExpGamingCore.Ranking": "?^4.0.0",
"ExpGamingCore.Sync": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -6,7 +6,7 @@
-- Module Require
local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
local AdminGui = require('ExpGamingAdmin.AdminGui@^4.0.0')
local AdminGui = require('ExpGamingAdmin.Gui@^4.0.0')
local Server = require('ExpGamingCore.Server@^4.0.0')
local Game = require('FactorioStdLib.Game@^0.8.0')
local Color -- FactorioStdLib.Color@^0.8.0
@@ -33,7 +33,7 @@ function Admin.ban(player,by_player,reason)
Admin.set_banned(player,true)
if Sync then Sync.emit_embeded{
title='Player Ban',
color=Color.to_hex(defines.text_color.crit),
color=Color.to_hex(defines.textcolor.crit),
description='There was a player banned.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,

View File

@@ -10,16 +10,14 @@
"Set",
"ExpGaming"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -12,11 +12,9 @@
"Clear",
"Inventory"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -31,7 +31,7 @@ local AdminGui = {
function AdminGui.add_button(name,caption,tooltip,callback)
AdminGui.buttons[name] = Gui.inputs.add{
type='button',
name='admin-gui-'+name,
name='admin-gui-'..name,
caption=caption,
tooltip=tooltip
}:on_event('click',function(event)
@@ -56,7 +56,6 @@ function AdminGui.draw(frame,filter_buttons)
btn.style.width = 30
end
for name,button in pairs(AdminGui.buttons) do
filter_buttons
if not filter_buttons or filter_buttons[name] then format(button:draw(frame)) end
end
return frame.player

View File

@@ -10,14 +10,12 @@
"Commands",
"Gui"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingCore.Gui": "^4.0.0",
"ExpGamingCore.Ranking": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0",
"ExpGamingPlayer": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -6,7 +6,7 @@
-- Module Require
local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
local AdminGui = require('ExpGamingAdmin.AdminGui@^4.0.0')
local AdminGui = require('ExpGamingAdmin.Gui@^4.0.0')
local Server = require('ExpGamingCore.Server@^4.0.0')
local Ranking = require('ExpGamingCore.Ranking@^4.0.0')
local Game = require('FactorioStdLib.Game@^0.8.0')
@@ -33,7 +33,7 @@ function Admin.jail(player,by_player,reason)
local reason = Admin.create_reason(reason,by_player_name)
if Sync then Sync.emit_embeded{
title='Player Jail',
color=Color.to_hex(defines.text_color.med),
color=Color.to_hex(defines.textcolor.med),
description='There was a player jailed.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,

View File

@@ -10,17 +10,15 @@
"Admin",
"ExpGaming"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Ranking": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0'",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -6,7 +6,7 @@
-- Module Require
local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
local AdminGui = require('ExpGamingAdmin.AdminGui@^4.0.0')
local AdminGui = require('ExpGamingAdmin.Gui@^4.0.0')
local Server = require('ExpGamingCore.Server@^4.0.0')
local Game = require('FactorioStdLib.Game@^0.8.0')
local Color -- FactorioStdLib.Color@^0.8.0
@@ -31,7 +31,7 @@ function Admin.kick(player,by_player,reason)
local reason = Admin.create_reason(reason,by_player_name)
if Sync then Sync.emit_embeded{
title='Player Kick',
color=Color.to_hex(defines.text_color.high),
color=Color.to_hex(defines.textcolor.high),
description='There was a player kicked.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,

View File

@@ -10,16 +10,14 @@
"Kick",
"Commands"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -44,11 +44,11 @@ local function report_message(player,by_player,reason)
local player, by_player_name = valid_players(player,by_player)
if not player then return end
if Admin.is_banned(player,true) == 'report' then return end
Ranking.print(low_rank,{'ExpGamingAdmin@4-0-0.low-print',player.name,reason},defines.text_color.info,true)
Ranking.print(high_rank,{'ExpGamingAdmin@4-0-0.high-print',player.name,by_player_name,reason},defines.text_color.med)
Ranking.print(low_rank,{'ExpGamingAdmin@4-0-0.low-print',player.name,reason},defines.textcolor.info,true)
Ranking.print(high_rank,{'ExpGamingAdmin@4-0-0.high-print',player.name,by_player_name,reason},defines.textcolor.med)
if Sync then Sync.emit_embeded{
title='Player Report',
color=Color.to_hex(defines.text_color.med),
color=Color.to_hex(defines.textcolor.med),
description='A player was reported.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,
@@ -114,7 +114,7 @@ function Admin.clear_reports(player,by_player,no_emit)
if not no_emit and Sync then
Sync.emit_embeded{
title='Player Clear',
color=Color.to_hex(defines.text_color.low),
color=Color.to_hex(defines.textcolor.low),
description='A player had their reports cleared.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,

View File

@@ -12,9 +12,6 @@
"Player List",
"Commands"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
@@ -22,5 +19,6 @@
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -6,7 +6,7 @@
-- Module Require
local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
local AdminGui = require('ExpGamingAdmin.AdminGui@^4.0.0')
local AdminGui = require('ExpGamingAdmin.Gui@^4.0.0')
local Game = require('FactorioStdLib.Game@^0.8.0')
-- Module Define

View File

@@ -13,12 +13,10 @@
"Teleport",
"Commands"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -28,13 +28,13 @@ function Admin.temp_ban(player,by_player,reason)
Admin.set_banned(player,'temp')
if Sync then Sync.emit_embeded{
title='Player Temp-Ban',
color=Color.to_hex(defines.text_color.high),
color=Color.to_hex(defines.textcolor.high),
description='A player was jailed.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,
['Reason:']=Admin.create_reason(reason,by_player_name)
} end
game.print({'ExpGamingAdmin@4-0-0.temp-ban',player.name,by_player_name,reason},defines.text_color.info)
game.print({'ExpGamingAdmin@4-0-0.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)

View File

@@ -11,9 +11,6 @@
"ExpGaming",
"Ranking"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
@@ -22,5 +19,6 @@
"FactorioStdLib.Color": "^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -12,10 +12,26 @@ local Game = require('FactorioStdLib.Game@^0.8.0')
local Color = require('FactorioStdLib.Color@^0.8.0')
local Sync -- ExpGamingCore.Sync@^4.0.0
-- so it can be used during on_init
-- Local Varibles
local take_action = 8 -- below this number no action is taken, the first admin given warning jumps to this number
local remove_warnings_time = {}
local min_time_to_remove_warning = 18000 -- this is in ticks
local punishments = {
{'nothing'},
{'nothing'},
{'nothing'},
{'nothing'},
{'nothing'},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.message'},defines.textcolor.info},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.message'},defines.textcolor.info},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.kick-warn'},defines.textcolor.med},
{'kick'},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.temp-warn'},defines.textcolor.high},
{'temp-ban'},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.ban-warn'},defines.textcolor.high},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.last-warn'},defines.textcolor.crit},
{'ban'}
}
-- Module Define
local module_verbose = false
@@ -24,12 +40,13 @@ local ThisModule = {
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
if loaded_modules['ExpGamingAdmin.Reports@^4.0.0'] then
take_action = take_action + 1
table.insert(punishments,{'report',{'ExpGamingAdmin-Warnings@4-0-0.reported'},defines.text_color.med},take_action)
table.insert(punishments,take_action,{'report',{'ExpGamingAdmin-Warnings@4-0-0.reported'},defines.textcolor.med})
end
end,
on_post=function()
local highest = nil
for power,rank in pairs(Ranking.ranks) do
for _,rank in pairs(Ranking.ranks) do
local power = rank.power
if not highest and not rank:allowed('no-report') then highest = power-1 end
local _power = power; if highest then _power = power-highest end
if rank:allowed('no-report') then remove_warnings_time[power] = 0
@@ -41,24 +58,6 @@ local ThisModule = {
-- Global Define
local global = global{}
-- Local Varibles
local punishments = {
{'nothing'},
{'nothing'},
{'nothing'},
{'nothing'},
{'nothing'},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.message'},defines.text_color.info},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.message'},defines.text_color.info},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.kick-warn'},defines.text_color.med},
{'kick'},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.temp-warn'},defines.text_color.high},
{'temp-ban'},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.ban-warn'},defines.text_color.high},
{'message',{'ExpGamingAdmin-Warnings@4-0-0.last-warn'},defines.text_color.crit},
{'ban'}
}
-- Function Define
local function valid_players(player,by_player)
local player = Game.get_player(player)
@@ -106,7 +105,7 @@ function Admin.give_warning(player,by_player,reason,min)
warnings = warnings+1
global[player.name] = warnings
if warnings > take_action then
player_return({'ExpGamingAdmin-Warnings@4-0-0.warning-given-by',by_player_name},defines.text_color.info,player)
player_return({'ExpGamingAdmin-Warnings@4-0-0.warning-given-by',by_player_name},defines.textcolor.info,player)
game.print({'ExpGamingAdmin-Warnings@4-0-0.player-warning',player.name,by_player_name,reason})
end
give_punishment(player,by_player,reason)
@@ -119,7 +118,7 @@ function Admin.clear_warings(player,by_player,no_emit)
if not no_emit and Sync then
Sync.emit_embeded{
title='Player Clear',
color=Color.to_hex(defines.text_color.low),
color=Color.to_hex(defines.textcolor.low),
description='A player had their warnings cleared.',
['Player:']='<<inline>>'..player.name,
['By:']='<<inline>>'..by_player_name,
@@ -137,7 +136,7 @@ script.on_event(defines.events.on_tick,function(event)
if (game.tick % time_to_remove) == 0 then
global[name]=warnings-1
if global.warnings[name] > 5 then
player_return({'ExpGamingAdmin-Warnings@4-0-0.remove-warn',global[name],tick_to_display_format(time_to_remove)},defines.text_color.low,name)
player_return({'ExpGamingAdmin-Warnings@4-0-0.remove-warn',global[name],tick_to_display_format(time_to_remove)},defines.textcolor.low,name)
end
end
end

View File

@@ -13,9 +13,6 @@
"Punishments",
"Ban"
],
"author": "<blank>",
"contact": "<blank>",
"license": "<blank>",
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
@@ -24,5 +21,6 @@
"FactorioStdLib.Color": "^0.8.0",
"ExpGamingAdmin.Reports": "?^4.0.0",
"ExpGamingCore.Sync": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}

View File

@@ -32,7 +32,8 @@
"FactorioStdLib": "^0.8.0",
"ExpGamingCore.Ranking": "?^4.0.0",
"ExpGamingCore.Sync": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Ban": {
"name": "Ban",
@@ -48,13 +49,14 @@
],
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"ClearInventory": {
"name": "ClearInventory",
@@ -73,7 +75,8 @@
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Gui": {
"name": "Gui",
@@ -93,7 +96,8 @@
"ExpGamingCore.Ranking": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0",
"ExpGamingPlayer": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Jail": {
"name": "Jail",
@@ -109,14 +113,15 @@
],
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Ranking": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0'",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Kick": {
"name": "Kick",
@@ -132,13 +137,14 @@
],
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Reports": {
"name": "Reports",
@@ -161,7 +167,8 @@
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Teleport": {
"name": "Teleport",
@@ -180,9 +187,10 @@
],
"dependencies": {
"ExpGamingAdmin.AdminLib": "^4.0.0",
"ExpGamingAdmin.AdminGui": "^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"TempBan": {
"name": "TempBan",
@@ -205,7 +213,8 @@
"FactorioStdLib.Color": "^0.8.0",
"ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
},
"Warnings": {
"name": "Warnings",
@@ -230,7 +239,9 @@
"FactorioStdLib.Color": "^0.8.0",
"ExpGamingAdmin.Reports": "?^4.0.0",
"ExpGamingCore.Sync": "?^4.0.0"
}
},
"collection": "ExpGamingAdmin_4.0.0"
}
}
},
"dependencies": {}
}

View File

@@ -45,7 +45,7 @@ script.on_init(function(event)
end):on_event('error',function(self,err)
if Sync then Sync.emit_embeded{
title='Auto Message Error',
color=Color.to_hex(defines.text_color.bg),
color=Color.to_hex(defines.textcolor.bg),
description='Auto Message Error - Closed Thread',
Error=err
} end

View File

@@ -19,24 +19,24 @@ Event.register(defines.events.on_console_command,function(event)
if command == 'config' or command == 'banlist' then
Sync.emit_embeded{
title='Edit To '..data.title,
color=Color.to_hex(defines.text_color.bg),
color=Color.to_hex(defines.textcolor.bg),
description='A player edited the '..command..'.',
['By:']=data.by,
['Edit:']=table.concat(args,' ',1)
}
else
if command == 'ban' then
data.colour = Color.to_hex(defines.text_color.crit)
data.colour = Color.to_hex(defines.textcolor.crit)
data.reason = table.concat(args,' ',2)
elseif command == 'kick' then
data.colour = Color.to_hex(defines.text_color.high)
data.colour = Color.to_hex(defines.textcolor.high)
data.reason = table.concat(args,' ',2)
elseif command == 'unban' then data.colour = Color.to_hex(defines.text_color.low)
elseif command == 'mute' then data.colour = Color.to_hex(defines.text_color.med)
elseif command == 'unmute' then data.colour = Color.to_hex(defines.text_color.low)
elseif command == 'promote' then data.colour = Color.to_hex(defines.text_color.info)
elseif command == 'demote' then data.colour = Color.to_hex(defines.text_color.info)
elseif command == 'purge' then data.colour = Color.to_hex(defines.text_color.med)
elseif command == 'unban' then data.colour = Color.to_hex(defines.textcolor.low)
elseif command == 'mute' then data.colour = Color.to_hex(defines.textcolor.med)
elseif command == 'unmute' then data.colour = Color.to_hex(defines.textcolor.low)
elseif command == 'promote' then data.colour = Color.to_hex(defines.textcolor.info)
elseif command == 'demote' then data.colour = Color.to_hex(defines.textcolor.info)
elseif command == 'purge' then data.colour = Color.to_hex(defines.textcolor.med)
else return end
data.username = args[1]
if not Game.get_player(data.username) then return end

View File

@@ -21,7 +21,7 @@ return {
if loaded_modules['ExpGamingAdmin.TempBan'] then verbose('ExpGamingAdmin.TempBan is installed; Loading tempban src') require(module_path..'/src/tempban',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Jail'] then verbose('ExpGamingAdmin.Jail is installed; Loading tempban src') require(module_path..'/src/jail',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Warnings'] then verbose('ExpGamingAdmin.Warnings is installed; Loading tempban src') require(module_path..'/src/warnings',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Reports'] then verbose('ExpGamingAdmin.Reports is installed; Loading tempban src') require(module_path..'/src/reprots',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.Reports'] then verbose('ExpGamingAdmin.Reports is installed; Loading tempban src') require(module_path..'/src/reports',{Admin=Admin}) end
if loaded_modules['ExpGamingAdmin.ClearInventory'] then verbose('ExpGamingAdmin.ClearInventory is installed; Loading tempban src') require(module_path..'/src/clear',{Admin=Admin}) end
end
}

View File

@@ -25,7 +25,7 @@ local const = 100
-- @param player the player who called the command
-- @param entity the entity which was repaired
local repairDisallow = function(player,entity)
player_return('You have repaired: '..entity.name..' this item is not allowed.',defines.text_color.crit,player)
player_return('You have repaired: '..entity.name..' this item is not allowed.',defines.textcolor.crit,player)
entity.destroy()
end

View File

@@ -1,7 +1,7 @@
-- not_luadoc=true
local temp_ban = require('ExpGamingAdmin.TempBan')
return function repairDisallow(player,entity)
player_return('You have repaired: '..entity.name..' this item is not allowed.',defines.text_color.crit,player)
return function(player,entity)
player_return('You have repaired: '..entity.name..' this item is not allowed.',defines.textcolor.crit,player)
temp_ban(player,'<server>','Attempt To Repair A Banned Item')
entity.destroy()
end

View File

@@ -33,6 +33,6 @@ return {
on_init=function(self)
if loaded_modules['ExpGamingCore.Ranking'] then Ranking = require('ExpGamingCore.Ranking') end
if loaded_modules['ExpGamingCore.Sync'] then Sync = require('ExpGamingCore.Sync') end
if loaded_modules['ExpGamingCore.Server'] then require(module_path..'/src/server.lua',Sync) end
if loaded_modules['ExpGamingCore.Server'] then require(module_path..'/src/server',Sync) end
end
}

View File

@@ -1,4 +1,5 @@
local Sync = Sync
local Server = require('ExpGamingCore.Server@^4.0.0')
Event[defines.events.on_tick] = nil
script.on_init(function(event)
Server.new_thread{
@@ -15,7 +16,7 @@ script.on_init(function(event)
if Sync then
Sync.emit_embeded{
title='Auto Kick Error',
color=Color.to_hex(defines.text_color.bg),
color=Color.to_hex(defines.textcolor.bg),
description='Auto Kick Error - Closed Thread',
Error=err
}

View File

@@ -49,5 +49,5 @@ return setmetatable({
if loaded_modules['ExpGamingCore.Ranking'] then Ranking = require('ExpGamingCore.Ranking') end
end
},{
__call=function(self) self.get_player_info(...) end
__call=function(self,...) self.get_player_info(...) end
})

51
modules/index.lua Normal file
View File

@@ -0,0 +1,51 @@
-- not_luadoc=true
--- Used to index the files to be loaded
return {
['FactorioStdLib.String@^0.8.0']='./modules/FactorioStdLib/String',
['FactorioStdLib.Table@^0.8.0']='./modules/FactorioStdLib/Table',
['FactorioStdLib.Color@^0.8.0']='./modules/FactorioStdLib/Color',
['FactorioStdLib.Game@^0.8.0']='./modules/FactorioStdLib/Game',
['FactorioStdLib.Table@0.8.0']='./modules/FactorioStdLib/Table',
['FactorioStdLib.String@0.8.0']='./modules/FactorioStdLib/String',
['FactorioStdLib.Game@0.8.0']='./modules/FactorioStdLib/Game',
['FactorioStdLib.Color@0.8.0']='./modules/FactorioStdLib/Color',
['ExpGamingLib@^4.0.0']='./modules/ExpGamingLib',
['ExpGamingLib@4.0.0']='./modules/ExpGamingLib',
['ExpGamingCore.Commands@4.0.0']='./modules/ExpGamingCore/Commands',
['ExpGamingCore.Server@4.0.0']='./modules/ExpGamingCore/Server',
['ExpGamingCore.Ranking@^4.0.0']='./modules/ExpGamingCore/Ranking',
['ExpGamingCore.Ranking@4.0.0']='./modules/ExpGamingCore/Ranking',
['ExpGamingBot.autoChat@4.0.0']='./modules/ExpGamingBot/autoChat',
['ExpGamingCore.Server@^4.0.0']='./modules/ExpGamingCore/Server',
['ExpGamingCommands.tags@4.0.0']='./modules/ExpGamingCommands/tags',
['ExpGamingCore.Commands@^4.0.0']='./modules/ExpGamingCore/Commands',
['ExpGamingCommands.kill@4.0.0']='./modules/ExpGamingCommands/kill',
['ExpGamingCommands.home@4.0.0']='./modules/ExpGamingCommands/home',
['ExpGamingCommands.cheatMode@4.0.0']='./modules/ExpGamingCommands/cheatMode',
['ExpGamingCommands.bonus@4.0.0']='./modules/ExpGamingCommands/bonus',
['ExpGamingCore.Gui@^4.0.0']='./modules/ExpGamingCore/Gui',
['ExpGamingCore.Gui@4.0.0']='./modules/ExpGamingCore/Gui',
['ExpGamingCore.Sync@^4.0.0']='./modules/ExpGamingCore/Sync',
['ExpGamingPlayer.playerList@4.0.0']='./modules/ExpGamingPlayer/playerList',
['ExpGamingPlayer.playerInfo@4.0.0']='./modules/ExpGamingPlayer/playerInfo',
['ExpGamingCore.Sync@4.0.0']='./modules/ExpGamingCore/Sync',
['ExpGamingBot.discordAlerts@4.0.0']='./modules/ExpGamingBot/discordAlerts',
['ExpGamingBot.autoMessage@4.0.0']='./modules/ExpGamingBot/autoMessage',
['ExpGamingPlayer.afkKick@4.0.0']='./modules/ExpGamingPlayer/afkKick',
['ExpGamingAdmin.AdminLib@^4.0.0']='./modules/ExpGamingAdmin/AdminLib',
['ExpGamingAdmin.AdminLib@4.0.0']='./modules/ExpGamingAdmin/AdminLib',
['ExpGamingAdmin.Warnings@4.0.0']='./modules/ExpGamingAdmin/Warnings',
['ExpGamingAdmin.Reports@4.0.0']='./modules/ExpGamingAdmin/Reports',
['ExpGamingAdmin.ClearInventory@4.0.0']='./modules/ExpGamingAdmin/ClearInventory',
['ExpGamingAdmin.TempBan@4.0.0']='./modules/ExpGamingAdmin/TempBan',
['ExpGamingCommands.repair@4.0.0']='./modules/ExpGamingCommands/repair',
['ExpGamingAdmin.Gui@^4.0.0']='./modules/ExpGamingAdmin/Gui',
['ExpGamingAdmin.Gui@4.0.0']='./modules/ExpGamingAdmin/Gui',
['ExpGamingAdmin.Teleport@^4.0.0']='./modules/ExpGamingAdmin/Teleport',
['ExpGamingAdmin.Teleport@4.0.0']='./modules/ExpGamingAdmin/Teleport',
['ExpGamingCommands.teleport@4.0.0']='./modules/ExpGamingCommands/teleport',
['ExpGamingAdmin.Kick@4.0.0']='./modules/ExpGamingAdmin/Kick',
['ExpGamingAdmin.Jail@4.0.0']='./modules/ExpGamingAdmin/Jail',
['ExpGamingCommands.admin@4.0.0']='./modules/ExpGamingCommands/admin',
['ExpGamingAdmin.Ban@4.0.0']='./modules/ExpGamingAdmin/Ban',
}