src/station_cmd.c
branchcustombridgeheads
changeset 5648 1608018c5ff2
parent 5643 3778051e8095
equal deleted inserted replaced
5647:cbde85c8c878 5648:1608018c5ff2
  1703 	if (st == NULL) {
  1703 	if (st == NULL) {
  1704 		st = GetClosestStationFromTile(tile, 8, _current_player);
  1704 		st = GetClosestStationFromTile(tile, 8, _current_player);
  1705 		if (st != NULL && st->facilities) st = NULL;
  1705 		if (st != NULL && st->facilities) st = NULL;
  1706 	}
  1706 	}
  1707 
  1707 
       
  1708 	if (w > _patches.station_spread || h > _patches.station_spread) {
       
  1709 		_error_message = STR_306C_STATION_TOO_SPREAD_OUT;
       
  1710 		return CMD_ERROR;
       
  1711 	}
       
  1712 
  1708 	if (st != NULL) {
  1713 	if (st != NULL) {
  1709 		if (st->owner != OWNER_NONE && st->owner != _current_player)
  1714 		if (st->owner != OWNER_NONE && st->owner != _current_player)
  1710 			return_cmd_error(STR_3009_TOO_CLOSE_TO_ANOTHER_STATION);
  1715 			return_cmd_error(STR_3009_TOO_CLOSE_TO_ANOTHER_STATION);
  1711 
  1716 
  1712 		if (!StationRect_BeforeAddRect(st, tile, w, h, RECT_MODE_TEST)) return CMD_ERROR;
  1717 		if (!StationRect_BeforeAddRect(st, tile, w, h, RECT_MODE_TEST)) return CMD_ERROR;