(svn r20321) -Codechange: rename GetUnmovableSpec to UnmovableSpec::Get and add+use a ::GetByTile

This commit is contained in:
rubidium
2010-08-02 20:57:32 +00:00
parent 0e900039f3
commit f2edc728e6
2 changed files with 25 additions and 14 deletions

View File

@@ -34,6 +34,20 @@ struct UnmovableSpec {
* @return The cost for clearing.
*/
Money GetClearCost() const { return (_price[PR_CLEAR_UNMOVABLE] * this->clear_cost_multiplier); }
/**
* Get the specification associated with a specific UnmovableType.
* @param index The unmovable type to fetch.
* @return The specification.
*/
static const UnmovableSpec *Get(int index);
/**
* Get the specification associated with a tile.
* @param tile The tile to fetch the data for.
* @return The specification.
*/
static const UnmovableSpec *GetByTile(TileIndex tile);
};