Skip to content

Commit

Permalink
Merge branch 'bad_record_docs' into 'master'
Browse files Browse the repository at this point in the history
Correct record store documentation errors

See merge request OpenMW/openmw!4054
  • Loading branch information
Capostrophic committed Apr 26, 2024
2 parents ec8675b + 575fb4e commit 5564265
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion files/lua_api/openmw/animation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions files/lua_api/openmw/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
--
Expand Down
2 changes: 1 addition & 1 deletion files/lua_api/openmw/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5564265

Please sign in to comment.