diff options
author | smatz <smatz@openttd.org> | 2009-07-16 19:00:13 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-07-16 19:00:13 +0000 |
commit | 1f29e38b8372484d51d852b89fc957eb53635ecb (patch) | |
tree | da4a251ac74e87e72a2857233069790f991914f6 /src/ai/api/ai_cargo.cpp | |
parent | b6889daf8d11b083358a26eea3f633942e2e50e4 (diff) | |
download | openttd-1f29e38b8372484d51d852b89fc957eb53635ecb.tar.xz |
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
Diffstat (limited to 'src/ai/api/ai_cargo.cpp')
-rw-r--r-- | src/ai/api/ai_cargo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/api/ai_cargo.cpp b/src/ai/api/ai_cargo.cpp index 1e2684f1a..4b1593d26 100644 --- a/src/ai/api/ai_cargo.cpp +++ b/src/ai/api/ai_cargo.cpp @@ -11,13 +11,13 @@ /* static */ bool AICargo::IsValidCargo(CargoID cargo_type) { - return (cargo_type < NUM_CARGO && ::GetCargo(cargo_type)->IsValid()); + return (cargo_type < NUM_CARGO && ::CargoSpec::Get(cargo_type)->IsValid()); } /* static */ char *AICargo::GetCargoLabel(CargoID cargo_type) { if (!IsValidCargo(cargo_type)) return NULL; - const CargoSpec *cargo = ::GetCargo(cargo_type); + const CargoSpec *cargo = ::CargoSpec::Get(cargo_type); /* cargo->label is a uint32 packing a 4 character non-terminated string, * like "PASS", "COAL", "OIL_". New ones can be defined by NewGRFs */ @@ -32,7 +32,7 @@ /* static */ bool AICargo::IsFreight(CargoID cargo_type) { if (!IsValidCargo(cargo_type)) return false; - const CargoSpec *cargo = ::GetCargo(cargo_type); + const CargoSpec *cargo = ::CargoSpec::Get(cargo_type); return cargo->is_freight; } @@ -46,7 +46,7 @@ { if (!IsValidCargo(cargo_type)) return TE_NONE; - return (AICargo::TownEffect)GetCargo(cargo_type)->town_effect; + return (AICargo::TownEffect)CargoSpec::Get(cargo_type)->town_effect; } /* static */ Money AICargo::GetCargoIncome(CargoID cargo_type, uint32 distance, uint32 days_in_transit) |