src/vehicle_gui.cpp
changeset 6148 5247b66aad19
parent 6113 a10ede03ac58
child 6247 7d81e3a5d803
equal deleted inserted replaced
6147:ee050ca3889f 6148:5247b66aad19
   208 		/* Skip this engine if it has no capacity */
   208 		/* Skip this engine if it has no capacity */
   209 		if (u->cargo_cap == 0) continue;
   209 		if (u->cargo_cap == 0) continue;
   210 
   210 
   211 		/* Loop through all cargos in the refit mask */
   211 		/* Loop through all cargos in the refit mask */
   212 		for (CargoID cid = 0; cid != NUM_CARGO && num_lines < max_lines; cid++) {
   212 		for (CargoID cid = 0; cid != NUM_CARGO && num_lines < max_lines; cid++) {
   213 			const CargoSpec *cs = GetCargo(cid);
       
   214 
       
   215 			/* Skip cargo type if it's not listed */
   213 			/* Skip cargo type if it's not listed */
   216 			if (!HASBIT(cmask, cs->bitnum)) continue;
   214 			if (!HASBIT(cmask, cid)) continue;
   217 
   215 
   218 			/* Check the vehicle's callback mask for cargo suffixes */
   216 			/* Check the vehicle's callback mask for cargo suffixes */
   219 			if (HASBIT(callbackmask, CBM_CARGO_SUFFIX)) {
   217 			if (HASBIT(callbackmask, CBM_CARGO_SUFFIX)) {
   220 				/* Make a note of the original cargo type. It has to be
   218 				/* Make a note of the original cargo type. It has to be
   221 				 * changed to test the cargo & subtype... */
   219 				 * changed to test the cargo & subtype... */
   514 
   512 
   515 		bool first = true;
   513 		bool first = true;
   516 
   514 
   517 		/* Add each cargo type to the list */
   515 		/* Add each cargo type to the list */
   518 		for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
   516 		for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
   519 			const CargoSpec *cs = GetCargo(cid);
   517 			if (!HASBIT(cmask, cid)) continue;
   520 
       
   521 			if (!HASBIT(cmask, cs->bitnum)) continue;
       
   522 
   518 
   523 			if (!first) b = strecpy(b, ", ", lastof(_userstring));
   519 			if (!first) b = strecpy(b, ", ", lastof(_userstring));
   524 			first = false;
   520 			first = false;
   525 
   521 
   526 			b = InlineString(b, GetCargo(cid)->name);
   522 			b = InlineString(b, GetCargo(cid)->name);