From b2c47cf7d6465dbe6bc1f599ecdcb0947f1a95d7 Mon Sep 17 00:00:00 2001 From: celestar Date: Fri, 7 Jan 2005 09:51:16 +0000 Subject: (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 --- aircraft_gui.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'aircraft_gui.c') 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) { -- cgit v1.2.3-70-g09d2