mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 00:26:39 +00:00 
			
		
		
		
	Merge branch 'minor_docs_fixes' into 'master'
Minor docs fixes See merge request OpenMW/openmw!1697
This commit is contained in:
		
						commit
						9ca0c7144c
					
				
					 11 changed files with 160 additions and 159 deletions
				
			
		| 
						 | 
				
			
			@ -150,7 +150,7 @@ The order of lines determines the script load order (i.e. script priorities).
 | 
			
		|||
 | 
			
		||||
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;
 | 
			
		||||
- ``PLAYER`` - an auto started player script;
 | 
			
		||||
- ``ACTIVATOR`` - a local script that will be automatically attached to any activator;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ Every widget is defined by a layout, which is a Lua table with the following fie
 | 
			
		|||
 | 
			
		||||
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.
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  -- 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 })
 | 
			
		||||
 | 
			
		||||
*clock.omwscripts*
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -172,7 +172,8 @@ end
 | 
			
		|||
 | 
			
		||||
return {
 | 
			
		||||
    interfaceName = 'Camera',
 | 
			
		||||
    --- @module Camera
 | 
			
		||||
    ---
 | 
			
		||||
    -- @module Camera
 | 
			
		||||
    -- @usage require('openmw.interfaces').Camera
 | 
			
		||||
    interface = {
 | 
			
		||||
        --- Interface version
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.async` contains timers and coroutine utils. All functions require
 | 
			
		||||
-- the package itself as a first argument.
 | 
			
		||||
-- @module async
 | 
			
		||||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Register a function as a timer callback.
 | 
			
		||||
-- @function [parent=#async] registerTimerCallback
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
-- @param #function func
 | 
			
		||||
-- @return #TimerCallback
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Calls callback(arg) in `delay` simulation seconds.
 | 
			
		||||
-- Callback must be registered in advance.
 | 
			
		||||
-- @function [parent=#async] newSimulationTimer
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
-- @param #TimerCallback callback A callback returned by `registerTimerCallback`
 | 
			
		||||
-- @param arg An argument for `callback`; can be `nil`.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Calls callback(arg) in `delay` game seconds.
 | 
			
		||||
-- Callback must be registered in advance.
 | 
			
		||||
-- @function [parent=#async] newGameTimer
 | 
			
		||||
| 
						 | 
				
			
			@ -32,7 +32,7 @@
 | 
			
		|||
-- @param #TimerCallback callback A callback returned by `registerTimerCallback`
 | 
			
		||||
-- @param arg An argument for `callback`; can be `nil`.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Calls `func()` in `delay` simulation seconds.
 | 
			
		||||
-- The timer will be lost if the game is saved and loaded.
 | 
			
		||||
-- @function [parent=#async] newUnsavableSimulationTimer
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +40,7 @@
 | 
			
		|||
-- @param #number delay
 | 
			
		||||
-- @param #function func
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Calls `func()` in `delay` game seconds.
 | 
			
		||||
-- The timer will be lost if the game is saved and loaded.
 | 
			
		||||
-- @function [parent=#async] newUnsavableGameTimer
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +48,7 @@
 | 
			
		|||
-- @param #number delay
 | 
			
		||||
-- @param #function func
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Wraps Lua function with `Callback` object that can be used in async API calls.
 | 
			
		||||
-- @function [parent=#async] callback
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +1,11 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.camera` controls camera.
 | 
			
		||||
-- Can be used only by player scripts.
 | 
			
		||||
-- @module camera
 | 
			
		||||
-- @usage local camera = require('openmw.camera')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @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 FirstPerson First person mode.
 | 
			
		||||
| 
						 | 
				
			
			@ -13,126 +13,126 @@
 | 
			
		|||
-- @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.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Camera modes.
 | 
			
		||||
-- @field [parent=#camera] #MODE MODE
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Return the current @{openmw.camera#MODE}.
 | 
			
		||||
-- @function [parent=#camera] getMode
 | 
			
		||||
-- @return #MODE
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Return the mode the camera will switch to after the end of the current animation. Can be nil.
 | 
			
		||||
-- @function [parent=#camera] getQueuedMode
 | 
			
		||||
-- @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`).
 | 
			
		||||
-- @function [parent=#camera] setMode
 | 
			
		||||
-- @param #MODE mode
 | 
			
		||||
-- @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.
 | 
			
		||||
-- @function [parent=#camera] allowCharacterDeferredRotation
 | 
			
		||||
-- @param #boolean boolValue
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Show/hide crosshair.
 | 
			
		||||
-- @function [parent=#camera] showCrosshair
 | 
			
		||||
-- @param #boolean boolValue
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Current position of the tracked object (the characters head if there is no animation).
 | 
			
		||||
-- @function [parent=#camera] getTrackedPosition
 | 
			
		||||
-- @return openmw.util#Vector3
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Current position of the camera.
 | 
			
		||||
-- @function [parent=#camera] getPosition
 | 
			
		||||
-- @return openmw.util#Vector3
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Camera pitch angle (radians) without taking extraPitch into account.
 | 
			
		||||
-- Full pitch is `getPitch()+getExtraPitch()`.
 | 
			
		||||
-- @function [parent=#camera] getPitch
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Force the pitch angle to the given value (radians); player input on this axis is ignored in this frame.
 | 
			
		||||
-- @function [parent=#camera] setPitch
 | 
			
		||||
-- @param #number value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Camera yaw angle (radians) without taking extraYaw into account.
 | 
			
		||||
-- Full yaw is `getYaw()+getExtraYaw()`.
 | 
			
		||||
-- @function [parent=#camera] getYaw
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Force the yaw angle to the given value (radians); player input on this axis is ignored in this frame.
 | 
			
		||||
-- @function [parent=#camera] setYaw
 | 
			
		||||
-- @param #number value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Get camera roll angle (radians).
 | 
			
		||||
-- @function [parent=#camera] getRoll
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set camera roll angle (radians).
 | 
			
		||||
-- @function [parent=#camera] setRoll
 | 
			
		||||
-- @param #number value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Additional summand for the pitch angle that is not affected by player input.
 | 
			
		||||
-- Full pitch is `getPitch()+getExtraPitch()`.
 | 
			
		||||
-- @function [parent=#camera] getExtraPitch
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Additional summand for the pitch angle; useful for camera shaking effects.
 | 
			
		||||
-- Setting extra pitch doesn't block player input.
 | 
			
		||||
-- Full pitch is `getPitch()+getExtraPitch()`.
 | 
			
		||||
-- @function [parent=#camera] setExtraPitch
 | 
			
		||||
-- @param #number value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Additional summand for the yaw angle that is not affected by player input.
 | 
			
		||||
-- Full yaw is `getYaw()+getExtraYaw()`.
 | 
			
		||||
-- @function [parent=#camera] getExtraYaw
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Additional summand for the yaw angle; useful for camera shaking effects.
 | 
			
		||||
-- Setting extra pitch doesn't block player input.
 | 
			
		||||
-- Full yaw is `getYaw()+getExtraYaw()`.
 | 
			
		||||
-- @function [parent=#camera] setExtraYaw
 | 
			
		||||
-- @param #number value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set camera position; can be used only if camera is in Static mode.
 | 
			
		||||
-- @function [parent=#camera] setStaticPosition
 | 
			
		||||
-- @param openmw.util#Vector3 pos
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The offset between the characters head and the camera in first person mode (3d vector).
 | 
			
		||||
-- @function [parent=#camera] getFirstPersonOffset
 | 
			
		||||
-- @return openmw.util#Vector3
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set the offset between the characters head and the camera in first person mode (3d vector).
 | 
			
		||||
-- @function [parent=#camera] setFirstPersonOffset
 | 
			
		||||
-- @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.
 | 
			
		||||
-- See `setFocalPreferredOffset`.
 | 
			
		||||
-- @function [parent=#camera] getFocalPreferredOffset
 | 
			
		||||
-- @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.
 | 
			
		||||
-- 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.
 | 
			
		||||
| 
						 | 
				
			
			@ -140,29 +140,29 @@
 | 
			
		|||
-- @function [parent=#camera] setFocalPreferredOffset
 | 
			
		||||
-- @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.
 | 
			
		||||
-- @function [parent=#camera] getThirdPersonDistance
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set preferred distance between the camera and the character in third person mode.
 | 
			
		||||
-- @function [parent=#camera] setPreferredThirdPersonDistance
 | 
			
		||||
-- @param #number distance
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The current speed coefficient of focal point (the center of the screen in third person mode) smooth transition.
 | 
			
		||||
-- @function [parent=#camera] getFocalTransitionSpeed
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- 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.
 | 
			
		||||
-- @function [parent=#camera] setFocalTransitionSpeed
 | 
			
		||||
-- Set the speed coefficient 
 | 
			
		||||
-- @param #number speed
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Make instant the current transition of camera focal point and the current deferred rotation (see `allowCharacterDeferredRotation`).
 | 
			
		||||
-- @function [parent=#camera] instantTransition
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.core` defines functions and types that are available in both local
 | 
			
		||||
-- and global scripts.
 | 
			
		||||
-- @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.
 | 
			
		||||
-- @field [parent=#core] #number API_REVISION
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Terminates the game and quits to the OS. Should be used only for testing purposes.
 | 
			
		||||
-- @function [parent=#core] quit
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Send an event to global scripts.
 | 
			
		||||
-- @function [parent=#core] sendGlobalEvent
 | 
			
		||||
-- @param #string eventName
 | 
			
		||||
-- @param eventData
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Simulation time in seconds.
 | 
			
		||||
-- The number of simulation seconds passed in the game world since starting a new game.
 | 
			
		||||
-- @function [parent=#core] getSimulationTime
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The scale of simulation time relative to real time.
 | 
			
		||||
-- @function [parent=#core] getSimulationTimeScale
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Game time in seconds.
 | 
			
		||||
-- @function [parent=#core] getGameTime
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The scale of game time relative to simulation time.
 | 
			
		||||
-- @function [parent=#core] getGameTimeScale
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Whether the world is paused (onUpdate doesn't work when the world is paused).
 | 
			
		||||
-- @function [parent=#core] isWorldPaused
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Get a GMST setting from content files.
 | 
			
		||||
-- @function [parent=#core] getGMST
 | 
			
		||||
-- @param #string setting Setting name
 | 
			
		||||
-- @return #any
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Return i18n formatting function for the given context.
 | 
			
		||||
-- It is based on `i18n.lua` library.
 | 
			
		||||
-- Language files should be stored in VFS as `i18n/<ContextName>/<Lang>.lua`.
 | 
			
		||||
| 
						 | 
				
			
			@ -86,7 +86,7 @@
 | 
			
		|||
-- print( myMsg('Hello %{name}!', {name='World'}) )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type OBJECT_TYPE
 | 
			
		||||
-- @field #string Activator "Activator"
 | 
			
		||||
-- @field #string Armor "Armor"
 | 
			
		||||
| 
						 | 
				
			
			@ -107,12 +107,12 @@
 | 
			
		|||
-- @field #string Probe "Probe"
 | 
			
		||||
-- @field #string Repair "Repair"
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Possible `object.type` values.
 | 
			
		||||
-- @field [parent=#core] #OBJECT_TYPE OBJECT_TYPE
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type EQUIPMENT_SLOT
 | 
			
		||||
-- @field #number Helmet
 | 
			
		||||
-- @field #number Cuirass
 | 
			
		||||
| 
						 | 
				
			
			@ -134,12 +134,12 @@
 | 
			
		|||
-- @field #number CarriedLeft
 | 
			
		||||
-- @field #number Ammunition
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Available equipment slots. Used in `object:getEquipment` and `object:setEquipment`.
 | 
			
		||||
-- @field [parent=#core] #EQUIPMENT_SLOT EQUIPMENT_SLOT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Any object that exists in the game world and has a specific location.
 | 
			
		||||
-- Player, actors, items, and statics are game objects.
 | 
			
		||||
-- @type GameObject
 | 
			
		||||
| 
						 | 
				
			
			@ -155,7 +155,7 @@
 | 
			
		|||
-- @field openmw.util#Vector3 destRotation Destination rotation (only if a teleport door).
 | 
			
		||||
-- @field #string destCell Destination cell (only if a teleport door).
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is the object still exists/available.
 | 
			
		||||
-- Returns true if the object exists and loaded, and false otherwise. If false, then every
 | 
			
		||||
-- access to the object will raise an error.
 | 
			
		||||
| 
						 | 
				
			
			@ -163,7 +163,7 @@
 | 
			
		|||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Returns true if the object is an actor and is able to move. For dead, paralized,
 | 
			
		||||
-- or knocked down actors in returns false.
 | 
			
		||||
-- access to the object will raise an error.
 | 
			
		||||
| 
						 | 
				
			
			@ -171,56 +171,56 @@
 | 
			
		|||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Speed of running. Returns 0 if not an actor, but for dead actors it still returns a positive value.
 | 
			
		||||
-- @function [parent=#GameObject] getRunSpeed
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Speed of walking. Returns 0 if not an actor, but for dead actors it still returns a positive value.
 | 
			
		||||
-- @function [parent=#GameObject] getWalkSpeed
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Current speed. Can be called only from a local script.
 | 
			
		||||
-- @function [parent=#GameObject] getCurrentSpeed
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is the actor standing on ground. Can be called only from a local script.
 | 
			
		||||
-- @function [parent=#GameObject] isOnGround
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is the actor in water. Can be called only from a local script.
 | 
			
		||||
-- @function [parent=#GameObject] isSwimming
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is the actor in weapon stance. Can be called only from a local script.
 | 
			
		||||
-- @function [parent=#GameObject] isInWeaponStance
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is the actor in magic stance. Can be called only from a local script.
 | 
			
		||||
-- @function [parent=#GameObject] isInMagicStance
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Send local event to the object.
 | 
			
		||||
-- @function [parent=#GameObject] sendEvent
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param #string eventName
 | 
			
		||||
-- @param eventData
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Activate the object.
 | 
			
		||||
-- @function [parent=#GameObject] activateBy
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			@ -228,14 +228,14 @@
 | 
			
		|||
-- @usage local self = require('openmw.self')
 | 
			
		||||
-- object:activateBy(self)
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Returns `true` if the item is equipped on the object.
 | 
			
		||||
-- @function [parent=#GameObject] isEquipped
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param #GameObject item
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Get equipment.
 | 
			
		||||
-- Returns a table `slot` -> `GameObject` of currently equipped items.
 | 
			
		||||
-- See @{openmw.core#EQUIPMENT_SLOT}. Returns empty table if the object doesn't have
 | 
			
		||||
| 
						 | 
				
			
			@ -244,7 +244,7 @@
 | 
			
		|||
-- @param self
 | 
			
		||||
-- @return #map<#number,#GameObject>
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set equipment.
 | 
			
		||||
-- 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
 | 
			
		||||
| 
						 | 
				
			
			@ -254,7 +254,7 @@
 | 
			
		|||
-- @param self
 | 
			
		||||
-- @param equipment
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Add new local script to the object.
 | 
			
		||||
-- Can be called only from a global script. Script should be specified in a content
 | 
			
		||||
-- file (omwgame/omwaddon/omwscripts) with a CUSTOM flag.
 | 
			
		||||
| 
						 | 
				
			
			@ -262,7 +262,7 @@
 | 
			
		|||
-- @param self
 | 
			
		||||
-- @param #string scriptPath Path to the script in OpenMW virtual filesystem.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Whether a script with given path is attached to this object.
 | 
			
		||||
-- Can be called only from a global script.
 | 
			
		||||
-- @function [parent=#GameObject] hasScript
 | 
			
		||||
| 
						 | 
				
			
			@ -270,14 +270,14 @@
 | 
			
		|||
-- @param #string scriptPath Path to the script in OpenMW virtual filesystem.
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Removes script that was attached by `addScript`
 | 
			
		||||
-- Can be called only from a global script.
 | 
			
		||||
-- @function [parent=#GameObject] removeScript
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param #string scriptPath Path to the script in OpenMW virtual filesystem.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Moves object to given cell and position.
 | 
			
		||||
-- The effect is not immediate: the position will be updated only in the next
 | 
			
		||||
-- 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.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- List of GameObjects. Implements [iterables#List](iterables.html#List) of #GameObject
 | 
			
		||||
-- @type ObjectList
 | 
			
		||||
-- @list <#GameObject>
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Filter list with a Query.
 | 
			
		||||
-- @function [parent=#ObjectList] select
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			@ -301,7 +301,7 @@
 | 
			
		|||
-- @return #ObjectList
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- A cell of the game world.
 | 
			
		||||
-- @type Cell
 | 
			
		||||
-- @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 #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.
 | 
			
		||||
-- @function [parent=#Cell] isInSameSpace
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			@ -324,7 +324,7 @@
 | 
			
		|||
--     -- the distance can't be calculated because the coordinates are in different spaces
 | 
			
		||||
-- end
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Select objects from the cell with a Query (only in global scripts).
 | 
			
		||||
-- Returns an empty list if the cell is not loaded.
 | 
			
		||||
-- @function [parent=#Cell] selectObjects
 | 
			
		||||
| 
						 | 
				
			
			@ -333,18 +333,18 @@
 | 
			
		|||
-- @return #ObjectList
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Inventory of a player/NPC or a content of a container.
 | 
			
		||||
-- @type Inventory
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The number of items with given recordId.
 | 
			
		||||
-- @function [parent=#Inventory] countOf
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param #string recordId
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Get all items of given type from the inventory.
 | 
			
		||||
-- @function [parent=#Inventory] getAll
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,95 +1,95 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.input` can be used only in scripts attached to a player.
 | 
			
		||||
-- @module input
 | 
			
		||||
-- @usage local input = require('openmw.input')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is player idle.
 | 
			
		||||
-- @function [parent=#input] isIdle
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is a specific control currently pressed.
 | 
			
		||||
-- Input bindings can be changed ingame using Options/Controls menu.
 | 
			
		||||
-- @function [parent=#input] isActionPressed
 | 
			
		||||
-- @param #number actionId One of @{openmw.input#ACTION}
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is a keyboard button currently pressed.
 | 
			
		||||
-- @function [parent=#input] isKeyPressed
 | 
			
		||||
-- @param #number keyCode Key code (see @{openmw.input#KEY})
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is a controller button currently pressed.
 | 
			
		||||
-- @function [parent=#input] isControllerButtonPressed
 | 
			
		||||
-- @param #number buttonId Button index (see @{openmw.input#CONTROLLER_BUTTON})
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is `Shift` key pressed.
 | 
			
		||||
-- @function [parent=#input] isShiftPressed
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is `Ctrl` key pressed.
 | 
			
		||||
-- @function [parent=#input] isCtrlPressed
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is `Alt` key pressed.
 | 
			
		||||
-- @function [parent=#input] isAltPressed
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is `Super`/`Win` key pressed.
 | 
			
		||||
-- @function [parent=#input] isSuperPressed
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Is a mouse button currently pressed.
 | 
			
		||||
-- @function [parent=#input] isMouseButtonPressed
 | 
			
		||||
-- @param #number buttonId Button index (1 - left, 2 - middle, 3 - right, 4 - X1, 5 - X2)
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Horizontal mouse movement during the last frame.
 | 
			
		||||
-- @function [parent=#input] getMouseMoveX
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Vertical mouse movement during the last frame.
 | 
			
		||||
-- @function [parent=#input] getMouseMoveY
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Get value of an axis of a game controller.
 | 
			
		||||
-- @function [parent=#input] getAxisValue
 | 
			
		||||
-- @param #number axisId Index of a controller axis, one of @{openmw.input#CONTROLLER_AXIS}.
 | 
			
		||||
-- @return #number Value in range [-1, 1].
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Get state of a control switch. I.e. is player able to move/fight/jump/etc.
 | 
			
		||||
-- @function [parent=#input] getControlSwitch
 | 
			
		||||
-- @param #string key Control type (see @{openmw.input#CONTROL_SWITCH})
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set state of a control switch. I.e. forbid or allow player to move/fight/jump/etc.
 | 
			
		||||
-- @function [parent=#input] setControlSwitch
 | 
			
		||||
-- @param #string key Control type (see @{openmw.input#CONTROL_SWITCH})
 | 
			
		||||
-- @param #boolean value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Returns a human readable name for the given key code
 | 
			
		||||
-- @function [parent=#input] getKeyName
 | 
			
		||||
-- @param #number code A key code (see @{openmw.input#KEY})
 | 
			
		||||
-- @return #string
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type CONTROL_SWITCH
 | 
			
		||||
-- @field [parent=#CONTROL_SWITCH] #string Controls Ability to move
 | 
			
		||||
-- @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 VanityMode Vanity view if player doesn't touch controls for a long time
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Values that can be used with getControlSwitch/setControlSwitch.
 | 
			
		||||
-- @field [parent=#input] #CONTROL_SWITCH CONTROL_SWITCH
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type ACTION
 | 
			
		||||
-- @field [parent=#ACTION] #number GameMenu
 | 
			
		||||
-- @field [parent=#ACTION] #number Screenshot
 | 
			
		||||
| 
						 | 
				
			
			@ -150,11 +150,11 @@
 | 
			
		|||
-- @field [parent=#ACTION] #number ZoomIn
 | 
			
		||||
-- @field [parent=#ACTION] #number ZoomOut
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Values that can be used with isActionPressed.
 | 
			
		||||
-- @field [parent=#input] #ACTION ACTION
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type CONTROLLER_BUTTON
 | 
			
		||||
-- @field [parent=#CONTROLLER_BUTTON] #number A
 | 
			
		||||
-- @field [parent=#CONTROLLER_BUTTON] #number B
 | 
			
		||||
| 
						 | 
				
			
			@ -172,11 +172,11 @@
 | 
			
		|||
-- @field [parent=#CONTROLLER_BUTTON] #number DPadLeft
 | 
			
		||||
-- @field [parent=#CONTROLLER_BUTTON] #number DPadRight
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Values that can be passed to onControllerButtonPress/onControllerButtonRelease engine handlers.
 | 
			
		||||
-- @field [parent=#input] #CONTROLLER_BUTTON CONTROLLER_BUTTON
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Ids of game controller axises. Used as an argument in getAxisValue.
 | 
			
		||||
-- @type CONTROLLER_AXIS
 | 
			
		||||
-- @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 MoveLeftRight Side movement (LeftX by default, can be mapped to another axis in Options/Controls menu)
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Values that can be used with getAxisValue.
 | 
			
		||||
-- @field [parent=#input] #CONTROLLER_AXIS CONTROLLER_AXIS
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type KEY
 | 
			
		||||
-- @field #number _0
 | 
			
		||||
-- @field #number _1
 | 
			
		||||
| 
						 | 
				
			
			@ -299,11 +299,11 @@
 | 
			
		|||
-- @field #number Space
 | 
			
		||||
-- @field #number Tab
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Key codes.
 | 
			
		||||
-- @field [parent=#input] #KEY KEY
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The argument of `onKeyPress`/`onKeyRelease` engine handlers.
 | 
			
		||||
-- @type KeyboardEvent
 | 
			
		||||
-- @field [parent=#KeyboardEvent] #string symbol The pressed symbol (1-symbol string if can be represented or an empty string otherwise).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.nearby` provides read-only access to the nearest area of the game world.
 | 
			
		||||
-- Can be used only from local scripts.
 | 
			
		||||
-- @module nearby
 | 
			
		||||
| 
						 | 
				
			
			@ -6,33 +6,33 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- List of nearby activators.
 | 
			
		||||
-- @field [parent=#nearby] openmw.core#ObjectList activators
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- List of nearby actors.
 | 
			
		||||
-- @field [parent=#nearby] openmw.core#ObjectList actors
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- List of nearby containers.
 | 
			
		||||
-- @field [parent=#nearby] openmw.core#ObjectList containers
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- List of nearby doors.
 | 
			
		||||
-- @field [parent=#nearby] openmw.core#ObjectList doors
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Everything that can be picked up in the nearby.
 | 
			
		||||
-- @field [parent=#nearby] openmw.core#ObjectList items
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Evaluates a Query.
 | 
			
		||||
-- @function [parent=#nearby] selectObjects
 | 
			
		||||
-- @param openmw.query#Query query
 | 
			
		||||
-- @return openmw.core#ObjectList
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type COLLISION_TYPE
 | 
			
		||||
-- @field [parent=#COLLISION_TYPE] #number World
 | 
			
		||||
-- @field [parent=#COLLISION_TYPE] #number Door
 | 
			
		||||
| 
						 | 
				
			
			@ -42,12 +42,12 @@
 | 
			
		|||
-- @field [parent=#COLLISION_TYPE] #number Water
 | 
			
		||||
-- @field [parent=#COLLISION_TYPE] #number Default Used by deafult: World+Door+Actor+HeightMap
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Collision types that are used in `castRay`.
 | 
			
		||||
-- Several types can be combined with '+'.
 | 
			
		||||
-- @field [parent=#nearby] #COLLISION_TYPE COLLISION_TYPE
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Result of raycasing
 | 
			
		||||
-- @type RayCastingResult
 | 
			
		||||
-- @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.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.
 | 
			
		||||
-- @function [parent=#nearby] castRay
 | 
			
		||||
-- @param openmw.util#Vector3 from Start point of the ray.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,22 +1,22 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.query` constructs queries that can be used in `world.selectObjects` and `nearby.selectObjects`.
 | 
			
		||||
-- @module query
 | 
			
		||||
-- @usage local query = require('openmw.query')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Query. A Query itself can no return objects. It only holds search conditions.
 | 
			
		||||
-- @type Query
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Add condition.
 | 
			
		||||
-- @function [parent=#Query] where
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param condition
 | 
			
		||||
-- @return #Query
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Limit result size.
 | 
			
		||||
-- @function [parent=#Query] limit
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			@ -24,91 +24,91 @@
 | 
			
		|||
-- @return #Query
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- A field that can be used in a condition
 | 
			
		||||
-- @type Field
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Equal
 | 
			
		||||
-- @function [parent=#Field] eq
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Not equal
 | 
			
		||||
-- @function [parent=#Field] neq
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Lesser
 | 
			
		||||
-- @function [parent=#Field] lt
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Lesser or equal
 | 
			
		||||
-- @function [parent=#Field] lte
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Greater
 | 
			
		||||
-- @function [parent=#Field] gt
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param value
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Greater or equal
 | 
			
		||||
-- @function [parent=#Field] gte
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @param value
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type OBJECT
 | 
			
		||||
-- @field [parent=#OBJECT] #Field type
 | 
			
		||||
-- @field [parent=#OBJECT] #Field recordId
 | 
			
		||||
-- @field [parent=#OBJECT] #Field count
 | 
			
		||||
-- @field [parent=#OBJECT] #CellFields cell
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Fields that can be used with any object.
 | 
			
		||||
-- @field [parent=#query] #OBJECT OBJECT
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type DOOR
 | 
			
		||||
-- @field [parent=#DOOR] #Field isTeleport
 | 
			
		||||
-- @field [parent=#DOOR] #CellFields destCell
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Fields that can be used only when search for doors.
 | 
			
		||||
-- @field [parent=#query] #DOOR DOOR
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- @type CellFields
 | 
			
		||||
-- @field [parent=#CellFields] #Field name
 | 
			
		||||
-- @field [parent=#CellFields] #Field region
 | 
			
		||||
-- @field [parent=#CellFields] #Field isExterior
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Base Query to select activators.
 | 
			
		||||
-- @field [parent=#query] #Query activators
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Base Query to select actors.
 | 
			
		||||
-- @field [parent=#query] #Query actors
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Base Query to select containers.
 | 
			
		||||
-- @field [parent=#query] #Query containers
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Base Query to select doors.
 | 
			
		||||
-- @field [parent=#query] #Query doors
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Base Query to select items.
 | 
			
		||||
-- @field [parent=#query] #Query items
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `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`.
 | 
			
		||||
-- @module self
 | 
			
		||||
| 
						 | 
				
			
			@ -10,22 +10,22 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- 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.
 | 
			
		||||
-- @function [parent=#self] isActive
 | 
			
		||||
-- @param self
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The object the script is attached to (readonly)
 | 
			
		||||
-- @field [parent=#self] openmw.core#GameObject object
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Movement controls (only for actors)
 | 
			
		||||
-- @field [parent=#self] #ActorControls controls
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Allows to view and/or modify controls of an actor. All fields are mutable.
 | 
			
		||||
-- @type ActorControls
 | 
			
		||||
-- @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] #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).
 | 
			
		||||
-- @function [parent=#self] enableAI
 | 
			
		||||
-- @param self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- `openmw.world` is an interface to the game world for global scripts.
 | 
			
		||||
-- Can not be used from local scripts.
 | 
			
		||||
-- @module world
 | 
			
		||||
| 
						 | 
				
			
			@ -6,56 +6,56 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- List of currently active actors.
 | 
			
		||||
-- @field [parent=#world] openmw.core#ObjectList activeActors
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Evaluates a Query.
 | 
			
		||||
-- @function [parent=#world] selectObjects
 | 
			
		||||
-- @param openmw.query#Query query
 | 
			
		||||
-- @return openmw.core#ObjectList
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Loads a named cell
 | 
			
		||||
-- @function [parent=#world] getCellByName
 | 
			
		||||
-- @param #string cellName
 | 
			
		||||
-- @return openmw.core#Cell
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Loads an exterior cell by grid indices
 | 
			
		||||
-- @function [parent=#world] getExteriorCell
 | 
			
		||||
-- @param #number gridX
 | 
			
		||||
-- @param #number gridY
 | 
			
		||||
-- @return openmw.core#Cell
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Simulation time in seconds.
 | 
			
		||||
-- The number of simulation seconds passed in the game world since starting a new game.
 | 
			
		||||
-- @function [parent=#core] getSimulationTime
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The scale of simulation time relative to real time.
 | 
			
		||||
-- @function [parent=#core] getSimulationTimeScale
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Game time in seconds.
 | 
			
		||||
-- @function [parent=#core] getGameTime
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- The scale of game time relative to simulation time.
 | 
			
		||||
-- @function [parent=#core] getGameTimeScale
 | 
			
		||||
-- @return #number
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Set the ratio of game time speed to simulation time speed.
 | 
			
		||||
-- @function [parent=#world] setGameTimeScale
 | 
			
		||||
-- @param #number ratio
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------------------
 | 
			
		||||
---
 | 
			
		||||
-- Whether the world is paused (onUpdate doesn't work when the world is paused).
 | 
			
		||||
-- @function [parent=#world] isWorldPaused
 | 
			
		||||
-- @return #boolean
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue