[LuaDoc] Fix incorrect declaration of unit.variables and side.variables - make them consistent with wml.variables

This commit is contained in:
Celtic Minstrel 2024-02-08 09:47:12 -05:00
parent dbae630acd
commit 6145c48d35
4 changed files with 5 additions and 3 deletions

View File

@ -311,7 +311,6 @@ if wesnoth.kernel_type() ~= "Application Lua Kernel" then
end
-- Get and set variables via wml.variables[variable_path]
---@alias WMLVariableProxy table<string, string|number|boolean|WMLTable>
---@type WMLVariableProxy
wml.variables = setmetatable({}, {
__metatable = "WML variables",

View File

@ -40,7 +40,7 @@
---@field faction_name tstring
---@field chose_random boolean
---@field lost boolean
---@field variables table<string, WML>
---@field variables WMLVariableProxy
---@field __cfg WMLTable
---@class wesnoth.sides

View File

@ -98,7 +98,7 @@
---@field advances_to? string[]
---@field advancements? WMLTable[]
---@field status? table<string, boolean>
---@field variables? table<string, WML>
---@field variables? WMLVariableProxy
---@field attacks? unit_weapon[]
---@field traits? string[]
---@field abilities? string[]

View File

@ -22,6 +22,9 @@
---@field tag string
---@field contents WML
---A table that can be used to look up WML variables, both scalar and containers.
---@alias WMLVariableProxy table<string, string|number|boolean|WMLTable>
---@class wml
---@field all_variables WMLTable
wml = {}