Module Tile
Contains functions to query single tiles for information about objects on them.
Functions
abandonBuilding (x, y)  Abandons the building at the given location. 
extinguishBurningBuilding (x, y)  Extinguishes the fire of a building at a given position. 
getBuildingAnimationFrame (x, y[, slot=1])  Returns the current frame of an animation that is attached to a building. 
getBuildingDaysBuilt (x, y)  Returns the number of days since this building was constructed. 
getBuildingDraft (x, y)  Returns the draft of a building at a given position. 
getBuildingFrame (x, y)  Returns the current frame of a building at a given position. 
getBuildingName (x, y)  Gets the name of a building 
getBuildingPerformance (x, y)  Returns the current performance of a building at a given position. 
getBuildingStorage (x, y)  Returns the storage table of the building at a given position. 
getBuildingXY (x, y)  Returns the pivot position of a building at a given position. 
getGroundDraft (x, y)  Returns the ground draft of a given position. 
getGroundHeight (x, y)  Returns the ground height at a given position. 
getInfluence (influenceType, x, y)  Returns the influence value of a influence type at a given position. 
getRoadCarCount (x, y, level)  Returns the absolute car counter of the road at a given position and level. 
getRoadChargeableCarCount (x, y, level)  Returns the absolute chargeable car counter of the road at a given position and level. 
getRoadDeco (x, y, level)  Returns the draft of the road decoration on the road at a given position and level. 
getRoadDraft (x, y, level)  Returns the draft of the road at a given position and level. 
getRoadFrame (x, y, level)  Returns the frame of a road at a given position and level. 
getRoadOccupation (x, y, level)  Returns the draft of the road occupcation on the road at a given position and level. 
getRoadStorage (x, y, level)  Returns the storage table of the road at a given position and level. 
getRoadTraffic (x, y, level)  Returns the amount of traffic on a road tile. 
getTreeDraft (x, y)  Returns the draft of the tree at the given position. 
getTreeFrame (x, y)  Returns the frame of the tree at the given position. 
hasBuildingNeededRoad (x, y)  Returns true iff there's a building at a given position that needs a road connection but also has a road connection. 
hasBuildingRoad (x, y)  Returns true iff there's a building at a given position that has a road connection. 
hasBuildingUpgrade (upgradeId, x, y)  Returns true iff the building at a given position has a specific upgrade applied to it. 
hasRoad (x, y)  Returns true if there's any raod at a given position (regardless of the level). 
hasRoadOccupation (x, y, level)  Returns true iff there's a road occupation on the road at a given position and level. 
isBuilding (x, y)  Returns true iff there's a building at a given position. 
isBuildingAnimationPaused (x, y[, slot=1])  Resumes an animation that is attached to a building. 
isBuildingBurning (x, y)  Returns true iff there's a building at a given position the is burning right now. 
isBuildingEmpty (x, y)  Returns true iff there's a building at a given position that is empty right now. 
isBuildingFullOfDeadPeople (x, y)  Returns true iff there's a building at a given position that has transport issues with dead bodies right now. 
isBuildingFullOfWaste (x, y)  Returns true iff there's a building at a given position that is full of garbage right now. 
isBuildingIll (x, y)  Returns true iff there's a building at a given position that contains ill people right now. 
isBuildingInConstruction (x, y)  Returns true iff there's a building at a given position that is in construction right now. 
isBuildingUpgradeInConstruction (x, y)  Returns true iff there's a building at a given position that has a pending upgrade right now. 
isLand (x, y)  Returns true iff there's land (the opposite of water) at a given position. 
isRoad (x, y, level)  Returns true if there's a road at a given position and level. 
isRoadDeco (x, y, level)  Returns true iff there's a road decoration on the road at a given position and level. 
isTree (x, y)  Returns true iff there's a tree at a given position. 
isValid (x, y)  Returns true iff a position is on the map. 
isWater (x, y)  Returns true iff there's water at a given position. 
pauseBuildingAnimation (x, y[, slot=1])  Pauses an animation that is attached to a building. 
resumeBuildingAnimation (x, y[, slot=1[, speed=1.0]])  Resumes an animation that is attached to a building. 
setBuildingAnimationFrame (x, y, frame[, slot=1])  Sets the current frame of an animation regardless of whether the animation is playing right now. 
setBuildingFrame (x, y, frame)  Sets the frame of a building at a given position. 
setBuildingName (x, y, name)  Sets the name of a building 
setBuildingPerformance (x, y, performance)  Sets the performance of a building. 
setRoadOccupation (draft, x, y, level)  Sets the road occupation on the road at a given position and level. 
Fields
INFLUENCE_BODY_DISPOSAL  Body disposal influence type. 
INFLUENCE_COMMERCIAL  Commercial influence type. 
INFLUENCE_CULTURE  Culture influence type. 
INFLUENCE_DENSITY  Density influence type. 
INFLUENCE_EDUCATION_HIGH  High education influence type. 
INFLUENCE_EDUCATION_LOW  Low education influence type. 
INFLUENCE_FIREDEPARTMENT  Fire department influence type. 
INFLUENCE_HEALTH  Health influence type. 
INFLUENCE_INDUSTRIAL  Industrial influence type. 
INFLUENCE_LEVEL_HIGH  High level influence type. 
INFLUENCE_LEVEL_LOW  Low level influence type. 
INFLUENCE_LEVEL_MIDDLE  Medium level influence type. 
INFLUENCE_MANAGEMENT  Management influence type. 
INFLUENCE_NATURE  Nature influence type. 
INFLUENCE_NOISE  Noise influence type. 
INFLUENCE_PARK  Park influence type. 
INFLUENCE_PASSENGER_BUS  Bus passenger influence type. 
INFLUENCE_PASSENGER_TRAIN  Train passenger influence type. 
INFLUENCE_POLICE  Police influence type. 
INFLUENCE_POLLUTION  Pollution influence type. 
INFLUENCE_RADIOACTIVITY  Radioactivity influence type. 
INFLUENCE_RELIGION  Religion influence type. 
INFLUENCE_RESIDENTIAL  Residential influence type. 
INFLUENCE_SPORT  Sport influence type. 
INFLUENCE_TRAFFIC  Traffic influence type. 
INFLUENCE_WASTE_DISPOSAL  Waste disposal influence type. 
Functions
 abandonBuilding (x, y)

Abandons the building at the given location.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 extinguishBurningBuilding (x, y)

Extinguishes the fire of a building at a given position.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 getBuildingAnimationFrame (x, y[, slot=1])

Returns the current frame of an animation that is attached to a building.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 slot number The index of the animation to pause. 1 is the first attached animation. (default 1)
Returns:

number or nil
The current frame of the animation or nil if something went wrong.
 getBuildingDaysBuilt (x, y)

Returns the number of days since this building was constructed.
Negative values indicate non finished buildings.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:

number
 getBuildingDraft (x, y)

Returns the draft of a building at a given position.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:

draft
 getBuildingFrame (x, y)

Returns the current frame of a building at a given position.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:

number
 getBuildingName (x, y)

Gets the name of a building
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:

string
name of the building or nil if no name is set.
 getBuildingPerformance (x, y)

Returns the current performance of a building at a given position.
1 represents 100%.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:

number
 getBuildingStorage (x, y)

Returns the storage table of the building at a given position.
Storage tables can be used to save information into cities/buildings/roads
permanently.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:
 getBuildingXY (x, y)

Returns the pivot position of a building at a given position. That point can
differ from the queried position for buildings that have a size bigger than 1.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
Returns:

number,number
X and Y component of the pivot position of
the building.
 getGroundDraft (x, y)

Returns the ground draft of a given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

draft
 getGroundHeight (x, y)

Returns the ground height at a given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

number
An integer that represents height. 0 means ocean level.
 getInfluence (influenceType, x, y)

Returns the influence value of a influence type at a given position.
Parameters:
 influenceType number A influence type constant like Tile.INFLUENCE_PARK.
 x number X component of a position.
 y number Y component of a position.
Returns:

number
A number in 0..1. 1 Means the influence is maxed out.
 getRoadCarCount (x, y, level)

Returns the absolute car counter of the road at a given position and level.
The car counter is incremented for each car that has entered that road.
You can use it to track the number of passed by cars in a certain time frame.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

number
 getRoadChargeableCarCount (x, y, level)

Returns the absolute chargeable car counter of the road at a given position and level.
The car counter is incremented for each chargeable car that has entered that road.
You can use it to track the number of passed by chargeable cars in a certain time frame.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

number
 getRoadDeco (x, y, level)

Returns the draft of the road decoration on the road at a given
position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

draft
 getRoadDraft (x, y, level)

Returns the draft of the road at a given position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

draft
Road draft object of the road.
 getRoadFrame (x, y, level)

Returns the frame of a road at a given position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

number
The frame of the road. Typically ranges from 0 to 15
dependent on the alignment (regardless city rotation).
 getRoadOccupation (x, y, level)

Returns the draft of the road occupcation on the road at a given
position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

animationdraft
 getRoadStorage (x, y, level)

Returns the storage table of the road at a given position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

table
The table can be used to save information permanently
in a road.
 getRoadTraffic (x, y, level)

Returns the amount of traffic on a road tile.
Parameters:
 x number X component of a road position.
 y number Y component of a road position.
 level number A road level with 0 being ground.
Returns:

number
0..1 with 1 being high traffic
 getTreeDraft (x, y)

Returns the draft of the tree at the given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

draft
 getTreeFrame (x, y)

Returns the frame of the tree at the given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

draft
 hasBuildingNeededRoad (x, y)

Returns true iff there's a building at a given position that needs a road
connection but also has a road connection.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 hasBuildingRoad (x, y)

Returns true iff there's a building at a given position that has a road
connection.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 hasBuildingUpgrade (upgradeId, x, y)

Returns true iff the building at a given position has a specific upgrade
applied to it.
Parameters:
 upgradeId string Id of an upgrade.
 x number X component of a building position.
 y number Y component of a building position.
Returns:

bool
 hasRoad (x, y)

Returns true if there's any raod at a given position
(regardless of the level).
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 hasRoadOccupation (x, y, level)

Returns true iff there's a road occupation on the road at a given
position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

bool
 isBuilding (x, y)

Returns true iff there's a building at a given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingAnimationPaused (x, y[, slot=1])

Resumes an animation that is attached to a building.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 slot number The index of the animation to pause. 1 is the first attached animation. (default 1)
Returns:

bool or nil
Is true iff the specified animation is paused right now, nil if an error occurred.
 isBuildingBurning (x, y)

Returns true iff there's a building at a given position the is burning right
now.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingEmpty (x, y)

Returns true iff there's a building at a given position that is empty
right now. That means that people left it. Only happens for RCI buildings.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingFullOfDeadPeople (x, y)

Returns true iff there's a building at a given position that has transport
issues with dead bodies right now.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingFullOfWaste (x, y)

Returns true iff there's a building at a given position that is full of
garbage right now.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingIll (x, y)

Returns true iff there's a building at a given position that contains ill
people right now.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingInConstruction (x, y)

Returns true iff there's a building at a given position that is in
construction right now.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isBuildingUpgradeInConstruction (x, y)

Returns true iff there's a building at a given position that has a pending
upgrade right now.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isLand (x, y)

Returns true iff there's land (the opposite of water) at a given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isRoad (x, y, level)

Returns true if there's a road at a given position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

bool
 isRoadDeco (x, y, level)

Returns true iff there's a road decoration on the road at a given
position and level.
Parameters:
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Returns:

bool
 isTree (x, y)

Returns true iff there's a tree at a given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 isValid (x, y)

Returns true iff a position is on the map.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
Usage:
print(Tile.isValid(1,0)) Prints false print(Tile.isValid(0,0)) Prints true print(Tile.isValid(City.getWidth()  1, City.getHeight()  1)) Prints true print(Tile.isValid(City.getWidth(), City.getHeight())) Prints false
 isWater (x, y)

Returns true iff there's water at a given position.
Parameters:
 x number X component of a position.
 y number Y component of a position.
Returns:

bool
 pauseBuildingAnimation (x, y[, slot=1])

Pauses an animation that is attached to a building.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 slot number The index of the animation to pause. 1 is the first attached animation. (default 1)
Returns:

number or nil
The current frame of the animation or nil if something went wrong.
 resumeBuildingAnimation (x, y[, slot=1[, speed=1.0]])

Resumes an animation that is attached to a building.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 slot number The index of the animation to pause. 1 is the first attached animation. (default 1)
 speed number A speed multiplier for the animation. (default 1.0)
Returns:

number or nil
The current frame of the animation or nil if something went wrong.
 setBuildingAnimationFrame (x, y, frame[, slot=1])

Sets the current frame of an animation regardless of whether the animation is playing right now.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 frame number The frame to set.
 slot number The index of the animation to pause. 1 is the first attached animation. (default 1)
Returns:

bool or nil
Only true if the operation was successful.
 setBuildingFrame (x, y, frame)

Sets the frame of a building at a given position.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 frame number The frame index to set.
 setBuildingName (x, y, name)

Sets the name of a building
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 name string The name that should be used for the building. Use nil to reset it.
 setBuildingPerformance (x, y, performance)

Sets the performance of a building. The performance value will be clipped
by the min and max value defined in the building's draft.
Parameters:
 x number X component of a building position.
 y number Y component of a building position.
 performance number The performance to set. 1 represents 100%.
 setRoadOccupation (draft, x, y, level)

Sets the road occupation on the road at a given
position and level.
Parameters:
 draft draft The animation draft to set on the road.
 x number X component of a position.
 y number Y component of a position.
 level number A road level with 0 being ground.
Fields
 INFLUENCE_BODY_DISPOSAL
 Body disposal influence type.
 INFLUENCE_COMMERCIAL
 Commercial influence type.
 INFLUENCE_CULTURE
 Culture influence type.
 INFLUENCE_DENSITY
 Density influence type.
 INFLUENCE_EDUCATION_HIGH
 High education influence type.
 INFLUENCE_EDUCATION_LOW
 Low education influence type.
 INFLUENCE_FIREDEPARTMENT
 Fire department influence type.
 INFLUENCE_HEALTH
 Health influence type.
 INFLUENCE_INDUSTRIAL
 Industrial influence type.
 INFLUENCE_LEVEL_HIGH
 High level influence type.
 INFLUENCE_LEVEL_LOW
 Low level influence type.
 INFLUENCE_LEVEL_MIDDLE
 Medium level influence type.
 INFLUENCE_MANAGEMENT
 Management influence type.
 INFLUENCE_NATURE
 Nature influence type.
 INFLUENCE_NOISE
 Noise influence type.
 INFLUENCE_PARK
 Park influence type.
 INFLUENCE_PASSENGER_BUS
 Bus passenger influence type.
 INFLUENCE_PASSENGER_TRAIN
 Train passenger influence type.
 INFLUENCE_POLICE
 Police influence type.
 INFLUENCE_POLLUTION
 Pollution influence type.
 INFLUENCE_RADIOACTIVITY
 Radioactivity influence type.
 INFLUENCE_RELIGION
 Religion influence type.
 INFLUENCE_RESIDENTIAL
 Residential influence type.
 INFLUENCE_SPORT
 Sport influence type.
 INFLUENCE_TRAFFIC
 Traffic influence type.
 INFLUENCE_WASTE_DISPOSAL
 Waste disposal influence type.