From 4bbc5710fb840273a674d0f3a372b1f54521cf14 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 22 Jun 2025 14:24:44 +0400 Subject: [PATCH] Fix some errors in Lua docs --- files/lua_api/openmw/core.lua | 2 +- files/lua_api/openmw/types.lua | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/files/lua_api/openmw/core.lua b/files/lua_api/openmw/core.lua index 8a78a52441..3275d2eb82 100644 --- a/files/lua_api/openmw/core.lua +++ b/files/lua_api/openmw/core.lua @@ -635,7 +635,7 @@ -- @usage local spell = core.magic.spells.records[1] -- get by index -- @usage -- Print all powers -- for _, spell in pairs(core.magic.spells.records) do --- if spell.types == core.magic.SPELL_TYPE.Power then +-- if spell.type == core.magic.SPELL_TYPE.Power then -- print(spell.name) -- end -- end diff --git a/files/lua_api/openmw/types.lua b/files/lua_api/openmw/types.lua index 5aef5fac94..3802ad1492 100644 --- a/files/lua_api/openmw/types.lua +++ b/files/lua_api/openmw/types.lua @@ -808,8 +808,8 @@ -- A read-only list of all @{#CreatureRecord}s in the world database, may be indexed by recordId. -- Implements [iterables#List](iterables.html#List) of #CreatureRecord. -- @field [parent=#Creature] #list<#CreatureRecord> records --- @usage local record = types.NPC.classes['example_recordid'] --- @usage local record = types.NPC.classes[1] +-- @usage local creature = types.Creature.records['creature id'] -- get by id +-- @usage local creature = types.Creature.records[1] -- get by index --- -- Whether the object is a creature. @@ -876,8 +876,8 @@ -- A read-only list of all @{#NpcRecord}s in the world database, may be indexed by recordId. -- Implements [iterables#List](iterables.html#List) of #NpcRecord. -- @field [parent=#NPC] #map<#NpcRecord> records --- @usage local record = types.NPC.classes['example_recordid'] --- @usage local record = types.NPC.classes[1] +-- @usage local npc = types.NPC.records['npc id'] -- get by id +-- @usage local npc = types.NPC.records[1] -- get by index --- -- Whether the object is an NPC or a Player. @@ -1048,8 +1048,8 @@ -- A read-only list of all @{#ClassRecord}s in the world database, may be indexed by recordId. -- Implements [iterables#List](iterables.html#List) of #ClassRecord. -- @field [parent=#Classes] #list<#ClassRecord> records --- @usage local record = types.NPC.classes['example_recordid'] --- @usage local record = types.NPC.classes[1] +-- @usage local class = types.NPC.classes.records['class id'] -- get by id +-- @usage local class = types.NPC.classes.records[1] -- get by index --- -- Returns a read-only @{#ClassRecord} @@ -1088,8 +1088,8 @@ -- A read-only list of all @{#RaceRecord}s in the world database. -- Implements [iterables#List](iterables.html#List) of #RaceRecord. -- @field [parent=#Races] #list<#RaceRecord> records --- @usage local record = types.NPC.classes['example_recordid'] --- @usage local record = types.NPC.classes[1] +-- @usage local race = types.NPC.races.records['race id'] -- get by id +-- @usage local race = types.NPC.races.records[1] -- get by index --- -- Returns a read-only @{#RaceRecord} @@ -1275,8 +1275,8 @@ -- A read-only list of all @{#BirthSignRecord}s in the world database. -- Implements [iterables#List](iterables.html#List) of #BirthSignRecord. -- @field [parent=#BirthSigns] #list<#BirthSignRecord> records --- @usage local record = types.NPC.classes['example_recordid'] --- @usage local record = types.NPC.classes[1] +-- @usage local birthSign = types.Player.birthSigns.records['birthsign id'] -- get by id +-- @usage local birthSign = types.Player.birthSigns.records[1] -- get by index --- -- Returns a read-only @{#BirthSignRecord}