OpenTTD Source: EntityIDMapping Struct Reference

OpenTTD Source 12.0-beta1

Data Fields
EntityIDMapping Struct Reference

Maps an entity id stored on the map to a GRF file. More...

`#include <newgrf_commons.h>`

## Data Fields
uint32 | grfid
| The GRF ID of the file the entity belongs to.
uint8 | entity_id
| The entity ID within the GRF file.
uint8 | substitute_id
| The (original) entity ID to use if this GRF is not available.

## Detailed Description

Maps an entity id stored on the map to a GRF file.

Entities are objects used ingame (houses, industries, industry tiles) for which we need to correlate the ids from the grf files with the ones in the the savegames themselves. An array of EntityIDMapping structs is saved with the savegame so that those GRFs can be loaded in a different order, or removed safely. The index in the array is the entity's ID stored on the map.

The substitute ID is the ID of an original entity that should be used instead if the GRF containing the new entity is not available.

Definition at line 186 of file newgrf_commons.h.

The documentation for this struct was generated from the following file:

- src/newgrf_commons.h