diff options
author | michi_cc <michi_cc@openttd.org> | 2011-10-31 22:31:40 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-10-31 22:31:40 +0000 |
commit | e094d7db624b69d2f0121e84e07abdb821f45ec9 (patch) | |
tree | 48fc1d4db1dd49d16838af094d6db5c323c7398d /src/newgrf.cpp | |
parent | f66cd97776cd73c653fad685c9a74538b4d8a2a8 (diff) | |
download | openttd-e094d7db624b69d2f0121e84e07abdb821f45ec9.tar.xz |
(svn r23072) -Feature: [NewGRF] House callback 0x148.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 8e8d4de3a..af5e25021 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2031,7 +2031,6 @@ static ChangeInfoResult IgnoreTownHouseProperty(int prop, ByteReader *buf) case 0x20: { byte count = buf->ReadByte(); for (byte j = 0; j < count; j++) buf->ReadByte(); - ret = CIR_UNHANDLED; break; } @@ -2251,10 +2250,12 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, Byt housespec->minimum_life = buf->ReadByte(); break; - case 0x20: { // @todo Cargo acceptance watch list + case 0x20: { // Cargo acceptance watch list byte count = buf->ReadByte(); - for (byte j = 0; j < count; j++) buf->ReadByte(); - ret = CIR_UNHANDLED; + for (byte j = 0; j < count; j++) { + CargoID cargo = GetCargoTranslation(buf->ReadByte(), _cur.grffile); + if (cargo != CT_INVALID) SetBit(housespec->watched_cargoes, cargo); + } break; } |