Merge pull request #234 from explosivegaming/patch/6.2.1

Patch/6.2.1
This commit is contained in:
Cooldude2606
2022-10-23 19:58:20 +01:00
committed by GitHub
4 changed files with 25 additions and 10 deletions

View File

@@ -24,11 +24,11 @@
## 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
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:
* 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.
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
@@ -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:
* 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.
* Pull requests are automatically linted and documentation checked.
* 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] |
| [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.
@@ -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
[experimental-dl]: https://github.com/explosivegaming/scenario/archive/dev.zip
[factorio]: https://factorio.com/
[docs]: https://explosivegaming.github.io/scenario/
[releases]: https://github.com/explosivegaming/scenario/releases
[factorio]: https://factorio.com
[docs]: https://explosivegaming.github.io/scenario
[issues]: https://github.com/explosivegaming/scenario/issues/new/choose
[website]: https://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.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

View File

@@ -73,7 +73,8 @@ function Gui.update_top_flow(player)
end
-- 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
end
end

View File

@@ -132,7 +132,7 @@ function Reports.report_player(player, by_player_name, reason)
if not player then return end
local player_name = player.name
if reason == nil or not reason:find("/S") then reason = 'No reason given' end
if reason == nil or not reason:find("%S") then reason = 'No reason given' end
local reports = user_reports[player_name]
if not reports then
@@ -222,4 +222,4 @@ function Reports.remove_all(player, removed_by_name)
return true
end
return Reports
return Reports