MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetRunningCost

Method GetRunningCost

src/ship_cmd.cpp:246–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246Money Ship::GetRunningCost() const
247{
248 const Engine *e = this->GetEngine();
249 uint cost_factor = GetVehicleProperty(this, PROP_SHIP_RUNNING_COST_FACTOR, e->VehInfo<ShipVehicleInfo>().running_cost);
250 return GetPrice(PR_RUNNING_SHIP, cost_factor, e->GetGRF());
251}
252
253/** Calendar day handler. */
254void Ship::OnNewCalendarDay()

Callers 1

OnNewEconomyDayMethod · 0.95

Calls 4

GetVehiclePropertyFunction · 0.85
GetPriceFunction · 0.85
GetEngineMethod · 0.45
GetGRFMethod · 0.45

Tested by

no test coverage detected