mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Large Number of bug fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=This Warnings Was Given By: __1__
|
warning-given-by=This Warnings Was Given By: __1__
|
||||||
player-warning=__1__ was given a warning by __2__ reason: __3__
|
player-warning=__1__ was given a warning by __2__ reason: __3__
|
||||||
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=This warning was given by: __1__
|
warning-given-by=This warning was given by: __1__
|
||||||
player-warning=__1__ was given a warning by __2__ for: __3__
|
player-warning=__1__ was given a warning by __2__ for: __3__
|
||||||
remove-warn=One of your warnings expired. You have __1__ warnings left, next warning will be removed in __2__
|
remove-warn=One of your warnings expired. You have __1__ warnings left, next warning will be removed in __2__
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=This Warnings Was Given By: __1__
|
warning-given-by=This Warnings Was Given By: __1__
|
||||||
player-warning=__1__ was given a warning by __2__ reason: __3__
|
player-warning=__1__ was given a warning by __2__ reason: __3__
|
||||||
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=Deze waarschuwing is gegeven door: __1__
|
warning-given-by=Deze waarschuwing is gegeven door: __1__
|
||||||
player-warning=__1__ is gewaarschuwd door __2__ met de reden: __3__
|
player-warning=__1__ is gewaarschuwd door __2__ met de reden: __3__
|
||||||
temp-ban=__1__ is verbannen door __2__ en is gejailed tot de volgende reset.
|
temp-ban=__1__ is verbannen door __2__ en is gejailed tot de volgende reset.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=Den här varningen gavs av: __1__
|
warning-given-by=Den här varningen gavs av: __1__
|
||||||
player-warning=__1__ var tillfälligt bannlyst av __2__ och kommer att förbli i fängelset tills nästa återställning (reset)
|
player-warning=__1__ var tillfälligt bannlyst av __2__ och kommer att förbli i fängelset tills nästa återställning (reset)
|
||||||
remove-warn=En av dina varningar har gått ut. Du har __1__ varning kvar, nästa varning kommer at tas bort om __2__
|
remove-warn=En av dina varningar har gått ut. Du har __1__ varning kvar, nästa varning kommer at tas bort om __2__
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ local module_verbose = false
|
|||||||
local ThisModule = {
|
local ThisModule = {
|
||||||
on_init=function()
|
on_init=function()
|
||||||
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
||||||
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Sync = require('FactorioStdLib.Color@^0.8.0') end
|
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Color = require('FactorioStdLib.Color@^0.8.0') end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -217,4 +217,4 @@ Admin.center = Gui.center{
|
|||||||
|
|
||||||
-- Module Return
|
-- Module Return
|
||||||
-- calling will draw the admin buttons to that frame
|
-- calling will draw the admin buttons to that frame
|
||||||
return setmetatable(AdminGui,{__call=function(self,...) self.draw(...) end})
|
return setmetatable(AdminGui,{__call=function(self,...) return self.draw(...) end})
|
||||||
@@ -17,7 +17,7 @@ local module_verbose = false
|
|||||||
local ThisModule = {
|
local ThisModule = {
|
||||||
on_init=function()
|
on_init=function()
|
||||||
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
||||||
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Sync = require('FactorioStdLib.Color@^0.8.0') end
|
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Color = require('FactorioStdLib.Color@^0.8.0') end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
-- Function Define
|
-- Function Define
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local Server = require('ExpGamingCore.Server@^4.0.0')
|
|||||||
local Role = require('ExpGamingCore.Role@^4.0.0')
|
local Role = require('ExpGamingCore.Role@^4.0.0')
|
||||||
local Gui = require('ExpGamingCore.Gui@^4.0.0')
|
local Gui = require('ExpGamingCore.Gui@^4.0.0')
|
||||||
local Game = require('FactorioStdLib.Game@^0.8.0')
|
local Game = require('FactorioStdLib.Game@^0.8.0')
|
||||||
local Color = require('FactorioStdLib.Color@^0.8.0')
|
local Color -- FactorioStdLib.Color@^0.8.0
|
||||||
local Sync -- ExpGamingCore.Sync@^4.0.0
|
local Sync -- ExpGamingCore.Sync@^4.0.0
|
||||||
|
|
||||||
-- Module Define
|
-- Module Define
|
||||||
@@ -18,6 +18,7 @@ local module_verbose = false
|
|||||||
local ThisModule = {
|
local ThisModule = {
|
||||||
on_init=function()
|
on_init=function()
|
||||||
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
||||||
|
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Color = require('FactorioStdLib.Color@^0.8.0') end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
|
|||||||
local Server = require('ExpGamingCore.Server@^4.0.0')
|
local Server = require('ExpGamingCore.Server@^4.0.0')
|
||||||
local Role = require('ExpGamingCore.Role@^4.0.0')
|
local Role = require('ExpGamingCore.Role@^4.0.0')
|
||||||
local Game = require('FactorioStdLib.Game@^0.8.0')
|
local Game = require('FactorioStdLib.Game@^0.8.0')
|
||||||
local Color = require('FactorioStdLib.Color@^0.8.0')
|
local Color -- FactorioStdLib.Color@^0.8.0
|
||||||
local Sync -- ExpGamingCore.Sync@^4.0.0
|
local Sync -- ExpGamingCore.Sync@^4.0.0
|
||||||
|
|
||||||
-- Module Define
|
-- Module Define
|
||||||
@@ -17,6 +17,7 @@ local module_verbose = false
|
|||||||
local ThisModule = {
|
local ThisModule = {
|
||||||
on_init=function()
|
on_init=function()
|
||||||
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
||||||
|
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Color = require('FactorioStdLib.Color@^0.8.0') end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ local Admin = require('ExpGamingAdmin.AdminLib@^4.0.0')
|
|||||||
local Server = require('ExpGamingCore.Server@^4.0.0')
|
local Server = require('ExpGamingCore.Server@^4.0.0')
|
||||||
local Role = require('ExpGamingCore.Role@^4.0.0')
|
local Role = require('ExpGamingCore.Role@^4.0.0')
|
||||||
local Game = require('FactorioStdLib.Game@^0.8.0')
|
local Game = require('FactorioStdLib.Game@^0.8.0')
|
||||||
local Color = require('FactorioStdLib.Color@^0.8.0')
|
local Color -- FactorioStdLib.Color@^0.8.0
|
||||||
local Sync -- ExpGamingCore.Sync@^4.0.0
|
local Sync -- ExpGamingCore.Sync@^4.0.0
|
||||||
|
|
||||||
-- Local Varibles
|
-- Local Varibles
|
||||||
@@ -22,14 +22,14 @@ local punishments = {
|
|||||||
{'nothing'},
|
{'nothing'},
|
||||||
{'nothing'},
|
{'nothing'},
|
||||||
{'nothing'},
|
{'nothing'},
|
||||||
{'message',{'ExpGamingAdmin-Warnings@4-0-0.message'},defines.textcolor.info},
|
{'message',{'ExpGamingAdmin-Warnings.message'},defines.textcolor.info},
|
||||||
{'message',{'ExpGamingAdmin-Warnings@4-0-0.message'},defines.textcolor.info},
|
{'message',{'ExpGamingAdmin-Warnings.message'},defines.textcolor.info},
|
||||||
{'message',{'ExpGamingAdmin-Warnings@4-0-0.kick-warn'},defines.textcolor.med},
|
{'message',{'ExpGamingAdmin-Warnings.kick-warn'},defines.textcolor.med},
|
||||||
{'kick'},
|
{'kick'},
|
||||||
{'message',{'ExpGamingAdmin-Warnings@4-0-0.temp-warn'},defines.textcolor.high},
|
{'message',{'ExpGamingAdmin-Warnings.temp-warn'},defines.textcolor.high},
|
||||||
{'temp-ban'},
|
{'temp-ban'},
|
||||||
{'message',{'ExpGamingAdmin-Warnings@4-0-0.ban-warn'},defines.textcolor.high},
|
{'message',{'ExpGamingAdmin-Warnings.ban-warn'},defines.textcolor.high},
|
||||||
{'message',{'ExpGamingAdmin-Warnings@4-0-0.last-warn'},defines.textcolor.crit},
|
{'message',{'ExpGamingAdmin-Warnings.last-warn'},defines.textcolor.crit},
|
||||||
{'ban'}
|
{'ban'}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,9 +38,10 @@ local module_verbose = false
|
|||||||
local ThisModule = {
|
local ThisModule = {
|
||||||
on_init=function()
|
on_init=function()
|
||||||
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
if loaded_modules['ExpGamingCore.Sync@^4.0.0'] then Sync = require('ExpGamingCore.Sync@^4.0.0') end
|
||||||
|
if loaded_modules['FactorioStdLib.Color@^0.8.0'] then Color = require('FactorioStdLib.Color@^0.8.0') end
|
||||||
if loaded_modules['ExpGamingAdmin.Reports@^4.0.0'] then
|
if loaded_modules['ExpGamingAdmin.Reports@^4.0.0'] then
|
||||||
take_action = take_action + 1
|
take_action = take_action + 1
|
||||||
table.insert(punishments,take_action,{'report',{'ExpGamingAdmin-Warnings@4-0-0.reported'},defines.textcolor.med})
|
table.insert(punishments,take_action,{'report',{'ExpGamingAdmin-Warnings.reported'},defines.textcolor.med})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_post=function()
|
on_post=function()
|
||||||
@@ -97,8 +98,8 @@ function Admin.give_warning(player,by_player,reason,min)
|
|||||||
warnings = warnings+1
|
warnings = warnings+1
|
||||||
global[player.name] = warnings
|
global[player.name] = warnings
|
||||||
if warnings > take_action then
|
if warnings > take_action then
|
||||||
player_return({'ExpGamingAdmin-Warnings@4-0-0.warning-given-by',by_player.name},defines.textcolor.info,player)
|
player_return({'ExpGamingAdmin-Warnings.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})
|
game.print({'ExpGamingAdmin-Warnings.player-warning',player.name,by_player.name,reason})
|
||||||
end
|
end
|
||||||
give_punishment(player,by_player,reason)
|
give_punishment(player,by_player,reason)
|
||||||
end
|
end
|
||||||
@@ -123,12 +124,12 @@ script.on_event(defines.events.on_tick,function(event)
|
|||||||
if (game.tick % min_time_to_remove_warning) == 0 then
|
if (game.tick % min_time_to_remove_warning) == 0 then
|
||||||
for name,warnings in pairs(global) do
|
for name,warnings in pairs(global) do
|
||||||
if warnings > 0 then
|
if warnings > 0 then
|
||||||
local role = Role.get(name)
|
local role = Role.get_highest(name)
|
||||||
local time_to_remove = remove_warnings_time[role.index]
|
local time_to_remove = remove_warnings_time[role.index]
|
||||||
if (game.tick % time_to_remove) == 0 then
|
if (game.tick % time_to_remove) == 0 then
|
||||||
global[name]=warnings-1
|
global[name]=warnings-1
|
||||||
if global.warnings[name] > 5 then
|
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.textcolor.low,name)
|
player_return({'ExpGamingAdmin-Warnings.remove-warn',global[name],tick_to_display_format(time_to_remove)},defines.textcolor.low,name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=This Warnings Was Given By: __1__
|
warning-given-by=This Warnings Was Given By: __1__
|
||||||
player-warning=__1__ was given a warning by __2__ reason: __3__
|
player-warning=__1__ was given a warning by __2__ reason: __3__
|
||||||
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=This warning was given by: __1__
|
warning-given-by=This warning was given by: __1__
|
||||||
player-warning=__1__ was given a warning by __2__ for: __3__
|
player-warning=__1__ was given a warning by __2__ for: __3__
|
||||||
remove-warn=One of your warnings expired. You have __1__ warnings left, next warning will be removed in __2__
|
remove-warn=One of your warnings expired. You have __1__ warnings left, next warning will be removed in __2__
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=This Warnings Was Given By: __1__
|
warning-given-by=This Warnings Was Given By: __1__
|
||||||
player-warning=__1__ was given a warning by __2__ reason: __3__
|
player-warning=__1__ was given a warning by __2__ reason: __3__
|
||||||
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
temp-ban=__1__ was temp-ban by __2__ and will remain in jail untill next reset
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=Deze waarschuwing is gegeven door: __1__
|
warning-given-by=Deze waarschuwing is gegeven door: __1__
|
||||||
player-warning=__1__ is gewaarschuwd door __2__ met de reden: __3__
|
player-warning=__1__ is gewaarschuwd door __2__ met de reden: __3__
|
||||||
temp-ban=__1__ is verbannen door __2__ en is gejailed tot de volgende reset.
|
temp-ban=__1__ is verbannen door __2__ en is gejailed tot de volgende reset.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[ExpGamingAdmin-Warnings-4-0-0]
|
[ExpGamingAdmin-Warnings]
|
||||||
warning-given-by=Den här varningen gavs av: __1__
|
warning-given-by=Den här varningen gavs av: __1__
|
||||||
player-warning=__1__ var tillfälligt bannlyst av __2__ och kommer att förbli i fängelset tills nästa återställning (reset)
|
player-warning=__1__ var tillfälligt bannlyst av __2__ och kommer att förbli i fängelset tills nästa återställning (reset)
|
||||||
remove-warn=En av dina varningar har gått ut. Du har __1__ varning kvar, nästa varning kommer at tas bort om __2__
|
remove-warn=En av dina varningar har gått ut. Du har __1__ varning kvar, nästa varning kommer at tas bort om __2__
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
-- not_luadoc=true
|
-- not_luadoc=true
|
||||||
local temp_ban = require('ExpGamingAdmin.TempBan')
|
local temp_ban = require('ExpGamingAdmin.AdminLib@^4.0.0').temp_ban
|
||||||
return function(player,entity)
|
return function(player,entity)
|
||||||
player_return('You have repaired: '..entity.name..' this item is not allowed.',defines.textcolor.crit,player)
|
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')
|
temp_ban(player,'<server>','Attempt To Repair A Banned Item')
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ function commands.validate_args(event)
|
|||||||
local arg = words[index]
|
local arg = words[index]
|
||||||
if not arg and data[1] then return commands.error('invalid-inputs') end
|
if not arg and data[1] then return commands.error('invalid-inputs') end
|
||||||
if data[2] == 'string-inf' then rtn[name] = table.concat(words,' ',index) break end
|
if data[2] == 'string-inf' then rtn[name] = table.concat(words,' ',index) break end
|
||||||
local valid = is_type(data[2],'function') and data[2] or commands.validate[data[2]] or error('Invalid type for command: "'..command.name..'/'..name..'"')
|
local valid = is_type(data[2],'function') and data[2] or commands.validate[data[2]] or error('Invalid validation ("'..tostring(data[2])..'") for command: "'..command.name..'/'..name..'"')
|
||||||
local temp_tbl = table.deepcopy(data) table.remove(temp_tbl,1) table.remove(temp_tbl,1)
|
local temp_tbl = table.deepcopy(data) table.remove(temp_tbl,1) table.remove(temp_tbl,1)
|
||||||
local value, err = valid(arg,event,unpack(temp_tbl))
|
local value, err = valid(arg,event,unpack(temp_tbl))
|
||||||
if value == commands.error then return value, err end
|
if value == commands.error then return value, err end
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Role{
|
|||||||
['admin-commands']=true,
|
['admin-commands']=true,
|
||||||
['warn']=true,
|
['warn']=true,
|
||||||
['temp-ban']=true,
|
['temp-ban']=true,
|
||||||
['clear-warings']=true,
|
['clear-warnings']=true,
|
||||||
['clear-reports']=true,
|
['clear-reports']=true,
|
||||||
['clear-all']=true,
|
['clear-all']=true,
|
||||||
['clear-inv']=true,
|
['clear-inv']=true,
|
||||||
|
|||||||
Reference in New Issue
Block a user