Module Tile
Contains functions to query single tiles for information about objects on them.
Functions
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. 
isLand (x, y)  Returns true iff there's land (the opposite of water) at a given position. 
isTree (x, y)  Returns true iff there's a tree at a given position. 
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. 
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. 
isBuilding (x, y)  Returns true iff there's a building at a given position. 
isBuildingInConstruction (x, y)  Returns true iff there's a building at a given position that is in construction right now. 
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. 
isBuildingBurning (x, y)  Returns true iff there's a building at a given position the is burning right now. 
isBuildingIll (x, y)  Returns true iff there's a building at a given position that contains ill people right now. 
isBuildingFullOfWaste (x, y)  Returns true iff there's a building at a given position that is full of garbage 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. 
isBuildingEmpty (x, y)  Returns true iff there's a building at a given position that is empty right now. 
extinguishBurningBuilding (x, y)  Extinguishes the fire of a building at a given position. 
getBuildingFrame (x, y)  Returns the current frame of a building at a given position. 
setBuildingFrame (x, y, frame)  Sets the frame of a building at a given position. 
getBuildingName (x, y)  Gets the name of a building 
setBuildingName (x, y, name)  Sets the name of a building 
getBuildingPerformance (x, y)  Returns the current performance of a building at a given position. 
setBuildingPerformance (x, y, performance)  Sets the performance of a building. 
getBuildingDraft (x, y)  Returns the draft of a building at a given position. 
getBuildingXY (x, y)  Returns the pivot position of a building at a given position. 
getBuildingStorage (x, y)  Returns the storage table of the building at a given position. 
getBuildingDaysBuilt (x, y)  Returns the number of days since this building was constructed. 
hasBuildingUpgrade (upgradeId, x, y)  Returns true iff the building at a given position has a specific upgrade applied to it. 
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. 
getBuildingAnimationFrame (x, y[, slot=1])  Returns the current frame of an animation that is attached to a building. 
isBuildingAnimationPaused (x, y[, slot=1])  Resumes an animation that is attached to a building. 
isRoad (x, y, level)  Returns true if there's a road at a given position and level. 
hasRoad (x, y)  Returns true if there's any raod at a given position (regardless of the level). 
getRoadFrame (x, y, level)  Returns the frame of a road at a given position and level. 
getRoadDraft (x, y, level)  Returns the draft of 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. 
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. 
isRoadDeco (x, y, level)  Returns true iff there's a road decoration on 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. 
hasRoadOccupation (x, y, level)  Returns true iff there's a road occupation on the 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. 
setRoadOccupation (roadDecorationDraft, x, y, level)  Sets the road occupation on the road at a given position and level. 
Fields
INFLUENCE_POLLUTION  Pollution influence type. 
INFLUENCE_NOISE  Noise influence type. 
INFLUENCE_HEALTH  Health influence type. 
INFLUENCE_POLICE  Police influence type. 
INFLUENCE_FIREDEPARTMENT  Fire department influence type. 
INFLUENCE_PARK  Park influence type. 
INFLUENCE_SPORT  Sport influence type. 
INFLUENCE_EDUCATION_LOW  Low education influence type. 
INFLUENCE_EDUCATION_HIGH  High education influence type. 
INFLUENCE_CULTURE  Culture influence type. 
INFLUENCE_MANAGEMENT  Management influence type. 
INFLUENCE_RELIGION  Religion influence type. 
INFLUENCE_PASSENGER_BUS  Bus passenger influence type. 
INFLUENCE_PASSENGER_TRAIN  Train passenger influence type. 
INFLUENCE_RESIDENTIAL  Residential influence type. 
INFLUENCE_COMMERCIAL  Commercial influence type. 
INFLUENCE_INDUSTRIAL  Industrial influence type. 
INFLUENCE_LEVEL_LOW  Low level influence type. 
INFLUENCE_LEVEL_MIDDLE  Medium level influence type. 
INFLUENCE_LEVEL_HIGH  High level influence type. 
INFLUENCE_DENSITY  Density influence type. 
INFLUENCE_RADIOACTIVITY  Radioactivity influence type. 
INFLUENCE_NATURE  Nature influence type. 
INFLUENCE_WASTE_DISPOSAL  Waste disposal influence type. 
INFLUENCE_BODY_DISPOSAL  Body disposal influence type. 
INFLUENCE_TRAFFIC  Traffic influence type. 
Functions
 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
 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
 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
 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
 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.
 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
 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
 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
 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
 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
 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
 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
 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
 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.
 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
 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.
 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.
 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.
 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
 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%.
 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
 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.
 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:
 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
 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
 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.
 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.
 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.
 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
 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
 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).
 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.
 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
 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
 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
 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
 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
 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
 setRoadOccupation (roadDecorationDraft, x, y, level)

Sets the road occupation on the road at a given
position and level.
Parameters:
 roadDecorationDraft 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_POLLUTION
 Pollution influence type.
 INFLUENCE_NOISE
 Noise influence type.
 INFLUENCE_HEALTH
 Health influence type.
 INFLUENCE_POLICE
 Police influence type.
 INFLUENCE_FIREDEPARTMENT
 Fire department influence type.
 INFLUENCE_PARK
 Park influence type.
 INFLUENCE_SPORT
 Sport influence type.
 INFLUENCE_EDUCATION_LOW
 Low education influence type.
 INFLUENCE_EDUCATION_HIGH
 High education influence type.
 INFLUENCE_CULTURE
 Culture influence type.
 INFLUENCE_MANAGEMENT
 Management influence type.
 INFLUENCE_RELIGION
 Religion influence type.
 INFLUENCE_PASSENGER_BUS
 Bus passenger influence type.
 INFLUENCE_PASSENGER_TRAIN
 Train passenger influence type.
 INFLUENCE_RESIDENTIAL
 Residential influence type.
 INFLUENCE_COMMERCIAL
 Commercial influence type.
 INFLUENCE_INDUSTRIAL
 Industrial influence type.
 INFLUENCE_LEVEL_LOW
 Low level influence type.
 INFLUENCE_LEVEL_MIDDLE
 Medium level influence type.
 INFLUENCE_LEVEL_HIGH
 High level influence type.
 INFLUENCE_DENSITY
 Density influence type.
 INFLUENCE_RADIOACTIVITY
 Radioactivity influence type.
 INFLUENCE_NATURE
 Nature influence type.
 INFLUENCE_WASTE_DISPOSAL
 Waste disposal influence type.
 INFLUENCE_BODY_DISPOSAL
 Body disposal influence type.
 INFLUENCE_TRAFFIC
 Traffic influence type.