Public Member Functions

ScriptTileList Class Reference
[Classes that create a list of items.]

Creates an empty list, in which you can add tiles. More...

#include <script_tilelist.hpp>

Inheritance diagram for ScriptTileList:
ScriptList ScriptObject SimpleCountedObject ScriptTileList_IndustryAccepting ScriptTileList_IndustryProducing ScriptTileList_StationType

Public Member Functions

void AddRectangle (TileIndex tile_from, TileIndex tile_to)
 Adds the rectangle between tile_from and tile_to to the to-be-evaluated tiles.
void AddTile (TileIndex tile)
 Add a tile to the to-be-evaluated tiles.
void RemoveRectangle (TileIndex tile_from, TileIndex tile_to)
 Remove the tiles inside the rectangle between tile_from and tile_to form the list.
void RemoveTile (TileIndex tile)
 Remove a tile from the list.

Detailed Description

Creates an empty list, in which you can add tiles.

ai

Definition at line 23 of file script_tilelist.hpp.


Member Function Documentation

void ScriptTileList::AddRectangle ( TileIndex  tile_from,
TileIndex  tile_to 
)

Adds the rectangle between tile_from and tile_to to the to-be-evaluated tiles.

Parameters:
tile_from One corner of the tiles to add.
tile_to The other corner of the tiles to add.
Precondition:
ScriptMap::IsValidTile(tile_from).
ScriptMap::IsValidTile(tile_to).

Definition at line 18 of file script_tilelist.cpp.

References ScriptList::AddItem(), IsValidTile(), and TILE_AREA_LOOP.

void ScriptTileList::AddTile ( TileIndex  tile  ) 

Add a tile to the to-be-evaluated tiles.

Parameters:
tile The tile to add.
Precondition:
ScriptMap::IsValidTile(tile).

Definition at line 27 of file script_tilelist.cpp.

References ScriptList::AddItem(), and IsValidTile().

Referenced by ScriptTileList_IndustryAccepting::ScriptTileList_IndustryAccepting(), ScriptTileList_IndustryProducing::ScriptTileList_IndustryProducing(), and ScriptTileList_StationType::ScriptTileList_StationType().

void ScriptTileList::RemoveRectangle ( TileIndex  tile_from,
TileIndex  tile_to 
)

Remove the tiles inside the rectangle between tile_from and tile_to form the list.

Parameters:
tile_from One corner of the tiles to remove.
tile_to The other corner of the files to remove.
Precondition:
ScriptMap::IsValidTile(tile_from).
ScriptMap::IsValidTile(tile_to).

Definition at line 34 of file script_tilelist.cpp.

References IsValidTile(), ScriptList::RemoveItem(), and TILE_AREA_LOOP.

void ScriptTileList::RemoveTile ( TileIndex  tile  ) 

Remove a tile from the list.

Parameters:
tile The tile to remove.
Precondition:
ScriptMap::IsValidTile(tile).

Definition at line 43 of file script_tilelist.cpp.

References IsValidTile(), and ScriptList::RemoveItem().


The documentation for this class was generated from the following files: