42@interface ShipEntity (DebugRawAccess)
55 NSMutableSet *roles =
nil;
62 roles = [[[[object
roleSet]
roles] mutableCopy] autorelease];
63 [roles removeObject:primaryRole];
65 [_primaryRoleField setStringValue:primaryRole ?: placeholder];
66 if ([roles
count] != 0)
68 desc = [[[roles allObjects] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] componentsJoinedByString:@", "];
69 [_otherRolesField setStringValue:desc];
73 [_otherRolesField setStringValue:placeholder];
75 [_targetField setStringValue:[object
inspTargetLine] ?: placeholder];
76 objAI = [object
getAI];
80 if ([desc hasSuffix:
@".plist"]) desc = [desc stringByDeletingPathExtension];
81 desc = [NSString stringWithFormat:@"%@: %@", desc, [objAI
state]];
82 [_AIField setStringValue:desc];
86 [_AIField setStringValue:placeholder];
89 [_scriptField setStringValue:[[object
script]
name] ?: placeholder];
97 [_laserTempField setStringValue:[NSString stringWithFormat:@"%.2f", level]];
98 [_laserTempIndicator setFloatValue:level * 100.0];
100 [_cabinTempField setStringValue:[NSString stringWithFormat:@"%.2f", level]];
101 [_cabinTempIndicator setFloatValue:level * 100.0];
102 fuel = [object
fuel];
103 [_fuelField setStringValue:[NSString stringWithFormat:@"%.1f", (float)fuel / 10.0f]];
104 [_fuelIndicator setIntValue:fuel];
108 [_laserTempField setStringValue:placeholder];
109 [_laserTempIndicator setFloatValue:0];
110 [_cabinTempField setStringValue:placeholder];
111 [_cabinTempIndicator setFloatValue:0];
112 [_fuelField setStringValue:placeholder];
113 [_fuelIndicator setFloatValue:0];
118- (IBAction) inspectPlayer:sender
120 [[
self object] inspect];
124- (IBAction) inspectTarget:sender
126 [[[
self object] primaryTarget] inspect];
130- (IBAction) inspectAI:sender
132 [[[
self object] getAI] inspect];
136- (IBAction) inspectGroup:sender
138 [[[
self object] group] inspect];
142- (IBAction) inspectEscortGroup:sender
144 [[[
self object] rawEscortGroup] inspect];
148- (IBAction) takeReportAIMessagesFrom:sender
150 [[
self object] setReportAIMessages:[(NSButton *)sender state]];
156@implementation ShipEntity (OOShipDebugInspectorModule)
158- (NSArray *) debugInspectorModules