1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 20:45:34 +00:00

Merge branch 'bad_record_docs' into 'master'

Correct record store documentation errors

See merge request OpenMW/openmw!4054
This commit is contained in:
Alexei Kotov 2024-04-26 09:49:23 +00:00
commit 55642650ea
3 changed files with 4 additions and 4 deletions

View file

@ -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')

View file

@ -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)
--

View file

@ -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