Litter Class
Method Index
- _tick() (inherited from Entity)
- afterLoad(old, new) (overrides Entity:afterLoad)
- anyLitter()
- clearDynamicInfo() (inherited from Entity)
- eraseObject() (inherited from Entity)
- getDrawingLayer() (overrides Entity:getDrawingLayer)
- getDynamicInfo() (inherited from Entity)
- getRank()
- getRankForType(litter_type)
- getRoom() (inherited from Entity)
- getTile() (inherited from Entity)
- getWalkableTiles()
- isCleanable()
- notifyNewObject(id) (inherited from Entity)
- notifyNewRoom(room) (inherited from Entity)
- onDestroy() (inherited from Entity)
- onPickUp() (inherited from Entity)
- playAfterLoadSound() (inherited from Entity)
- playEntitySounds(name_pattern, min_silence_lengths, max_silence_lengths, num_silences) (inherited from Entity)
- playSound(name, played_callback, played_callback_delay) (inherited from Entity)
- remove()
- resetAnimation() (inherited from Entity)
- resolveTileRank(objects_in_tile, litter_type)
- setAnimation(animation, flags) (inherited from Entity)
- setDynamicInfo(type, value) (inherited from Entity)
- setLayer(layer, id) (inherited from Entity)
- setLitterType(anim_type, mirrorFlag)
- setMood(mood_name, activate) (inherited from Entity)
- setMoodInfo(new_mood) (inherited from Entity)
- setPosition(x, y) (inherited from Entity)
- setSpeed(x, y) (inherited from Entity)
- setTile(x, y) (overrides Entity:setTile)
- setTilePositionSpeed(tx, ty, px, py, sx, sy) (inherited from Entity)
- setTimer(tick_count, f) (inherited from Entity)
- setWaitingForSoundEffectsToBeTurnedOn() (inherited from Entity)
- tick() (inherited from Entity)
- tickDay() (inherited from Entity)
- vomitInducing()
Member Index
- animation_flags (*)
- animation_idx
- dynamic_info (*)
- hospital
- layers (*)
- mood_info (*)
- mood_marker (*)
- num_animation_ticks (*)
- object_type
- permanent_flags (*)
- playing_sounds_in_random_sequence (*)
- random_sound_sequence_parameters (*)
- skip_next_tick (*)
- slow_animation (*)
- th (*)
- ticks
- tile_x
- tile_y
- timer_function (*)
- timer_time (*)
- user_of (*)
- waiting_for_sound_effects_to_be_turned_on (*)
- world
function Litter:Litter(hospital, object_type, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| hospital | ? | ? |
| object_type | ? | ? |
| x | ? | ? |
| y | ? | ? |
Declared on: line 83 of Lua/objects/litter.lua.
function Litter:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: Entity:afterLoad.
Declared on: line 206 of Lua/objects/litter.lua.
function Litter:getDrawingLayer()
Overrides: Entity:getDrawingLayer.
Declared on: line 177 of Lua/objects/litter.lua.
function Litter:getRank()
Declared on: line 109 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| anim_type | ? | ? |
| mirrorFlag | ? | ? |
Declared on: line 147 of Lua/objects/litter.lua.
function Litter:setTile(x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Overrides: Entity:setTile.
Declared on: line 93 of Lua/objects/litter.lua.