(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.

This commit is contained in:
frosch
2009-11-07 22:47:54 +00:00
parent 7984d90c40
commit ba1fc280e3
30 changed files with 249 additions and 242 deletions

View File

@@ -319,7 +319,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
}
}
return CommandCost(EXPENSES_CONSTRUCTION, count * _price.build_train_depot);
return CommandCost(EXPENSES_CONSTRUCTION, count * _price[PR_BUILD_DEPOT_TRAIN]);
}
/** Build a buoy.
@@ -366,7 +366,7 @@ CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
}
return CommandCost(EXPENSES_CONSTRUCTION, _price.build_dock);
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_STATION_DOCK]);
}
/**
@@ -404,7 +404,7 @@ CommandCost RemoveBuoy(TileIndex tile, DoCommandFlag flags)
wp->delete_ctr = 0;
}
return CommandCost(EXPENSES_CONSTRUCTION, _price.remove_truck_station);
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_STATION_TRUCK]);
}