diff --git a/docs/source/reference/lua-scripting/api.rst b/docs/source/reference/lua-scripting/api.rst index d4f4c91044..ef6637cf7d 100644 --- a/docs/source/reference/lua-scripting/api.rst +++ b/docs/source/reference/lua-scripting/api.rst @@ -12,28 +12,28 @@ Lua API reference aipackages setting_renderers events - openmw_util - openmw_storage - openmw_core - openmw_types + openmw_ambient openmw_animation openmw_async - openmw_vfs - openmw_markup - openmw_world - openmw_self - openmw_nearby - openmw_input - openmw_ambient - openmw_ui openmw_camera - openmw_postprocessing + openmw_core openmw_debug + openmw_input + openmw_markup openmw_menu + openmw_nearby + openmw_postprocessing + openmw_self + openmw_storage + openmw_types + openmw_ui + openmw_util + openmw_vfs + openmw_world openmw_aux_calendar - openmw_aux_util openmw_aux_time openmw_aux_ui + openmw_aux_util interface_activation interface_ai interface_animation diff --git a/docs/source/reference/lua-scripting/engine_handlers.rst b/docs/source/reference/lua-scripting/engine_handlers.rst index 2b5e99e6ae..ac6979a236 100644 --- a/docs/source/reference/lua-scripting/engine_handlers.rst +++ b/docs/source/reference/lua-scripting/engine_handlers.rst @@ -157,4 +157,4 @@ Engine handler is a function defined by a script, that can be called by the engi * - onStateChanged() - | Called whenever the current game changes - | (i. e. the result of `getState `_ changes) + | (i. e. the result of `getState `_ changes) diff --git a/docs/source/reference/lua-scripting/overview.rst b/docs/source/reference/lua-scripting/overview.rst index a9025fcf93..b889b09a9f 100644 --- a/docs/source/reference/lua-scripting/overview.rst +++ b/docs/source/reference/lua-scripting/overview.rst @@ -216,6 +216,7 @@ To enter the Lua mode run one of the commands: - ``lua player`` or ``luap`` - enter player context - ``lua global`` or ``luag`` - enter global context - ``lua selected`` or ``luas`` - enter local context on the selected object +- ``lua menu`` or ``luam`` - enter menu context Script structure ================ @@ -482,7 +483,7 @@ There are a few methods for sending events: - `core.sendGlobalEvent `_ to send events to global scripts - `GameObject:sendEvent `_ to send events to local scripts attached to a game object -- `types.Player.sendMenuEvent `_ to send events to menu scripts of the given player +- `types.Player.sendMenuEvent `_ to send events to menu scripts of the given player Events are the main way of interacting between local and global scripts. They are not recommended for interactions between two global scripts, because in this case interfaces are more convenient. diff --git a/files/data/scripts/omw/input/gamepadcontrols.lua b/files/data/scripts/omw/input/gamepadcontrols.lua index 0af17efa39..b55b806b4a 100644 --- a/files/data/scripts/omw/input/gamepadcontrols.lua +++ b/files/data/scripts/omw/input/gamepadcontrols.lua @@ -19,7 +19,7 @@ return { return input._isGamepadCursorActive() end, - --- Set if the gamepad cursor is active. If it is active, the left stick can move the cursor, and A will be interpreted as a mouse click. + --- Sets if the gamepad cursor is active. If it is active, the left stick can move the cursor, and A will be interpreted as a mouse click. -- @function [parent=#GamepadControls] setGamepadCursorActive -- @param #boolean value setGamepadCursorActive = function(state) diff --git a/files/lua_api/openmw/core.lua b/files/lua_api/openmw/core.lua index 1d28125cd4..4b9c56d844 100644 --- a/files/lua_api/openmw/core.lua +++ b/files/lua_api/openmw/core.lua @@ -1130,6 +1130,7 @@ -- @field #map<#string, #number> reactions A read-only map containing reactions of other factions to this faction. -- @field #list<#string> attributes A read-only list containing IDs of attributes to advance ranks in the faction. -- @field #list<#string> skills A read-only list containing IDs of skills to advance ranks in the faction. +-- @field #boolean hidden If true, the faction won't show in the player's skills menu --- -- Faction rank data record diff --git a/files/lua_api/openmw/types.lua b/files/lua_api/openmw/types.lua index 3be2a97379..6c0f4544f5 100644 --- a/files/lua_api/openmw/types.lua +++ b/files/lua_api/openmw/types.lua @@ -315,7 +315,7 @@ -- @param #any spellOrId A @{openmw.core#Spell} or string record id. --- --- Remove an active spell based on active spell ID (see @{openmw.core#ActiveSpell.activeSpellId}). Can only be used in global scripts or on self. Can only be used to remove spells with the temporary flag set (see @{openmw.core#ActiveSpell.temporary}). +-- Remove an active spell based on active spell ID (see @{openmw_core#ActiveSpell.activeSpellId}). Can only be used in global scripts or on self. Can only be used to remove spells with the temporary flag set (see @{openmw_core#ActiveSpell.temporary}). -- @function [parent=#ActorActiveSpells] remove -- @param self -- @param #any id Active spell ID. @@ -1318,7 +1318,7 @@ -- --This is the new record we want to create, with a record provided as a template. -- local recordDraft = types.Armor.createRecordDraft(armorTable)--Need to convert the table into the record draft -- local newRecord = world.createRecord(recordDraft)--This creates the actual record --- world.createObject(newRecord):moveInto(playerActor)--Create an instance of this object, and move it into the player's inventory +-- world.createObject(newRecord.id):moveInto(playerActor)--Create an instance of this object, and move it into the player's inventory --- @{#Book} functions @@ -1457,7 +1457,7 @@ -- --This is the new record we want to create, with a record provided as a template. -- local recordDraft = types.Clothing.createRecordDraft(clothingTable)--Need to convert the table into the record draft -- local newRecord = world.createRecord(recordDraft)--This creates the actual record --- world.createObject(newRecord):moveInto(playerActor)--Create an instance of this object, and move it into the player's inventory +-- world.createObject(newRecord.id):moveInto(playerActor)--Create an instance of this object, and move it into the player's inventory --- -- @type ClothingRecord