station_cmd.c
changeset 3580 14bf6e7715c8
parent 3576 18fb92480771
child 3585 43461f26b729
equal deleted inserted replaced
3579:4a55e8ce3087 3580:14bf6e7715c8
   465 	st->time_since_load = 255;
   465 	st->time_since_load = 255;
   466 	st->time_since_unload = 255;
   466 	st->time_since_unload = 255;
   467 	st->delete_ctr = 0;
   467 	st->delete_ctr = 0;
   468 	st->facilities = 0;
   468 	st->facilities = 0;
   469 
   469 
   470 	st->last_vehicle = INVALID_VEHICLE;
   470 	st->last_vehicle_type = VEH_Invalid;
   471 
   471 
   472 	for (ge = st->goods; ge != endof(st->goods); ge++) {
   472 	for (ge = st->goods; ge != endof(st->goods); ge++) {
   473 		ge->waiting_acceptance = 0;
   473 		ge->waiting_acceptance = 0;
   474 		ge->days_since_pickup = 0;
   474 		ge->days_since_pickup = 0;
   475 		ge->enroute_from = INVALID_STATION;
   475 		ge->enroute_from = INVALID_STATION;
  2315 			if (st->owner < MAX_PLAYERS && HASBIT(st->town->statues, st->owner))
  2315 			if (st->owner < MAX_PLAYERS && HASBIT(st->town->statues, st->owner))
  2316 				rating += 26;
  2316 				rating += 26;
  2317 
  2317 
  2318 			{
  2318 			{
  2319 				byte days = ge->days_since_pickup;
  2319 				byte days = ge->days_since_pickup;
  2320 				if (st->last_vehicle != INVALID_VEHICLE &&
  2320 				if (st->last_vehicle_type == VEH_Ship)
  2321 						GetVehicle(st->last_vehicle)->type == VEH_Ship)
       
  2322 							days >>= 2;
  2321 							days >>= 2;
  2323 				(days > 21) ||
  2322 				(days > 21) ||
  2324 				(rating += 25, days > 12) ||
  2323 				(rating += 25, days > 12) ||
  2325 				(rating += 25, days > 6) ||
  2324 				(rating += 25, days > 6) ||
  2326 				(rating += 45, days > 3) ||
  2325 				(rating += 45, days > 3) ||
  2642 	st->train_tile = 0;
  2641 	st->train_tile = 0;
  2643 	st->had_vehicle_of_type = 0;
  2642 	st->had_vehicle_of_type = 0;
  2644 	st->time_since_load = 255;
  2643 	st->time_since_load = 255;
  2645 	st->time_since_unload = 255;
  2644 	st->time_since_unload = 255;
  2646 	st->delete_ctr = 0;
  2645 	st->delete_ctr = 0;
  2647 	st->last_vehicle = INVALID_VEHICLE;
  2646 	st->last_vehicle_type = VEH_Invalid;
  2648 	st->facilities = FACIL_AIRPORT | FACIL_DOCK;
  2647 	st->facilities = FACIL_AIRPORT | FACIL_DOCK;
  2649 	st->build_date = _date;
  2648 	st->build_date = _date;
  2650 
  2649 
  2651 	for (j = 0; j != NUM_CARGO; j++) {
  2650 	for (j = 0; j != NUM_CARGO; j++) {
  2652 		st->goods[j].waiting_acceptance = 0;
  2651 		st->goods[j].waiting_acceptance = 0;
  2815 	SLE_CONDVAR(Station,blocked_months_obsolete,    SLE_UINT8, 0, 4),
  2814 	SLE_CONDVAR(Station,blocked_months_obsolete,    SLE_UINT8, 0, 4),
  2816 
  2815 
  2817 	SLE_CONDVAR(Station,airport_flags,     SLE_VAR_U32 | SLE_FILE_U16, 0, 2),
  2816 	SLE_CONDVAR(Station,airport_flags,     SLE_VAR_U32 | SLE_FILE_U16, 0, 2),
  2818 	SLE_CONDVAR(Station,airport_flags,     SLE_UINT32, 3, SL_MAX_VERSION),
  2817 	SLE_CONDVAR(Station,airport_flags,     SLE_UINT32, 3, SL_MAX_VERSION),
  2819 
  2818 
  2820 	SLE_VAR(Station,last_vehicle,          SLE_UINT16),
  2819 	SLE_CONDNULL(2, 0, 25), /* Ex last-vehicle */
       
  2820 	SLE_CONDVAR(Station,last_vehicle_type,          SLE_UINT8 , 26, SL_MAX_VERSION),
  2821 
  2821 
  2822 	// Was custom station class and id
  2822 	// Was custom station class and id
  2823 	SLE_CONDNULL(2, 3, 25),
  2823 	SLE_CONDNULL(2, 3, 25),
  2824 	SLE_CONDVAR(Station,build_date,        SLE_UINT16, 3, SL_MAX_VERSION),
  2824 	SLE_CONDVAR(Station,build_date,        SLE_UINT16, 3, SL_MAX_VERSION),
  2825 
  2825