From 3a053d7fd39524b21aa757b5b713e3a61b64b80a Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Mon, 28 Aug 2023 12:35:53 -0500 Subject: [PATCH] Documentation Elab --- files/lua_api/openmw/world.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/files/lua_api/openmw/world.lua b/files/lua_api/openmw/world.lua index 53f1e44e26..7907da5047 100644 --- a/files/lua_api/openmw/world.lua +++ b/files/lua_api/openmw/world.lua @@ -135,7 +135,7 @@ -- Create a new instance of the given record. -- 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. -- @function [parent=#world] createObject --- @param #string recordId Record ID in lowercase +-- @param #string recordId Record ID. Non-generated IDs are always lowercase. If a generated ID is provided, it must be provided exactly as generated. -- @param #number count (optional, 1 by default) The number of objects in stack -- @return openmw.core#GameObject -- @usage -- put 100 gold on the ground at the position of `actor` @@ -144,9 +144,11 @@ -- @usage -- put 50 gold into the actor's inventory -- money = world.createObject('gold_001', 50) -- 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; the record ID from this record is case sensitive if generated. -- Eventually meant to support all records, but the current -- set of supported types is limited to: -- * @{openmw.types#PotionRecord}, @@ -155,7 +157,7 @@ -- * @{openmw.types#MiscellaneousRecord}, -- * @{openmw.types#ActivatorRecord} -- @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 nil