Skip to content

Commit

Permalink
Merge branch 'release/5.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cooldude2606 committed Apr 19, 2019
2 parents 1a3e365 + c98ed90 commit 4c5c693
Show file tree
Hide file tree
Showing 103 changed files with 2,094 additions and 153 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk

.vscode
*luacheckrc
1,002 changes: 1,002 additions & 0 deletions .luacheckrc

Large diffs are not rendered by default.

31 changes: 0 additions & 31 deletions .vscode/settings.json

This file was deleted.

37 changes: 0 additions & 37 deletions Boiler Print Module

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@
</p>
<h2 align="center">ExpGaming Scenario Repository</h2>

<p align="center"><font size="-2">Out Dated; Will be updated in the future</font></p>

#### Use and Installation

* Download the git repo
* Move files into the scenario folder (C:\Users\User\AppData\Roaming\Factorio\scenarios\ExpGamingScenario)
* Make edits to role and group configs as well as any other configs that you want
* Run the scenario under Play > Multiplayer > Host Scenario > ExpGamingScenario
* All modules will be loaded if you have not removed any, any problems see log file

#### Creation of new modules

* Please see [FactorioSoftmodManager](https://github.com/explosivegaming/FactorioSoftmodManager) for making new modules

#### Forks and Pull Requests

* We are happy for people to make pull requests if you wish to help make our server better
* Your server is a community server, it is all about the people and feedback is good
* Dont be afraid to make a pull request as if it fixes something then its a good change
3 changes: 0 additions & 3 deletions config.ld

This file was deleted.

9 changes: 7 additions & 2 deletions config/command_parse_roles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ require 'config.command_parse_general'

Commands.add_parse('role',function(input,player,reject)
if not input then return end
local roles = Roles.config.roles
local role = auto_complete(roles,input,true)
local roles = Roles.config.order
local rev_roles = {}
for i=#roles,1,-1 do
table.insert(rev_roles,roles[i])
end
local role = auto_complete(rev_roles,input)
role = Roles.get_role_by_name(role)
if not role then
return reject{'expcore-role.reject-role'}
else
Expand Down
7 changes: 7 additions & 0 deletions config/file_loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ return {
'modules.commands.help',
'modules.commands.roles',
'modules.commands.rainbow',
'modules.commands.clear-inventory',
'modules.commands.jail',
'modules.commands.repair',
'modules.commands.reports',
'modules.commands.spawn',
'modules.commands.warnings',
-- QoL Addons
'modules.addons.chat-popups',
'modules.addons.damage-popups',
Expand All @@ -25,6 +31,7 @@ return {
'modules.addons.compilatron',
'modules.addons.scorched-earth',
'modules.addons.pollution-grading',
'modules.addons.random-player-colours',
-- Config Files
'config.command_auth_admin', -- commands tagged with admin_only are blocked for non admins
'config.command_auth_roles', -- commands must be allowed via the role config
Expand Down
36 changes: 36 additions & 0 deletions config/preset_player_colours.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
players={
BADgamerNL={r=255,g=20,b=147},
arty714={r=150,g=68,b=161},
Cooldude2606={r=57,g=192,b=207},
mark9064={r=99,g=0,b=255},
eissturm={r=25,g=25,b=112},
Sakama={r=20,g=213,b=80},
Sakama={r=20,g=213,b=80},
freek18={r=50,g=0,b=255},
aldldl={r=0,g=131,b=255},
NAD4X4={r=135,g=206,b=250},
cydes={r=82,g=249,b=155},
UUBlueFire={r=0,g=204,b=255}
},
disallow = { -- the value does not matter it is only the key which is checked
black = {r = 0, g = 0, b = 0},
white = {r = 255, g = 255, b = 255},
jailed = {r = 255, g = 255, b = 255},
probation = {r = 255, g = 255, b = 255},
guest = {r = 255, g = 255, b = 255},
auto_trusted = {r = 192, g = 192, b = 192},
regular = {r = 0.155, g = 0.540, b = 0.898},
admin = {r = 0.093, g = 0.768, b = 0.172},
donator = {r = 172.6, g = 70.2, b = 215.8},
[-10] = {r = 255, g = 255, b = 255},
[0] = {r = 255, g = 255, b = 255},
[10] = {r = 192, g = 192, b = 192},
[20] = {r = 0.155, g = 0.540, b = 0.898},
[30] = {r = 0.093, g = 0.768, b = 0.172},
success = {r = 0, g = 255, b = 0},
warning = {r = 255, g = 255, b = 0},
fail = {r = 255, g = 0, b = 0},
info = {r = 255, g = 255, b = 255}
}
}
13 changes: 13 additions & 0 deletions config/repair.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return {
disallow = {
['loader']=true,
['fast-loader']=true,
['express-loader']=true,
['electric-energy-interface']=true,
['infinity-chest']=true
},
max_range=50,
allow_blueprint_repair=false,
allow_ghost_revive=true,
allow_heal_entities=true
}
46 changes: 34 additions & 12 deletions config/roles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ Roles.new_role('System','SYS')
:set_permission_group('Admin')
:set_flag('is_admin')
:set_flag('is_spectator')
:set_flag('report-immune')
:set_allow_all()

Roles.new_role('Senior Administrator','SAdmin')
:set_permission_group('Admin')
:set_flag('is_admin')
:set_flag('is_spectator')
:set_flag('report-immune')
:set_parent('Administrator')
:allow{
'command/interface',
Expand All @@ -50,6 +52,7 @@ Roles.new_role('Administrator','Admin')
:set_custom_color{r=233,g=63,b=233}
:set_flag('is_admin')
:set_flag('is_spectator')
:set_flag('report-immune')
:set_parent('Moderator')
:allow{
}
Expand All @@ -59,32 +62,45 @@ Roles.new_role('Moderator','Mod')
:set_custom_color{r=0,g=170,b=0}
:set_flag('is_admin')
:set_flag('is_spectator')
:set_flag('report-immune')
:set_parent('Trainee')
:allow{
'command/assign-role',
'command/unassign-role'
'command/unassign-role',
'command/repair',
'command/kill/always',
'command/tag-clear/always',
'command/go-to-spawn/always',
'command/clear-reports',
'command/clear-warnings',
'command/clear-temp-ban',
'command/clear-inventory',
}

Roles.new_role('Trainee','TrMod')
:set_permission_group('Admin')
:set_custom_color{r=0,g=170,b=0}
:set_flag('is_admin')
:set_flag('is_spectator')
:set_flag('report-immune')
:set_parent('Donator')
:allow{
'command/admin-chat',
'command/teleport',
'command/bring',
'command/goto',
'command/kill/always',
'command/tag-clear/always',
'command/temp-ban',
'command/give-warning',
'command/get-warnings',
'command/get-reports',
}

--- Trusted Roles
Roles.new_role('Sponsor','Spon')
:set_permission_group('Trusted')
:set_custom_color{r=247,g=246,b=54}
:set_flag('is_spectator')
:set_flag('report-immune')
:set_parent('Pay to Win')
:allow{
}
Expand All @@ -93,6 +109,7 @@ Roles.new_role('Pay to Win','P2W')
:set_permission_group('Trusted')
:set_custom_color{r=238,g=172,b=44}
:set_flag('is_spectator')
:set_flag('report-immune')
:set_parent('Donator')
:allow{
}
Expand All @@ -103,6 +120,8 @@ Roles.new_role('Donator','Don')
:set_flag('is_spectator')
:set_parent('Veteran')
:allow{
'command/jail',
'command/unjail'
}

Roles.new_role('Partner','Part')
Expand All @@ -111,6 +130,8 @@ Roles.new_role('Partner','Part')
:set_flag('is_spectator')
:set_parent('Veteran')
:allow{
'command/jail',
'command/unjail'
}

Roles.new_role('Veteran','Vet')
Expand Down Expand Up @@ -138,7 +159,10 @@ Roles.new_role('Regular','Reg')
:set_custom_color{r=79,g=155,b=163}
:set_parent('Guest')
:allow{
'command/kill'
'command/kill',
'command/rainbow',
'command/go-to-spawn',
'command/me',
}
:set_auto_promote_condition(function(player)
if player.online_time > 3*216000 then
Expand All @@ -147,32 +171,30 @@ Roles.new_role('Regular','Reg')
end)

--- Guest/Default role
Roles.new_role('Guest','')
local default = Roles.new_role('Guest','')
:set_permission_group('Guest')
:set_custom_color{r=185,g=187,b=160}
:allow{
'command/me',
'command/tag',
'command/tag-clear',
'command/chelp',
'command/list-roles',
'command/rainbow'
'command/report',
}

--- Jail role
Roles.new_role('Jail')
:set_permission_group('Restricted')
:set_custom_color{r=50,g=50,b=50}
:set_block_auto_promote(true)
:allow{
}
:disallow(default.allowed)

--- System defaults which are required to be set
Roles.set_root('System')
Roles.set_default('Guest')

Roles.define_role_order{
'System',
'System', -- Best to keep root at top
'Senior Administrator',
'Administrator',
'Moderator',
Expand All @@ -184,8 +206,8 @@ Roles.define_role_order{
'Veteran',
'Member',
'Regular',
'Guest',
'Jail'
'Jail',
'Guest' -- Default must be last if you want to apply restrictions to other roles
}

Roles.override_player_roles{
Expand Down
19 changes: 19 additions & 0 deletions config/warnings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- Config file for the warning system, this is very similar to reports but is for the use of moderators rather than normal users.
return {
actions = { -- what actions are taking at number of warnings
-- if a localized string is used then __1__ will by_player_name and __2__ will be the current warning count (auto inserted)
{'warnings.received'},
{'warnings.received'},
{'warnings.received',{'warnings.pre-kick'}},
function(player,by_player_name,number_of_warnings)
game.kick_player(player,{'warnings.received',by_player_name,number_of_warnings,{'warnings.kick'}})
end,
{'warnings.received',{'warnings.pre-pre-ban'}},
{'warnings.received',{'warnings.pre-ban'}},
function(player,by_player_name,number_of_warnings)
game.ban_player(player,{'warnings.received',by_player_name,number_of_warnings,{'warnings.ban',{'info.website-link'}}})
end
},
temp_warning_cool_down=30, -- time for a temp warning (given by script) to be removed (in minutes)
temp_warning_limit=5 -- the number of temp warnings (given by script) that are allowed before full warnings are given
}
6 changes: 3 additions & 3 deletions expcore/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
Commands.remove_parse(name) --- Removes a parse function, see add_parse for adding them
Commands.parse(name,input,player,reject,...) --- Intended to be used within other parse functions, runs a parse and returns success and new value
Commands.add_command(name,help) --- Creates a new command object to added details to, note this does not register the command to the game
Commands.new_command(name,help) --- Creates a new command object to added details to, note this does not register the command to the game
Commands._prototype:add_param(name,optional,parse,...) --- Adds a new param to the command this will be displayed in the help and used to parse the input
Commands._prototype:set_defaults(defaults) --- Adds default values to params only matters if the param is optional
Commands._prototype:set_flag(name,value) --- Adds a tag to the command which is passed via the flags param to the authenticators, can be used to assign command roles or type
Expand Down Expand Up @@ -724,10 +724,10 @@ function Commands.run_command(command_event)

-- runs the command
-- player: LuaPlayer, ... command params, raw: string
table.insert(params,input_string)
table.insert(params,command_data.max_param_count+1,input_string)
local success, err = pcall(command_data.callback,player,unpack(params))
if Commands.internal_error(success,command_data.name,err) then
return command_log(player,command_data,'Internal Error: Command Callback Fail',params,command_event.parameter,err)
return command_log(player,command_data,'Internal Error: Command Callback Fail',raw_params,command_event.parameter,err)
end
if err == Commands.defines.error or err == Commands.error then
return command_log(player,command_data,'Custom Error',raw_params,input_string)
Expand Down
Loading

0 comments on commit 4c5c693

Please sign in to comment.