summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-05-11 18:02:11 +0000
committerrubidium <rubidium@openttd.org>2014-05-11 18:02:11 +0000
commit89c25b955e636efa46d65ebf5b4782b77f30f764 (patch)
treedf0d3aacb099edb188c2cab71394604569707af8 /src/newgrf_station.cpp
parent62378e098b008d41fa4f428b212bc238d33c5aad (diff)
downloadopenttd-89c25b955e636efa46d65ebf5b4782b77f30f764.tar.xz
(svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore)
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r--src/newgrf_station.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index e70a8653b..cd5dad7b4 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -396,7 +396,7 @@ uint32 Station::GetNewGRFVariable(const ResolverObject &object, byte variable, b
uint32 value = 0;
for (cargo_type = 0; cargo_type < NUM_CARGO; cargo_type++) {
- if (HasBit(this->goods[cargo_type].acceptance_pickup, GoodsEntry::GES_ACCEPTANCE)) SetBit(value, cargo_type);
+ if (HasBit(this->goods[cargo_type].status, GoodsEntry::GES_ACCEPTANCE)) SetBit(value, cargo_type);
}
return value;
}
@@ -428,12 +428,12 @@ uint32 Station::GetNewGRFVariable(const ResolverObject &object, byte variable, b
case 0x62: return ge->HasRating() ? ge->rating : 0xFFFFFFFF;
case 0x63: return ge->cargo.DaysInTransit();
case 0x64: return ge->HasVehicleEverTriedLoading() ? ge->last_speed | (ge->last_age << 8) : 0xFF00;
- case 0x65: return GB(ge->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE, 1) << 3;
+ case 0x65: return GB(ge->status, GoodsEntry::GES_ACCEPTANCE, 1) << 3;
case 0x69: {
assert_compile((int)GoodsEntry::GES_EVER_ACCEPTED + 1 == (int)GoodsEntry::GES_LAST_MONTH);
assert_compile((int)GoodsEntry::GES_EVER_ACCEPTED + 2 == (int)GoodsEntry::GES_CURRENT_MONTH);
assert_compile((int)GoodsEntry::GES_EVER_ACCEPTED + 3 == (int)GoodsEntry::GES_ACCEPTED_BIGTICK);
- return GB(ge->acceptance_pickup, GoodsEntry::GES_EVER_ACCEPTED, 4);
+ return GB(ge->status, GoodsEntry::GES_EVER_ACCEPTED, 4);
}
}
}
@@ -443,7 +443,7 @@ uint32 Station::GetNewGRFVariable(const ResolverObject &object, byte variable, b
const GoodsEntry *g = &this->goods[GB(variable - 0x8C, 3, 4)];
switch (GB(variable - 0x8C, 0, 3)) {
case 0: return g->cargo.TotalCount();
- case 1: return GB(min(g->cargo.TotalCount(), 4095), 0, 4) | (GB(g->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE, 1) << 7);
+ case 1: return GB(min(g->cargo.TotalCount(), 4095), 0, 4) | (GB(g->status, GoodsEntry::GES_ACCEPTANCE, 1) << 7);
case 2: return g->time_since_pickup;
case 3: return g->rating;
case 4: return g->cargo.Source();