AI dropMessages: now takes a comma-separated string.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2490 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2009-09-12 23:43:46 +00:00
parent 7d17118510
commit d28c6f9828

View File

@ -347,11 +347,12 @@ MA 02110-1301, USA.
NSArray *messages = nil;
NSEnumerator *messageEnum = nil;
NSString *message = nil;
NSCharacterSet *whiteSpace = [NSCharacterSet whitespaceCharacterSet];
messages = ScanTokensFromString(messageString);
messages = [messageString componentsSeparatedByString:@","];
for (messageEnum = [messages objectEnumerator]; (message = [messageEnum nextObject]); )
{
[shipAI dropMessage:message];
[shipAI dropMessage:[message stringByTrimmingCharactersInSet:whiteSpace]];
}
}