Skip to content

Commit

Permalink
documentation for math api
Browse files Browse the repository at this point in the history
  • Loading branch information
IonutParau committed Jul 22, 2023
1 parent 2f9da37 commit 26af433
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions extra/tpc_api_docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,16 @@ function TPC.Time.Travel() return end
---@field movable fun(cell: CellBinding, x: integer, y: integer, dir: integer, side: integer, force: integer, mt: MoveType):boolean
--- Whether the cell is meant to be in References
---@field isReference boolean
--- Code to be executed when a math cell writes a number to this cell
---@field mathWhenWritten fun(cell: CellBinding, x: integer, y: integer, dir: integer, amount: number)
--- Allows the cell to choose its own way of determening its count. If nil is returned, it returns the one stored in the properties.
---@field mathCustomCount fun(cell: CellBinding, x: integer, y: integer, dir: integer): number|nil
--- Decides if the cell's count property should be automatically modified by TPC, or if the cell should do it itself in mathWhenWritten. Can be used to create safeNumbers.
---@field mathAutoApplyCount fun(cell: CellBinding, cx: integer, cy: integer, dir: integer, amount: number, ox: integer, oy: integer): boolean
--- Decides if count can be modified.
---@field mathIsWritable fun(cell: CellBinding, x: integer, y: integer, dir: integer)
--- Decides if the count can be read from that direction.
---@field mathIsOutput fun(cell: CellBinding, x: integer, y: integer, dir: integer)
--- A list of properties for the property editor to allow the modification of.
---@field properties CellProperty[]

Expand Down

0 comments on commit 26af433

Please sign in to comment.