Oolite
Loading...
Searching...
No Matches
ShipEntity(SubEntityRelationship) Category Reference

Instance Methods

(BOOL) - isShipWithSubEntityShip: [implementation]
 

Detailed Description

Definition at line 14860 of file ShipEntity.m.

Method Documentation

◆ isShipWithSubEntityShip:

- (BOOL) isShipWithSubEntityShip: (Entity *)  other
implementation

Definition at line 14062 of file ShipEntity.m.

14862 :(Entity *)other
14863{
14864 assert ([self isShip]);
14865
14866 if (![other isShip]) return NO;
14867 if (![other isSubEntity]) return NO;
14868 if ([other owner] != self) return NO;
14869
14870#ifndef NDEBUG
14871 // Sanity check; this should always be true.
14872 if (![self hasSubEntity:(ShipEntity *)other])
14873 {
14874 OOLogERR(@"ship.subentity.sanityCheck.failed", @"%@ thinks it's a subentity of %@, but the supposed parent does not agree. %@", [other shortDescription], [self shortDescription], @"This is an internal error, please report it.");
14875 [other setOwner:nil];
14876 return NO;
14877 }
14878#endif
14879
14880 return YES;
14881}
#define OOLogERR(class, format,...)
Definition OOLogging.h:112
void setOwner:(Entity *ent)
Definition Entity.m:577

The documentation for this category was generated from the following file: