36@implementation NSObject (OOInspectorExtensions)
40 NSString *desc = [
self shortDescriptionComponents];
41 if (desc ==
nil)
return [
self className];
42 else return [
NSString stringWithFormat:@"%@ %@", [
self className], desc];
48 return [
self inspDescription];
78 if ([
self conformsToProtocol:
@protocol(OOWeakReferenceSupport)])
87@implementation Entity (OOEntityInspectorExtensions)
101 return [
NSString stringWithFormat:@"%@ ID %u", [
self class], myID];
105 return [
self className];
124 return [
NSString stringWithFormat:@"%lu", [
self retainCount]];
131 return [
NSString stringWithFormat:@"%.0f, %.0f, %.0f", v.x, v.y, v.z];
138 return [
NSString stringWithFormat:@"%.1f, %.1f, %.1f (%.1f)", v.x, v.y, v.z, magnitude(v)];
145 return [
NSString stringWithFormat:@"%.3f (%.3f, %.3f, %.3f)", q.w, q.x, q.y, q.z];
157 if ([
self owner] ==
self)
return @"Self";
158 return [[
self owner] inspDescription];
170@implementation ShipEntity (OOEntityInspectorExtensions)
210@implementation PlayerEntity (OOEntityInspectorExtensions)
NSString * OOStringFromScanClass(OOScanClass scanClass) CONST_FUNC
NSString * OOStringFromEntityStatus(OOEntityStatus status) CONST_FUNC
NSString * inspVelocityLine()
NSString * inspRetainCountLine()
NSString * inspDescription()
NSString * inspOwnerLine()
NSString * inspStatusLine()
NSString * inspPositionLine()
NSString * inspScanClassLine()
NSString * inspBasicIdentityLine()
NSString * inspOrientationLine()
NSString * inspTargetLine()
NSString * inspEnergyLine()
NSString * inspBasicIdentityLine()
BOOL inspHasSecondaryIdentityLine()
NSString * inspDescription()
BOOL inspCanBecomeTarget()
NSString * inspSecondaryIdentityLine()
BOOL inspCanBecomeTarget()
NSString * inspDescription()
NSString * inspSecondaryIdentityLine()
NSString * inspDescription()
NSString * inspTargetLine()
BOOL inspCanBecomeTarget()
BOOL inspHasSecondaryIdentityLine()
NSString * inspSecondaryIdentityLine()
OOUniversalID universalID
id inspectorForObject:(id< OOWeakReferenceSupport > object)
NSString * commanderName()
void addTarget:(Entity *targetEntity)
PlayerEntity * sharedPlayer()