summaryrefslogtreecommitdiff
path: root/table
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-11-21 10:49:40 +0000
committertron <tron@openttd.org>2004-11-21 10:49:40 +0000
commit57adc97733fc0cc226f7d8f71c7e6b62dab690e0 (patch)
tree3fa8e5167fbe6804668a83cddbd662bdb0e8de2c /table
parent75d002690ac43c3a1c9bdbd16ca0eb48c9a2c50e (diff)
downloadopenttd-57adc97733fc0cc226f7d8f71c7e6b62dab690e0.tar.xz
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
This especially enables houses to accept passengers, mail, goods AND food. Add string templates for up to 5 cargo types for the tile info window. If more are needed just add them. Simplify (de-uglify) the logic for cargo acceptence for houses and split the goods/food table into two. The acceptance is unmodified, but accepting goods AND food is now trivially possible. The exact amounts have to be decided. This is based on Celestar's changes in the map branch plus some further bits that will be merged there soon.
Diffstat (limited to 'table')
-rw-r--r--table/town_land.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/table/town_land.h b/table/town_land.h
index f7c28accc..01b3a26e5 100644
--- a/table/town_land.h
+++ b/table/town_land.h
@@ -2133,21 +2133,38 @@ static const byte _housetype_cargo_mail[110] = {
4, 4, 4, 1, 1, 2,
};
-static const int8 _housetype_cargo_goods[110] = {
+static const byte _housetype_cargo_goods[] = {
4, 4, 1, 0, 6, 6, 0, 2,
2, 0, 0, 0, 0, 4, 3, 3,
3, 6, 8, 6, 0, 0, 0, 0,
0, 0, 0, 2, 3, 3, 3, 2,
- 0, 0, 0, 0, 2,-1,-1, 2,
- 3, 3, 3, 3,-2,-2,-2,-2,
- -2,-2, 4, 4, 4, 4, 5, 5,
- -1,-1,-1,-1, 0, 0,-1,-1,
- 3, 3,-3, 2,-3, 2, 3, 3,
- 4, 4, 2, 2, 2, 2,-2,-2,
- -2,-1, 1, 0,-2, 1, 1, 4,
+ 0, 0, 0, 0, 2, 0, 0, 2,
+ 3, 3, 3, 3, 0, 0, 0, 0,
+ 0, 0, 4, 4, 4, 4, 5, 5,
+ 0, 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