name
: A string that represents the name of the cell in a human-readable format. By convention, it uses titlecase.
author
: A string that represents the author. By convention, the author name should be recognizable as your own. For example, I use "Da BOXEN"
for mine.
id
: A string that gives an ID for the cell. By convention, it is all uppercase and separated with underscores. Do not change IDs in updates! It will break things! Also, avoid common names and duplicate names.
texture
: A string that represents the filename for the cell's default texture. The texture file is checked for in the same directory as the cell file.
updateIndex
: An integer that represents when the cell should be updated—lower indices go first. Generators use 1000
, clockwise rotators use 4000
, counterclockwise rotators 5000
, and movers 9000
. Do not use zero!
this
as the first argument, and only Push
returns anything.
Push
function Push(this, dir, bias)
--push logic here
end
In addition to the cell being pushed, Push
has two more arguments.
dir
: The direction that the cell is being pushed. This is distinct from this.direction
!
bias
: The bias of the push. A negative bias means pushing backwards in the default Push
function.