Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
ShipEntity(SubEntityRelationship) Category Reference

Instance Methods

(BOOL) - isShipWithSubEntityShip: [implementation]
 

Detailed Description

Definition at line 14872 of file ShipEntity.m.

Method Documentation

◆ isShipWithSubEntityShip:

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

Extends class ShipEntity.

Definition at line 14073 of file ShipEntity.m.

14874 :(Entity *)other
14875{
14876 assert ([self isShip]);
14877
14878 if (![other isShip]) return NO;
14879 if (![other isSubEntity]) return NO;
14880 if ([other owner] != self) return NO;
14881
14882#ifndef NDEBUG
14883 // Sanity check; this should always be true.
14884 if (![self hasSubEntity:(ShipEntity *)other])
14885 {
14886 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.");
14887 [other setOwner:nil];
14888 return NO;
14889 }
14890#endif
14891
14892 return YES;
14893}
#define OOLogERR(class, format,...)
Definition OOLogging.h:112
void setOwner:(Entity *who_owns_entity)

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