mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Merge branch 'feature/find' into dev
This commit is contained in:
91
README.md
91
README.md
@@ -16,28 +16,89 @@
|
|||||||
<a href="https://www.codefactor.io/repository/github/explosivegaming/scenario">
|
<a href="https://www.codefactor.io/repository/github/explosivegaming/scenario">
|
||||||
<img src="https://www.codefactor.io/repository/github/explosivegaming/scenario/badge" alt="CodeFactor">
|
<img src="https://www.codefactor.io/repository/github/explosivegaming/scenario/badge" alt="CodeFactor">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://discord.me/explosivegaming">
|
<a href="https://discord.explosivegaming.nl">
|
||||||
<img src="https://discordapp.com/api/guilds/260843215836545025/widget.png?style=shield" alt="Discord">
|
<img src="https://discordapp.com/api/guilds/260843215836545025/widget.png?style=shield" alt="Discord">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<h2 align="center">ExpGaming Scenario Repository</h2>
|
<h1 align="center">ExpGaming Scenario Repository</h2>
|
||||||
|
|
||||||
<p align="center"><font size="-2">Out Dated; Will be updated in the future</font></p>
|
## 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
|
## Use and Installation
|
||||||
* 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
|
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
|
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.
|
||||||
* 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
|
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
|
||||||
@@ -22,6 +22,7 @@ return {
|
|||||||
'modules.commands.reports',
|
'modules.commands.reports',
|
||||||
'modules.commands.spawn',
|
'modules.commands.spawn',
|
||||||
'modules.commands.warnings',
|
'modules.commands.warnings',
|
||||||
|
'modules.commands.find',
|
||||||
-- QoL Addons
|
-- QoL Addons
|
||||||
'modules.addons.chat-popups',
|
'modules.addons.chat-popups',
|
||||||
'modules.addons.damage-popups',
|
'modules.addons.damage-popups',
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ return {
|
|||||||
['command/report'] = {
|
['command/report'] = {
|
||||||
auth=function(player,action_player_name)
|
auth=function(player,action_player_name)
|
||||||
if not Roles.player_allowed(player,'command/give-warning') then
|
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
|
||||||
end,
|
end,
|
||||||
reason_callback=report_player_callback,
|
reason_callback=report_player_callback,
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ local default = Roles.new_role('Guest','')
|
|||||||
'command/tag-clear',
|
'command/tag-clear',
|
||||||
'command/chelp',
|
'command/chelp',
|
||||||
'command/list-roles',
|
'command/list-roles',
|
||||||
|
'command/find-on-map',
|
||||||
'command/report',
|
'command/report',
|
||||||
'gui/player-list',
|
'gui/player-list',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,4 +12,5 @@ jail-player=Jail player
|
|||||||
temp-ban-player=Temp ban player
|
temp-ban-player=Temp ban player
|
||||||
kick-player=Kick player
|
kick-player=Kick player
|
||||||
ban-player=Ban player
|
ban-player=Ban player
|
||||||
afk-time=__1__% of total map time\nLast moved __2__ ago
|
afk-time=__1__% of total map time\nLast moved __2__ ago
|
||||||
|
open-map=__1__ __2__\n__3__\nClick to open map
|
||||||
11
modules/commands/find.lua
Normal file
11
modules/commands/find.lua
Normal file
@@ -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)
|
||||||
@@ -11,6 +11,15 @@ local Colors = require 'resources.color_presets'
|
|||||||
local action_player_store = 'gui.left.player-list.action-player'
|
local action_player_store = 'gui.left.player-list.action-player'
|
||||||
local action_name_store = 'gui.left.player-list.action-name'
|
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
|
--- Button used to open the action bar
|
||||||
local open_action_bar =
|
local open_action_bar =
|
||||||
Gui.new_button()
|
Gui.new_button()
|
||||||
@@ -204,12 +213,20 @@ end
|
|||||||
local function add_player(list_table,player,role_name)
|
local function add_player(list_table,player,role_name)
|
||||||
open_action_bar(list_table,player.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
|
-- player name with the tooltip of their highest role and in they colour
|
||||||
local player_name =
|
local player_name =
|
||||||
list_table.add{
|
player_name_flow.add{
|
||||||
|
name=zoom_to_map_name,
|
||||||
type='label',
|
type='label',
|
||||||
caption=player.name,
|
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)
|
Gui.set_padding(player_name,0,0,0,2)
|
||||||
player_name.style.font_color = player.chat_color
|
player_name.style.font_color = player.chat_color
|
||||||
|
|||||||
Reference in New Issue
Block a user