diff options
author | celestar <celestar@openttd.org> | 2005-01-07 09:51:16 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-01-07 09:51:16 +0000 |
commit | 9a4465f9c0db69b3d9da903b67b678a0ee3a565e (patch) | |
tree | dd060d5dca61f8a204e1ed8e93a87362d44f4945 /aircraft_gui.c | |
parent | e58739c55963b22a345e3efb78e7c10d5646b383 (diff) | |
download | openttd-9a4465f9c0db69b3d9da903b67b678a0ee3a565e.tar.xz |
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
values.
-Feature: aircraft can now be refitted "mail-only"
-Feature: Passengers aircraft now ignore the amount of mail for "full
load any" options
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r-- | aircraft_gui.c | 47 |
1 files changed, 43 insertions, 4 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index 0439d71db..33f81cf9d 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -204,15 +204,54 @@ static void ShowBuildAircraftWindow(uint tile) } } -const byte _aircraft_refit_normal[] = { 0,1,4,5,6,7,8,9,10,0xFF }; -const byte _aircraft_refit_arctic[] = { 0,1,4,5,6,7,9,11,10,0xFF }; -const byte _aircraft_refit_desert[] = { 0,4,5,8,6,7,9,10,0xFF }; -const byte _aircraft_refit_candy[] = { 0,1,3,5,7,8,9,6,4,10,11,0xFF }; +#define MAX_REFIT 0xFF + +const byte _aircraft_refit_normal[] = { + CT_PASSENGERS, + CT_MAIL, + CT_GOODS, + CT_VALUABLES, + MAX_REFIT +}; + +const byte _aircraft_refit_arctic[] = { + CT_PASSENGERS, + CT_MAIL, + CT_GOODS, + CT_FOOD, + MAX_REFIT +}; + +const byte _aircraft_refit_desert[] = { + CT_PASSENGERS, + CT_MAIL, + CT_FRUIT, + CT_GOODS, + CT_DIAMONDS, + MAX_REFIT +}; + +const byte _aircraft_refit_candy[] = { + CT_PASSENGERS, + CT_SUGAR, + CT_TOYS, + CT_CANDY, + CT_COLA, + CT_COTTON_CANDY, + CT_BUBBLES, + CT_TOFFEE, + CT_BATTERIES, + CT_PLASTIC, + CT_FIZZY_DRINKS, + MAX_REFIT +}; const byte * const _aircraft_refit_types[4] = { _aircraft_refit_normal, _aircraft_refit_arctic, _aircraft_refit_desert, _aircraft_refit_candy }; +#undef MAX_REFIT + static void AircraftRefitWndProc(Window *w, WindowEvent *e) { switch(e->event) { |