Lua API/System

Материал из CryWiki Russia

(Различия между версиями)
Перейти к: навигация, поиск
(Отмена правки 1893 участника Alex626 (обсуждение))
(Отмена правки 1892 участника Alex626 (обсуждение))
Строка 1: Строка 1:
-
=== Обзор  ===
+
=== Overview ===
-
Эти функции Lua находятся в таблице '''System'''. Например, функция '''Log''' может быть вызвана вот так:  
+
These Lua functions are in the '''System''' table. For example, the '''Log''' function would be invoked like this:
-
  System.Log("hello world!");
+
  System.Log("logging this message");
-
 
+
<br />
-
<br>  
+
<h3>Configuration</h3>
-
 
+
* [[Lua_API/System/IsEditor|IsEditor]]
-
=== Конфигурация ===
+
* [[Lua_API/System/IsMultiplayer|IsMultiplayer]]
-
 
+
* [[Lua_API/System/IsDevModeEnable|IsDevModeEnable]]
-
*[[Lua API/System/IsEditor|IsEditor]]  
+
* GetCPUQuality
-
*[[Lua API/System/IsMultiplayer|IsMultiplayer]]  
+
* GetGPUQuality
-
*[[Lua API/System/IsDevModeEnable|IsDevModeEnable]]  
+
* IsPS20Supported
-
*GetCPUQuality  
+
* LoadLocalizationXml
-
*GetGPUQuality  
+
* SaveConfiguration
-
*IsPS20Supported  
+
* [[Lua_API/System/Quit|Quit]]
-
*LoadLocalizationXml  
+
* [[Lua_API/System/QuitInNSeconds|QuitInNSeconds]]
-
*SaveConfiguration  
+
* SetBudget
-
*[[Lua API/System/Quit|Quit]]  
+
* [[Lua_API/System/ViewDistanceGet|ViewDistanceGet]]
-
*[[Lua API/System/QuitInNSeconds|QuitInNSeconds]]  
+
* [[Lua_API/System/ViewDistanceSet|ViewDistanceSet]]
-
*SetBudget  
+
* ApplyForceToEnvironment
-
*[[Lua API/System/ViewDistanceGet|ViewDistanceGet]]  
+
* GetOutdoorAmbientColor
-
*[[Lua API/System/ViewDistanceSet|ViewDistanceSet]]  
+
* ActivatePortal
-
*ApplyForceToEnvironment  
+
* IsPointIndoors
-
*GetOutdoorAmbientColor  
+
* CheckHeapValid
-
*ActivatePortal  
+
* GetConfigSpec
-
*IsPointIndoors  
+
* SetScissor
-
*CheckHeapValid  
+
* LoadFont
-
*GetConfigSpec  
+
<h3>File</h3>
-
*SetScissor  
+
* [[Lua_API/System/ScanDirectory|ScanDirectory]]
-
*LoadFont
+
<h3>Surface</h3>
-
 
+
* [[Lua_API/System/GetSurfaceTypeIdByName|GetSurfaceTypeIdByName]]
-
=== Файл ===
+
* [[Lua_API/System/GetSurfaceTypeNameById|GetSurfaceTypeNameById]]
-
 
+
<h3>Renderer</h3>
-
*[[Lua API/System/ScanDirectory|ScanDirectory]]
+
<h4>Screen</h4>
-
 
+
* ProjectToScreen
-
=== Поверхность ===
+
* EnumDisplayFormats
-
 
+
* EnumAAFormats
-
*[[Lua API/System/GetSurfaceTypeIdByName|GetSurfaceTypeIdByName]]  
+
* [[Lua_API/System/SetGammaDelta|SetGammaDelta]]
-
*[[Lua API/System/GetSurfaceTypeNameById|GetSurfaceTypeNameById]]
+
* [[Lua_API/System/SetSystemShaderRenderFlags|SetSystemShaderRenderFlags]]
-
 
+
* GetFrameID
-
=== Рендер ===
+
<h4>HDR</h4>
-
 
+
* GetHDRDynamicMultiplier
-
==== Экран ====
+
* [[Lua_API/System/SetHDRDynamicMultiplier|SetHDRDynamicMultiplier]]
-
 
+
* [[Lua_API/System/IsHDRSupported|IsHDRSupported]]
-
*ProjectToScreen  
+
<h4>2D Drawing</h4>
-
*EnumDisplayFormats  
+
* DrawLabelImage
-
*EnumAAFormats  
+
* DrawLabel
-
*[[Lua API/System/SetGammaDelta|SetGammaDelta]]  
+
* ScreenToTexture
-
*[[Lua API/System/SetSystemShaderRenderFlags|SetSystemShaderRenderFlags]]  
+
* DrawLine
-
*GetFrameID
+
* Draw2DLine
-
 
+
* DrawText
-
==== HDR ====
+
* DrawImage
-
 
+
* DrawImageColor
-
*GetHDRDynamicMultiplier  
+
* DrawImageColorCoords
-
*[[Lua API/System/SetHDRDynamicMultiplier|SetHDRDynamicMultiplier]]  
+
* DrawImageCoords
-
*[[Lua API/System/IsHDRSupported|IsHDRSupported]]
+
* DrawRectShader
-
 
+
* DrawTriStrip
-
==== Вывод 2D<br> ====
+
<h4>Screen Effects</h4>
-
 
+
* [[Lua_API/System/SetPostProcessFXParam|SetPostProcessFXParam]]
-
*DrawLabelImage  
+
* GetPostProcessFXParam
-
*DrawLabel  
+
* SetScreenFx
-
*ScreenToTexture  
+
* GetScreenFx
-
*DrawLine  
+
<h3>Time</h3>
-
*Draw2DLine  
+
* GetCurrTime
-
*DrawText  
+
* GetCurrAsyncTime
-
*DrawImage  
+
* GetFrameTime
-
*DrawImageColor  
+
* GetOSTime
-
*DrawImageColorCoords  
+
* GetLocalOSTime
-
*DrawImageCoords  
+
<h3>Debugging</h3>
-
*DrawRectShader  
+
* [[Lua_API/System/ShowDebugger|ShowDebugger]]
-
*DrawTriStrip
+
* [[Lua_API/System/Break|Break]]
-
 
+
<h3>Console</h3>
-
==== Эффекты экрана (Screen Effects)<br> ====
+
* [[Lua_API/System/SetCVar|SetCVar]]
-
 
+
* [[Lua_API/System/GetCVar|GetCVar]]
-
*[[Lua API/System/SetPostProcessFXParam|SetPostProcessFXParam]]  
+
* [[Lua_API/System/AddCCommand|AddCCommand]]
-
*GetPostProcessFXParam  
+
* [[Lua_API/System/ExecuteCommand|ExecuteCommand]]
-
*SetScreenFx  
+
* [[Lua_API/System/ShowConsole|ShowConsole]]
-
*GetScreenFx
+
* [[Lua_API/System/SetConsoleImage|SetConsoleImage]]
-
 
+
<h3>Log</h3>
-
=== Время ===
+
These logging functions are subject to the log verbosity level.
-
 
+
<br />
-
*GetCurrTime  
+
* [[Lua_API/System/LogToConsole|LogToConsole]]
-
*GetCurrAsyncTime  
+
* [[Lua_API/System/LogAlways|LogAlways]]
-
*GetFrameTime  
+
* [[Lua_API/System/Log|Log]]
-
*GetOSTime  
+
* [[Lua_API/System/Warning|Warning]]
-
*GetLocalOSTime
+
* Error
-
 
+
* [[Lua_API/System/ClearConsole|ClearConsole]]
-
=== Отладка ===
+
<h3>Statistics</h3>
-
 
+
* DumpMemoryCoverage
-
*[[Lua API/System/ShowDebugger|ShowDebugger]]  
+
* DumpMemStats
-
*[[Lua API/System/Break|Break]]
+
* DumpMMStats
-
 
+
* DumpWinHeaps
-
=== Консоль ===
+
* DebugStats
-
 
+
* GetSystemMem
-
*[[Lua API/System/SetCVar|SetCVar]]  
+
* GetVideoMem
-
*[[Lua API/System/GetCVar|GetCVar]]  
+
<h3>View</h3>
-
*[[Lua API/System/AddCCommand|AddCCommand]]  
+
* [[Lua_API/System/SetViewCameraFov|SetViewCameraFov]]
-
*[[Lua API/System/ExecuteCommand|ExecuteCommand]]  
+
* [[Lua_API/System/GetViewCameraFov|GetViewCameraFov]]
-
*[[Lua API/System/ShowConsole|ShowConsole]]  
+
* [[Lua_API/System/GetViewCameraPos|GetViewCameraPos]]
-
*[[Lua API/System/SetConsoleImage|SetConsoleImage]]
+
* [[Lua_API/System/GetViewCameraDir|GetViewCameraDir]]
-
 
+
* [[Lua_API/System/GetViewCameraAngles|GetViewCameraAngles]]
-
=== Логи ===
+
* [[Lua_API/System/IsPointVisible|IsPointVisible]]
-
 
+
<h3>Entity</h3>
-
These logging functions are subject to the log verbosity level. <br>  
+
* [[Lua_API/System/GetEntity|GetEntity]]
-
 
+
* [[Lua_API/System/GetEntityClass|GetEntityClass]]
-
*[[Lua API/System/LogToConsole|LogToConsole]]  
+
* [[Lua_API/System/GetEntities|GetEntities]]
-
*[[Lua API/System/LogAlways|LogAlways]]  
+
* [[Lua_API/System/GetEntitiesInSphere|GetEntitiesInSphere]]
-
*[[Lua API/System/Log|Log]]  
+
* [[Lua_API/System/GetEntitiesInSphereByClass|GetEntitiesInSphereByClass]]
-
*[[Lua API/System/Warning|Warning]]  
+
* GetPhysicalEntitiesInBox
-
*Error  
+
* GetPhysicalEntitiesInBoxByClass
-
*[[Lua API/System/ClearConsole|ClearConsole]]
+
* [[Lua_API/System/GetEntitiesByClass|GetEntitiesByClass]]
-
 
+
* [[Lua_API/System/GetNearestEntityByClass|GetNearestEntityByClass]]
-
=== Статистика ===
+
* [[Lua_API/System/GetEntityByName|GetEntityByName]]
-
 
+
* [[Lua_API/System/GetEntityIdByName|GetEntityIdByName]]
-
*DumpMemoryCoverage  
+
* [[Lua_API/System/RemoveEntity|RemoveEntity]]
-
*DumpMemStats  
+
* [[Lua_API/System/SpawnEntity|SpawnEntity]]
-
*DumpMMStats  
+
<h3>Environment</h3>
-
*DumpWinHeaps  
+
<h4>Terrain</h4>
-
*DebugStats  
+
* [[Lua_API/System/GetTerrainElevation|GetTerrainElevation]]
-
*GetSystemMem  
+
* [[Lua_API/System/IsValidMapPos|IsValidMapPos]]
-
*GetVideoMem
+
<h4>Sky</h4>
-
 
+
* [[Lua_API/System/SetSunColor|SetSunColor]]
-
=== Вид ===
+
* [[Lua_API/System/GetSunColor|GetSunColor]]
-
 
+
* [[Lua_API/System/SetSkyColor|SetSkyColor]]
-
*[[Lua API/System/SetViewCameraFov|SetViewCameraFov]]  
+
* GetSkyColor
-
*[[Lua API/System/GetViewCameraFov|GetViewCameraFov]]  
+
* [[Lua_API/System/SetSkyHighlight|SetSkyHighlight]]
-
*[[Lua API/System/GetViewCameraPos|GetViewCameraPos]]  
+
* [[Lua_API/System/GetSkyHighlight|GetSkyHighlight]]
-
*[[Lua API/System/GetViewCameraDir|GetViewCameraDir]]  
+
<h4>Fog</h4>
-
*[[Lua API/System/GetViewCameraAngles|GetViewCameraAngles]]  
+
* [[Lua_API/System/SetVolumetricFogModifiers|SetVolumetricFogModifiers]]
-
*[[Lua API/System/IsPointVisible|IsPointVisible]]
+
<h4>Wind</h4>
-
 
+
* [[Lua_API/System/SetWind|SetWind]]
-
=== Сущность ===
+
* [[Lua_API/System/GetWind|GetWind]]
-
 
+
<h4>Water</h4>
-
*[[Lua API/System/GetEntity|GetEntity]]  
+
* EnableOceanRendering
-
*[[Lua API/System/GetEntityClass|GetEntityClass]]  
+
<h3>Input</h3>
-
*[[Lua API/System/GetEntities|GetEntities]]  
+
* [[Lua_API/System/ClearKeyState|ClearKeyState]]
-
*[[Lua API/System/GetEntitiesInSphere|GetEntitiesInSphere]]  
+
-
*[[Lua API/System/GetEntitiesInSphereByClass|GetEntitiesInSphereByClass]]  
+
-
*GetPhysicalEntitiesInBox  
+
-
*GetPhysicalEntitiesInBoxByClass  
+
-
*[[Lua API/System/GetEntitiesByClass|GetEntitiesByClass]]  
+
-
*[[Lua API/System/GetNearestEntityByClass|GetNearestEntityByClass]]  
+
-
*[[Lua API/System/GetEntityByName|GetEntityByName]]  
+
-
*[[Lua API/System/GetEntityIdByName|GetEntityIdByName]]  
+
-
*[[Lua API/System/RemoveEntity|RemoveEntity]]  
+
-
*[[Lua API/System/SpawnEntity|SpawnEntity]]
+
-
 
+
-
=== Окружение ===
+
-
 
+
-
==== Ландшафт ====
+
-
 
+
-
*[[Lua API/System/GetTerrainElevation|GetTerrainElevation]]  
+
-
*[[Lua API/System/IsValidMapPos|IsValidMapPos]]
+
-
 
+
-
==== Небо ====
+
-
 
+
-
*[[Lua API/System/SetSunColor|SetSunColor]]  
+
-
*[[Lua API/System/GetSunColor|GetSunColor]]  
+
-
*[[Lua API/System/SetSkyColor|SetSkyColor]]  
+
-
*GetSkyColor  
+
-
*[[Lua API/System/SetSkyHighlight|SetSkyHighlight]]  
+
-
*[[Lua API/System/GetSkyHighlight|GetSkyHighlight]]
+
-
 
+
-
==== ТУман ====
+
-
 
+
-
*[[Lua API/System/SetVolumetricFogModifiers|SetVolumetricFogModifiers]]
+
-
 
+
-
==== Ветер ====
+
-
 
+
-
*[[Lua API/System/SetWind|SetWind]]  
+
-
*[[Lua API/System/GetWind|GetWind]]
+
-
 
+
-
==== Вода ====
+
-
 
+
-
*EnableOceanRendering
+
-
 
+
-
=== Input ===
+
-
 
+
-
*[[Lua API/System/ClearKeyState|ClearKeyState]]
+

Версия 16:14, 12 мая 2011

Содержание

Overview

These Lua functions are in the System table. For example, the Log function would be invoked like this:

System.Log("logging this message");


Configuration

File

Surface

Renderer

Screen

HDR

2D Drawing

  • DrawLabelImage
  • DrawLabel
  • ScreenToTexture
  • DrawLine
  • Draw2DLine
  • DrawText
  • DrawImage
  • DrawImageColor
  • DrawImageColorCoords
  • DrawImageCoords
  • DrawRectShader
  • DrawTriStrip

Screen Effects

Time

  • GetCurrTime
  • GetCurrAsyncTime
  • GetFrameTime
  • GetOSTime
  • GetLocalOSTime

Debugging

Console

Log

These logging functions are subject to the log verbosity level.

Statistics

  • DumpMemoryCoverage
  • DumpMemStats
  • DumpMMStats
  • DumpWinHeaps
  • DebugStats
  • GetSystemMem
  • GetVideoMem

View

Entity

Environment

Terrain

Sky

Fog

Wind

Water

  • EnableOceanRendering

Input