diff --git a/expcore/gui/left_flow.lua b/expcore/gui/left_flow.lua index f57dac1a..4befce31 100644 --- a/expcore/gui/left_flow.lua +++ b/expcore/gui/left_flow.lua @@ -93,7 +93,13 @@ function Gui.draw_left_flow(player) for name, open_on_join in pairs(Gui.left_elements) do -- Draw the element to the left flow - local left_element = Gui.defines[name](left_flow) + local draw_success, left_element = pcall(function() + return Gui.defines[name](left_flow) + end) + + if not draw_success then + error('There as been an error with an element draw function:\n\t'..left_element) + end -- Check if it should be open by default local visible = type(open_on_join) == 'boolean' and open_on_join or false diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 5586782d..987cd10f 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. This map has been online for __2__.\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/server-ups.lua b/modules/gui/server-ups.lua index cba75d89..29ca6542 100644 --- a/modules/gui/server-ups.lua +++ b/modules/gui/server-ups.lua @@ -13,7 +13,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands local server_ups = Gui.element{ type = 'label', - caption = 'Server UPS = 60.0' + caption = 'SUPS = 60.0' } :style{ font = 'default-game' @@ -38,7 +38,7 @@ local function set_location(event) local label = player.gui.screen[server_ups.name] local res = player.display_resolution local uis = player.display_scale - label.location = { x=res.width-465*uis, y=30*uis } + label.location = { x=res.width-423*uis, y=30*uis } end -- Draw the label when the player joins @@ -52,7 +52,7 @@ end) -- Update the caption for all online players Event.on_nth_tick(60,function() if global.ext and global.ext.server_ups then - local caption = 'Server UPS = '..global.ext.server_ups + local caption = 'SUPS = '..global.ext.server_ups for _,player in pairs(game.connected_players) do player.gui.screen[server_ups.name].caption = caption end diff --git a/modules/gui/task-list.lua b/modules/gui/task-list.lua index 19c3906d..20f3f189 100644 --- a/modules/gui/task-list.lua +++ b/modules/gui/task-list.lua @@ -341,7 +341,7 @@ Gui.element(function(event_trigger,parent) -- Add any existing tasks local task_ids = Tasks.get_force_task_ids(player.force.name) if #task_ids > 0 then - no_tasks_style.visible = false + no_tasks_label.visible = false for _,task_id in ipairs(task_ids) do update_task(player,scroll_table,task_id) end