Merge branch 'patch/6.2.1' into dev

This commit is contained in:
Cooldude2606
2022-10-23 20:00:47 +01:00
3 changed files with 23 additions and 8 deletions

View File

@@ -24,11 +24,11 @@
## Explosive Gaming ## Explosive Gaming
Explosive Gaming (often ExpGaming) is a server hosting community with a strong focus on [Factorio](factorio) and games with similar themes. We are best known for our weekly reset Factorio server with a vanilla+ scenario. Although our servers tend to attract the more experienced players, our servers are open to everyone. You can find us through our [website], [discord], or the public server list with the name ExpGaming. Explosive Gaming (often ExpGaming) is a server hosting community with a strong focus on [Factorio][factorio] and games with similar themes. We are best known for our weekly reset Factorio server with a vanilla+ scenario. Although our servers tend to attract the more experienced players, our servers are open to everyone. You can find us through our [website], [discord], or the public server list with the name ExpGaming.
## Use and Installation ## Use and Installation
1) Download our [git repository](stable-dl) for the stable release. For the latest features you can download our [dev branch](experimental-dl). See [releases](#releases) for other major releases. 1) Download our [git repository][stable-dl] for the stable release. For the latest features you can download our [dev branch][experimental-dl]. See [releases](#releases) for other major releases.
2) Extract the downloaded zip file into your Factorio scenario directory: 2) Extract the downloaded zip file into your Factorio scenario directory:
* Windows: `%appdata%\Factorio\scenarios` * Windows: `%appdata%\Factorio\scenarios`
@@ -40,7 +40,7 @@ Explosive Gaming (often ExpGaming) is a server hosting community with a strong f
5) Once you have made your config changes: open Factorio, select either single or multiplayer, select (host) new game, and finally select our scenario which will be called `scenario-master` or `scenario-dev` under user scenarios. 5) Once you have made your config changes: open Factorio, select either single or multiplayer, select (host) new game, and finally select our scenario which will be called `scenario-master` or `scenario-dev` under user scenarios.
6) You will now be asked to generate your map and the scenario will load all selected modules. If any module does not load as expected please check `factorio-current.log` in your Factorio directory for errors and report them to our [issues page](issues). 6) You will now be asked to generate your map and the scenario will load all selected modules. If any module does not load as expected please check `factorio-current.log` in your Factorio directory for errors and report them to our [issues page][issues].
## Contributing ## Contributing
@@ -48,7 +48,7 @@ All are welcome to make bug reports, feature requests, and pull requests for our
For developers wanting to add features please follow these guidelines: For developers wanting to add features please follow these guidelines:
* All code is documented using ldoc, the end result can be found [here](docs). * All code is documented using ldoc, the end result can be found [here][docs].
* Changes should be made on your own fork and merged into `dev` through a pull request. * Changes should be made on your own fork and merged into `dev` through a pull request.
* Pull requests are automatically linted and documentation checked. * Pull requests are automatically linted and documentation checked.
* Pull requests are manually reviewed to maintain code and language quality. * Pull requests are manually reviewed to maintain code and language quality.
@@ -79,7 +79,7 @@ For developers wanting to add features please follow these guidelines:
| [1.0][s1.0] | Modulation | [0.15][f0.15] | | [1.0][s1.0] | Modulation | [0.15][f0.15] |
| [0.1][s0.1] | First Tracked Version | [0.14][f0.14] | | [0.1][s0.1] | First Tracked Version | [0.14][f0.14] |
\* Scenario patch releases have been omitted and can be found [here](https://github.com/explosivegaming/scenario/releases). \* Scenario patch releases have been omitted and can be found [here][releases].
\*\* Factorio versions show the version they were made for, often the minimum requirement to run the scenario. \*\* Factorio versions show the version they were made for, often the minimum requirement to run the scenario.
@@ -128,8 +128,9 @@ The Explosive Gaming codebase is licensed under the [GNU General Public License
[stable-dl]: https://github.com/explosivegaming/scenario/archive/master.zip [stable-dl]: https://github.com/explosivegaming/scenario/archive/master.zip
[experimental-dl]: https://github.com/explosivegaming/scenario/archive/dev.zip [experimental-dl]: https://github.com/explosivegaming/scenario/archive/dev.zip
[factorio]: https://factorio.com/ [releases]: https://github.com/explosivegaming/scenario/releases
[docs]: https://explosivegaming.github.io/scenario/ [factorio]: https://factorio.com
[docs]: https://explosivegaming.github.io/scenario
[issues]: https://github.com/explosivegaming/scenario/issues/new/choose [issues]: https://github.com/explosivegaming/scenario/issues/new/choose
[website]: https://explosivegaming.nl [website]: https://explosivegaming.nl
[discord]: https://discord.explosivegaming.nl [discord]: https://discord.explosivegaming.nl

View File

@@ -128,4 +128,17 @@ require 'expcore.gui.left_flow'
require 'expcore.gui.helper_functions' require 'expcore.gui.helper_functions'
require 'expcore.gui.defines' require 'expcore.gui.defines'
local Roles = _C.opt_require('expcore.roles')
local Event = _C.opt_require('utils.event')
if Roles and Event then
Event.add(Roles.events.on_role_assigned, function(e)
Gui.update_top_flow(game.get_player(e.player_index))
end)
Event.add(Roles.events.on_role_unassigned, function(e)
Gui.update_top_flow(game.get_player(e.player_index))
end)
end
return Gui return Gui

View File

@@ -73,7 +73,8 @@ function Gui.update_top_flow(player)
end end
-- Set the visible state -- Set the visible state
local allowed = type(authenticator) == 'function' and authenticator(player) or authenticator local allowed = authenticator
if type(allowed) == 'function' then allowed = allowed(player) end
element.visible = is_visible and allowed or false element.visible = is_visible and allowed or false
end end
end end