CSO Studio Lua API
한국어 · English · 繁體中文(台灣)
한국어
Counter-Strike Online 스튜디오 Lua API를 위한 비공식 Lua Language Server (LuaLS) 정의를 제공하는 VS Code 확장입니다. Game, UI, Common API의 자동완성과 호버 설명을 사용할 수 있습니다. API 설명 주석은 주로 한국어로 작성되어 있습니다.
시작하기
- VS Code에 이 확장과 Lua Language Server를 설치합니다.
- Lua 파일을 열면 이 확장의
library 폴더가 LuaLS의 Lua.workspace.library 설정에 자동으로 등록됩니다.
정의는 기본적으로 활성화됩니다. 명령 팔레트에서 다음 명령으로 켜거나 끌 수 있으며, 선택한 상태는 VS Code를 다시 시작해도 유지됩니다.
CSO Studio Lua API: Enable Definitions
CSO Studio Lua API: Disable Definitions
Lua.workspace.library 등록은 VS Code의 전역 설정에 적용됩니다.
__Doc 참고표
library/__Doc.lua의 __Doc 테이블은 ID와 값 확인을 위한 참고 자료입니다. 게임 스크립트에서는 __Doc 항목을 직접 참조하지 말고 해당 정수를 API에 전달하세요.
-- __Doc.MonsterId.NormalZombie1 = 200
Game.Monster:Create(200, { x = 1, y = 1, z = 1 })
Lua 파일에서 다음 이름을 입력하면 해당 참고표를 삽입하는 자동완성을 사용할 수 있습니다.
__DocWeapon → __Doc.WeaponId
__DocMonster → __Doc.MonsterId
__DocRenderFX → __Doc.RENDERFX
English
This VS Code extension provides unofficial Lua Language Server (LuaLS) definitions for the Counter-Strike Online Studio Lua API. It adds completions and hover information for the Game, UI, and Common APIs. Most API documentation comments are in Korean.
Getting started
- Install this extension and Lua Language Server in VS Code.
- Open a Lua file. The extension automatically adds its
library folder to the LuaLS Lua.workspace.library setting.
Definitions are enabled by default. Use these Command Palette commands to change the setting; your choice persists across VS Code sessions.
CSO Studio Lua API: Enable Definitions
CSO Studio Lua API: Disable Definitions
The Lua.workspace.library entry is added to your global VS Code settings.
__Doc reference tables
The __Doc tables in library/__Doc.lua are for looking up IDs and values. In game scripts, pass the corresponding integer to the API instead of referencing a __Doc entry directly.
-- __Doc.MonsterId.NormalZombie1 = 200
Game.Monster:Create(200, { x = 1, y = 1, z = 1 })
Type one of these names in a Lua file to insert its reference table through completion:
__DocWeapon → __Doc.WeaponId
__DocMonster → __Doc.MonsterId
__DocRenderFX → __Doc.RENDERFX
繁體中文(台灣)
這是提供 Counter-Strike Online 工作室 Lua API 非官方 Lua Language Server(LuaLS) 定義的 VS Code 擴充套件,可為 Game、UI、Common API 提供程式碼補全與滑鼠游標提示。API 文件註解主要以韓文撰寫。
開始使用
- 在 VS Code 安裝本擴充套件及 Lua Language Server。
- 開啟 Lua 檔案後,本擴充套件會自動將其
library 資料夾加入 LuaLS 的 Lua.workspace.library 設定。
API 定義預設為啟用。可透過命令選擇區中的以下命令切換;設定會在重新啟動 VS Code 後保留。
CSO Studio Lua API: Enable Definitions
CSO Studio Lua API: Disable Definitions
Lua.workspace.library 項目會加入 VS Code 的全域設定。
__Doc 參照表
library/__Doc.lua 中的 __Doc 表格僅供查詢 ID 與數值。在遊戲腳本中,請將對應的整數傳給 API,而不要直接參照 __Doc 項目。
-- __Doc.MonsterId.NormalZombie1 = 200
Game.Monster:Create(200, { x = 1, y = 1, z = 1 })
在 Lua 檔案中輸入以下名稱,即可透過程式碼補全插入對應的參照表:
__DocWeapon → __Doc.WeaponId
__DocMonster → __Doc.MonsterId
__DocRenderFX → __Doc.RENDERFX