Subversion Repositories spk

Rev

Rev 102 | Rev 126 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 102 Rev 116
Line 261... Line 261...
261
	{
261
	{
262
		// no ship id, lets get one
262
		// no ship id, lets get one
263
		Utils::String ids[2];
263
		Utils::String ids[2];
264
		int i = 0;
264
		int i = 0;
265
		int id = 0;
265
		int id = 0;
266
		for ( CListNode<Utils::SStringList> *node = ships->Front(); node; node = node->next() )
266
		for ( Utils::SStringList *str = ships->first(); str; str = ships->next() )
267
		{
267
		{
268
			ids[i++] = node->Data()->data;
268
			ids[i++] = str->data;
269
			if ( i >= 2 )
269
			if ( i >= 2 )
270
			{
270
			{
271
				printf("[%3d][%30s]\t[%3d][%30s]\n", id - 1, ids[0].c_str(), id, ids[1].c_str());
271
				printf("[%3d][%30s]\t[%3d][%30s]\n", id - 1, ids[0].c_str(), id, ids[1].c_str());
272
				for ( i = 0; i < 2; i++ )
272
				for ( i = 0; i < 2; i++ )
273
					ids[i] = "";
273
					ids[i] = "";
Line 279... Line 279...
279
			printf("[%3d][%30s]\n", id, ids[0].c_str());
279
			printf("[%3d][%30s]\n", id, ids[0].c_str());
280
		printf("Enter ID to use > ");
280
		printf("Enter ID to use > ");
281
		shipid = GetInput();
281
		shipid = GetInput();
282
 
282
 
283
		if ( shipid.IsNumber() )
283
		if ( shipid.IsNumber() )
284
			tShipsLine = ships->Get(shipid.ToInt())->str;
284
			tShipsLine = ships->get(shipid.ToInt())->str;
285
		else
285
		else
286
			tShipsLine = ships->findData(shipid.ToString(), true);
286
			tShipsLine = ships->findData(shipid.ToString(), true);
287
	}
287
	}
288
	else
288
	else
289
		ships->findData(shipid.ToString(), true);
289
		ships->findData(shipid.ToString(), true);