Updated documentation

This commit is contained in:
KiritoDv 2025-03-12 16:14:39 -06:00
parent 01723fd67a
commit 8eb2bf6c14
3 changed files with 1944 additions and 230 deletions

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -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