34@implementation ShipEntity (ScriptMethods)
36- (
ShipEntity *) ejectShipOfType:(NSString *)shipKey
42 item = [[UNIVERSE newShipWithName:shipKey] autorelease];
50- (
ShipEntity *) ejectShipOfRole:(NSString *)role
56 item = [[UNIVERSE newShipWithRole:role] autorelease];
57 if (item !=
nil) [
self dumpItem:item];
64- (NSArray *) spawnShipsWithRole:(NSString *)role count:(NSUInteger)count
68 NSMutableArray *result =
nil;
70 if (
count == 0)
return [NSArray array];
74 result = [NSMutableArray arrayWithCapacity:count];
78 spawned = [UNIVERSE spawnShipWithRole:role near:ship];
82 if ([
self isMissileFlagSet] && [[spawned shipInfoDictionary] oo_boolForKey:
@"is_submunition"])
88 [result addObject:spawned];
#define OOLog(class, format,...)
static NSString *const kOOLogNoteAddShips
static NSString *const kOOLogNoteAddShips
void addTarget:(Entity *targetEntity)
OOCargoType dumpItem:(ShipEntity *jetto)
void setTemperature:(GLfloat value)
void setIsMissileFlag:(BOOL newValue)
void setOwner:(Entity *who_owns_entity)