(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.

This commit is contained in:
frosch
2011-11-01 00:23:41 +00:00
parent e57ba5d0ae
commit ad38f27242
17 changed files with 84 additions and 64 deletions

View File

@@ -192,7 +192,7 @@ Money Ship::GetRunningCost() const
{
const Engine *e = this->GetEngine();
uint cost_factor = GetVehicleProperty(this, PROP_SHIP_RUNNING_COST_FACTOR, e->u.ship.running_cost);
return GetPrice(PR_RUNNING_SHIP, cost_factor, e->grf_prop.grffile);
return GetPrice(PR_RUNNING_SHIP, cost_factor, e->GetGRF());
}
void Ship::OnNewDay()