From 74675f2d19bff6618ec16f95a7693b0ded9f7419 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Wed, 25 Mar 2020 21:45:30 +0000 Subject: [PATCH] Added servers tab --- config/chat_reply.lua | 2 ++ config/compilatron.lua | 1 + locale/en/addons.cfg | 2 ++ locale/en/gui.cfg | 3 +++ modules/gui/readme.lua | 29 +++++++++++++++++++++++++---- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/config/chat_reply.lua b/config/chat_reply.lua index 8b8343c5..f1ae92a7 100644 --- a/config/chat_reply.lua +++ b/config/chat_reply.lua @@ -17,6 +17,8 @@ return { ['wiki']={'info.wiki'}, ['status']={'info.status'}, ['github']={'info.github'}, + ['patreon']={'info.patreon'}, + ['donate']={'info.patreon'}, ['command']={'info.custom-commands'}, ['commands']={'info.custom-commands'}, ['softmod']={'info.softmod'}, diff --git a/config/compilatron.lua b/config/compilatron.lua index 6b69601d..00c9ddcf 100644 --- a/config/compilatron.lua +++ b/config/compilatron.lua @@ -19,6 +19,7 @@ return { {'info.status'}, {'info.lhd'}, {'info.github'}, + {'info.patreon'}, } } } \ No newline at end of file diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg index e526e53f..86081d87 100644 --- a/locale/en/addons.cfg +++ b/locale/en/addons.cfg @@ -13,6 +13,7 @@ wiki=https://wiki.explosivegaming.nl/ feedback=https://exp.fider.io/ status=https://status.explosivegaming.nl github=https://github.com/explosivegaming/scenario +patreon=https://www.patreon.com/ExpGaming [info] players-online=There are __1__ players online @@ -23,6 +24,7 @@ wiki=You can get more information about us and the custom scenario from our wiki feedback=Do you have feedback? leave it at https://exp.fider.io/ status=Want to check if out servers are down? Visit: https://status.explosivegaming.nl github=Want to help improve our server with some extra features? Help us at: https://github.com/explosivegaming/scenario +patreon=Consider supporting our server at: https://www.patreon.com/ExpGaming custom-commands=We use custom commands, such as /tag and /me, use /chelp for more info. read-readme=Make sure you have read the Readme (It can be found through the question mark on the top left) softmod=We run a softmod on our servers. A softmod is a custom scenario that runs on this server, an example is the player list. diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index f7217991..4c832f92 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -128,5 +128,8 @@ commands-tooltip=Commands which you are able to use commands-general=We have lots of custom commands which you are able to use. Below you can find a list of all the commands that you are allowed to use and what they do. If you need more information or want to search for a command you can use our /search-help command. servers-tab=Servers servers-tooltip=Links to our other servers and sites +servers-general=This is only one of our servers for factorio, we host alot of others as well. Below you can find details about all the servers that we host as well as links to our external services such as discord or github. +servers-factorio=ExpGaming - S1 Public: This is our 48 hour reset experimental server.\nExpGaming - S2 Public: This is our 48 hour reset stable server.\nExpGaming - S3 Weekly: This is our weekly reset experimental server.\nExpGaming - S4 Weekly: This is our weekly reset stable server.\nExpGaming - S5 Modded: This is our modded server, see discord for details.\nExpGaming - S6 Donator: This is our donator only server, online when requested.\nExpGaming - S7 Event: This is our event server, we try to run an event every weekend\nExpGaming - S8 T̷-̶s̶-̴:̷ ̵N̵o̴ ̶o̷-̶e̵ ̴k̸n̷-̶w̵s̸ ̴w̷h̷a̶-̶ ̷h̴a̴p̷p̴e̷n̷s̸ ̷o̶n̴ ̷t̶h̴-̶s̶ ̷s̷e̶r̸v̸e̴r̷,̶ ̸i̸t̴ ̷m̶-̸g̴h̶t̷ ̸n̸-̶t̵ ̷e̴v̸e̸n̶t̷ ̵-̷x̴i̵s̶t̸.̸ +servers-external=__1__\n__2__ backers-tab=Backers backers-tooltip=People who have helped make our server \ No newline at end of file diff --git a/modules/gui/readme.lua b/modules/gui/readme.lua index b969b113..6e70cc1e 100644 --- a/modules/gui/readme.lua +++ b/modules/gui/readme.lua @@ -151,13 +151,34 @@ Gui.element(function(_,parent) return container end)) + --- Content area for the servers tab -- @element servers_content Tab({'readme.servers-tab'},{'readme.servers-tooltip'}, -Gui.element{ - type = 'label', - caption = 'Servers' -}) +Gui.element(function(_,parent) + local container = parent.add{ type='flow', direction='vertical' } + + -- Add the title to the content + title(container,260,{'readme.servers-tab'}) + + -- Add the tab description + description_label(container,575,{'readme.servers-general'}) + Gui.bar(container) + + -- Create the external links string + local result + local keys = {'discord','website','patreon','status','github'} + for i,key in ipairs(keys) do + if i == 1 then result = {'info.'..key} + else result = {'readme.servers-external',result,{'info.'..key}} end + end + + -- Add the other information to the gui + description_label(sub_content(container),575,{'readme.servers-factorio'}) + description_label(sub_content(container),575,result) + + return container +end)) --- Content area for the servers tab -- @element backers_content