From 8569de50aa38c9592c7f74711ae20540fa6778a2 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 5 Apr 2020 19:39:19 +0100 Subject: [PATCH] Moved map time to info gui --- config/chat_reply.lua | 4 ---- locale/en/addons.cfg | 1 - locale/en/gui.cfg | 2 +- modules/gui/readme.lua | 4 +++- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/config/chat_reply.lua b/config/chat_reply.lua index d4b66a16..2f653569 100644 --- a/config/chat_reply.lua +++ b/config/chat_reply.lua @@ -24,7 +24,6 @@ return { ['softmod']={'info.softmod'}, ['script']={'info.softmod'}, ['loop']={'chat-bot.loops'}, - ['loops']={'chat-bot.loops'}, ['rhd']={'info.lhd'}, ['lhd']={'info.lhd'}, ['roundabout']={'chat-bot.loops'}, @@ -45,9 +44,6 @@ return { ['online']=function() return {'chat-bot.players-online',#game.connected_players} end, - ['time']=function() - return {'chat-bot.map-time',format_time(game.tick,{days=true,hours=true,minutes=true,seconds=true,long=true})} - end, ['r!verify']=function(player) return {'chat-bot.verify',player.name} end, diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg index 9281e461..4cb4c837 100644 --- a/locale/en/addons.cfg +++ b/locale/en/addons.cfg @@ -47,7 +47,6 @@ reply=[Chat Bot] __1__ disallow=You can't use global chat commands players-online=There are __1__ players online players=There have been __1__ players on this map -map-time=This map has been on for __1__ not-real-dev=Cooldude2606 is a dev for this server and makes the softmod and is not a factorio dev. softmod=A softmod is a custom scenario that runs on this server,an example is the player list. blame=Blame __1__ for what just happened! diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 15e4c113..5586782d 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -102,7 +102,7 @@ goto-edit=Edit warp icon main-tooltip=Infomation welcome-tab=Welcome welcome-tooltip=Welcome to Explosive Gaming -welcome-general=Welcome to Explosive Gaming, we host many factorio servers. While you are here we require you to follow our rules, you can find these in the tab above. You can also find our custom commands and links to our other servers.\nPlease note that our servers reset periodically, the next reset is: __1__ +welcome-general=Welcome to Explosive Gaming, we host many factorio servers. While you are here we require you to follow our rules, you can find these in the tab above. You can also find our custom commands and links to our other servers. This map has been online for __2__.\nPlease note that our servers reset periodically, the next reset is: __1__ welcome-roles=We run a custom role system to help protect the work of others. As a result you may not be able to use your deconstruction planner yet or drop item on the groud. Roles also give you access to some custom features such as adding tasks to our task list or making new warp points.\nYou have been assigned the roles: __1__ welcome-chat=Chatting can be difficult for new players because it’s different than other games! It’s very simple, the button you need to press is the “GRAVE/TILDE” key (which is located under the “ESC key”) - If you would like to change the key, go to your Controls tab in options.\nThe setting you need to change is “Toggle chat (and Lua console)” you currently have it set to "__CONTROL__toggle-console__" rules-tab=Rules diff --git a/modules/gui/readme.lua b/modules/gui/readme.lua index 18c094af..35691dd9 100644 --- a/modules/gui/readme.lua +++ b/modules/gui/readme.lua @@ -9,6 +9,7 @@ local Roles = require 'expcore.roles' --- @dep expcore.roles local Commands = require 'expcore.commands' --- @dep expcore.commands local Event = require 'utils.event' --- @dep utils.event local Game = require 'utils.game' --- @dep utils.game +local format_time = _C.format_time --- @dep expcore.common local tabs = {} local function Tab(caption,tooltip,element_define) @@ -98,7 +99,8 @@ Gui.element(function(_,parent) -- Add the other information to the gui container.add{ type='flow' }.style.height = 4 - Gui.centered_label(sub_content(container), frame_width, {'readme.welcome-general', server_details.reset_time}) + local online_time = format_time(game.tick,{days=true,hours=true,minutes=true,long=true}) + Gui.centered_label(sub_content(container), frame_width, {'readme.welcome-general', server_details.reset_time, online_time}) Gui.centered_label(sub_content(container), frame_width, {'readme.welcome-roles', table.concat(role_names,', ')}) Gui.centered_label(sub_content(container), frame_width, {'readme.welcome-chat'})