CorsixTH Lua Documentation

Litter Class

Declared on: line 78 of Lua/objects/litter.lua.
Inheritance: Litter ยป Entity

Method Index

Member Index

(*) only used in superclass methods
function Litter:Litter(hospital, object_type, x, y)

Parameters:

NameTypeDescription
hospital ? ?
object_type ? ?
x ? ?
y ? ?

Declared on: line 83 of Lua/objects/litter.lua.

function Litter:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Entity:afterLoad.
Declared on: line 206 of Lua/objects/litter.lua.

function Litter.getRankForType(litter_type)

Accepts a type name ("puke", "soda_can", ...) or one of the numeric

indices 1-4 used to pick a random piece of trash.

Parameters:

NameTypeDescription
litter_type string or or or int The litter type to look up.

Declared on: line 114 of Lua/objects/litter.lua.
Note: Is a function rather than a method.

function Litter:getWalkableTiles()

Litter is an Entity and not an Object so it does not inherit this method This is an (effective) hack, see issue 918 --cgj

Declared on: line 100 of Lua/objects/litter.lua.

function Litter:remove()

Remove the litter from the world.

Declared on: line 162 of Lua/objects/litter.lua.

function Litter.resolveTileRank(objects_in_tile, litter_type)

litter already on it.

created at all (the first return is then nil).

Parameters:

NameTypeDescription
objects_in_tile array or or or nil Objects currently on the tile
litter_type string or or or int Type of the litter about to be created.

Declared on: line 126 of Lua/objects/litter.lua.
Note: Is a function rather than a method.

function Litter:setLitterType(anim_type, mirrorFlag)

Set the animation of the litter and register a cleaning task for it.

Parameters:

NameTypeDescription
anim_type ? ?
mirrorFlag ? ?

Declared on: line 147 of Lua/objects/litter.lua.

function Litter:setTile(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Overrides: Entity:setTile.
Declared on: line 93 of Lua/objects/litter.lua.