42 AI *
object = [
self object];
45 NSString *pendingDesc =
nil;
47 [_stateMachineNameField setStringValue:[object
name] ?: placeholder];
48 [_stateField setStringValue:[object
state] ?: placeholder];
51 [_stackDepthField setIntegerValue:[object
stackDepth]];
52 [_timeToThinkField setStringValue:[NSString stringWithFormat:@"%.1f", [object
nextThinkTime] - [UNIVERSE getTime]]];
53 [_behaviourField setStringValue:OOStringFromBehaviour([[object
owner]
behaviour])];
58 [_stackDepthField setStringValue:placeholder];
59 [_timeToThinkField setStringValue:placeholder];
60 [_behaviourField setStringValue:placeholder];
61 [_frustrationField setStringValue:placeholder];
65 if ([pending
count] == 0)
67 pendingDesc =
@"none";
71 pendingDesc = [[[pending allObjects] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] componentsJoinedByString:@", "];
72 pendingDesc = [NSString stringWithFormat:@"%lu: %@", [pending count], pendingDesc];
75 [_pendingMessagesField setStringValue:pendingDesc];
79- (IBAction) thinkNow:sender
81 [[
self object] setNextThinkTime:[UNIVERSE getTime]];
85- (IBAction) dumpPendingMessages:sender
87 [[
self object] debugDumpPendingMessages];
93@implementation AI (OOAIDebugInspectorModule)
98 return [
super inspBasicIdentityLine];