Changeset - r29:9120a1c86c1f
[Not reviewed]
master
0 2 0
darkvater - 20 years ago 2004-08-12 21:29:26
darkvater@openttd.org
(svn r30) -Fix [1007272] Copy orders between bus/truck possible. You cannot share orders between busses/trucks. You can only copy orders if all the facilities in schedule allow both types to go there (Celestar)
-Fix Dutch in dropdown language box is not in BIGFONT
2 files changed with 25 insertions and 2 deletions:
0 comments (0 inline, 0 general)
lang/dutch.txt
Show inline comments
 
##name 								Dutch (not complete)
 
##ownname 							Nederlands (niet volledig)
 
##name Dutch (not complete)
 
##ownname Nederlands (niet volledig)
 

	
 
##id 0x0000
 
STR_NULL							:
 
STR_0001_OFF_EDGE_OF_MAP					:{WHITE}Buiten de kaart
 
STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP				:{WHITE}Te dicht bij de rand van de kaart
 
STR_0003_NOT_ENOUGH_CASH_REQUIRES				:{WHITE}Niet genoeg geld - {CURRENCY} nodig
order_cmd.c
Show inline comments
 
@@ -214,12 +214,18 @@ int32 CmdCloneOrder(int x, int y, uint32
 
	case 0: {
 
		Vehicle *src = &_vehicles[p1 >> 16];
 

	
 
		// sanity checks
 
		if (!(src->owner == _current_player && dst->type == src->type && dst != src))
 
			return CMD_ERROR;
 
			
 
		// let's see what happens with road vehicles
 
		if (src->type == VEH_Road) {
 
			if (src->cargo_type != dst->cargo_type && (src->cargo_type == CT_PASSENGERS || dst->cargo_type == CT_PASSENGERS))
 
				return CMD_ERROR;
 
		}
 

	
 
		if (flags & DC_EXEC) {
 
			DeleteVehicleSchedule(dst);
 
			dst->schedule_ptr = src->schedule_ptr;
 
			dst->num_orders = src->num_orders;
 

	
 
@@ -234,12 +240,29 @@ int32 CmdCloneOrder(int x, int y, uint32
 
		Vehicle *src = &_vehicles[p1 >> 16];
 
		int delta;
 

	
 
		// sanity checks
 
		if (!(src->owner == _current_player && dst->type == src->type && dst != src))
 
			return CMD_ERROR;
 
			
 
		// let's see what happens with road vehicles
 
		if (src->type == VEH_Road) {
 
			uint16 ord;
 
			int i;
 
			Station *st;
 
			TileIndex required_dst;
 
			
 
			for (i=0; (ord = src->schedule_ptr[i]) != 0; i++) {
 
				if ( ( ord & OT_MASK ) == OT_GOTO_STATION ) {
 
					st = DEREF_STATION(ord >> 8);
 
					required_dst = (dst->cargo_type == CT_PASSENGERS) ? st->bus_tile : st->lorry_tile;
 
					if ( !required_dst )
 
						return CMD_ERROR;
 
				}
 
			}
 
		}
 

	
 
		// make sure there's orders available
 
		delta = IsScheduleShared(dst) ? src->num_orders + 1 : src->num_orders - dst->num_orders;
 
		if (delta > endof(_order_array) - _ptr_to_next_order)
 
			return_cmd_error(STR_8831_NO_MORE_SPACE_FOR_ORDERS);
 

	
0 comments (0 inline, 0 general)