mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-04-28 12:27:59 +03:00
Updated documentation
This commit is contained in:
parent
01723fd67a
commit
8eb2bf6c14
3 changed files with 1944 additions and 230 deletions
2164
example/.vscode/api_definitions.lua
vendored
2164
example/.vscode/api_definitions.lua
vendored
File diff suppressed because it is too large
Load diff
|
@ -6,7 +6,6 @@ function OnPlayUpdate(ev)
|
|||
local reticlePos = Game.D_display_801613E0(0)
|
||||
local actorId = math.random(176, 291)
|
||||
local actor = Game_SpawnActor(actorId);
|
||||
|
||||
if (actor ~= nil) then
|
||||
actor.obj.pos.x = reticlePos.x * 1.7
|
||||
actor.obj.pos.y = 200.0
|
||||
|
|
|
@ -286,12 +286,18 @@ def parse_externs(header, namespace=None):
|
|||
var_name = line.split(' ')[2].split(';')[0]
|
||||
print(f'---@return {sanitize_type(var_type)}')
|
||||
print(f'function Game.{var_name}() end')
|
||||
print(f'---@param value {sanitize_type(var_type)}')
|
||||
print(f'function Game.{var_name}(value) end')
|
||||
elif '[' in line and not '(' in line:
|
||||
dimension_len = len(line.split('[')) - 1
|
||||
var_name = line.split('[')[0].split(' ')[-1]
|
||||
var_type = line.split(' ')[1]
|
||||
print(f'---@param index number')
|
||||
print(f'---@return {sanitize_type(var_type)}[{dimension_len}]')
|
||||
print(f'function Game.{var_name}() end')
|
||||
print(f'function Game.{var_name}(index) end')
|
||||
print(f'---@param index number')
|
||||
print(f'---@param value {sanitize_type(var_type)}')
|
||||
print(f'function Game.{var_name}(index, value) end')
|
||||
elif '(' in line:
|
||||
if 'ALIGN_ASSET' in line:
|
||||
var_name = line.split('[')[0].split(' ')[-1]
|
||||
|
@ -352,6 +358,7 @@ if __name__ == "__main__":
|
|||
print("Game = {}")
|
||||
print("Assets = {}")
|
||||
print("UIWidgets = {}")
|
||||
print("Events = {}")
|
||||
header = """
|
||||
---@alias ListenerID number
|
||||
---@class Asset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue