[LuaDoc] Suppress some diagnostics
This commit is contained in:
parent
12d95bc082
commit
4b5a8e25e8
5 changed files with 8 additions and 2 deletions
|
@ -33,7 +33,7 @@ local function ca_castle_switch()
|
|||
-- Avoid going through the __cfg above every time the evaluation function
|
||||
-- is called if the castle switch CA does not exist
|
||||
local dummy_castle_switch = {}
|
||||
function dummy_castle_switch:evaluation() return 0 end
|
||||
function dummy_castle_switch:evaluation(cfg, data, filter_own, leader) return 0 end
|
||||
return dummy_castle_switch
|
||||
end
|
||||
|
||||
|
|
|
@ -324,6 +324,7 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
|
|||
end
|
||||
return n
|
||||
end,
|
||||
---@diagnostic disable-next-line: redundant-return-value
|
||||
__pairs = function(_) return pairs(wesnoth.current.map.special_locations) end,
|
||||
}), 'Note: the length operator has been removed')
|
||||
|
||||
|
|
|
@ -233,7 +233,8 @@ function methods:invert(width, height, border_size)
|
|||
if type(width) == 'number' and type(height) == 'number' then
|
||||
border_size = border_size or 0
|
||||
elseif type(width) == 'userdata' and getmetatable(width) == 'terrain map' then
|
||||
local map = width
|
||||
---@type terrain_map
|
||||
local map = width ---@diagnostic disable-line : assign-type-mismatch
|
||||
width = map.playable_width
|
||||
height = map.playable_height
|
||||
border_size = map.border_size
|
||||
|
|
|
@ -100,6 +100,7 @@ function wml_actions.store_gold(cfg)
|
|||
if team then wml.variables[cfg.variable or "gold"] = team.gold end
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: redundant-parameter
|
||||
function wml_actions.clear_variable(cfg, variables)
|
||||
local names = cfg.name or
|
||||
wml.error "[clear_variable] missing required name= attribute."
|
||||
|
@ -454,6 +455,8 @@ function wml_actions.capture_village(cfg)
|
|||
local locs = wesnoth.map.find(cfg)
|
||||
|
||||
for i, loc in ipairs(locs) do
|
||||
-- The fire_event parameter doesn't currently exist but probably should someday
|
||||
---@diagnostic disable-next-line : redundant-parameter
|
||||
wesnoth.map.set_owner(loc[1], loc[2], side, fire_event)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -68,6 +68,7 @@ local function add_animation(anim, cfg)
|
|||
|
||||
-- TODO: The last argument is currently unused
|
||||
-- (should make the game not scroll if view locked or prefs disables it)
|
||||
---@diagnostic disable-next-line: redundant-parameter
|
||||
wesnoth.interface.scroll_to_hex(unit.x, unit.y, true, false, true, false)
|
||||
|
||||
local facing = wml.get_child(cfg, "facing")
|
||||
|
|
Loading…
Add table
Reference in a new issue