diff --git a/exp_legacy/module/expcore/roles.lua b/exp_legacy/module/expcore/roles.lua index da506d02..d3698f3e 100644 --- a/exp_legacy/module/expcore/roles.lua +++ b/exp_legacy/module/expcore/roles.lua @@ -894,7 +894,7 @@ role:set_permission_group('Admin') function Roles._prototype:set_permission_group(name, use_factorio_api) ExpUtil.assert_not_runtime() if use_factorio_api then - self.permission_group = { true, name } + self.permission_group = { true, name } --[[@as [boolean, string] ]] else local group = Groups.get_group_by_name(name) if not group then return end diff --git a/exp_legacy/module/modules/gui/warp-list.lua b/exp_legacy/module/modules/gui/warp-list.lua index 49a75e27..10fcd593 100644 --- a/exp_legacy/module/modules/gui/warp-list.lua +++ b/exp_legacy/module/modules/gui/warp-list.lua @@ -291,9 +291,13 @@ local confirm_edit_button = Gui.define("confirm_edit_button") } :style(Styles.sprite22) :on_click(function(def, player, element) - local warp_id = element.parent.caption - local warp_name = element.parent.parent["name-" .. warp_id][warp_textfield.name].text - local warp_icon = element.parent.parent["icon-" .. warp_id][warp_icon_editing.name].elem_value --[[@as SignalID]] + local parent = assert(element.parent) + local grandparent = assert(parent.parent) + local warp_id = parent.caption --[[@as string]] + local name_flow = assert(grandparent["name-" .. warp_id]) + local icon_flow = assert(grandparent["icon-" .. warp_id]) + local warp_name = assert(name_flow[warp_textfield.name]).text + local warp_icon = assert(icon_flow[warp_icon_editing.name]).elem_value --[[@as SignalID]] if warp_icon.type == nil then warp_icon.type = "item" end Warps.set_editing(warp_id, player.name) Warps.update_warp(warp_id, warp_name, warp_icon, player.name) @@ -778,7 +782,7 @@ Event.on_nth_tick(math.floor(60 / config.update_smoothing), function() end -- Check if the force has any warps - local closest_warp = nil + local closest_warp = nil --- @type { warp_id: string, name: string }? local closest_distance = nil if #warp_ids > 0 then local surface = player.surface diff --git a/exp_scenario/module/gui/debug/model.lua b/exp_scenario/module/gui/debug/model.lua index 52ab850f..387aed88 100644 --- a/exp_scenario/module/gui/debug/model.lua +++ b/exp_scenario/module/gui/debug/model.lua @@ -4,7 +4,7 @@ local ExpUtil = require("modules/exp_util") local concat = table.concat local inspect = table.inspect local pcall = pcall -local loadstring = loadstring --- @diagnostic disable-line +local loadstring = load local rawset = rawset local Public = {} diff --git a/exp_scenario/module/gui/science_production.lua b/exp_scenario/module/gui/science_production.lua index c654d924..d1647ff1 100644 --- a/exp_scenario/module/gui/science_production.lua +++ b/exp_scenario/module/gui/science_production.lua @@ -327,7 +327,7 @@ function Elements.science_table.refresh_row(science_table, row_data) Elements.production_label.refresh(row.used, row_data.used) end -do local _row_data = {} --- @type table +do local _row_data = {} --- @type table> --- Refresh the production tables for all online players function Elements.science_table.refresh_online() -- Refresh the row data for online forces