1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-28 19:21:04 +00:00

Merge branch 'minor_docs_fixes' into 'master'

Minor docs fixes

See merge request OpenMW/openmw!1697
This commit is contained in:
psi29a 2022-02-23 21:45:25 +00:00
commit 9ca0c7144c
11 changed files with 160 additions and 159 deletions

View File

@ -150,7 +150,7 @@ The order of lines determines the script load order (i.e. script priorities).
Possible flags are: Possible flags are:
- ``GLOBAL`` - a global script; always active, can not by stopped; - ``GLOBAL`` - a global script; always active, can not be stopped;
- ``CUSTOM`` - dynamic local script that can be started or stopped by a global script; - ``CUSTOM`` - dynamic local script that can be started or stopped by a global script;
- ``PLAYER`` - an auto started player script; - ``PLAYER`` - an auto started player script;
- ``ACTIVATOR`` - a local script that will be automatically attached to any activator; - ``ACTIVATOR`` - a local script that will be automatically attached to any activator;

View File

@ -23,7 +23,7 @@ Every widget is defined by a layout, which is a Lua table with the following fie
Layers Layers
------ ------
Layers control how widgets overlap - layers with higher indexes cover render over layers with lower indexes. Layers control how widgets overlap - layers with higher indexes render over layers with lower indexes.
Widgets within the same layer which were added later overlap the ones created earlier. Widgets within the same layer which were added later overlap the ones created earlier.
A layer can also be set as non-interactive, which prevents all mouse interactions with the widgets in that layer. A layer can also be set as non-interactive, which prevents all mouse interactions with the widgets in that layer.
@ -120,7 +120,7 @@ Example
end end
-- we are showing game time in hours and minutes -- we are showing game time in hours and minutes
-- so no need to update more often than ones a game minute -- so no need to update more often than once a game minute
time.runRepeatedly(updateTime, 1 * time.minute, { type = time.GameTime }) time.runRepeatedly(updateTime, 1 * time.minute, { type = time.GameTime })
*clock.omwscripts* *clock.omwscripts*

View File

@ -172,7 +172,8 @@ end
return { return {
interfaceName = 'Camera', interfaceName = 'Camera',
--- @module Camera ---
-- @module Camera
-- @usage require('openmw.interfaces').Camera -- @usage require('openmw.interfaces').Camera
interface = { interface = {
--- Interface version --- Interface version

View File

@ -1,4 +1,4 @@
------------------------------------------------------------------------------- ---
-- `openmw.async` contains timers and coroutine utils. All functions require -- `openmw.async` contains timers and coroutine utils. All functions require
-- the package itself as a first argument. -- the package itself as a first argument.
-- @module async -- @module async
@ -6,7 +6,7 @@
------------------------------------------------------------------------------- ---
-- Register a function as a timer callback. -- Register a function as a timer callback.
-- @function [parent=#async] registerTimerCallback -- @function [parent=#async] registerTimerCallback
-- @param self -- @param self
@ -14,7 +14,7 @@
-- @param #function func -- @param #function func
-- @return #TimerCallback -- @return #TimerCallback
------------------------------------------------------------------------------- ---
-- Calls callback(arg) in `delay` simulation seconds. -- Calls callback(arg) in `delay` simulation seconds.
-- Callback must be registered in advance. -- Callback must be registered in advance.
-- @function [parent=#async] newSimulationTimer -- @function [parent=#async] newSimulationTimer
@ -23,7 +23,7 @@
-- @param #TimerCallback callback A callback returned by `registerTimerCallback` -- @param #TimerCallback callback A callback returned by `registerTimerCallback`
-- @param arg An argument for `callback`; can be `nil`. -- @param arg An argument for `callback`; can be `nil`.
------------------------------------------------------------------------------- ---
-- Calls callback(arg) in `delay` game seconds. -- Calls callback(arg) in `delay` game seconds.
-- Callback must be registered in advance. -- Callback must be registered in advance.
-- @function [parent=#async] newGameTimer -- @function [parent=#async] newGameTimer
@ -32,7 +32,7 @@
-- @param #TimerCallback callback A callback returned by `registerTimerCallback` -- @param #TimerCallback callback A callback returned by `registerTimerCallback`
-- @param arg An argument for `callback`; can be `nil`. -- @param arg An argument for `callback`; can be `nil`.
------------------------------------------------------------------------------- ---
-- Calls `func()` in `delay` simulation seconds. -- Calls `func()` in `delay` simulation seconds.
-- The timer will be lost if the game is saved and loaded. -- The timer will be lost if the game is saved and loaded.
-- @function [parent=#async] newUnsavableSimulationTimer -- @function [parent=#async] newUnsavableSimulationTimer
@ -40,7 +40,7 @@
-- @param #number delay -- @param #number delay
-- @param #function func -- @param #function func
------------------------------------------------------------------------------- ---
-- Calls `func()` in `delay` game seconds. -- Calls `func()` in `delay` game seconds.
-- The timer will be lost if the game is saved and loaded. -- The timer will be lost if the game is saved and loaded.
-- @function [parent=#async] newUnsavableGameTimer -- @function [parent=#async] newUnsavableGameTimer
@ -48,7 +48,7 @@
-- @param #number delay -- @param #number delay
-- @param #function func -- @param #function func
------------------------------------------------------------------------------- ---
-- Wraps Lua function with `Callback` object that can be used in async API calls. -- Wraps Lua function with `Callback` object that can be used in async API calls.
-- @function [parent=#async] callback -- @function [parent=#async] callback
-- @param self -- @param self

View File

@ -1,11 +1,11 @@
------------------------------------------------------------------------------- ---
-- `openmw.camera` controls camera. -- `openmw.camera` controls camera.
-- Can be used only by player scripts. -- Can be used only by player scripts.
-- @module camera -- @module camera
-- @usage local camera = require('openmw.camera') -- @usage local camera = require('openmw.camera')
------------------------------------------------------------------------------- ---
-- @type MODE Camera modes. -- @type MODE Camera modes.
-- @field #number Static Camera doesn't track player; player inputs doesn't affect camera; use `setStaticPosition` to move the camera. -- @field #number Static Camera doesn't track player; player inputs doesn't affect camera; use `setStaticPosition` to move the camera.
-- @field #number FirstPerson First person mode. -- @field #number FirstPerson First person mode.
@ -13,126 +13,126 @@
-- @field #number Vanity Similar to Preview; camera slowly moves around the player. -- @field #number Vanity Similar to Preview; camera slowly moves around the player.
-- @field #number Preview Third person mode, but player character doesn't turn to the view direction. -- @field #number Preview Third person mode, but player character doesn't turn to the view direction.
------------------------------------------------------------------------------- ---
-- Camera modes. -- Camera modes.
-- @field [parent=#camera] #MODE MODE -- @field [parent=#camera] #MODE MODE
------------------------------------------------------------------------------- ---
-- Return the current @{openmw.camera#MODE}. -- Return the current @{openmw.camera#MODE}.
-- @function [parent=#camera] getMode -- @function [parent=#camera] getMode
-- @return #MODE -- @return #MODE
------------------------------------------------------------------------------- ---
-- Return the mode the camera will switch to after the end of the current animation. Can be nil. -- Return the mode the camera will switch to after the end of the current animation. Can be nil.
-- @function [parent=#camera] getQueuedMode -- @function [parent=#camera] getQueuedMode
-- @return #MODE -- @return #MODE
------------------------------------------------------------------------------- ---
-- Change @{openmw.camera#MODE}; if the second (optional, true by default) argument is set to false, the switching can be delayed (see `getQueuedMode`). -- Change @{openmw.camera#MODE}; if the second (optional, true by default) argument is set to false, the switching can be delayed (see `getQueuedMode`).
-- @function [parent=#camera] setMode -- @function [parent=#camera] setMode
-- @param #MODE mode -- @param #MODE mode
-- @param #boolean force -- @param #boolean force
------------------------------------------------------------------------------- ---
-- If set to true then after switching from Preview to ThirdPerson the player character turns to the camera view direction. Otherwise the camera turns to the character view direction. -- If set to true then after switching from Preview to ThirdPerson the player character turns to the camera view direction. Otherwise the camera turns to the character view direction.
-- @function [parent=#camera] allowCharacterDeferredRotation -- @function [parent=#camera] allowCharacterDeferredRotation
-- @param #boolean boolValue -- @param #boolean boolValue
------------------------------------------------------------------------------- ---
-- Show/hide crosshair. -- Show/hide crosshair.
-- @function [parent=#camera] showCrosshair -- @function [parent=#camera] showCrosshair
-- @param #boolean boolValue -- @param #boolean boolValue
------------------------------------------------------------------------------- ---
-- Current position of the tracked object (the characters head if there is no animation). -- Current position of the tracked object (the characters head if there is no animation).
-- @function [parent=#camera] getTrackedPosition -- @function [parent=#camera] getTrackedPosition
-- @return openmw.util#Vector3 -- @return openmw.util#Vector3
------------------------------------------------------------------------------- ---
-- Current position of the camera. -- Current position of the camera.
-- @function [parent=#camera] getPosition -- @function [parent=#camera] getPosition
-- @return openmw.util#Vector3 -- @return openmw.util#Vector3
------------------------------------------------------------------------------- ---
-- Camera pitch angle (radians) without taking extraPitch into account. -- Camera pitch angle (radians) without taking extraPitch into account.
-- Full pitch is `getPitch()+getExtraPitch()`. -- Full pitch is `getPitch()+getExtraPitch()`.
-- @function [parent=#camera] getPitch -- @function [parent=#camera] getPitch
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Force the pitch angle to the given value (radians); player input on this axis is ignored in this frame. -- Force the pitch angle to the given value (radians); player input on this axis is ignored in this frame.
-- @function [parent=#camera] setPitch -- @function [parent=#camera] setPitch
-- @param #number value -- @param #number value
------------------------------------------------------------------------------- ---
-- Camera yaw angle (radians) without taking extraYaw into account. -- Camera yaw angle (radians) without taking extraYaw into account.
-- Full yaw is `getYaw()+getExtraYaw()`. -- Full yaw is `getYaw()+getExtraYaw()`.
-- @function [parent=#camera] getYaw -- @function [parent=#camera] getYaw
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Force the yaw angle to the given value (radians); player input on this axis is ignored in this frame. -- Force the yaw angle to the given value (radians); player input on this axis is ignored in this frame.
-- @function [parent=#camera] setYaw -- @function [parent=#camera] setYaw
-- @param #number value -- @param #number value
------------------------------------------------------------------------------- ---
-- Get camera roll angle (radians). -- Get camera roll angle (radians).
-- @function [parent=#camera] getRoll -- @function [parent=#camera] getRoll
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Set camera roll angle (radians). -- Set camera roll angle (radians).
-- @function [parent=#camera] setRoll -- @function [parent=#camera] setRoll
-- @param #number value -- @param #number value
------------------------------------------------------------------------------- ---
-- Additional summand for the pitch angle that is not affected by player input. -- Additional summand for the pitch angle that is not affected by player input.
-- Full pitch is `getPitch()+getExtraPitch()`. -- Full pitch is `getPitch()+getExtraPitch()`.
-- @function [parent=#camera] getExtraPitch -- @function [parent=#camera] getExtraPitch
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Additional summand for the pitch angle; useful for camera shaking effects. -- Additional summand for the pitch angle; useful for camera shaking effects.
-- Setting extra pitch doesn't block player input. -- Setting extra pitch doesn't block player input.
-- Full pitch is `getPitch()+getExtraPitch()`. -- Full pitch is `getPitch()+getExtraPitch()`.
-- @function [parent=#camera] setExtraPitch -- @function [parent=#camera] setExtraPitch
-- @param #number value -- @param #number value
------------------------------------------------------------------------------- ---
-- Additional summand for the yaw angle that is not affected by player input. -- Additional summand for the yaw angle that is not affected by player input.
-- Full yaw is `getYaw()+getExtraYaw()`. -- Full yaw is `getYaw()+getExtraYaw()`.
-- @function [parent=#camera] getExtraYaw -- @function [parent=#camera] getExtraYaw
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Additional summand for the yaw angle; useful for camera shaking effects. -- Additional summand for the yaw angle; useful for camera shaking effects.
-- Setting extra pitch doesn't block player input. -- Setting extra pitch doesn't block player input.
-- Full yaw is `getYaw()+getExtraYaw()`. -- Full yaw is `getYaw()+getExtraYaw()`.
-- @function [parent=#camera] setExtraYaw -- @function [parent=#camera] setExtraYaw
-- @param #number value -- @param #number value
------------------------------------------------------------------------------- ---
-- Set camera position; can be used only if camera is in Static mode. -- Set camera position; can be used only if camera is in Static mode.
-- @function [parent=#camera] setStaticPosition -- @function [parent=#camera] setStaticPosition
-- @param openmw.util#Vector3 pos -- @param openmw.util#Vector3 pos
------------------------------------------------------------------------------- ---
-- The offset between the characters head and the camera in first person mode (3d vector). -- The offset between the characters head and the camera in first person mode (3d vector).
-- @function [parent=#camera] getFirstPersonOffset -- @function [parent=#camera] getFirstPersonOffset
-- @return openmw.util#Vector3 -- @return openmw.util#Vector3
------------------------------------------------------------------------------- ---
-- Set the offset between the characters head and the camera in first person mode (3d vector). -- Set the offset between the characters head and the camera in first person mode (3d vector).
-- @function [parent=#camera] setFirstPersonOffset -- @function [parent=#camera] setFirstPersonOffset
-- @param openmw.util#Vector3 offset -- @param openmw.util#Vector3 offset
------------------------------------------------------------------------------- ---
-- Preferred offset between tracked position (see `getTrackedPosition`) and the camera focal point (the center of the screen) in third person mode. -- Preferred offset between tracked position (see `getTrackedPosition`) and the camera focal point (the center of the screen) in third person mode.
-- See `setFocalPreferredOffset`. -- See `setFocalPreferredOffset`.
-- @function [parent=#camera] getFocalPreferredOffset -- @function [parent=#camera] getFocalPreferredOffset
-- @return openmw.util#Vector2 -- @return openmw.util#Vector2
------------------------------------------------------------------------------- ---
-- Set preferred offset between tracked position (see `getTrackedPosition`) and the camera focal point (the center of the screen) in third person mode. -- Set preferred offset between tracked position (see `getTrackedPosition`) and the camera focal point (the center of the screen) in third person mode.
-- The offset is a 2d vector (X, Y) where X is horizontal (to the right from the character) and Y component is vertical (upward). -- The offset is a 2d vector (X, Y) where X is horizontal (to the right from the character) and Y component is vertical (upward).
-- The real offset can differ from the preferred one during smooth transition of if blocked by an obstacle. -- The real offset can differ from the preferred one during smooth transition of if blocked by an obstacle.
@ -140,29 +140,29 @@
-- @function [parent=#camera] setFocalPreferredOffset -- @function [parent=#camera] setFocalPreferredOffset
-- @param openmw.util#Vector2 offset -- @param openmw.util#Vector2 offset
------------------------------------------------------------------------------- ---
-- The actual distance between the camera and the character in third person mode; can differ from the preferred one if there is an obstacle. -- The actual distance between the camera and the character in third person mode; can differ from the preferred one if there is an obstacle.
-- @function [parent=#camera] getThirdPersonDistance -- @function [parent=#camera] getThirdPersonDistance
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Set preferred distance between the camera and the character in third person mode. -- Set preferred distance between the camera and the character in third person mode.
-- @function [parent=#camera] setPreferredThirdPersonDistance -- @function [parent=#camera] setPreferredThirdPersonDistance
-- @param #number distance -- @param #number distance
------------------------------------------------------------------------------- ---
-- The current speed coefficient of focal point (the center of the screen in third person mode) smooth transition. -- The current speed coefficient of focal point (the center of the screen in third person mode) smooth transition.
-- @function [parent=#camera] getFocalTransitionSpeed -- @function [parent=#camera] getFocalTransitionSpeed
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Set the speed coefficient of focal point (the center of the screen in third person mode) smooth transition. -- Set the speed coefficient of focal point (the center of the screen in third person mode) smooth transition.
-- Smooth transition happens by default every time when the preferred offset was changed. Use `instantTransition()` to skip the current transition. -- Smooth transition happens by default every time when the preferred offset was changed. Use `instantTransition()` to skip the current transition.
-- @function [parent=#camera] setFocalTransitionSpeed -- @function [parent=#camera] setFocalTransitionSpeed
-- Set the speed coefficient -- Set the speed coefficient
-- @param #number speed -- @param #number speed
------------------------------------------------------------------------------- ---
-- Make instant the current transition of camera focal point and the current deferred rotation (see `allowCharacterDeferredRotation`). -- Make instant the current transition of camera focal point and the current deferred rotation (see `allowCharacterDeferredRotation`).
-- @function [parent=#camera] instantTransition -- @function [parent=#camera] instantTransition

View File

@ -1,4 +1,4 @@
------------------------------------------------------------------------------- ---
-- `openmw.core` defines functions and types that are available in both local -- `openmw.core` defines functions and types that are available in both local
-- and global scripts. -- and global scripts.
-- @module core -- @module core
@ -6,53 +6,53 @@
------------------------------------------------------------------------------- ---
-- The revision of OpenMW Lua API. It is an integer that is incremented every time the API is changed. -- The revision of OpenMW Lua API. It is an integer that is incremented every time the API is changed.
-- @field [parent=#core] #number API_REVISION -- @field [parent=#core] #number API_REVISION
------------------------------------------------------------------------------- ---
-- Terminates the game and quits to the OS. Should be used only for testing purposes. -- Terminates the game and quits to the OS. Should be used only for testing purposes.
-- @function [parent=#core] quit -- @function [parent=#core] quit
------------------------------------------------------------------------------- ---
-- Send an event to global scripts. -- Send an event to global scripts.
-- @function [parent=#core] sendGlobalEvent -- @function [parent=#core] sendGlobalEvent
-- @param #string eventName -- @param #string eventName
-- @param eventData -- @param eventData
------------------------------------------------------------------------------- ---
-- Simulation time in seconds. -- Simulation time in seconds.
-- The number of simulation seconds passed in the game world since starting a new game. -- The number of simulation seconds passed in the game world since starting a new game.
-- @function [parent=#core] getSimulationTime -- @function [parent=#core] getSimulationTime
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- The scale of simulation time relative to real time. -- The scale of simulation time relative to real time.
-- @function [parent=#core] getSimulationTimeScale -- @function [parent=#core] getSimulationTimeScale
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Game time in seconds. -- Game time in seconds.
-- @function [parent=#core] getGameTime -- @function [parent=#core] getGameTime
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- The scale of game time relative to simulation time. -- The scale of game time relative to simulation time.
-- @function [parent=#core] getGameTimeScale -- @function [parent=#core] getGameTimeScale
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Whether the world is paused (onUpdate doesn't work when the world is paused). -- Whether the world is paused (onUpdate doesn't work when the world is paused).
-- @function [parent=#core] isWorldPaused -- @function [parent=#core] isWorldPaused
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Get a GMST setting from content files. -- Get a GMST setting from content files.
-- @function [parent=#core] getGMST -- @function [parent=#core] getGMST
-- @param #string setting Setting name -- @param #string setting Setting name
-- @return #any -- @return #any
------------------------------------------------------------------------------- ---
-- Return i18n formatting function for the given context. -- Return i18n formatting function for the given context.
-- It is based on `i18n.lua` library. -- It is based on `i18n.lua` library.
-- Language files should be stored in VFS as `i18n/<ContextName>/<Lang>.lua`. -- Language files should be stored in VFS as `i18n/<ContextName>/<Lang>.lua`.
@ -86,7 +86,7 @@
-- print( myMsg('Hello %{name}!', {name='World'}) ) -- print( myMsg('Hello %{name}!', {name='World'}) )
------------------------------------------------------------------------------- ---
-- @type OBJECT_TYPE -- @type OBJECT_TYPE
-- @field #string Activator "Activator" -- @field #string Activator "Activator"
-- @field #string Armor "Armor" -- @field #string Armor "Armor"
@ -107,12 +107,12 @@
-- @field #string Probe "Probe" -- @field #string Probe "Probe"
-- @field #string Repair "Repair" -- @field #string Repair "Repair"
------------------------------------------------------------------------------- ---
-- Possible `object.type` values. -- Possible `object.type` values.
-- @field [parent=#core] #OBJECT_TYPE OBJECT_TYPE -- @field [parent=#core] #OBJECT_TYPE OBJECT_TYPE
------------------------------------------------------------------------------- ---
-- @type EQUIPMENT_SLOT -- @type EQUIPMENT_SLOT
-- @field #number Helmet -- @field #number Helmet
-- @field #number Cuirass -- @field #number Cuirass
@ -134,12 +134,12 @@
-- @field #number CarriedLeft -- @field #number CarriedLeft
-- @field #number Ammunition -- @field #number Ammunition
------------------------------------------------------------------------------- ---
-- Available equipment slots. Used in `object:getEquipment` and `object:setEquipment`. -- Available equipment slots. Used in `object:getEquipment` and `object:setEquipment`.
-- @field [parent=#core] #EQUIPMENT_SLOT EQUIPMENT_SLOT -- @field [parent=#core] #EQUIPMENT_SLOT EQUIPMENT_SLOT
------------------------------------------------------------------------------- ---
-- Any object that exists in the game world and has a specific location. -- Any object that exists in the game world and has a specific location.
-- Player, actors, items, and statics are game objects. -- Player, actors, items, and statics are game objects.
-- @type GameObject -- @type GameObject
@ -155,7 +155,7 @@
-- @field openmw.util#Vector3 destRotation Destination rotation (only if a teleport door). -- @field openmw.util#Vector3 destRotation Destination rotation (only if a teleport door).
-- @field #string destCell Destination cell (only if a teleport door). -- @field #string destCell Destination cell (only if a teleport door).
------------------------------------------------------------------------------- ---
-- Is the object still exists/available. -- Is the object still exists/available.
-- Returns true if the object exists and loaded, and false otherwise. If false, then every -- Returns true if the object exists and loaded, and false otherwise. If false, then every
-- access to the object will raise an error. -- access to the object will raise an error.
@ -163,7 +163,7 @@
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Returns true if the object is an actor and is able to move. For dead, paralized, -- Returns true if the object is an actor and is able to move. For dead, paralized,
-- or knocked down actors in returns false. -- or knocked down actors in returns false.
-- access to the object will raise an error. -- access to the object will raise an error.
@ -171,56 +171,56 @@
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Speed of running. Returns 0 if not an actor, but for dead actors it still returns a positive value. -- Speed of running. Returns 0 if not an actor, but for dead actors it still returns a positive value.
-- @function [parent=#GameObject] getRunSpeed -- @function [parent=#GameObject] getRunSpeed
-- @param self -- @param self
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Speed of walking. Returns 0 if not an actor, but for dead actors it still returns a positive value. -- Speed of walking. Returns 0 if not an actor, but for dead actors it still returns a positive value.
-- @function [parent=#GameObject] getWalkSpeed -- @function [parent=#GameObject] getWalkSpeed
-- @param self -- @param self
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Current speed. Can be called only from a local script. -- Current speed. Can be called only from a local script.
-- @function [parent=#GameObject] getCurrentSpeed -- @function [parent=#GameObject] getCurrentSpeed
-- @param self -- @param self
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Is the actor standing on ground. Can be called only from a local script. -- Is the actor standing on ground. Can be called only from a local script.
-- @function [parent=#GameObject] isOnGround -- @function [parent=#GameObject] isOnGround
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is the actor in water. Can be called only from a local script. -- Is the actor in water. Can be called only from a local script.
-- @function [parent=#GameObject] isSwimming -- @function [parent=#GameObject] isSwimming
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is the actor in weapon stance. Can be called only from a local script. -- Is the actor in weapon stance. Can be called only from a local script.
-- @function [parent=#GameObject] isInWeaponStance -- @function [parent=#GameObject] isInWeaponStance
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is the actor in magic stance. Can be called only from a local script. -- Is the actor in magic stance. Can be called only from a local script.
-- @function [parent=#GameObject] isInMagicStance -- @function [parent=#GameObject] isInMagicStance
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Send local event to the object. -- Send local event to the object.
-- @function [parent=#GameObject] sendEvent -- @function [parent=#GameObject] sendEvent
-- @param self -- @param self
-- @param #string eventName -- @param #string eventName
-- @param eventData -- @param eventData
------------------------------------------------------------------------------- ---
-- Activate the object. -- Activate the object.
-- @function [parent=#GameObject] activateBy -- @function [parent=#GameObject] activateBy
-- @param self -- @param self
@ -228,14 +228,14 @@
-- @usage local self = require('openmw.self') -- @usage local self = require('openmw.self')
-- object:activateBy(self) -- object:activateBy(self)
------------------------------------------------------------------------------- ---
-- Returns `true` if the item is equipped on the object. -- Returns `true` if the item is equipped on the object.
-- @function [parent=#GameObject] isEquipped -- @function [parent=#GameObject] isEquipped
-- @param self -- @param self
-- @param #GameObject item -- @param #GameObject item
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Get equipment. -- Get equipment.
-- Returns a table `slot` -> `GameObject` of currently equipped items. -- Returns a table `slot` -> `GameObject` of currently equipped items.
-- See @{openmw.core#EQUIPMENT_SLOT}. Returns empty table if the object doesn't have -- See @{openmw.core#EQUIPMENT_SLOT}. Returns empty table if the object doesn't have
@ -244,7 +244,7 @@
-- @param self -- @param self
-- @return #map<#number,#GameObject> -- @return #map<#number,#GameObject>
------------------------------------------------------------------------------- ---
-- Set equipment. -- Set equipment.
-- Keys in the table are equipment slots (see @{openmw.core#EQUIPMENT_SLOT}). Each -- Keys in the table are equipment slots (see @{openmw.core#EQUIPMENT_SLOT}). Each
-- value can be either a `GameObject` or recordId. Raises an error if -- value can be either a `GameObject` or recordId. Raises an error if
@ -254,7 +254,7 @@
-- @param self -- @param self
-- @param equipment -- @param equipment
------------------------------------------------------------------------------- ---
-- Add new local script to the object. -- Add new local script to the object.
-- Can be called only from a global script. Script should be specified in a content -- Can be called only from a global script. Script should be specified in a content
-- file (omwgame/omwaddon/omwscripts) with a CUSTOM flag. -- file (omwgame/omwaddon/omwscripts) with a CUSTOM flag.
@ -262,7 +262,7 @@
-- @param self -- @param self
-- @param #string scriptPath Path to the script in OpenMW virtual filesystem. -- @param #string scriptPath Path to the script in OpenMW virtual filesystem.
------------------------------------------------------------------------------- ---
-- Whether a script with given path is attached to this object. -- Whether a script with given path is attached to this object.
-- Can be called only from a global script. -- Can be called only from a global script.
-- @function [parent=#GameObject] hasScript -- @function [parent=#GameObject] hasScript
@ -270,14 +270,14 @@
-- @param #string scriptPath Path to the script in OpenMW virtual filesystem. -- @param #string scriptPath Path to the script in OpenMW virtual filesystem.
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Removes script that was attached by `addScript` -- Removes script that was attached by `addScript`
-- Can be called only from a global script. -- Can be called only from a global script.
-- @function [parent=#GameObject] removeScript -- @function [parent=#GameObject] removeScript
-- @param self -- @param self
-- @param #string scriptPath Path to the script in OpenMW virtual filesystem. -- @param #string scriptPath Path to the script in OpenMW virtual filesystem.
------------------------------------------------------------------------------- ---
-- Moves object to given cell and position. -- Moves object to given cell and position.
-- The effect is not immediate: the position will be updated only in the next -- The effect is not immediate: the position will be updated only in the next
-- frame. Can be called only from a global script. -- frame. Can be called only from a global script.
@ -288,12 +288,12 @@
-- @param openmw.util#Vector3 rotation New rotation. Optional argument. If missed, then the current rotation is used. -- @param openmw.util#Vector3 rotation New rotation. Optional argument. If missed, then the current rotation is used.
------------------------------------------------------------------------------- ---
-- List of GameObjects. Implements [iterables#List](iterables.html#List) of #GameObject -- List of GameObjects. Implements [iterables#List](iterables.html#List) of #GameObject
-- @type ObjectList -- @type ObjectList
-- @list <#GameObject> -- @list <#GameObject>
------------------------------------------------------------------------------- ---
-- Filter list with a Query. -- Filter list with a Query.
-- @function [parent=#ObjectList] select -- @function [parent=#ObjectList] select
-- @param self -- @param self
@ -301,7 +301,7 @@
-- @return #ObjectList -- @return #ObjectList
------------------------------------------------------------------------------- ---
-- A cell of the game world. -- A cell of the game world.
-- @type Cell -- @type Cell
-- @field #string name Name of the cell (can be empty string). -- @field #string name Name of the cell (can be empty string).
@ -311,7 +311,7 @@
-- @field #number gridY Index of the cell by Y (only for exteriors). -- @field #number gridY Index of the cell by Y (only for exteriors).
-- @field #boolean hasWater True if the cell contains water. -- @field #boolean hasWater True if the cell contains water.
------------------------------------------------------------------------------- ---
-- Returns true either if the cell contains the object or if the cell is an exterior and the object is also in an exterior. -- Returns true either if the cell contains the object or if the cell is an exterior and the object is also in an exterior.
-- @function [parent=#Cell] isInSameSpace -- @function [parent=#Cell] isInSameSpace
-- @param self -- @param self
@ -324,7 +324,7 @@
-- -- the distance can't be calculated because the coordinates are in different spaces -- -- the distance can't be calculated because the coordinates are in different spaces
-- end -- end
------------------------------------------------------------------------------- ---
-- Select objects from the cell with a Query (only in global scripts). -- Select objects from the cell with a Query (only in global scripts).
-- Returns an empty list if the cell is not loaded. -- Returns an empty list if the cell is not loaded.
-- @function [parent=#Cell] selectObjects -- @function [parent=#Cell] selectObjects
@ -333,18 +333,18 @@
-- @return #ObjectList -- @return #ObjectList
------------------------------------------------------------------------------- ---
-- Inventory of a player/NPC or a content of a container. -- Inventory of a player/NPC or a content of a container.
-- @type Inventory -- @type Inventory
------------------------------------------------------------------------------- ---
-- The number of items with given recordId. -- The number of items with given recordId.
-- @function [parent=#Inventory] countOf -- @function [parent=#Inventory] countOf
-- @param self -- @param self
-- @param #string recordId -- @param #string recordId
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Get all items of given type from the inventory. -- Get all items of given type from the inventory.
-- @function [parent=#Inventory] getAll -- @function [parent=#Inventory] getAll
-- @param self -- @param self

View File

@ -1,95 +1,95 @@
------------------------------------------------------------------------------- ---
-- `openmw.input` can be used only in scripts attached to a player. -- `openmw.input` can be used only in scripts attached to a player.
-- @module input -- @module input
-- @usage local input = require('openmw.input') -- @usage local input = require('openmw.input')
------------------------------------------------------------------------------- ---
-- Is player idle. -- Is player idle.
-- @function [parent=#input] isIdle -- @function [parent=#input] isIdle
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is a specific control currently pressed. -- Is a specific control currently pressed.
-- Input bindings can be changed ingame using Options/Controls menu. -- Input bindings can be changed ingame using Options/Controls menu.
-- @function [parent=#input] isActionPressed -- @function [parent=#input] isActionPressed
-- @param #number actionId One of @{openmw.input#ACTION} -- @param #number actionId One of @{openmw.input#ACTION}
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is a keyboard button currently pressed. -- Is a keyboard button currently pressed.
-- @function [parent=#input] isKeyPressed -- @function [parent=#input] isKeyPressed
-- @param #number keyCode Key code (see @{openmw.input#KEY}) -- @param #number keyCode Key code (see @{openmw.input#KEY})
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is a controller button currently pressed. -- Is a controller button currently pressed.
-- @function [parent=#input] isControllerButtonPressed -- @function [parent=#input] isControllerButtonPressed
-- @param #number buttonId Button index (see @{openmw.input#CONTROLLER_BUTTON}) -- @param #number buttonId Button index (see @{openmw.input#CONTROLLER_BUTTON})
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is `Shift` key pressed. -- Is `Shift` key pressed.
-- @function [parent=#input] isShiftPressed -- @function [parent=#input] isShiftPressed
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is `Ctrl` key pressed. -- Is `Ctrl` key pressed.
-- @function [parent=#input] isCtrlPressed -- @function [parent=#input] isCtrlPressed
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is `Alt` key pressed. -- Is `Alt` key pressed.
-- @function [parent=#input] isAltPressed -- @function [parent=#input] isAltPressed
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is `Super`/`Win` key pressed. -- Is `Super`/`Win` key pressed.
-- @function [parent=#input] isSuperPressed -- @function [parent=#input] isSuperPressed
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Is a mouse button currently pressed. -- Is a mouse button currently pressed.
-- @function [parent=#input] isMouseButtonPressed -- @function [parent=#input] isMouseButtonPressed
-- @param #number buttonId Button index (1 - left, 2 - middle, 3 - right, 4 - X1, 5 - X2) -- @param #number buttonId Button index (1 - left, 2 - middle, 3 - right, 4 - X1, 5 - X2)
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Horizontal mouse movement during the last frame. -- Horizontal mouse movement during the last frame.
-- @function [parent=#input] getMouseMoveX -- @function [parent=#input] getMouseMoveX
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Vertical mouse movement during the last frame. -- Vertical mouse movement during the last frame.
-- @function [parent=#input] getMouseMoveY -- @function [parent=#input] getMouseMoveY
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Get value of an axis of a game controller. -- Get value of an axis of a game controller.
-- @function [parent=#input] getAxisValue -- @function [parent=#input] getAxisValue
-- @param #number axisId Index of a controller axis, one of @{openmw.input#CONTROLLER_AXIS}. -- @param #number axisId Index of a controller axis, one of @{openmw.input#CONTROLLER_AXIS}.
-- @return #number Value in range [-1, 1]. -- @return #number Value in range [-1, 1].
------------------------------------------------------------------------------- ---
-- Get state of a control switch. I.e. is player able to move/fight/jump/etc. -- Get state of a control switch. I.e. is player able to move/fight/jump/etc.
-- @function [parent=#input] getControlSwitch -- @function [parent=#input] getControlSwitch
-- @param #string key Control type (see @{openmw.input#CONTROL_SWITCH}) -- @param #string key Control type (see @{openmw.input#CONTROL_SWITCH})
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- Set state of a control switch. I.e. forbid or allow player to move/fight/jump/etc. -- Set state of a control switch. I.e. forbid or allow player to move/fight/jump/etc.
-- @function [parent=#input] setControlSwitch -- @function [parent=#input] setControlSwitch
-- @param #string key Control type (see @{openmw.input#CONTROL_SWITCH}) -- @param #string key Control type (see @{openmw.input#CONTROL_SWITCH})
-- @param #boolean value -- @param #boolean value
------------------------------------------------------------------------------- ---
-- Returns a human readable name for the given key code -- Returns a human readable name for the given key code
-- @function [parent=#input] getKeyName -- @function [parent=#input] getKeyName
-- @param #number code A key code (see @{openmw.input#KEY}) -- @param #number code A key code (see @{openmw.input#KEY})
-- @return #string -- @return #string
------------------------------------------------------------------------------- ---
-- @type CONTROL_SWITCH -- @type CONTROL_SWITCH
-- @field [parent=#CONTROL_SWITCH] #string Controls Ability to move -- @field [parent=#CONTROL_SWITCH] #string Controls Ability to move
-- @field [parent=#CONTROL_SWITCH] #string Fighting Ability to attack -- @field [parent=#CONTROL_SWITCH] #string Fighting Ability to attack
@ -99,11 +99,11 @@
-- @field [parent=#CONTROL_SWITCH] #string ViewMode Ability to toggle 1st/3rd person view -- @field [parent=#CONTROL_SWITCH] #string ViewMode Ability to toggle 1st/3rd person view
-- @field [parent=#CONTROL_SWITCH] #string VanityMode Vanity view if player doesn't touch controls for a long time -- @field [parent=#CONTROL_SWITCH] #string VanityMode Vanity view if player doesn't touch controls for a long time
------------------------------------------------------------------------------- ---
-- Values that can be used with getControlSwitch/setControlSwitch. -- Values that can be used with getControlSwitch/setControlSwitch.
-- @field [parent=#input] #CONTROL_SWITCH CONTROL_SWITCH -- @field [parent=#input] #CONTROL_SWITCH CONTROL_SWITCH
------------------------------------------------------------------------------- ---
-- @type ACTION -- @type ACTION
-- @field [parent=#ACTION] #number GameMenu -- @field [parent=#ACTION] #number GameMenu
-- @field [parent=#ACTION] #number Screenshot -- @field [parent=#ACTION] #number Screenshot
@ -150,11 +150,11 @@
-- @field [parent=#ACTION] #number ZoomIn -- @field [parent=#ACTION] #number ZoomIn
-- @field [parent=#ACTION] #number ZoomOut -- @field [parent=#ACTION] #number ZoomOut
------------------------------------------------------------------------------- ---
-- Values that can be used with isActionPressed. -- Values that can be used with isActionPressed.
-- @field [parent=#input] #ACTION ACTION -- @field [parent=#input] #ACTION ACTION
------------------------------------------------------------------------------- ---
-- @type CONTROLLER_BUTTON -- @type CONTROLLER_BUTTON
-- @field [parent=#CONTROLLER_BUTTON] #number A -- @field [parent=#CONTROLLER_BUTTON] #number A
-- @field [parent=#CONTROLLER_BUTTON] #number B -- @field [parent=#CONTROLLER_BUTTON] #number B
@ -172,11 +172,11 @@
-- @field [parent=#CONTROLLER_BUTTON] #number DPadLeft -- @field [parent=#CONTROLLER_BUTTON] #number DPadLeft
-- @field [parent=#CONTROLLER_BUTTON] #number DPadRight -- @field [parent=#CONTROLLER_BUTTON] #number DPadRight
------------------------------------------------------------------------------- ---
-- Values that can be passed to onControllerButtonPress/onControllerButtonRelease engine handlers. -- Values that can be passed to onControllerButtonPress/onControllerButtonRelease engine handlers.
-- @field [parent=#input] #CONTROLLER_BUTTON CONTROLLER_BUTTON -- @field [parent=#input] #CONTROLLER_BUTTON CONTROLLER_BUTTON
------------------------------------------------------------------------------- ---
-- Ids of game controller axises. Used as an argument in getAxisValue. -- Ids of game controller axises. Used as an argument in getAxisValue.
-- @type CONTROLLER_AXIS -- @type CONTROLLER_AXIS
-- @field [parent=#CONTROLLER_AXIS] #number LeftX Left stick horizontal axis (from -1 to 1) -- @field [parent=#CONTROLLER_AXIS] #number LeftX Left stick horizontal axis (from -1 to 1)
@ -190,11 +190,11 @@
-- @field [parent=#CONTROLLER_AXIS] #number MoveForwardBackward Movement forward/backward (LeftY by default, can be mapped to another axis in Options/Controls menu) -- @field [parent=#CONTROLLER_AXIS] #number MoveForwardBackward Movement forward/backward (LeftY by default, can be mapped to another axis in Options/Controls menu)
-- @field [parent=#CONTROLLER_AXIS] #number MoveLeftRight Side movement (LeftX by default, can be mapped to another axis in Options/Controls menu) -- @field [parent=#CONTROLLER_AXIS] #number MoveLeftRight Side movement (LeftX by default, can be mapped to another axis in Options/Controls menu)
------------------------------------------------------------------------------- ---
-- Values that can be used with getAxisValue. -- Values that can be used with getAxisValue.
-- @field [parent=#input] #CONTROLLER_AXIS CONTROLLER_AXIS -- @field [parent=#input] #CONTROLLER_AXIS CONTROLLER_AXIS
------------------------------------------------------------------------------- ---
-- @type KEY -- @type KEY
-- @field #number _0 -- @field #number _0
-- @field #number _1 -- @field #number _1
@ -299,11 +299,11 @@
-- @field #number Space -- @field #number Space
-- @field #number Tab -- @field #number Tab
------------------------------------------------------------------------------- ---
-- Key codes. -- Key codes.
-- @field [parent=#input] #KEY KEY -- @field [parent=#input] #KEY KEY
------------------------------------------------------------------------------- ---
-- The argument of `onKeyPress`/`onKeyRelease` engine handlers. -- The argument of `onKeyPress`/`onKeyRelease` engine handlers.
-- @type KeyboardEvent -- @type KeyboardEvent
-- @field [parent=#KeyboardEvent] #string symbol The pressed symbol (1-symbol string if can be represented or an empty string otherwise). -- @field [parent=#KeyboardEvent] #string symbol The pressed symbol (1-symbol string if can be represented or an empty string otherwise).

View File

@ -1,4 +1,4 @@
------------------------------------------------------------------------------- ---
-- `openmw.nearby` provides read-only access to the nearest area of the game world. -- `openmw.nearby` provides read-only access to the nearest area of the game world.
-- Can be used only from local scripts. -- Can be used only from local scripts.
-- @module nearby -- @module nearby
@ -6,33 +6,33 @@
------------------------------------------------------------------------------- ---
-- List of nearby activators. -- List of nearby activators.
-- @field [parent=#nearby] openmw.core#ObjectList activators -- @field [parent=#nearby] openmw.core#ObjectList activators
------------------------------------------------------------------------------- ---
-- List of nearby actors. -- List of nearby actors.
-- @field [parent=#nearby] openmw.core#ObjectList actors -- @field [parent=#nearby] openmw.core#ObjectList actors
------------------------------------------------------------------------------- ---
-- List of nearby containers. -- List of nearby containers.
-- @field [parent=#nearby] openmw.core#ObjectList containers -- @field [parent=#nearby] openmw.core#ObjectList containers
------------------------------------------------------------------------------- ---
-- List of nearby doors. -- List of nearby doors.
-- @field [parent=#nearby] openmw.core#ObjectList doors -- @field [parent=#nearby] openmw.core#ObjectList doors
------------------------------------------------------------------------------- ---
-- Everything that can be picked up in the nearby. -- Everything that can be picked up in the nearby.
-- @field [parent=#nearby] openmw.core#ObjectList items -- @field [parent=#nearby] openmw.core#ObjectList items
------------------------------------------------------------------------------- ---
-- Evaluates a Query. -- Evaluates a Query.
-- @function [parent=#nearby] selectObjects -- @function [parent=#nearby] selectObjects
-- @param openmw.query#Query query -- @param openmw.query#Query query
-- @return openmw.core#ObjectList -- @return openmw.core#ObjectList
------------------------------------------------------------------------------- ---
-- @type COLLISION_TYPE -- @type COLLISION_TYPE
-- @field [parent=#COLLISION_TYPE] #number World -- @field [parent=#COLLISION_TYPE] #number World
-- @field [parent=#COLLISION_TYPE] #number Door -- @field [parent=#COLLISION_TYPE] #number Door
@ -42,12 +42,12 @@
-- @field [parent=#COLLISION_TYPE] #number Water -- @field [parent=#COLLISION_TYPE] #number Water
-- @field [parent=#COLLISION_TYPE] #number Default Used by deafult: World+Door+Actor+HeightMap -- @field [parent=#COLLISION_TYPE] #number Default Used by deafult: World+Door+Actor+HeightMap
------------------------------------------------------------------------------- ---
-- Collision types that are used in `castRay`. -- Collision types that are used in `castRay`.
-- Several types can be combined with '+'. -- Several types can be combined with '+'.
-- @field [parent=#nearby] #COLLISION_TYPE COLLISION_TYPE -- @field [parent=#nearby] #COLLISION_TYPE COLLISION_TYPE
------------------------------------------------------------------------------- ---
-- Result of raycasing -- Result of raycasing
-- @type RayCastingResult -- @type RayCastingResult
-- @field [parent=#RayCastingResult] #boolean hit Is there a collision? (true/false) -- @field [parent=#RayCastingResult] #boolean hit Is there a collision? (true/false)
@ -55,7 +55,7 @@
-- @field [parent=#RayCastingResult] openmw.util#Vector3 hitNormal Normal to the surface in the collision point (nil if no collision) -- @field [parent=#RayCastingResult] openmw.util#Vector3 hitNormal Normal to the surface in the collision point (nil if no collision)
-- @field [parent=#RayCastingResult] openmw.core#GameObject hitObject The object the ray has collided with (can be nil) -- @field [parent=#RayCastingResult] openmw.core#GameObject hitObject The object the ray has collided with (can be nil)
------------------------------------------------------------------------------- ---
-- Cast ray from one point to another and return the first collision. -- Cast ray from one point to another and return the first collision.
-- @function [parent=#nearby] castRay -- @function [parent=#nearby] castRay
-- @param openmw.util#Vector3 from Start point of the ray. -- @param openmw.util#Vector3 from Start point of the ray.

View File

@ -1,22 +1,22 @@
------------------------------------------------------------------------------- ---
-- `openmw.query` constructs queries that can be used in `world.selectObjects` and `nearby.selectObjects`. -- `openmw.query` constructs queries that can be used in `world.selectObjects` and `nearby.selectObjects`.
-- @module query -- @module query
-- @usage local query = require('openmw.query') -- @usage local query = require('openmw.query')
------------------------------------------------------------------------------- ---
-- Query. A Query itself can no return objects. It only holds search conditions. -- Query. A Query itself can no return objects. It only holds search conditions.
-- @type Query -- @type Query
------------------------------------------------------------------------------- ---
-- Add condition. -- Add condition.
-- @function [parent=#Query] where -- @function [parent=#Query] where
-- @param self -- @param self
-- @param condition -- @param condition
-- @return #Query -- @return #Query
------------------------------------------------------------------------------- ---
-- Limit result size. -- Limit result size.
-- @function [parent=#Query] limit -- @function [parent=#Query] limit
-- @param self -- @param self
@ -24,91 +24,91 @@
-- @return #Query -- @return #Query
------------------------------------------------------------------------------- ---
-- A field that can be used in a condition -- A field that can be used in a condition
-- @type Field -- @type Field
------------------------------------------------------------------------------- ---
-- Equal -- Equal
-- @function [parent=#Field] eq -- @function [parent=#Field] eq
-- @param self -- @param self
-- @param value -- @param value
------------------------------------------------------------------------------- ---
-- Not equal -- Not equal
-- @function [parent=#Field] neq -- @function [parent=#Field] neq
-- @param self -- @param self
-- @param value -- @param value
------------------------------------------------------------------------------- ---
-- Lesser -- Lesser
-- @function [parent=#Field] lt -- @function [parent=#Field] lt
-- @param self -- @param self
-- @param value -- @param value
------------------------------------------------------------------------------- ---
-- Lesser or equal -- Lesser or equal
-- @function [parent=#Field] lte -- @function [parent=#Field] lte
-- @param self -- @param self
-- @param value -- @param value
------------------------------------------------------------------------------- ---
-- Greater -- Greater
-- @function [parent=#Field] gt -- @function [parent=#Field] gt
-- @param self -- @param self
-- @param value -- @param value
------------------------------------------------------------------------------- ---
-- Greater or equal -- Greater or equal
-- @function [parent=#Field] gte -- @function [parent=#Field] gte
-- @param self -- @param self
-- @param value -- @param value
------------------------------------------------------------------------------- ---
-- @type OBJECT -- @type OBJECT
-- @field [parent=#OBJECT] #Field type -- @field [parent=#OBJECT] #Field type
-- @field [parent=#OBJECT] #Field recordId -- @field [parent=#OBJECT] #Field recordId
-- @field [parent=#OBJECT] #Field count -- @field [parent=#OBJECT] #Field count
-- @field [parent=#OBJECT] #CellFields cell -- @field [parent=#OBJECT] #CellFields cell
------------------------------------------------------------------------------- ---
-- Fields that can be used with any object. -- Fields that can be used with any object.
-- @field [parent=#query] #OBJECT OBJECT -- @field [parent=#query] #OBJECT OBJECT
------------------------------------------------------------------------------- ---
-- @type DOOR -- @type DOOR
-- @field [parent=#DOOR] #Field isTeleport -- @field [parent=#DOOR] #Field isTeleport
-- @field [parent=#DOOR] #CellFields destCell -- @field [parent=#DOOR] #CellFields destCell
------------------------------------------------------------------------------- ---
-- Fields that can be used only when search for doors. -- Fields that can be used only when search for doors.
-- @field [parent=#query] #DOOR DOOR -- @field [parent=#query] #DOOR DOOR
------------------------------------------------------------------------------- ---
-- @type CellFields -- @type CellFields
-- @field [parent=#CellFields] #Field name -- @field [parent=#CellFields] #Field name
-- @field [parent=#CellFields] #Field region -- @field [parent=#CellFields] #Field region
-- @field [parent=#CellFields] #Field isExterior -- @field [parent=#CellFields] #Field isExterior
------------------------------------------------------------------------------- ---
-- Base Query to select activators. -- Base Query to select activators.
-- @field [parent=#query] #Query activators -- @field [parent=#query] #Query activators
------------------------------------------------------------------------------- ---
-- Base Query to select actors. -- Base Query to select actors.
-- @field [parent=#query] #Query actors -- @field [parent=#query] #Query actors
------------------------------------------------------------------------------- ---
-- Base Query to select containers. -- Base Query to select containers.
-- @field [parent=#query] #Query containers -- @field [parent=#query] #Query containers
------------------------------------------------------------------------------- ---
-- Base Query to select doors. -- Base Query to select doors.
-- @field [parent=#query] #Query doors -- @field [parent=#query] #Query doors
------------------------------------------------------------------------------- ---
-- Base Query to select items. -- Base Query to select items.
-- @field [parent=#query] #Query items -- @field [parent=#query] #Query items

View File

@ -1,4 +1,4 @@
------------------------------------------------------------------------------- ---
-- `openmw.self` provides full access to the object the script is attached to. -- `openmw.self` provides full access to the object the script is attached to.
-- Can be used only from local scripts. All fields and function of `GameObject` are also available for `openmw.self`. -- Can be used only from local scripts. All fields and function of `GameObject` are also available for `openmw.self`.
-- @module self -- @module self
@ -10,22 +10,22 @@
------------------------------------------------------------------------------- ---
-- Returns true if the script isActive (the object it is attached to is in an active cell). -- Returns true if the script isActive (the object it is attached to is in an active cell).
-- If it is not active, then `openmw.nearby` can not be used. -- If it is not active, then `openmw.nearby` can not be used.
-- @function [parent=#self] isActive -- @function [parent=#self] isActive
-- @param self -- @param self
-- @return #boolean -- @return #boolean
------------------------------------------------------------------------------- ---
-- The object the script is attached to (readonly) -- The object the script is attached to (readonly)
-- @field [parent=#self] openmw.core#GameObject object -- @field [parent=#self] openmw.core#GameObject object
------------------------------------------------------------------------------- ---
-- Movement controls (only for actors) -- Movement controls (only for actors)
-- @field [parent=#self] #ActorControls controls -- @field [parent=#self] #ActorControls controls
------------------------------------------------------------------------------- ---
-- Allows to view and/or modify controls of an actor. All fields are mutable. -- Allows to view and/or modify controls of an actor. All fields are mutable.
-- @type ActorControls -- @type ActorControls
-- @field [parent=#ActorControls] #number movement +1 - move forward, -1 - move backward -- @field [parent=#ActorControls] #number movement +1 - move forward, -1 - move backward
@ -36,7 +36,7 @@
-- @field [parent=#ActorControls] #boolean jump If true - initiate a jump -- @field [parent=#ActorControls] #boolean jump If true - initiate a jump
-- @field [parent=#ActorControls] #number use if 1 - activates the readied weapon/spell. For weapons, keeping at 1 will charge the attack until set to 0. -- @field [parent=#ActorControls] #number use if 1 - activates the readied weapon/spell. For weapons, keeping at 1 will charge the attack until set to 0.
------------------------------------------------------------------------------- ---
-- Enables or disables standard AI (enabled by default). -- Enables or disables standard AI (enabled by default).
-- @function [parent=#self] enableAI -- @function [parent=#self] enableAI
-- @param self -- @param self

View File

@ -1,4 +1,4 @@
------------------------------------------------------------------------------- ---
-- `openmw.world` is an interface to the game world for global scripts. -- `openmw.world` is an interface to the game world for global scripts.
-- Can not be used from local scripts. -- Can not be used from local scripts.
-- @module world -- @module world
@ -6,56 +6,56 @@
------------------------------------------------------------------------------- ---
-- List of currently active actors. -- List of currently active actors.
-- @field [parent=#world] openmw.core#ObjectList activeActors -- @field [parent=#world] openmw.core#ObjectList activeActors
------------------------------------------------------------------------------- ---
-- Evaluates a Query. -- Evaluates a Query.
-- @function [parent=#world] selectObjects -- @function [parent=#world] selectObjects
-- @param openmw.query#Query query -- @param openmw.query#Query query
-- @return openmw.core#ObjectList -- @return openmw.core#ObjectList
------------------------------------------------------------------------------- ---
-- Loads a named cell -- Loads a named cell
-- @function [parent=#world] getCellByName -- @function [parent=#world] getCellByName
-- @param #string cellName -- @param #string cellName
-- @return openmw.core#Cell -- @return openmw.core#Cell
------------------------------------------------------------------------------- ---
-- Loads an exterior cell by grid indices -- Loads an exterior cell by grid indices
-- @function [parent=#world] getExteriorCell -- @function [parent=#world] getExteriorCell
-- @param #number gridX -- @param #number gridX
-- @param #number gridY -- @param #number gridY
-- @return openmw.core#Cell -- @return openmw.core#Cell
------------------------------------------------------------------------------- ---
-- Simulation time in seconds. -- Simulation time in seconds.
-- The number of simulation seconds passed in the game world since starting a new game. -- The number of simulation seconds passed in the game world since starting a new game.
-- @function [parent=#core] getSimulationTime -- @function [parent=#core] getSimulationTime
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- The scale of simulation time relative to real time. -- The scale of simulation time relative to real time.
-- @function [parent=#core] getSimulationTimeScale -- @function [parent=#core] getSimulationTimeScale
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Game time in seconds. -- Game time in seconds.
-- @function [parent=#core] getGameTime -- @function [parent=#core] getGameTime
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- The scale of game time relative to simulation time. -- The scale of game time relative to simulation time.
-- @function [parent=#core] getGameTimeScale -- @function [parent=#core] getGameTimeScale
-- @return #number -- @return #number
------------------------------------------------------------------------------- ---
-- Set the ratio of game time speed to simulation time speed. -- Set the ratio of game time speed to simulation time speed.
-- @function [parent=#world] setGameTimeScale -- @function [parent=#world] setGameTimeScale
-- @param #number ratio -- @param #number ratio
------------------------------------------------------------------------------- ---
-- Whether the world is paused (onUpdate doesn't work when the world is paused). -- Whether the world is paused (onUpdate doesn't work when the world is paused).
-- @function [parent=#world] isWorldPaused -- @function [parent=#world] isWorldPaused
-- @return #boolean -- @return #boolean