1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-07 13:20:25 +00:00

Merge branch 'lua_case' into 'master'

Add more information about generated IDs and record info.

See merge request OpenMW/openmw!3384
This commit is contained in:
psi29a 2025-01-04 17:46:08 +00:00
commit f6efb28fd1

View File

@ -153,7 +153,7 @@
-- After creation the object is in the disabled state. Use :teleport to place to the world or :moveInto to put it into a container or an inventory. -- After creation the object is in the disabled state. Use :teleport to place to the world or :moveInto to put it into a container or an inventory.
-- Note that dynamically created creatures, NPCs, and container inventories will not respawn. -- Note that dynamically created creatures, NPCs, and container inventories will not respawn.
-- @function [parent=#world] createObject -- @function [parent=#world] createObject
-- @param #string recordId Record ID in lowercase -- @param #string recordId Record ID. String ids that came from ESM3 content files are lower-cased. If another ID is provided, it must be provided exactly as it is, case sensitive.
-- @param #number count (optional, 1 by default) The number of objects in stack -- @param #number count (optional, 1 by default) The number of objects in stack
-- @return openmw.core#GameObject -- @return openmw.core#GameObject
-- @usage -- put 100 gold on the ground at the position of `actor` -- @usage -- put 100 gold on the ground at the position of `actor`
@ -162,9 +162,11 @@
-- @usage -- put 50 gold into the actor's inventory -- @usage -- put 50 gold into the actor's inventory
-- money = world.createObject('gold_001', 50) -- money = world.createObject('gold_001', 50)
-- money:moveInto(types.Actor.inventory(actor)) -- money:moveInto(types.Actor.inventory(actor))
-- @usage -- create the an object for the first generated item
-- potion = world.createObject('Generated:0x0', 1)
--- ---
-- Creates a custom record in the world database. -- Creates a custom record in the world database; String ids that came from ESM3 content files are lower-cased.
-- Eventually meant to support all records, but the current -- Eventually meant to support all records, but the current
-- set of supported types is limited to: -- set of supported types is limited to:
-- --
@ -177,7 +179,7 @@
-- * @{openmw.types#ActivatorRecord}, -- * @{openmw.types#ActivatorRecord},
-- * @{openmw.types#LightRecord} -- * @{openmw.types#LightRecord}
-- @function [parent=#world] createRecord -- @function [parent=#world] createRecord
-- @param #any record A record to be registered in the database. Must be one of the supported types. -- @param #any record A record to be registered in the database. Must be one of the supported types. The id field is not used, one will be generated for you.
-- @return #any A new record added to the database. The type is the same as the input's. -- @return #any A new record added to the database. The type is the same as the input's.
--- @{#VFX}: Visual effects --- @{#VFX}: Visual effects