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

Instance Methods

(BOOL) - isShipWithSubEntityShip: [implementation]

Detailed Description

Definition at line 12982 of file ShipEntity.m.

Method Documentation

◆ isShipWithSubEntityShip:

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

Extends class ShipEntity.

Definition at line 12984 of file ShipEntity.m.

12984 :(Entity*)other
12985{
12986 assert([self isShip]);
12987
12988 if (![other isShip])
12989 return NO;
12990 if (![other isSubEntity])
12991 return NO;
12992 if ([other owner] != self)
12993 return NO;
12994
12995#ifndef NDEBUG
12996 // Sanity check; this should always be true.
12997 if (![self hasSubEntity:(ShipEntity*)other]) {
12998 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.");
12999 [other setOwner:nil];
13000 return NO;
13001 }
13002#endif
13003
13004 return YES;
13005}
#define OOLogERR(class, format,...)
Definition OOLogging.h:125
void setOwner:(Entity *who_owns_entity)

References OOLogERR, and Entity::setOwner:.

Here is the call graph for this function:

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