diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 8d1d7915..885ebd8e 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -1,18 +1,24 @@ --- name: Bug report -about: Create a report to help us improve +about: Report a bug which does not crash the game, any bug from the latest major scenario version --- -**Describe the bug** +**Factorio version** +Version number: X.Y.Z + +**Scenario version** +Version number: X.Y.Z + +**Bug description** A clear and concise description of what the bug is. -**To Reproduce** +**Reproduction method** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' -4. See error +4. See error in log **Expected behavior** A clear and concise description of what you expected to happen. @@ -20,9 +26,5 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. -**Other information (please complete the following information):** - - OS: [e.g. iOS, Windows, Linux] - - Factorio Version: [e.g. 0.16.30] - **Additional context** -Add any other context about the problem here. +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Desync_report.md b/.github/ISSUE_TEMPLATE/Desync_report.md new file mode 100644 index 00000000..5c7e81f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Desync_report.md @@ -0,0 +1,24 @@ +--- +name: Desync report +about: Report a desync, latest version of scenario only including patches + +--- + +**Factorio version** +Version number: X.Y.Z + +**Scenario version** +Version number: X.Y.Z + +**Desync description** +A clear and concise description of what you believe causes the desync. + +**Reproduction method** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error in log + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Error_report.md b/.github/ISSUE_TEMPLATE/Error_report.md index 85f5a32f..d9ca9b28 100644 --- a/.github/ISSUE_TEMPLATE/Error_report.md +++ b/.github/ISSUE_TEMPLATE/Error_report.md @@ -1,33 +1,35 @@ --- -name: Error/Desync Report -about: Create a report on a bug which gives an error or desync +name: Error report +about: Report a bug which cases the game to crash, any bug from the latest major scenario version --- -**Error Message** -Error: insert error message +**Factorio version** +Version number: X.Y.Z -**Known Causes** -Know causes that will result in error: - - Cause 1 - - Cause 2 +**Scenario version** +Version number: X.Y.Z -**To Reproduce (please give for each cause outlined above)** +**Error message** +``` +error message and stacktrace back +``` + +**Error description** +A clear and concise description of what you believe causes the crash. + +**Reproduction method** Steps to reproduce the behavior: - - Cause 1 - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - - Cause 2 - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error in log -**Other information (please complete the following information):** - - OS: [e.g. iOS, Windows, Linux] - - Factorio Version: [e.g. 0.16.30] +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index 066b2d92..6bdc2252 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -1,17 +1,18 @@ --- name: Feature request -about: Suggest an idea for this project +about: Suggest a new idea to be worked on --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +**Feature overview** +Name: name-here +TL;DR: a few words about what the feature is -**Describe the solution you'd like** -A clear and concise description of what you want to happen. +**Details** +A detailed description of what the new feature is. -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. +**Possible methods** +Any ideas you have had about how to implement the feature or any problems that may arise. **Additional context** -Add any other context or screenshots about the feature request here. +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/README.md b/README.md index ecec858d..7f54976d 100644 --- a/README.md +++ b/README.md @@ -16,28 +16,91 @@ CodeFactor - + Discord

-

ExpGaming Scenario Repository

+

ExpGaming Scenario Repository

-

Out Dated; Will be updated in the future

+## Explosive Gaming -#### Use and Installation +Explosive Gaming (often ExpGaming) is a server hosting community with a strong focus on Factorio and games that follow similar ideas. Our factorio server are known for hosting large maps with the main goal of being a "mega base" which can produce as much as possible with in our reset schedule. Although these server tend to the more experienced players our server are open to everyone. You can find us through our [website](website), [discord](discord), [wiki](wiki), or in the public games tab in factorio (ExpGaming S1). -* 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 +## Use and Installation -#### Creation of new modules +1) Download this [git repository](https://github.com/explosivegaming/scenario/archive/master.zip) for the stable release. The dev branch can be found [here](https://github.com/explosivegaming/scenario/archive/dev.zip) for those who want the latest features. See [releases](#releases) for other release branches. -* Please see [FactorioSoftmodManager](https://github.com/explosivegaming/FactorioSoftmodManager) for making new modules +2) Extract the downloaded zip file from the branch you downloaded into factorio's scenario directory: + * Windows: `%appdata%\Factorio\scenarios` + * Linux: `~/.factorio/scenarios` -#### Forks and Pull Requests +3) Within the scenario you can find `./config/_file_loader.lua` which contains a list of all the modules that will be loaded by the scenario; simply comment out (or remove) features you do not want but note that some modules may load other modules as dependencies even when removed from the list. -* 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 \ No newline at end of file +4) More advanced users may want to play with the other configs files within `./config` but please be aware that some of the config files will require a basic understanding of lua while others may just be a list of values. + +5) Once you have made any config changes that you wish to make open factorio, select play, then start scenario (or host scenario from within multiplayer tab), and select the scenario which will be called `scenario-master` if you have downloaded the latest stable release and have not changed the folder name. + +6) The scenario will now load all the selected modules and start the map, any errors or exceptions raised in the scenario should not cause a game/server crash so if any features don't work as expected then it may be returning an error in the log, please report these errors to [the issues page](issues). + +## Contributing + +All are welcome to make pull requests and issues for this scenario, if you are in any doubt please ask someone in our [discord](discord). If you do not know lua and don't feel like learning you can always make a [feature request](issues). Please keep in mind while making code changes: + +* New features should have the branch names: `feature/feature-name` +* New features are merged into `dev` after it has been completed. +* After a number of features have been added a release branch is made: `release/X.Y.0`; this branch should have no new features and only bug fixes or localization. +* A release is merged into `master` on the following friday in time for the the weekly reset. +* Patches may be named `patch/X.Y.Z` and fill be merged into `master` and `dev` when appropriate. + +## Releases + +| Scenario Version* | Version Name | Factorio Version** | +|---|---|---| +| [v5.6](s5.6) | Information Guis | [v0.17.44](f0.17.44) | +| [v5.5](s5.5) | Gui System | [v0.17.43](f0.17.43) | +| [v5.4](s5.4) | Admin Controls | [v0.17.32](f0.17.32) | +| [v5.3](s5.3) | Custom Roles | [v0.17.28](f0.17.28) | +| [v5.2](s5.2) | Quality of life | [v0.17.22](f0.17.22) | +| [v5.1](s5.1) | Permission Groups | [v0.17.13](f0.17.13) | +| [v5.0](s5.0) | 0.17 Overhaul| [v0.17](f0.17.9) | +| [v4.0](s4.0) | Softmod Manager | [v0.16.51](f0.16.51) | +| [v3.0](s3.0) | 0.16 Overhaul | [v0.16](f0.16) | +| [v2.0](s2.0) | Localization and clean up | [v0.15](f0.15) | +| [v1.0](s1.0) | Modulation | [v0.15](f0.15) | +| [v0.1](s0.1) | First Tracked Version | [v0.14](f0.14) | +\* Scenario patch versions have been omitted. + +\** Factorio versions show the version they were made for, often the minimum requirement. + +[s5.6]: https://github.com/explosivegaming/scenario/releases/tag/5.6.0 +[s5.5]: https://github.com/explosivegaming/scenario/releases/tag/5.5.0 +[s5.4]: https://github.com/explosivegaming/scenario/releases/tag/5.4.0 +[s5.3]: https://github.com/explosivegaming/scenario/releases/tag/5.3.0 +[s5.2]: https://github.com/explosivegaming/scenario/releases/tag/5.2.0 +[s5.1]: https://github.com/explosivegaming/scenario/releases/tag/5.1.0 +[s5.0]: https://github.com/explosivegaming/scenario/releases/tag/5.0.0 +[s4.0]: https://github.com/explosivegaming/scenario/releases/tag/v4.0 +[s3.0]: https://github.com/explosivegaming/scenario/releases/tag/v3.0 +[s2.0]: https://github.com/explosivegaming/scenario/releases/tag/v2.0 +[s1.0]: https://github.com/explosivegaming/scenario/releases/tag/v1.0 +[s0.1]: https://github.com/explosivegaming/scenario/releases/tag/v0.1 + +[f0.17.44]: https://wiki.factorio.com/Version_history/0.17.0#0.17.44 +[f0.17.32]: https://wiki.factorio.com/Version_history/0.17.0#0.17.32 +[f0.17.28]: https://wiki.factorio.com/Version_history/0.17.0#0.17.28 +[f0.17.22]: https://wiki.factorio.com/Version_history/0.17.0#0.17.22 +[f0.17.13]: https://wiki.factorio.com/Version_history/0.17.0#0.17.13 +[f0.17.9]: https://wiki.factorio.com/Version_history/0.17.0#0.17.9 +[f0.16.51]: https://wiki.factorio.com/Version_history/0.16.0#0.16.51 +[f0.16]: https://wiki.factorio.com/Version_history/0.16.0 +[f0.15]: https://wiki.factorio.com/Version_history/0.15.0 +[f0.14]: https://wiki.factorio.com/Version_history/0.14.0 + +## License + +The Explosive Gaming codebase is licensed under the [GNU General Public License v3.0](https://github.com/explosivegaming/scenario/blob/master/LICENSE) + +[issues]: https://github.com/explosivegaming/scenario/issues/new/choose +[website]: https://explosivegaming.nl +[discord]: https://discord.explosivegaming.nl +[wiki]: https://wiki.explosivegaming.nl \ No newline at end of file diff --git a/config/file_loader.lua b/config/_file_loader.lua similarity index 71% rename from config/file_loader.lua rename to config/_file_loader.lua index 744c058c..23eb99dd 100644 --- a/config/file_loader.lua +++ b/config/_file_loader.lua @@ -22,23 +22,28 @@ return { 'modules.commands.reports', 'modules.commands.spawn', 'modules.commands.warnings', + 'modules.commands.find', -- QoL Addons 'modules.addons.chat-popups', 'modules.addons.damage-popups', 'modules.addons.death-logger', - 'modules.addons.advanced-starting-items', + 'modules.addons.advanced-start', 'modules.addons.spawn-area', 'modules.addons.compilatron', 'modules.addons.scorched-earth', 'modules.addons.pollution-grading', 'modules.addons.random-player-colours', -- GUI + 'modules.gui.rocket-info', + 'modules.gui.science-info', + 'modules.gui.task-list', + 'modules.gui.player-list', 'modules.commands.debug', -- 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 - 'config.command_auth_runtime_disable', -- allows commands to be enabled and disabled during runtime + 'config.expcore-commands.auth_admin', -- commands tagged with admin_only are blocked for non admins + 'config.expcore-commands.auth_roles', -- commands must be allowed via the role config + 'config.expcore-commands.auth_runtime_disable', -- allows commands to be enabled and disabled during runtime 'config.permission_groups', -- loads some predefined permission groups 'config.roles', -- loads some predefined roles - 'expcore.gui.test' + 'expcore.gui.test' -- loads multiple gui defines to test the gui system } \ No newline at end of file diff --git a/config/action_buttons.lua b/config/action_buttons.lua new file mode 100644 index 00000000..71ec2ee2 --- /dev/null +++ b/config/action_buttons.lua @@ -0,0 +1,267 @@ +--- Config for the different action buttons that show on the player list +-- each button has the button define(s) given along side an auth function, and optional reason callback +-- if a reason callback is used then Store.set_child(action_name_store,player.name,'BUTTON_NAME') should be called during on_click +-- buttons can be removed from the gui by commenting them out of the config at the bottom of this file +-- the key used for the name of the button is the permision name used by the role system +local Gui = require 'expcore.gui' +local Roles = require 'expcore.roles' +local Store = require 'expcore.store' +local Game = require 'utils.game' +local Reports = require 'modules.addons.reports-control' +local Warnings = require 'modules.addons.warnings-control' +local Jail = require 'modules.addons.jail-control' +local Colors = require 'resources.color_presets' +local format_chat_player_name = ext_require('expcore.common','format_chat_player_name') + +local action_player_store = 'gui.left.player-list.action-player' +local action_name_store = 'gui.left.player-list.action-name' + +-- common style used by all action buttons +local function tool_button_style(style) + Gui.set_padding_style(style,-1,-1,-1,-1) + style.height = 28 + style.width = 28 +end + +-- auth that will only allow when on player's of lower roles +local function auth_lower_role(player,action_player_name) + local player_highest = Roles.get_player_highest_role(player) + local action_player_highest = Roles.get_player_highest_role(action_player_name) + if player_highest.index < action_player_highest.index then + return true + end +end + +-- gets the action player and a coloured name for the action to be used on +local function get_action_player_name(player) + local action_player_name = Store.get_child(action_player_store,player.name) + local action_player = Game.get_player_from_any(action_player_name) + local action_player_name_color = format_chat_player_name(action_player) + return action_player,action_player_name_color +end + +-- telports one player to another +local function teleport(from_player,to_player) + local surface = to_player.surface + local position = surface.find_non_colliding_position('character',to_player.position,32,1) + if not position then return false end -- return false if no new position + if from_player.driving then from_player.driving = false end -- kicks a player out a vehicle if in one + from_player.teleport(position,surface) + return true +end + +-- teleports the user to the action player +local goto_player = +Gui.new_button() +:set_sprites('utility/export') +:set_tooltip{'player-list.goto-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + local action_player_name = get_action_player_name(player) + local action_player = Game.get_player_from_any(action_player_name) + if not player.character or not action_player.character then + player.print({'expcore-commands.reject-player-alive'},Colors.orange_red) + else + teleport(player,action_player) + end +end) + +-- teleports the action player to the user +local bring_player = +Gui.new_button() +:set_sprites('utility/import') +:set_tooltip{'player-list.bring-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + local action_player_name = get_action_player_name(player) + local action_player = Game.get_player_from_any(action_player_name) + if not player.character or not action_player.character then + player.print({'expcore-commands.reject-player-alive'},Colors.orange_red) + else + teleport(action_player,player) + end +end) + +-- kills the action player, if there are alive +local kill_player = +Gui.new_button() +:set_sprites('utility/too_far') +:set_tooltip{'player-list.kill-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + local action_player_name = get_action_player_name(player) + local action_player = Game.get_player_from_any(action_player_name) + if action_player.character then + action_player.character.die() + else + player.print({'expcom-kill.already-dead'},Colors.orange_red) + end +end) + +-- reports the action player, requires a reason to be given +local report_player = +Gui.new_button() +:set_sprites('utility/spawn_flag') +:set_tooltip{'player-list.report-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + local action_player_name = get_action_player_name(player) + if Reports.player_is_reported_by(action_player_name,player.name) then + player.print({'expcom-report.already-reported'},Colors.orange_red) + else + Store.set_child(action_name_store,player.name,'command/report') + end +end) + +local function report_player_callback(player,reason) + local action_player_name,action_player_name_color = get_action_player_name(player) + local by_player_name_color = format_chat_player_name(player) + game.print{'expcom-report.non-admin',action_player_name_color,reason} + Roles.print_to_roles_higher('Trainee',{'expcom-report.admin',action_player_name_color,by_player_name_color,reason}) + Reports.report_player(action_player_name,reason,player.name) +end + +-- gives the action player a warning, requires a reason +local warn_player = +Gui.new_button() +:set_sprites('utility/spawn_flag') +:set_tooltip{'player-list.warn-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + Store.set_child(action_name_store,player.name,'command/give-warning') +end) + +local function warn_player_callback(player,reason) + local action_player_name,action_player_name_color = get_action_player_name(player) + local by_player_name_color = format_chat_player_name(player) + game.print{'expcom-warnings.received',action_player_name_color,by_player_name_color,reason} + Warnings.add_warnings(action_player_name,player.name) +end + +-- jails the action player, requires a reason +local jail_player = +Gui.new_button() +:set_sprites('utility/item_editor_icon') +:set_tooltip{'player-list.jail-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + local action_player_name,action_player_name_color = get_action_player_name(player) + if Roles.player_has_role(action_player_name,'Jail') then + player.print({'expcom-jail.already-jailed',action_player_name_color},Colors.orange_red) + else + Store.set_child(action_name_store,player.name,'command/jail') + end +end) + +local function jail_player_callback(player,reason) + local action_player_name,action_player_name_color = get_action_player_name(player) + local by_player_name_color = format_chat_player_name(player) + game.print{'expcom-jail.give',action_player_name_color,by_player_name_color,reason} + Jail.jail_player(action_player_name,player.name) +end + +-- temp bans the action player, requires a reason +local temp_ban_player = +Gui.new_button() +:set_sprites('utility/clock') +:set_tooltip{'player-list.temp-ban-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + local action_player_name,action_player_name_color = get_action_player_name(player) + if Roles.player_has_role(action_player_name,'Jail') then + player.print({'expcom-jail.already-banned',action_player_name_color},Colors.orange_red) + else + Store.set_child(action_name_store,player.name,'command/temp-ban') + end +end) + +local function temp_ban_player_callback(player,reason) + local action_player,action_player_name_color = get_action_player_name(player) + local by_player_name_color = format_chat_player_name(player) + game.print{'expcom-jail.temp-ban',action_player_name_color,by_player_name_color,reason} + Jail.temp_ban_player(action_player,player.name,reason) +end + +-- kicks the action player, requires a reason +local kick_player = +Gui.new_button() +:set_sprites('utility/warning_icon') +:set_tooltip{'player-list.kick-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + Store.set_child(action_name_store,player.name,'command/kick') +end) + +local function kick_player_callback(player,reason) + local action_player = get_action_player_name(player) + game.kick_player(action_player,reason) +end + +-- bans the action player, requires a reason +local ban_player = +Gui.new_button() +:set_sprites('utility/danger_icon') +:set_tooltip{'player-list.ban-player'} +:set_style('tool_button',tool_button_style) +:on_click(function(player,element) + Store.set_child(action_name_store,player.name,'command/ban') +end) + +local function ban_player_callback(player,reason) + local action_player = get_action_player_name(player) + game.ban_player(action_player,reason) +end + +return { + ['command/teleport'] = { + auth=function(player,action_player) + return player.name ~= action_player.name + end, -- cant teleport to your self + goto_player, + bring_player + }, + ['command/kill'] = { + auth=function(player,action_player) + if player.name == action_player.name then + return true + elseif Roles.player_allowed(player,'command/kill/always') then + return auth_lower_role(player,action_player) + end + end, -- player must be lower role, or your self + kill_player + }, + ['command/report'] = { + auth=function(player,action_player) + if not Roles.player_allowed(player,'command/give-warning') then + return not Roles.player_has_flag(action_player,'report-immune') + end + end, -- can report any player that isnt immune and you arnt able to give warnings + reason_callback=report_player_callback, + report_player + }, + ['command/give-warning'] = { + auth=auth_lower_role, -- warn a lower user, replaces report + reason_callback=warn_player_callback, + warn_player + }, + ['command/jail'] = { + auth=auth_lower_role, + reason_callback=jail_player_callback, + jail_player + }, + ['command/temp-ban'] = { + auth=auth_lower_role, + reason_callback=temp_ban_player_callback, + temp_ban_player + }, + ['command/kick'] = { + auth=auth_lower_role, + reason_callback=kick_player_callback, + kick_player + }, + ['command/ban'] = { + auth=auth_lower_role, + reason_callback=ban_player_callback, + ban_player + } +} \ No newline at end of file diff --git a/config/advanced_starting_items.lua b/config/advanced_start.lua similarity index 94% rename from config/advanced_starting_items.lua rename to config/advanced_start.lua index 0847ac6d..586530ad 100644 --- a/config/advanced_starting_items.lua +++ b/config/advanced_start.lua @@ -62,6 +62,9 @@ end return { skip_intro=true, -- skips the intro given in the default factorio free play scenario + skip_victory=true, -- will skip the victory screen when a rocket is launched + disable_base_game_silo_script=true, -- will not load the silo script at all + research_queue_from_start=true, -- when true the research queue is useible from the start friendly_fire=false, -- weather players will be able to attack each other on the same force enemy_expansion=false, -- a catch all for in case the map settings file fails to load chart_radius=10*32, -- the number of tiles that will be charted when the map starts diff --git a/config/compilatron.lua b/config/compilatron.lua index a4980f92..47ffccb3 100644 --- a/config/compilatron.lua +++ b/config/compilatron.lua @@ -1,3 +1,4 @@ +-- config file for the compliatrons including where they spawn and what messages they show return { message_cycle=60*15, -- 15 seconds default, how often (in ticks) the messages will cycle locations={ -- defines the spawn locations for all compilatrons diff --git a/config/config.cfg b/config/config.cfg deleted file mode 100644 index b12b17cf..00000000 --- a/config/config.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[command-auth] -admin-only=This command is for (game) admins only! -command-disabled=This command has been disabled by management! \ No newline at end of file diff --git a/config/command_auth_admin.lua b/config/expcore-commands/auth_admin.lua similarity index 100% rename from config/command_auth_admin.lua rename to config/expcore-commands/auth_admin.lua diff --git a/config/command_auth_roles.lua b/config/expcore-commands/auth_roles.lua similarity index 100% rename from config/command_auth_roles.lua rename to config/expcore-commands/auth_roles.lua diff --git a/config/command_auth_runtime_disable.lua b/config/expcore-commands/auth_runtime_disable.lua similarity index 100% rename from config/command_auth_runtime_disable.lua rename to config/expcore-commands/auth_runtime_disable.lua diff --git a/config/command_parse_general.lua b/config/expcore-commands/parse_general.lua similarity index 100% rename from config/command_parse_general.lua rename to config/expcore-commands/parse_general.lua diff --git a/config/command_parse_roles.lua b/config/expcore-commands/parse_roles.lua similarity index 97% rename from config/command_parse_roles.lua rename to config/expcore-commands/parse_roles.lua index efdf2a00..3d468aaf 100644 --- a/config/command_parse_roles.lua +++ b/config/expcore-commands/parse_roles.lua @@ -2,7 +2,7 @@ local Commands = require 'expcore.commands' local Roles = require 'expcore.roles' local auto_complete = ext_require('expcore.common','auto_complete') -require 'config.command_parse_general' +require 'config.expcore-commands.parse_general' Commands.add_parse('role',function(input,player,reject) if not input then return end diff --git a/config/preset_player_colours.lua b/config/preset_player_colours.lua index 527ad065..d10fd64a 100644 --- a/config/preset_player_colours.lua +++ b/config/preset_player_colours.lua @@ -1,3 +1,4 @@ +-- preset colours that players get when they join the server, if not in the list then will be given a random colour (which isnt disallowed) return { players={ BADgamerNL={r=255,g=20,b=147}, diff --git a/config/repair.lua b/config/repair.lua index dd58d8be..5980c8c2 100644 --- a/config/repair.lua +++ b/config/repair.lua @@ -1,13 +1,14 @@ +-- config file for the repair command return { - disallow = { + disallow = { -- items in this list will never be repaired ['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 + max_range=50, -- the max range that can be used with the repair command + allow_blueprint_repair=false, -- when true will allow blueprints (things not destroied by biters) to be build instently using the repair command + allow_ghost_revive=true, -- when true will allow ghosts (things destoried by biters) to be build instently using the repair command + allow_heal_entities=true -- when true will heal entities to full health that are within range } \ No newline at end of file diff --git a/config/rockets.lua b/config/rockets.lua new file mode 100644 index 00000000..7025ae16 --- /dev/null +++ b/config/rockets.lua @@ -0,0 +1,33 @@ +--- This file controls what will show in each section of the rocket info gui +return { + stats = { --- The data that will show in the stats section + show_stats=true, -- false will hide this section all together + show_first_rocket = true, -- false will not show when the first rocket was launched + show_last_rocket = true, -- false will not show when the last rocket was launched + show_fastest_rocket = true, -- false will not show the time taken for the fastest rocket + show_total_rockets = true, -- false will not show the total number of rockets launched + show_game_avg = true, -- false will hide the avg across the entire map time + rolling_avg = { -- each number will be one stat; 5 means the avg time taken for the last 5 rockets + 5,10,25 + } + }, + milestones = { -- each number will be one stat; 5 means the time that the 5th rocket was launched + show_milestones=true, -- false will hide this section all together + 1,2,5, + 10,20,50, + 100,200,500, + 1000,1500,2000,2500, + 3000,3500,4000,4500, + 5000 + }, + progress = { --- The data and buttons in the build progress section + show_progress = true, -- false will hide this section altogether + allow_zoom_to_map = true, -- false will disable the zoom to map feature + allow_remote_launch = true, -- false removes the remote launch button for all players + remote_launch_admins_only = false, -- true will remove the remote launch button for all non (game) admins + remote_launch_role_permision = 'gui/rocket-info/remote_launch', -- value used by custom permission system to allow or disllow the button + allow_toggle_active = true, -- false removes the remote toggle auto launch button for all players + toggle_active_admins_only = false, -- true will remove the toggle auto launch button for all non (game) admins + toggle_active_role_permision = 'gui/rocket-info/toggle-active' -- value used by custom permission system to allow or disllow the button + } +} \ No newline at end of file diff --git a/config/roles.lua b/config/roles.lua index b1863ea7..ebc40583 100644 --- a/config/roles.lua +++ b/config/roles.lua @@ -76,6 +76,8 @@ Roles.new_role('Moderator','Mod') 'command/clear-warnings', 'command/clear-temp-ban', 'command/clear-inventory', + 'gui/rocket-info/toggle-active', + 'gui/rocket-info/remote_launch', } Roles.new_role('Trainee','TrMod') @@ -94,6 +96,8 @@ Roles.new_role('Trainee','TrMod') 'command/give-warning', 'command/get-warnings', 'command/get-reports', + 'command/kick', + 'command/ban', } --- Trusted Roles @@ -113,6 +117,8 @@ Roles.new_role('Pay to Win','P2W') :set_flag('report-immune') :set_parent('Donator') :allow{ + 'gui/rocket-info/toggle-active', + 'gui/rocket-info/remote_launch', } Roles.new_role('Donator','Don') @@ -153,6 +159,7 @@ Roles.new_role('Member','Mem') :set_custom_color{r=24,g=172,b=188} :set_parent('Regular') :allow{ + 'gui/task-list/edit' } Roles.new_role('Regular','Reg') @@ -180,7 +187,12 @@ local default = Roles.new_role('Guest','') 'command/tag-clear', 'command/chelp', 'command/list-roles', + 'command/find-on-map', 'command/report', + 'gui/player-list', + 'gui/rocket-info', + 'gui/science-info', + 'gui/task-list', } --- Jail role diff --git a/config/science.lua b/config/science.lua new file mode 100644 index 00000000..3cd3ce5f --- /dev/null +++ b/config/science.lua @@ -0,0 +1,13 @@ +-- config file for the science info gui +return { -- list of all science packs to be shown in the gui + show_eta=true, -- when true the eta for research completion will be shown + required_for_green=5, -- the amount required for the text to show as green + required_for_red=-5, -- the amount required for the text to show as red + 'automation-science-pack', + 'logistic-science-pack', + 'military-science-pack', + 'chemical-science-pack', + 'production-science-pack', + 'utility-science-pack', + 'space-science-pack', +} \ No newline at end of file diff --git a/config/scorched_earth.lua b/config/scorched_earth.lua index bf683d45..1a46e20d 100644 --- a/config/scorched_earth.lua +++ b/config/scorched_earth.lua @@ -108,6 +108,7 @@ return { ['rocket-silo']=true, ['pumpjack']=true, ['electric-mining-drill']=true, - ['roboport']=true + ['roboport']=true, + ['accumulator']=true } } \ No newline at end of file diff --git a/config/tasks.lua b/config/tasks.lua new file mode 100644 index 00000000..4c6bd54a --- /dev/null +++ b/config/tasks.lua @@ -0,0 +1,5 @@ +-- config file for the tasks gui +return { + only_admins_can_edit = false, -- true will hide the edit and delete buttons from non (game) admins + edit_tasks_role_permision = 'gui/task-list/edit' -- value used with custom permision system +} \ No newline at end of file diff --git a/config/warnings.lua b/config/warnings.lua index 5beace17..6e6c9211 100644 --- a/config/warnings.lua +++ b/config/warnings.lua @@ -2,8 +2,8 @@ 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.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'}}) diff --git a/control.lua b/control.lua index 48a4fbbc..e4ed6c3f 100644 --- a/control.lua +++ b/control.lua @@ -26,7 +26,7 @@ ext_require = require('expcore.common').ext_require -- Please go to config/file_loader.lua to edit the files that are loaded log('[INFO] Getting file loader config') -local files = require 'config.file_loader' +local files = require 'config._file_loader' -- Loads all files from the config and logs that they are loaded local total_file_count = string.format('%3d',#files) diff --git a/doc/index.html b/doc/index.html index f5d24cda..45c80e3f 100644 --- a/doc/index.html +++ b/doc/index.html @@ -30,25 +30,62 @@

Modules

-