The m4nfo User manual and Technical Report

Towns

Accessing town information

Introduction

Some of TTD's features may access information from their 'related' objects:

FeatureRelated object
BridgesTown to which bridge belongs
HousesTown to which house belongs
IndustriesTown to which industry belongs
Industry tilesIndustry containing tile
ObjectsTown to which object belongs
StationsTown to which station belongs
Vehicles (trains, road vehicles, ships, aircraft)First vehicle of consist (if any)

For vehicles, the 'related' vehicle might be simply accessed by using m4nfo's 'bracket' function engine(). But when accessing town information (from houses, industries, objects, or stations), the use of a bracket function makes no sense because town functions are generally handling quite different information than stations, houses, industries or objects do. Therefore, town information is accessed directly by use of its own functions.

Pre-compiled m4nfo modules for bridges, houses, industries, objects and stations include town accessibility, without any need for extra include files or a "town module".