From ac755ba2acf6a71bf411d851007a6d924826c07c Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 27 May 2019 14:24:31 +0100 Subject: [PATCH 1/3] New Readme --- README.md | 91 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ecec858d..c7509c63 100644 --- a/README.md +++ b/README.md @@ -16,28 +16,89 @@ 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.5](s5.5) | Gui System | [v0.17.35](f0.17.35) | +| [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.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.35]: https://wiki.factorio.com/Version_history/0.17.0#0.17.35 +[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 From e1ec16ac777cbaea6776f5ef54b053fd4fa9ebb1 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 27 May 2019 14:38:23 +0100 Subject: [PATCH 2/3] Added command find --- config/_file_loader.lua | 1 + config/action_buttons.lua | 2 +- config/roles.lua | 1 + modules/commands/find.lua | 11 +++++++++++ modules/gui/player-list.lua | 19 ++++++++++++++++++- 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 modules/commands/find.lua diff --git a/config/_file_loader.lua b/config/_file_loader.lua index 24c135c7..ca4405fd 100644 --- a/config/_file_loader.lua +++ b/config/_file_loader.lua @@ -22,6 +22,7 @@ return { 'modules.commands.reports', 'modules.commands.spawn', 'modules.commands.warnings', + 'modules.commands.find', -- QoL Addons 'modules.addons.chat-popups', 'modules.addons.damage-popups', diff --git a/config/action_buttons.lua b/config/action_buttons.lua index b3da006a..cd48100d 100644 --- a/config/action_buttons.lua +++ b/config/action_buttons.lua @@ -184,7 +184,7 @@ return { ['command/report'] = { auth=function(player,action_player_name) if not Roles.player_allowed(player,'command/give-warning') then - return auth_lower_role(player,action_player_name) + return not Roles.player_has_flag(action_player_name,'report-immune') end end, reason_callback=report_player_callback, diff --git a/config/roles.lua b/config/roles.lua index 3fe9c615..3604d31a 100644 --- a/config/roles.lua +++ b/config/roles.lua @@ -182,6 +182,7 @@ local default = Roles.new_role('Guest','') 'command/tag-clear', 'command/chelp', 'command/list-roles', + 'command/find-on-map', 'command/report', 'gui/player-list', } diff --git a/modules/commands/find.lua b/modules/commands/find.lua new file mode 100644 index 00000000..ee242b1b --- /dev/null +++ b/modules/commands/find.lua @@ -0,0 +1,11 @@ +local Commands = require 'expcore.commands' +require 'config.expcore-commands.parse_general' + +Commands.new_command('find-on-map','Find a player on your map.') +:add_param('player',false,'player-online') -- the player to find on the map +:add_alias('find','zoom-to') +:register(function(player,action_player,raw) + local position = action_player.position + player.zoom_to_world(position,2) + return Commands.success -- prevents command complete message from showing +end) \ No newline at end of file diff --git a/modules/gui/player-list.lua b/modules/gui/player-list.lua index e5b6e51b..9987b341 100644 --- a/modules/gui/player-list.lua +++ b/modules/gui/player-list.lua @@ -11,6 +11,15 @@ local Colors = require 'resources.color_presets' local action_player_store = 'gui.left.player-list.action-player' local action_name_store = 'gui.left.player-list.action-name' +--- used on player name label to allow zoom to map +local zoom_to_map_name = Gui.uid_name() +Gui.on_click(zoom_to_map_name,function(event) + local action_player_name = event.element.caption + local action_player = Game.get_player_from_any(action_player_name) + local position = action_player.position + event.player.zoom_to_world(position,2) +end) + --- Button used to open the action bar local open_action_bar = Gui.new_button() @@ -204,9 +213,17 @@ end local function add_player(list_table,player,role_name) open_action_bar(list_table,player.name) + -- flow to contain player_name to allow all to have trigger for zoom to map + local player_name_flow = + list_table.add{ + type='flow' + } + Gui.set_padding(player_name_flow) + -- player name with the tooltip of their highest role and in they colour local player_name = - list_table.add{ + player_name_flow.add{ + name=zoom_to_map_name, type='label', caption=player.name, tooltip=player.name..' '..player.tag..'\n'..role_name From e57e44d93c27949bf191dc7a16cd21ddf85f9d1d Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 27 May 2019 14:41:45 +0100 Subject: [PATCH 3/3] Added click to open to tooltip --- locale/en/gui.cfg | 3 ++- modules/gui/player-list.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 210f4ad1..80a9e80d 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -12,4 +12,5 @@ jail-player=Jail player temp-ban-player=Temp ban player kick-player=Kick player ban-player=Ban player -afk-time=__1__% of total map time\nLast moved __2__ ago \ No newline at end of file +afk-time=__1__% of total map time\nLast moved __2__ ago +open-map=__1__ __2__\n__3__\nClick to open map \ No newline at end of file diff --git a/modules/gui/player-list.lua b/modules/gui/player-list.lua index 9987b341..79339dd4 100644 --- a/modules/gui/player-list.lua +++ b/modules/gui/player-list.lua @@ -226,7 +226,7 @@ local function add_player(list_table,player,role_name) name=zoom_to_map_name, type='label', caption=player.name, - tooltip=player.name..' '..player.tag..'\n'..role_name + tooltip={'player-list.open-map',player.name,player.tag,role_name} } Gui.set_padding(player_name,0,0,0,2) player_name.style.font_color = player.chat_color