From 17a095ffb13cc767d0a5c5474215d82062cf06c0 Mon Sep 17 00:00:00 2001 From: Jens Ayton Date: Sat, 12 Feb 2011 16:13:34 +0000 Subject: [PATCH] That's what I get for trying to be clever. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4334 127b21dd-08f5-0310-b4b7-95ae10353056 --- src/Core/Universe.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Core/Universe.m b/src/Core/Universe.m index e0a5d96d..34489478 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -4890,7 +4890,7 @@ OOINLINE BOOL EntityInRange(Vector p1, Entity *e2, float range) NSString *systemName = [self getSystemName:system_seed]; - isStandard = [systemName isEqualToString: [self generateSystemName:system_seed]]; + isStandard = [systemName isEqualToString:[self generateSystemName:system_seed]]; //if the name is not the standard generated one, we can't use the generated phonemes. systemSaid = isStandard ? [self generatePhoneticSystemName:system_seed] : systemName; @@ -4971,9 +4971,14 @@ OOINLINE BOOL EntityInRange(Vector p1, Entity *e2, float range) if (!logOnly) { - [self speakWithSubstitutions:[NSString stringWithFormat:DESC(@"speech-synthesis-incoming-message-@"), text]]; + if ([player isSpeechOn]) + { + // EMMSTRAN: should say "Incoming message from ..." when prefixed with sender name. + NSString *format = ExpandDescriptionForCurrentSystem(DESC(@"speech-synthesis-incoming-message-@")); + [self speakWithSubstitutions:[NSString stringWithFormat:format, text]]; + } - [message_gui printLongText:text align:GUI_ALIGN_CENTER color:[OOColor greenColor] fadeTime:(float)count key:nil addToArray:nil]; + [message_gui printLongText:text align:GUI_ALIGN_CENTER color:[OOColor greenColor] fadeTime:count key:nil addToArray:nil]; [currentMessage release]; currentMessage = [text retain];