52@interface StationEntity (OOPrivate)
54- (void)pullInShipIfPermitted:(
ShipEntity*)ship;
55- (void)addShipToStationCount:(
ShipEntity*)ship;
57- (void)addShipToLaunchQueue:(
ShipEntity*)ship withPriority:(BOOL)priority;
58- (unsigned)countOfShipsInLaunchQueueWithPrimaryRole:(NSString*)role;
60- (NSDictionary*)holdPositionInstructionForShip:(
ShipEntity*)ship;
65@interface StationEntity (mwDebug)
84 return [[UNIVERSE currentSystemData] oo_intForKey:KEY_TECHLEVEL];
107 double buoy_distance = 10000.0;
155 foreach (good, [market goods]) {
171 return [UNIVERSE commodityMarket];
179- (void)setLocalMarket:(NSArray*)some_market
204- (void)setLocalShipyard:(NSArray*)some_market
207 [localShipyard release];
218 if (definition ==
nil) {
219 [localInterfaces removeObjectForKey:key];
221 [localInterfaces setObject:definition forKey:key];
228 localMarket = [[[UNIVERSE commodities] generateMarketForStation:
self] retain];
232- (void)setPlanet:(OOPlanetEntity*)planet_entity
242 return [UNIVERSE entityForUniversalID:planet];
262 return [[
self subEntities] objectEnumeratorFilteredWithSelector:@selector(isDock)];
268 NSEnumerator* subEnum =
nil;
285 NSEnumerator* subEnum =
nil;
290 if ([sub allowsLaunching] && [sub countOfShipsInLaunchQueue] == 0) {
297 if ([sub allowsLaunching]) {
314 NSEnumerator* subEnum =
nil;
321 NSEnumerator* holdEnum =
nil;
347 while ((ship = [onHoldEnum nextObject])) {
356 NSEnumerator* subEnum =
nil;
370 NSEnumerator* subEnum =
nil;
373 if ([sub shipIsInDockingQueue:ship]) {
383 [
acc oo_setHPVector:coords forKey:@"destination"];
384 [
acc oo_setFloat:speed forKey:@"speed"];
385 [
acc oo_setFloat:range forKey:@"range"];
387 [
acc oo_setBool:match_rotation forKey:@"match_rotation"];
388 [
acc oo_setInteger:docking_stage forKey:@"docking_stage"];
390 [
acc setObject:ai_message forKey:@"ai_message"];
393 [
acc setObject:comms_message forKey:@"comms_message"];
425 NSEnumerator* subEnum =
nil;
427 NSString* docking =
nil;
429 NSUInteger queue = 100;
431 BOOL alldockstoosmall = YES;
433 if ([sub shipIsInDockingQueue:ship]) {
436 alldockstoosmall = NO;
439 if (player_is_ahead) {
445 if ([docking isEqualToString:
@"DOCK_CLOSED"]) {
450 BOOL tempreject = NO;
458 docking =
@"TRY_AGAIN_LATER";
460 docking =
@"TOO_BIG_TO_DOCK";
469 if ([docking isEqualToString:
@"DOCKING_POSSIBLE"] && [sub countOfShipsInDockingQueue] < queue) {
473 alldockstoosmall = NO;
474 }
else if (![docking isEqualToString:
@"TOO_BIG_TO_DOCK"]) {
475 alldockstoosmall = NO;
478 alldockstoosmall = NO;
481 if (chosenDock ==
nil) {
482 if (player_is_ahead || ([docking isEqualToString:
@"TOO_BIG_TO_DOCK"] && !alldockstoosmall) || docking ==
nil) {
486 docking =
@"TRY_AGAIN_LATER";
493 if (fabs(
flightRoll) > 0.01 && [chosenDock isOffCentre]) {
506- (NSDictionary*)holdPositionInstructionForShip:(
ShipEntity*)ship
508 if (![_shipsOnHold containsObject:ship]) {
523 NSEnumerator* subEnum =
nil;
538- (id)initWithKey:(NSString*)key definition:(NSDictionary*)dict
569- (BOOL)setUpShipFromDictionary:(NSDictionary*)dict
577 port_radius = [
dict oo_nonNegativeDoubleForKey:@"port_radius" defaultValue:500.0];
581 NSString* portDimensionsStr = [
dict oo_stringForKey:@"port_dimensions"];
582 if (portDimensionsStr !=
nil) {
586 if ([tokens
count] == 3) {
588 [[tokens objectAtIndex:1] floatValue],
589 [[tokens objectAtIndex:2] floatValue]);
594 if (![super setUpShipFromDictionary:dict])
600 max_police = [
dict oo_unsignedIntForKey:@"max_police" defaultValue:STATION_MAX_POLICE];
603 hasNPCTraffic = [
dict oo_fuzzyBooleanForKey:@"has_npc_traffic" defaultValue:(maxFlightSpeed == 0)];
608 marketCapacity = [
dict oo_unsignedIntForKey:@"market_capacity" defaultValue:MAIN_SYSTEM_MARKET_LIMIT];
626 double unitime = [UNIVERSE getTime];
664 NSEnumerator* subEnum =
nil;
670 OOLog(
@"setup.ship.badType.subentities",
@"Subentity %@ (%@) of station %@ is itself a StationEntity. This is an internal error - please report it. ", subEntity, [subEntity
shipDataKey], [
self displayName]);
682 OOLog(
@"ship.setup.docks",
@"No docks set up for %@, making virtual dock",
self);
687 [
virtualDockDict setObject:@"oolite-dock-virtual" forKey:@"subentity_key"];
688 [
virtualDockDict oo_setVector:make_vector(0, 0, port_radius) forKey:@"position"];
689 [
virtualDockDict oo_setQuaternion:kIdentityQuaternion forKey:@"orientation"];
697 if (![
self setUpOneStandardSubentity:virtualDockDict asTurret:NO]) {
710 NSEnumerator* subEnum =
nil;
713 if ([sub shipIsInDockingCorridor:ship]) {
730 NSEnumerator* subEnum =
nil;
745 NSEnumerator* subEnum =
nil;
756 BOOL isRockHermit = (
scanClass == CLASS_ROCK);
757 BOOL isMainStation = (
self == [UNIVERSE station]);
759 double unitime = [UNIVERSE getTime];
770 if (isDockingStation && [player
status] == STATUS_IN_FLIGHT) {
803 DESC(@"station-docking-clearance-granted-in-@-until-@"),
809 DESC(@"station-docking-clearance-granted-until-@"),
858 NSEnumerator* subEnum =
nil;
869 NSEnumerator* subEnum =
nil;
885 NSEnumerator* subEnum =
nil;
888 if ([sub allowsDocking] && [sub countOfShipsInLaunchQueue] == 0 && [sub countOfShipsInDockingQueue] == 0) {
889 if ([[sub canAcceptShipForDocking:
PLAYER] isEqualToString:
@"DOCKING_POSSIBLE"]) {
899 NSEnumerator* subEnum =
nil;
903 if ([sub allowsDocking] && ([[sub canAcceptShipForDocking:
PLAYER] isEqualToString:
@"DOCKING_POSSIBLE"] || [[sub canAcceptShipForDocking:
PLAYER] isEqualToString:
@"TRY_AGAIN_LATER"])) {
913 NSEnumerator* subEnum =
nil;
916 if ([sub allowsLaunching]) {
926 NSEnumerator* subEnum =
nil;
929 if ([sub allowsDocking] && [sub countOfShipsInLaunchQueue] == 0 && [sub countOfShipsInDockingQueue] == 0) {
936- (void)addShipToLaunchQueue:(
ShipEntity*)ship withPriority:(BOOL)priority
938 NSEnumerator* subEnum =
nil;
940 unsigned threshold = 0;
945 while (threshold < 16) {
946 for (subEnum = [
self dockSubEntityEnumerator]; (sub = [
subEnum nextObject]);) {
947 if (sub != player_reserved_dock) {
948 if ([sub countOfShipsInDockingQueue] == 0) {
949 if ([sub allowsLaunching] && [sub countOfShipsInLaunchQueue] <= threshold) {
950 if ([sub allowsLaunchingOf:ship]) {
966 while (threshold < 16) {
967 for (subEnum = [
self dockSubEntityEnumerator]; (sub = [
subEnum nextObject]);) {
973 if ([sub allowsLaunching] && [sub countOfShipsInDockingQueue] <= threshold) {
974 if ([sub allowsLaunchingOf:ship]) {
983 OOLog(
@"station.launchShip.failed",
@"Cancelled launch for a %@ with role %@, as the %@ has too many ships in its launch queue(s) or no suitable launch docks.",
984 [ship displayName], [ship primaryRole], [
self displayName]);
987- (unsigned)countOfShipsInLaunchQueueWithPrimaryRole:(NSString*)role
990 NSEnumerator* subEnum =
nil;
992 for (subEnum = [
self dockSubEntityEnumerator]; (sub = [
subEnum nextObject]);) {
1008 NSEnumerator* subEnum =
nil;
1011 if ([sub allowsLaunchingOf:ship]) {
1017 OOLog(
@"station.launchShip.failed",
@"Cancelled launch for a %@ with role %@, as it is too large for the docking port of the %@.",
1035 NSEnumerator* subEnum =
nil;
1045 if (isDockingStation && [player
status] == STATUS_IN_FLIGHT &&
1051 DESC(@"station-docking-clearance-holding-d-ships-approaching"),
1056 DESC(@"station-docking-clearance-holding-d-ships-departing"),
1070 if ([ship isShuttle])
1072 else if ([ship isTrader] && ![ship isPlayer])
1074 else if (([ship isPolice] && ![ship isEscort]) || [ship hasPrimaryRole:
@"defense_ship"]) {
1075 if (0 < defenders_launched)
1076 defenders_launched--;
1077 }
else if ([ship hasPrimaryRole:
@"scavenger"] || [ship hasPrimaryRole:
@"miner"])
1079 if (0 < scavengers_launched)
1080 scavengers_launched--;
1094- (void)setHasNPCTraffic:(BOOL)flag
1116- (void)takeEnergyDamage:(
double)amount from:(
Entity*)ent becauseOf:(
Entity*)other weaponIdentifier:(NSString*)weaponIdentifier
1128 if (
self == [
UNIVERSE station] && !isFriend) {
1133 if ([
self hasNewAI] || isEnergyMine) {
1134 unsigned b = isEnergyMine ? 96 : 64;
1153 if (!isFriend && (
self != [
UNIVERSE station] || amount <
energy)) {
1165- (void)takeScrapeDamage:(
double)amount from:(
Entity*)ent
1172- (void)takeHeatDamage:(
double)amount
1184- (void)setAllegiance:(NSString*)newAllegiance
1186 [allegiance release];
1205 if (signallingScript) {
1228 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a ship with role %@, as the %@ has no launch docks.",
1233 BOOL trader = [
role isEqualToString:@"trader"];
1234 BOOL sunskimmer = ([
role isEqualToString:@"sunskim-trader"]);
1237 if ((trader && (
randf() < 0.1)) || sunskimmer) {
1238 ship = [UNIVERSE newShipWithRole:@"sunskim-trader"];
1243 ship = [UNIVERSE newShipWithRole:role];
1246 if (![
self fitsInDock:ship]) {
1257 if (trader || ship->
scanClass == CLASS_NOT_SET)
1265 [UNIVERSE makeSunSkimmer:ship andSetAI:YES];
1269 if ([ship
fuel] == 0)
1315 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a police ship, as the %@ has no launch docks.",
1322 NSMutableArray* result =
nil;
1324 if (techlevel == NSNotFound)
1331 if (![
UNIVERSE entityForUniversalID:police_target]) {
1338 if ((
Ranrot() & 3) + 9 < techlevel) {
1339 police_ship = [UNIVERSE newShipWithRole:@"interceptor"];
1341 police_ship = [UNIVERSE newShipWithRole:@"police"];
1344 if (police_ship && [
self fitsInDock:police_ship]) {
1345 if (![police_ship
crew]) {
1352 if ([police_ship
scanClass] == CLASS_NOT_SET)
1360 [
result addObject:police_ship];
1372 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a defense ship, as the %@ has no launch docks.",
1379 NSString *defense_ship_key =
nil,
1380 *defense_ship_role =
nil,
1381 *default_defense_ship_role =
nil;
1382 NSString* defense_ship_ai =
@"oolite-defenseShipAI.js";
1387 if (techlevel == NSNotFound)
1389 if ((
Ranrot() & 7) + 6 <= techlevel)
1390 default_defense_ship_role =
@"interceptor";
1392 default_defense_ship_role =
@"police";
1395 default_defense_ship_role =
@"hermit-ship";
1400 if (![
UNIVERSE entityForUniversalID:defense_target]) {
1405 defense_ship_key = [shipinfoDictionary oo_stringForKey:@"defense_ship"];
1406 if (defense_ship_key !=
nil) {
1407 defense_ship = [UNIVERSE newShipWithName:defense_ship_key];
1409 if (!defense_ship) {
1410 defense_ship_role = [shipinfoDictionary oo_stringForKey:@"defense_ship_role" defaultValue:default_defense_ship_role];
1411 defense_ship = [UNIVERSE newShipWithRole:defense_ship_role];
1414 if (!defense_ship && default_defense_ship_role != defense_ship_role)
1415 defense_ship = [UNIVERSE newShipWithRole:default_defense_ship_role];
1417 if (!defense_ship || ![
self fitsInDock:defense_ship]) {
1422 if ([defense_ship
isPolice] || [defense_ship hasPrimaryRole:
@"hermit-ship"]) {
1430 if (![defense_ship
crew]) {
1448 }
else if ([defense_ship
scanClass] == CLASS_NOT_SET) {
1460 return defense_ship;
1467 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a scavenger ship, as the %@ has no launch docks.",
1481 scavenger_ship = [UNIVERSE newShipWithRole:@"scavenger"];
1483 if (![
self fitsInDock:scavenger_ship]) {
1488 if (scavenger_ship) {
1489 if (![scavenger_ship
crew]) {
1502 return scavenger_ship;
1509 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a miner ship, as the %@ has no launch docks.",
1525 miner_ship = [UNIVERSE newShipWithRole:@"miner"];
1527 if (![
self fitsInDock:miner_ship]) {
1533 if (![miner_ship
crew]) {
1555 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a pirate ship, as the %@ has no launch docks.",
1566 if (![
UNIVERSE entityForUniversalID:defense_target]) {
1572 pirate_ship = [UNIVERSE newShipWithRole:@"pirate"];
1575 if (![
self fitsInDock:pirate_ship]) {
1581 if (![pirate_ship
crew]) {
1609 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a shuttle ship, as the %@ has no launch docks.",
1615 shuttle_ship = [UNIVERSE newShipWithRole:@"shuttle"];
1617 if (![
self fitsInDock:shuttle_ship]) {
1623 if (![shuttle_ship
crew]) {
1635 return shuttle_ship;
1642 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for an escort ship, as the %@ has no launch docks.",
1648 escort_ship = [UNIVERSE newShipWithRole:@"escort"];
1650 if (escort_ship && [
self fitsInDock:escort_ship]) {
1651 if (![escort_ship
crew]) {
1668 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a patrol ship, as the %@ has no launch docks.",
1677 if (techlevel == NSNotFound)
1680 if ((
Ranrot() & 7) + 6 <= techlevel)
1681 patrol_ship = [UNIVERSE newShipWithRole:@"interceptor"];
1683 patrol_ship = [UNIVERSE newShipWithRole:@"police"];
1685 if (![
self fitsInDock:patrol_ship]) {
1691 if (![patrol_ship
crew]) {
1697 if ([patrol_ship
scanClass] == CLASS_NOT_SET)
1715- (void)launchShipWithRole:(NSString*)role
1718 OOLog(
@"station.launchShip.impossible",
@"Cancelled launch for a ship with role %@, as the %@ has no launch docks.",
1722 ShipEntity* ship = [UNIVERSE newShipWithRole:role];
1723 if (ship && [
self fitsInDock:ship]) {
1744 if ((player) && ([player
status] == STATUS_DOCKED || [player
status] == STATUS_DOCKING) && ([player dockedStation] ==
self)) {
1747 [UNIVERSE setViewDirection:VIEW_FORWARD];
1748 [[UNIVERSE gameController] setMouseInteractionModeForFlight];
1771- (void)becomeLargeExplosion:(
double)factor
1787 NSString* result =
nil;
1788 double timeNow = [UNIVERSE getTime];
1793 [UNIVERSE clearPreviousMessage];
1814 result =
@"DOCKING_CLEARANCE_NOT_REQUIRED";
1819 if (result ==
nil && [other
isPlayer] &&
self == [player getTargetDockStation]) {
1820 switch ([player getDockingClearanceStatus]) {
1825 DESC(@"station-docking-clearance-extended-until-@"),
1829 result =
@"DOCKING_CLEARANCE_EXTENDED";
1838 result =
@"DOCKING_CLEARANCE_CANCELLED";
1842 [
self doScriptEvent:OOJSID("stationDockingQueuesAreEmpty")];
1853 if (result ==
nil && [other
isPlayer] &&
self != [player getTargetDockStation]) {
1866 result =
@"DOCKING_CLEARANCE_DENIED_SHIP_FUGITIVE";
1874 result =
@"DOCKING_CLEARANCE_DENIED_SHIP_HOSTILE";
1884 result =
@"DOCKING_CLEARANCE_DENIED_NO_DOCKS";
1892 DESC(@"station-docking-clearance-acknowledged-d-ships-approaching"),
1896 result =
@"DOCKING_CLEARANCE_DENIED_TRAFFIC_INBOUND";
1901 DESC(@"station-docking-clearance-acknowledged-d-ships-departing"),
1905 result =
@"DOCKING_CLEARANCE_DENIED_TRAFFIC_OUTBOUND";
1907 if (result ==
nil) {
1913 result =
@"DOCKING_CLEARANCE_DENIED_NO_DOCKS";
1915 NSEnumerator* subEnum =
nil;
1917 BOOL openLater = NO;
1920 if ([docking isEqualToString:
@"DOCK_CLOSED"]) {
1925 BOOL tempreject = NO;
1954 if (result ==
nil) {
1963 DESC(@"station-docking-clearance-granted-in-@-until-@"),
1969 DESC(@"station-docking-clearance-granted-until-@"),
1974 result =
@"DOCKING_CLEARANCE_GRANTED";
1983 NSEnumerator* subEnum =
nil;
1995 NSEnumerator* subEnum =
nil;
2009- (void)setRequiresDockingClearance:(BOOL)newValue
2019- (void)setAllowsFastDocking:(BOOL)newValue
2029- (void)setAllowsAutoDocking:(BOOL)newValue
2044 return [[shipinfoDictionary objectForKey:@"roles"] rangeOfString:@"rotating-station"].location != NSNotFound;
2054 return [shipinfoDictionary oo_stringForKey:@"market"];
2061 id determinant = [shipinfoDictionary objectForKey:@"has_shipyard"];
2064 determinant = [shipinfoDictionary objectForKey:@"hasShipyard"];
2068 if ([determinant isKindOfClass:[NSArray
class]]) {
2069 return [PLAYER scriptTestConditions:OOSanitizeLegacyScriptConditions(determinant, nil)];
2088 [
self setLocalShipyard:[UNIVERSE shipsForSaleForSystem:[UNIVERSE currentSystemID] withTL:stationTechLevel atTime:[PLAYER clockTime]]];
2094 for (i = 0; i < [
shipyard count]; i++) {
2095 NSString* shipID = [[
shipyard oo_dictionaryAtIndex:i] oo_stringForKey:SHIPYARD_KEY_ID];
2096 if ([[
PLAYER shipyardRecord] objectForKey:shipID]) {
2097 [
shipyard removeObjectAtIndex:i--];
2107- (void)setSuppressArrivalReports:(BOOL)newValue
2117- (void)setHasBreakPattern:(BOOL)newValue
2129 NSMutableArray* flags =
nil;
2130 NSString* flagsString =
nil;
2131 NSString* alertString =
@"*** ERROR: UNKNOWN ALERT LEVEL ***";
2137 alertString =
@"green";
2141 alertString =
@"yellow";
2145 alertString =
@"red";
2149 OOLog(
@"dumpState.stationEntity",
@"Alert level: %@", alertString);
2161#define ADD_FLAG_IF_SET(x) \
2163 [flags addObject:@ #x]; \
2167 [
flags addObject:@"rotatingStation"];
2170 [
flags addObject:@"dockingCorridorIsBusy"];
2172 flagsString = [
flags count] ? [
flags componentsJoinedByString:@", "] : (NSString*)
@"none";
2173 OOLog(
@"dumpState.stationEntity",
@"Flags: %@", flagsString);
2185 foreach (ship, onHoldEnum) {
#define ADD_FLAG_IF_SET(x)
void OOStandardsDeprecated(NSString *message)
BOOL OOEnforceStandards(void)
OOINLINE HPVector vectorToHPVector(Vector v) INLINE_CONST_FUNC
OOINLINE HPVector HPvector_add(HPVector a, HPVector b) INLINE_CONST_FUNC
OOINLINE OOHPScalar HPdistance(HPVector v1, HPVector v2) INLINE_CONST_FUNC
#define OOJS_PROFILE_EXIT
#define OOJS_PROFILE_ENTER
#define OOJSFreeValue(context, value)
#define OOJSUndefinedValue()
OOINLINE jsval OOJSValueFromNativeObject(JSContext *context, id object)
OOINLINE BOOL OOJSValueToBOOL(JSContext *context, jsval value)
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)
#define OOLog(class, format,...)
Vector vector_forward_from_quaternion(Quaternion quat) CONST_FUNC
NSString * OOCommodityType
uint64_t OOCreditsQuantity
@ DOCKING_CLEARANCE_STATUS_TIMING_OUT
@ DOCKING_CLEARANCE_STATUS_NOT_REQUIRED
@ DOCKING_CLEARANCE_STATUS_GRANTED
@ DOCKING_CLEARANCE_STATUS_NONE
@ DOCKING_CLEARANCE_STATUS_REQUESTED
OOINLINE Vector make_vector(OOScalar vx, OOScalar vy, OOScalar vz) INLINE_CONST_FUNC
OOINLINE OOScalar magnitude2(Vector vec) INLINE_CONST_FUNC
OOINLINE Vector vector_multiply_scalar(Vector v, OOScalar s) INLINE_CONST_FUNC
NSDictionary * OOMakeDockingInstructions(StationEntity *station, HPVector coords, float speed, float range, NSString *ai_message, NSString *comms_message, BOOL match_rotation, int docking_stage)
@ STATION_ALERT_LEVEL_RED
@ STATION_ALERT_LEVEL_YELLOW
@ STATION_ALERT_LEVEL_GREEN
#define DOCKING_CLEARANCE_WINDOW
NSString * dbgDumpIdLocks()
NSArray * dbgGetIdLocks()
NSArray * dbgGetShipsOnApproach()
void message:(NSString *ms)
void reactToMessage:context:(NSString *message,[context] NSString *debugContext)
void launchShip:(ShipEntity *ship)
NSUInteger countOfShipsInLaunchQueueWithPrimaryRole:(NSString *role)
Vector portUpVectorForShipsBoundingBox:(BoundingBox bb)
NSDictionary * dockingInstructionsForShip:(ShipEntity *ship)
NSUInteger countOfShipsInLaunchQueue()
NSUInteger countOfShipsInDockingQueue()
NSUInteger pruneAndCountShipsOnApproach()
NSString * canAcceptShipForDocking:(ShipEntity *ship)
void autoDockShipsOnApproach()
void abortDockingForShip:(ShipEntity *ship)
void noteDockingForShip:(ShipEntity *ship)
void clearDockingCorridor()
void addShipToLaunchQueue:withPriority:(ShipEntity *ship,[withPriority] BOOL priority)
void setScanClass:(OOScanClass sClass)
NSUInteger exportLegalityForGood:(OOCommodityType good)
NSDictionary * dictionaryForScripting()
NSUInteger importLegalityForGood:(OOCommodityType good)
BOOL setQuantity:forGood:(OOCargoQuantity quantity,[forGood] OOCommodityType good)
OOCargoQuantity quantityForGood:(OOCommodityType good)
BOOL setPrice:forGood:(OOCreditsQuantity price,[forGood] OOCommodityType good)
void loadStationAmounts:(NSArray *amounts)
BOOL callMethod:inContext:withArguments:count:result:(jsid methodID,[inContext] JSContext *context,[withArguments] jsval *argv,[count] intN argc,[result] jsval *outResult)
void setLeader:(ShipEntity *leader)
NSEnumerator * objectEnumerator()
void makeObjectsPerformSelector:withObject:(SEL selector,[withObject] id argument)
void removeObject:(id< OOWeakReferenceSupport > object)
OODockingClearanceStatus getDockingClearanceStatus()
StationEntity * getTargetDockStation()
void setDockingClearanceStatus:(OODockingClearanceStatus newValue)
void leaveDock:(StationEntity *station)
BOOL isExplicitlyUnpiloted()
void doScriptEvent:(OOJSPropID message)
void setBounty:withReason:(OOCreditsQuantity amount,[withReason] OOLegalStatusReason reason)
void addTarget:(Entity *targetEntity)
void setPrimaryAggressor:(Entity *targetEntity)
void setFuel:(OOFuelQuantity amount)
void takeEnergyDamage:from:becauseOf:weaponIdentifier:(double amount, [from] Entity *ent, [becauseOf] Entity *other, [weaponIdentifier] NSString *weaponIdentifier)
id initWithKey:definition:(NSString *key,[definition] NSDictionary *dict)
void setCargoFlag:(OOCargoFlag flag)
NSDictionary * shipinfoDictionary
BOOL collideWithShip:(ShipEntity *other)
OOShipGroup * escortGroup()
void takeScrapeDamage:from:(double amount,[from] Entity *ent)
void setSingleCrewWithRole:(NSString *crewRole)
void setGroup:(OOShipGroup *group)
OOShipGroup * stationGroup()
void setPrimaryRole:(NSString *role)
NSString * descriptionComponents()
void setHeatInsulation:(GLfloat value)
OOAegisStatus aegis_status
void respondToAttackFrom:becauseOf:(Entity *from,[becauseOf] Entity *other)
void doScriptEvent:withArgument:andArgument:(OOJSPropID message,[withArgument] id argument1,[andArgument] id argument2)
void becomeLargeExplosion:(double factor)
NSEnumerator * shipSubEntityEnumerator()
void adjustVelocity:(Vector xVel)
void setPendingEscortCount:(uint8_t count)
void sendExpandedMessage:toShip:(NSString *message_text,[toShip] ShipEntity *other_ship)
void update:(OOTimeDelta delta_t)
uint8_t pendingEscortCount()
void takeHeatDamage:(double amount)
void doScriptEvent:withArgument:(OOJSPropID message,[withArgument] id argument)
void markAsOffender:withReason:(int offence_value,[withReason] OOLegalStatusReason reason)
void switchAITo:(NSString *aiString)
void setFoundTarget:(Entity *targetEntity)
void sendAIMessage:(NSString *message)
NSMutableArray * subEntities
void setOwner:(Entity *who_owns_entity)
void enterDock:(StationEntity *station)
void addShipToLaunchQueue:withPriority:(ShipEntity *ship, [withPriority] BOOL priority)
void acceptPatrolReportFrom:(ShipEntity *patrol_ship)
ShipEntity * launchMiner()
ShipEntity * launchScavenger()
OOCommodityMarket * localMarket
double patrol_launch_interval
ShipEntity * launchIndependentShip:(NSString *role)
NSString * marketOverrideName()
double last_trader_launch_time
OOCommodityMarket * initialiseLocalMarket()
ShipEntity * launchDefenseShip()
void autoDockShipsOnApproach()
ShipEntity * launchPirateShip()
void setAlertLevel:signallingScript:(OOStationAlertLevel level,[signallingScript] BOOL signallingScript)
unsigned currentlyInDockingQueues()
BOOL suppressArrivalReports()
Vector virtualPortDimensions()
NSMutableDictionary * localInterfaces
DockEntity * player_reserved_dock
ShipEntity * launchShuttle()
NSMutableArray * localShipyard
unsigned allowsAutoDocking
void generateShipyard:(OOTechLevelID stationTechLevel)
BOOL dockingCorridorIsEmpty()
ShipEntity * launchPatrol()
NSDictionary * OOMakeDockingInstructions(StationEntity *station, HPVector coords, float speed, float range, NSString *ai_message, NSString *comms_message, BOOL match_rotation, int docking_stage)
unsigned defenders_launched
NSString * descriptionComponents()
void increaseAlertLevel()
unsigned countOfDockedDefenders()
unsigned countOfDockedPolice()
unsigned no_docking_while_launching
OOCargoQuantity marketCapacity
NSDictionary * localMarketForScripting()
OOTechLevelID equivalentTechLevel
OOStationAlertLevel alertLevel
void autoDockShipsOnHold()
unsigned countOfDockedContractors()
void sanityCheckShipsOnApproach()
double last_shuttle_launch_time
unsigned interstellarUndockingAllowed
unsigned currentlyInLaunchingQueues()
unsigned scavengers_launched
void decreaseAlertLevel()
void addShipToStationCount:(ShipEntity *ship)
unsigned countOfShipsInLaunchQueueWithPrimaryRole:(NSString *role)
unsigned suppress_arrival_reports
HPVector beaconPosition()
unsigned allowsFastDocking
double shuttle_launch_interval
BOOL fitsInDock:andLogNoFit:(ShipEntity *ship,[andLogNoFit] BOOL logNoFit)
ShipEntity * launchEscort()
unsigned max_defense_ships
NSArray * marketDefinition
float equipmentPriceFactor
void pullInShipIfPermitted:(ShipEntity *ship)
void setLocalShipyard:(NSArray *market)
double last_patrol_report_time
NSString * marketScriptName
DockEntity * playerReservedDock()
DockEntity * selectDockForDocking()
NSEnumerator * dockSubEntityEnumerator()
unsigned requiresDockingClearance
double trader_launch_interval
NSDictionary * holdPositionInstructionForShip:(ShipEntity *ship)
void clearDockingCorridor()
void setAllegiance:(NSString *newAllegiance)