Merge branch 'bad_record_docs' into 'master'

Correct record store documentation errors

See merge request OpenMW/openmw!4054
pull/3235/head
Alexei Kotov 3 weeks ago
commit 55642650ea

@ -229,7 +229,7 @@
-- * `particle` - name of the particle texture to use. (default: "") -- * `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: ""). -- * `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'}) -- anim.addVfx(self, 'VFX_Hands', {bonename = 'Bip01 L Hand', particle = mgef.particle, loop = mgef.continuousVfx, vfxId = mgef.id..'_myuniquenamehere'})
-- -- later: -- -- later:
-- anim.removeVfx(self, mgef.id..'_myuniquenamehere') -- anim.removeVfx(self, mgef.id..'_myuniquenamehere')

@ -388,7 +388,7 @@
-- local function getEnchantment(item) -- local function getEnchantment(item)
-- local record = getRecord(item) -- local record = getRecord(item)
-- if record and record.enchant then -- if record and record.enchant then
-- return core.magic.enchantments[record.enchant] -- return core.magic.enchantments.records[record.enchant]
-- end -- end
-- return nil -- return nil
-- end -- end
@ -968,7 +968,7 @@
-- * `scale` - A number that scales the size of the vfx (Default: 1) -- * `scale` - A number that scales the size of the vfx (Default: 1)
-- --
-- @usage -- Spawn a sanctuary effect near the player -- @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) -- pos = self.position + util.vector3(0, 100, 0)
-- core.vfx.spawn(effect.castingStatic, pos) -- core.vfx.spawn(effect.castingStatic, pos)
-- --

@ -372,7 +372,7 @@
-- for i = 1, #mySpells do print(mySpells[i].id) end -- for i = 1, #mySpells do print(mySpells[i].id) end
-- @usage -- add ALL spells that exist in the world -- @usage -- add ALL spells that exist in the world
-- local mySpells = types.Actor.spells(self) -- 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 -- if spell.type == core.magic.SPELL_TYPE.Spell then
-- mySpells:add(spell) -- mySpells:add(spell)
-- end -- end

Loading…
Cancel
Save