From 575fb4e637ab783d7b370982360a61b10881ae60 Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Wed, 24 Apr 2024 17:53:26 -0500 Subject: [PATCH] Correct docs --- files/lua_api/openmw/animation.lua | 2 +- files/lua_api/openmw/core.lua | 4 ++-- files/lua_api/openmw/types.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/lua_api/openmw/animation.lua b/files/lua_api/openmw/animation.lua index bb5a0594df..42facef717 100644 --- a/files/lua_api/openmw/animation.lua +++ b/files/lua_api/openmw/animation.lua @@ -229,7 +229,7 @@ -- * `particle` - name of the particle texture to use. (default: "") -- * `vfxId` - a string ID that can be used to remove the effect later, using #removeVfx, and to avoid duplicate effects. The default value of "" can have duplicates. To avoid interaction with the engine, use unique identifiers unrelated to magic effect IDs. The engine uses this identifier to add and remove magic effects based on what effects are active on the actor. If this is set equal to the @{openmw.core#MagicEffectId} identifier of the magic effect being added, for example core.magic.EFFECT_TYPE.FireDamage, then the engine will remove it once the fire damage effect on the actor reaches 0. (Default: ""). -- --- @usage local mgef = core.magic.effects[myEffectName] +-- @usage local mgef = core.magic.effects.records[myEffectName] -- anim.addVfx(self, 'VFX_Hands', {bonename = 'Bip01 L Hand', particle = mgef.particle, loop = mgef.continuousVfx, vfxId = mgef.id..'_myuniquenamehere'}) -- -- later: -- anim.removeVfx(self, mgef.id..'_myuniquenamehere') diff --git a/files/lua_api/openmw/core.lua b/files/lua_api/openmw/core.lua index e7090fd986..3fe2a9297e 100644 --- a/files/lua_api/openmw/core.lua +++ b/files/lua_api/openmw/core.lua @@ -388,7 +388,7 @@ -- local function getEnchantment(item) -- local record = getRecord(item) -- if record and record.enchant then --- return core.magic.enchantments[record.enchant] +-- return core.magic.enchantments.records[record.enchant] -- end -- return nil -- end @@ -968,7 +968,7 @@ -- * `scale` - A number that scales the size of the vfx (Default: 1) -- -- @usage -- Spawn a sanctuary effect near the player --- local effect = core.magic.effects[core.magic.EFFECT_TYPE.Sanctuary] +-- local effect = core.magic.effects.records[core.magic.EFFECT_TYPE.Sanctuary] -- pos = self.position + util.vector3(0, 100, 0) -- core.vfx.spawn(effect.castingStatic, pos) -- diff --git a/files/lua_api/openmw/types.lua b/files/lua_api/openmw/types.lua index 90344cbae1..a92df7aa46 100644 --- a/files/lua_api/openmw/types.lua +++ b/files/lua_api/openmw/types.lua @@ -372,7 +372,7 @@ -- for i = 1, #mySpells do print(mySpells[i].id) end -- @usage -- add ALL spells that exist in the world -- local mySpells = types.Actor.spells(self) --- for _, spell in pairs(core.magic.spells) do +-- for _, spell in pairs(core.magic.spells.records) do -- if spell.type == core.magic.SPELL_TYPE.Spell then -- mySpells:add(spell) -- end