(svn r23416) -Add: [NoAI] API for querying infrastructure costs.

This commit is contained in:
michi_cc
2011-12-03 23:40:57 +00:00
parent d3b7b89493
commit 0e5e8fff12
20 changed files with 362 additions and 0 deletions

View File

@@ -581,3 +581,10 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
default: return -1;
}
}
/* static */ uint16 ScriptRoad::GetMaintenanceCostFactor(RoadType roadtype)
{
if (!ScriptRoad::IsRoadTypeAvailable(roadtype)) return 0;
return roadtype == ROADTYPE_TRAM ? 3 : 2;
}