55static JSBool
PlayerShipSetProperty(JSContext *context, JSObject *
this, jsid propID, JSBool strict, jsval *value);
85static BOOL
ValidateContracts(JSContext *context, uintN argc, jsval *vp, BOOL isCargo,
OOSystemID *start,
OOSystemID *destination,
double *eta,
double *fee,
double *premium, NSString *functionName,
unsigned *risk);
101 JSCLASS_NO_OPTIONAL_MEMBERS
315@implementation PlayerEntity (OOJavaScriptExtensions)
319 return @"PlayerShip";
323- (void) setJSSelf:(JSObject *)val context:(JSContext *)context
328 [[NSNotificationCenter defaultCenter] addObserver:self
329 selector:@selector(javaScriptEngineWillReset:)
330 name:kOOJavaScriptEngineWillResetNotification
335- (void) javaScriptEngineWillReset:(NSNotification *)notification
337 [[NSNotificationCenter defaultCenter] removeObserver:self
338 name:kOOJavaScriptEngineWillResetNotification
345 JS_RemoveObjectRoot(context, &_jsSelf);
356 if (!JSID_IS_INT(propID))
return YES;
365 switch (JSID_TO_INT(propID))
368 return JS_NewNumberValue(context, [player activeMissile], value);
371 return JS_NewNumberValue(context, [player fuelLeakRate], value);
424 return JS_NewNumberValue(context, [player forwardShieldLevel], value);
427 return JS_NewNumberValue(context, [player aftShieldLevel], value);
430 return JS_NewNumberValue(context, [player maxForwardShieldLevel], value);
433 return JS_NewNumberValue(context, [player maxAftShieldLevel], value);
437 return JS_NewNumberValue(context, [player forwardShieldRechargeRate], value);
441 return JS_NewNumberValue(context, [player aftShieldRechargeRate], value);
444 return JS_NewNumberValue(context, [[player hud] mfdCount], value);
471 *value = INT_TO_JSVAL([player targetSystemID]);
475 *value = INT_TO_JSVAL([player nextHopTargetSystemID]);
479 *value = INT_TO_JSVAL([player infoSystemID]);
483 *value = INT_TO_JSVAL([player previousSystemID]);
492 result =
@"OPTIMIZED_BY_TIME";
495 result =
@"OPTIMIZED_BY_JUMPS";
498 result =
@"OPTIMIZED_BY_NONE";
537 result = [OOStringFromCompassMode([player
compassMode]) isEqualToString:@"COMPASS_MODE_BASIC"] ?
538 @"OO_COMPASSTYPE_BASIC" :
@"OO_COMPASSTYPE_ADVANCED";
573 return VectorToJSValue(context, [player viewpointOffsetForward], value);
579 return VectorToJSValue(context, [player viewpointOffsetStarboard], value);
586 return JS_NewNumberValue(context, [
UNIVERSE tradeInValueForCommanderDictionary:[player commanderDataDictionary]], value);
589 return JS_NewNumberValue(context, [player tradeInFactor], value);
592 return JS_NewNumberValue(context, [player renovationCosts], value);
595 return JS_NewNumberValue(context, [player renovationFactor], value);
601 return JS_NewNumberValue(context, -[player flightPitch], value);
604 return JS_NewNumberValue(context, -[player flightRoll], value);
607 return JS_NewNumberValue(context, -[player flightYaw], value);
610 result = [[[UNIVERSE messageGUI] textColor] normalizedArray];
614 result = [[[UNIVERSE messageGUI] textCommsColor] normalizedArray];
630 if (!JSID_IS_INT(propID))
return YES;
640 NSString *sValue =
nil;
646 switch (JSID_TO_INT(propID))
649 if (JS_ValueToNumber(context, *value, &fValue))
657 if (JS_ValueToBoolean(context, *value, &bValue))
665 if (JS_ValueToBoolean(context, *value, &bValue))
677 if (chartMode > OOLRC_MODE_UNKNOWN)
685 OOJSReportError(context,
@"Unknown chart hightlight mode specified - must be either OOLRC_MODE_SUNCOLOR, OOLRC_MODE_ECONOMY, OOLRC_MODE_GOVERNMENT or OOLRC_MODE_TECHLEVEL.");
706 if ([sValue isEqualToString:
@"OO_COMPASSTYPE_BASIC"])
710 else if([sValue isEqualToString:
@"OO_COMPASSTYPE_ADVANCED"])
712 if (![player hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"])
714 OOJSReportWarning(context,
@"Advanced Compass type requested and set but player ship does not carry the EQ_ADVANCED_COMPASS equipment or has it damaged.");
720 OOJSReportError(context,
@"Unknown compass type specified - must be either OO_COMPASSTYPE_BASIC or OO_COMPASSTYPE_ADVANCED.");
729 if (![player hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"])
731 OOJSReportError(context,
@"Compass target cannot be set with a basic compass.");
735 if (!JSVAL_IS_NULL(*value) &&
JSValueToEntity(context, *value, &eValue))
741 while ([player compassTarget] != current && [player compassTarget] != eValue)
757 if (ghBehaviour != GALACTIC_HYPERSPACE_BEHAVIOUR_UNKNOWN)
767 NSPoint coords = { vValue.x, vValue.y };
809 if (JS_ValueToNumber(context, *value, &fValue))
820 if (JS_ValueToNumber(context, *value, &fValue))
831 if (JS_ValueToNumber(context, *value, &fValue))
842 if (JS_ValueToNumber(context, *value, &fValue))
850 if (JS_ValueToNumber(context, *value, &fValue))
858 if (JS_ValueToNumber(context, *value, &fValue))
866 if (JS_ValueToNumber(context, *value, &fValue))
874 if (JS_ValueToNumber(context, *value, &fValue))
882 if (JS_ValueToNumber(context, *value, &fValue))
890 if (JS_ValueToBoolean(context, *value, &bValue))
898 if (JS_ValueToBoolean(context, *value, &bValue))
906 if (JS_ValueToBoolean(context, *value, &bValue))
914 if (JS_ValueToBoolean(context, *value, &bValue))
940 NSString *hud = [[[player
hud]
hudName] retain];
947 if (![[player hud] setCrosshairDefinition:sValue])
949 OOJSReportWarning(context,
@"Crosshair definition file %@ not found or invalid", sValue);
956 if (JS_ValueToBoolean(context, *value, &bValue))
964 if (JS_ValueToNumber(context, *value, &fValue))
966 int newLevel = (
int)fValue;
975 if (!exists || sValue ==
nil)
977 sValue =
@"EQ_WEAPON_NONE";
986 if ([player status] != STATUS_ENTERING_WITCHSPACE)
993#ifndef OO_DUMP_PLANETINFO
994 if (
EXPECT_NOT([player status] != STATUS_DOCKED && [player status] != STATUS_LAUNCHING))
996 OOJSReportError(context,
@"player.ship.targetSystem is read-only unless called when docked.");
1001 if (JS_ValueToInt32(context, *value, &iValue))
1016 OOJSReportError(context,
@"player.ship.targetSystem is read-only unless called when docked.");
1021 if (JS_ValueToInt32(context, *value, &iValue))
1037 if (colorForScript !=
nil || JSVAL_IS_NULL(*value))
1039 [[UNIVERSE messageGUI] setTextColor:colorForScript];
1046 if (colorForScript !=
nil || JSVAL_IS_NULL(*value))
1048 [[UNIVERSE messageGUI] setTextCommsColor:colorForScript];
1055 if (colorForScript !=
nil || JSVAL_IS_NULL(*value))
1063 if (colorForScript !=
nil || JSVAL_IS_NULL(*value))
1071 if (colorForScript !=
nil || JSVAL_IS_NULL(*value))
1098 [OOPlayerForScripting() launchFromStation];
1114 if ([player isDocked])
1121 OOJSReportError(context,
@"PlayerShip.removeAllCargo only works when docked.");
1137 NSString *name =
nil;
1164 if (stationForDocking ==
nil)
1183 [OOPlayerForScripting() disengageAutopilot];
1199 if (stationForDocking ==
nil)
1221 if (stationForDocking ==
nil)
1241 NSString *key =
nil;
1264 NSString *name =
nil;
1266 jsdouble eta = 0.0, fee = 0.0, advance = 0.0;
1271 OOJSReportBadArguments(context,
@"PlayerShip",
@"addPassenger", argc,
OOJS_ARGV,
nil,
@"name, start, destination, ETA, fee");
1282 if (!
ValidateContracts(context, argc, vp, NO, &start, &destination, &eta, &fee, &advance,
@"addPassenger", &risk))
return NO;
1285 if ([player passengerCount] >= [player passengerCapacity])
OOJS_RETURN_BOOL(NO);
1300 NSString *name =
nil;
1325 NSString *name =
nil;
1327 jsdouble eta = 0.0, fee = 0.0, premium = 0.0;
1332 OOJSReportBadArguments(context,
@"PlayerShip",
@"addParcel", argc,
OOJS_ARGV,
nil,
@"name, start, destination, ETA, fee");
1343 if (!
ValidateContracts(context, argc, vp, NO, &start, &destination, &eta, &fee, &premium,
@"addParcel", &risk))
return NO;
1360 NSString *name =
nil;
1370 OK = [player
parcelCount] > 0 && [name length] > 0;
1385 NSString *key =
nil;
1388 jsdouble eta = 0.0, fee = 0.0, premium = 0.0;
1392 OOJSReportBadArguments(context,
@"PlayerShip",
@"awardContract", argc,
OOJS_ARGV,
nil,
@"quantity, commodity, start, destination, ETA, fee");
1396 if (!JS_ValueToInt32(context,
OOJS_ARGV[0], &qty))
1409 if (!
ValidateContracts(context, argc, vp, YES, &start, &destination, &eta, &fee, &premium,
@"awardContract", NULL))
return NO;
1424 NSString *key =
nil;
1441 if (!JS_ValueToInt32(context,
OOJS_ARGV[1], &dest) || dest < 0 || dest > 255)
1468 if ([
UNIVERSE viewDirection] != VIEW_CUSTOM)
1470 OOJSReportError(context,
@"PlayerShip.setCustomView only works when custom view is active.");
1474 NSMutableDictionary *viewData = [NSMutableDictionary dictionaryWithCapacity:3];
1483 NSString *positionstr = [[NSString alloc] initWithFormat:@"%f %f %f",position.x,position.y,position.z];
1492 NSString *orientationstr = [[NSString alloc] initWithFormat:@"%f %f %f %f",orientation.w,orientation.x,orientation.y,orientation.z];
1494 [viewData setObject:positionstr forKey:@"view_position"];
1495 [viewData setObject:orientationstr forKey:@"view_orientation"];
1500 [viewData setObject:facing forKey:@"weapon_facing"];
1506 [positionstr release];
1507 [orientationstr release];
1522 if ([
UNIVERSE viewDirection] != VIEW_CUSTOM)
1524 OOJSReportError(context,
@"PlayerShip.setCustomView only works when custom view is active.");
1571 int32 witchspaceSpinUpTime = 0;
1575 witchspaceSpinUpTime = 0;
1576#ifdef OO_DUMP_PLANETINFO
1578 witchspaceSpinUpTime = 1;
1583 if (!JS_ValueToInt32(context,
OOJS_ARGV[0], &spin_time) || spin_time < 5 || spin_time > 60)
1590 witchspaceSpinUpTime = 5;
1594 witchspaceSpinUpTime = spin_time;
1597 if ([player hasHyperspaceMotor] && [player status] == STATUS_IN_FLIGHT && [player witchJumpChecklist:
false])
1614 BOOL cancelled = NO;
1615 if ([player hasHyperspaceMotor] && [player status] == STATUS_WITCHSPACE_COUNTDOWN)
1634 int32 witchspaceSpinUpTime = 5;
1639 if (!JS_ValueToInt32(context,
OOJS_ARGV[0], &spin_time) || spin_time < 5 || spin_time > 60)
1646 witchspaceSpinUpTime = 5;
1650 witchspaceSpinUpTime = spin_time;
1653 if ([player hasEquipmentItemProviding:
@"EQ_GAL_DRIVE"] && [player status] == STATUS_IN_FLIGHT && [player witchJumpChecklist:
true])
1657 [player
setStatus:STATUS_WITCHSPACE_COUNTDOWN];
1660 [UNIVERSE addMessage:[NSString stringWithFormat:DESC(@"witch-galactic-in-f-seconds"), witchspaceSpinUpTime] forCount:1.0];
1673 NSString *key =
nil;
1680 if (!JS_ValueToECMAUint32(context,
OOJS_ARGV[0],&index))
1705 NSString *key =
nil;
1706 NSString *value =
nil;
1750 NSString *key =
nil;
1752 JSBool showMsg = YES;
1780 NSString *key =
nil;
1815 NSString *key =
nil;
1839 NSString *key =
nil;
1860static BOOL
ValidateContracts(JSContext *context, uintN argc, jsval *vp, BOOL isCargo,
OOSystemID *start,
OOSystemID *destination,
double *eta,
double *fee,
double *premium, NSString *functionName,
unsigned *risk)
1864 NSCParameterAssert(context != NULL && vp != NULL && start != NULL && destination != NULL && eta != NULL && fee != NULL);
1866 unsigned uValue,
offset = isCargo ? 2 : 1;
1882 *destination = iValue;
1885 if (!JS_ValueToNumber(context,
OOJS_ARGV[
offset + 2], &fValue) || !isfinite(fValue) || fValue <= [
PLAYER clockTime])
1892 if (!JS_ValueToNumber(context,
OOJS_ARGV[
offset + 3], &fValue) || !isfinite(fValue) || fValue < 0.0)
1899 if (argc >
offset+4 && JS_ValueToNumber(context,
OOJS_ARGV[
offset + 4], &fValue) && isfinite(fValue) && fValue >= 0.0)
1906 if (argc >
offset+5 && JS_ValueToECMAUint32(context,
OOJS_ARGV[
offset + 5], &uValue) && isfinite((
double)uValue))
id OOConsumeReference(id OO_NS_CONSUMED value)
OOINLINE jsval OOJSValueFromGalacticHyperspaceBehaviour(JSContext *context, OOGalacticHyperspaceBehaviour value)
OOINLINE jsval OOJSValueFromViewID(JSContext *context, OOViewID value)
OOINLINE OOGalacticHyperspaceBehaviour OOGalacticHyperspaceBehaviourFromJSValue(JSContext *context, jsval value)
OOINLINE OOCompassMode OOCompassModeFromJSValue(JSContext *context, jsval value)
OOINLINE jsval OOJSValueFromCompassMode(JSContext *context, OOCompassMode value)
NSString * OOStringFromLongRangeChartMode(OOLongRangeChartMode chartMode)
OOLongRangeChartMode OOLongRangeChartModeFromString(NSString *string)
#define OOJS_PROFILE_EXIT
#define OOJS_NATIVE_ENTER(cx)
#define OOJS_PROFILE_ENTER
OOINLINE BOOL OOIsPlayerStale(void)
BOOL JSValueToEntity(JSContext *context, jsval value, Entity **outEntity)
NSString * JSValueToEquipmentKeyRelaxed(JSContext *context, jsval value, BOOL *outExists)
NSString * JSValueToEquipmentKey(JSContext *context, jsval value)
static JSBool PlayerShipSetPrimedEquipment(JSContext *context, uintN argc, jsval *vp)
static JSFunctionSpec sPlayerShipMethods[]
static JSBool PlayerShipEngageAutopilotToStation(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipAddParcel(JSContext *context, uintN argc, jsval *vp)
static JSClass sPlayerShipClass
static JSBool PlayerShipBeginHyperspaceCountdown(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipSetCustomView(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipTakeInternalDamage(JSContext *context, uintN argc, jsval *vp)
static BOOL ValidateContracts(JSContext *context, uintN argc, jsval *vp, BOOL isCargo, OOSystemID *start, OOSystemID *destination, double *eta, double *fee, double *premium, NSString *functionName, unsigned *risk)
static JSObject * sPlayerShipObject
static JSBool PlayerShipResetScannerZoom(JSContext *context, uintN argc, jsval *vp)
static JSObject * sPlayerShipPrototype
static JSBool PlayerShipHideHUDSelector(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipSetCustomHUDDial(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipUseSpecialCargo(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipCancelDockingRequest(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipRemoveContract(JSContext *context, uintN argc, jsval *vp)
@ kPlayerShip_compassMode
@ kPlayerShip_serviceLevel
@ kPlayerShip_cursorCoordinates
@ kPlayerShip_reticleTargetSensitive
@ kPlayerShip_maxForwardShield
@ kPlayerShip_dockedStation
@ kPlayerShip_targetSystem
@ kPlayerShip_massLockable
@ kPlayerShip_scannerNonLinear
@ kPlayerShip_injectorsEngaged
@ kPlayerShip_activeMissile
@ kPlayerShip_galacticHyperspaceBehaviour
@ kPlayerShip_fuelLeakRate
@ kPlayerShip_viewPositionAft
@ kPlayerShip_cursorCoordinatesInLY
@ kPlayerShip_torusEngaged
@ kPlayerShip_reticleColorTargetSensitive
@ kPlayerShip_chartHightlightMode
@ kPlayerShip_scoopOverride
@ kPlayerShip_currentWeapon
@ kPlayerShip_missilesOnline
@ kPlayerShip_fastEquipmentA
@ kPlayerShip_messageGuiTextCommsColor
@ kPlayerShip_multiFunctionDisplayList
@ kPlayerShip_viewPositionForward
@ kPlayerShip_galaxyCoordinates
@ kPlayerShip_compassType
@ kPlayerShip_compassTarget
@ kPlayerShip_galaxyCoordinatesInLY
@ kPlayerShip_multiFunctionDisplays
@ kPlayerShip_galacticHyperspaceFixedCoordsInLY
@ kPlayerShip_fastEquipmentB
@ kPlayerShip_scannerUltraZoom
@ kPlayerShip_viewPositionStarboard
@ kPlayerShip_messageGuiTextColor
@ kPlayerShip_renovationCost
@ kPlayerShip_scannerMinimalistic
@ kPlayerShip_galacticHyperspaceFixedCoords
@ kPlayerShip_weaponsOnline
@ kPlayerShip_reticleColorTarget
@ kPlayerShip_maxAftShield
@ kPlayerShip_viewPositionPort
@ kPlayerShip_hudAllowsBigGui
@ kPlayerShip_specialCargo
@ kPlayerShip_forwardShieldRechargeRate
@ kPlayerShip_viewDirection
@ kPlayerShip_reticleColorWormhole
@ kPlayerShip_forwardShield
@ kPlayerShip_primedEquipment
@ kPlayerShip_aftShieldRechargeRate
@ kPlayerShip_renovationMultiplier
@ kPlayerShip_previousSystem
static JSBool PlayerShipRemoveAllCargo(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipAddPassenger(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipResetCustomView(JSContext *context, uintN argc, jsval *vp)
JSObject * JSPlayerShipObject(void)
static JSBool PlayerShipAwardContract(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipSetProperty(JSContext *context, JSObject *this, jsid propID, JSBool strict, jsval *value)
static JSBool PlayerShipRemoveParcel(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipDisengageAutopilot(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipRemovePassenger(JSContext *context, uintN argc, jsval *vp)
void InitOOJSPlayerShip(JSContext *context, JSObject *global)
static JSBool PlayerShipShowHUDSelector(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipSetMultiFunctionText(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipRequestDockingClearance(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipGetProperty(JSContext *context, JSObject *this, jsid propID, jsval *value)
static JSPropertySpec sPlayerShipProperties[]
JSObject * JSPlayerShipPrototype(void)
static JSBool PlayerShipBeginGalacticHyperspaceCountdown(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipSetMultiFunctionDisplay(JSContext *context, uintN argc, jsval *vp)
JSClass * JSPlayerShipClass(void)
static JSBool PlayerShipLaunch(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipCancelHyperspaceCountdown(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipAwardEquipmentToCurrentPylon(JSContext *context, uintN argc, jsval *vp)
JSObject * JSPlayerObject(void)
PlayerEntity * OOPlayerForScripting(void)
BOOL JSValueToQuaternion(JSContext *context, jsval value, Quaternion *outQuaternion) NONNULL_FUNC
JSObject * JSShipPrototype(void)
JSClass * JSShipClass(void)
BOOL JSValueToVector(JSContext *context, jsval value, Vector *outVector) NONNULL_FUNC
BOOL NSPointToVectorJSValue(JSContext *context, NSPoint point, jsval *outValue) NONNULL_FUNC
BOOL VectorToJSValue(JSContext *context, Vector vector, jsval *outValue) NONNULL_FUNC
id OOJSNativeObjectFromJSValue(JSContext *context, jsval value)
void OOJSReportWarning(JSContext *context, NSString *format,...)
#define OOJS_PROP_READWRITE_CB
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
OOINLINE jsval OOJSValueFromNativeObject(JSContext *context, id object)
void OOJSObjectWrapperFinalize(JSContext *context, JSObject *this)
void OOJSReportBadPropertySelector(JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec)
#define OOJS_RETURN_BOOL(v)
id OOJSNativeObjectOfClassFromJSValue(JSContext *context, jsval value, Class requiredClass)
NSString * OOStringFromJSValue(JSContext *context, jsval value)
JSBool OOJSUnconstructableConstruct(JSContext *context, uintN argc, jsval *vp)
#define OOJS_PROP_READONLY
void OOJSRegisterSubclass(JSClass *subclass, JSClass *superclass)
OOINLINE JSContext * OOJSAcquireContext(void)
void OOJSReportError(JSContext *context, NSString *format,...)
OOINLINE jsval OOJSValueFromBOOL(int b) INLINE_CONST_FUNC
#define OOJSAddGCObjectRoot(context, root, name)
OOINLINE void OOJSRelinquishContext(JSContext *context)
void OOJSReportBadPropertyValue(JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec, jsval value)
id OOJSBasicPrivateObjectConverter(JSContext *context, JSObject *object)
void OOJSReportBadArguments(JSContext *context, NSString *scriptClass, NSString *function, uintN argc, jsval *argv, NSString *message, NSString *expectedArgsDescription)
#define OOJS_PROP_READONLY_CB
const Quaternion kIdentityQuaternion
#define OO_SYSTEMS_PER_GALAXY
NSPoint OOInternalCoordinatesFromGalactic(Vector galacticCoordinates)
Vector OOGalacticCoordinatesFromInternal(NSPoint internalCoordinates)
OOGalacticHyperspaceBehaviour
NSString * oo_jsClassName()
NSString * reflowTextForMFD:(NSString *input)
void setHidden:(BOOL newValue)
void setReticleTargetSensitive:(BOOL newReticleTargetSensitiveValue)
void setNonlinearScanner:(BOOL newValue)
void setScannerUltraZoom:(BOOL newValue)
NSString * crosshairDefinition
BOOL setReticleColorForIndex:toColor:(NSUInteger idx,[toColor] OOColor *newColor)
void setHiddenSelector:hidden:(NSString *selectorName,[hidden] BOOL hide)
OOColor * reticleColorForIndex:(NSUInteger idx)
void setMinimalisticScanner:(BOOL newValue)
OOColor * colorWithDescription:(id description)
NSArray * normalizedArray()
OOEquipmentType * equipmentTypeWithIdentifier:(NSString *identifier)
OOJavaScriptEngine * sharedEngine()
void setNextCompassMode()
void setMaxAftShieldLevel:(float new)
void setForwardShieldLevel:(GLfloat level)
BOOL setMultiFunctionDisplay:toKey:(NSUInteger index,[toKey] NSString *key)
void setMultiFunctionText:forKey:(NSString *text,[forKey] NSString *key)
void playGalacticHyperspace()
void setAftShieldRechargeRate:(float new)
OOWeakReference * compassTarget
void setAftShieldLevel:(GLfloat level)
OOLongRangeChartMode longRangeChartMode
NSUInteger passengerCount()
void setGalacticHyperspaceFixedCoords:(NSPoint point)
StationEntity * dockedStation()
void cancelWitchspaceCountdown()
void useSpecialCargo:(NSString *descriptionString)
BOOL switchHudTo:(NSString *hudFileName)
void setJSSelf:context:(JSObject *val,[context] JSContext *context)
void setFastEquipmentA:(NSString *eqKey)
void setFastEquipmentB:(NSString *eqKey)
void beginWitchspaceCountdown:(int spin_time)
BOOL setWeaponMount:toWeapon:inContext:(OOWeaponFacing facing,[toWeapon] NSString *eqKey,[inContext] NSString *context)
BOOL removeParcel:(NSString *Name)
void setInfoSystemID:moveChart:(OOSystemID sid,[moveChart] BOOL moveChart)
void cancelDockingRequest:(StationEntity *stationForDocking)
BOOL addPassenger:start:destination:eta:fee:advance:risk:(NSString *Name,[start] unsigned start,[destination] unsigned destination,[eta] double eta,[fee] double fee,[advance] double advance,[risk] unsigned risk)
BOOL takeInternalDamage()
void setDialCustom:forKey:(id value,[forKey] NSString *key)
NSString * fastEquipmentA()
NSString * currentPrimedEquipment()
NSArray * multiFunctionDisplayList()
void setFuelLeakRate:(float value)
void setJumpType:(BOOL isGalacticJump)
void setLongRangeChartMode:(OOLongRangeChartMode mode)
BOOL addParcel:start:destination:eta:fee:premium:risk:(NSString *Name,[start] unsigned start,[destination] unsigned destination,[eta] double eta,[fee] double fee,[premium] double premium,[risk] unsigned risk)
void setCompassMode:(OOCompassMode value)
BOOL setPrimedEquipment:showMessage:(NSString *eqKey,[showMessage] BOOL showMsg)
void setScoopOverride:(BOOL newValue)
NSString * fastEquipmentB()
void validateCompassTarget()
void setGalacticHyperspaceBehaviour:(OOGalacticHyperspaceBehaviour galacticHyperspaceBehaviour)
BOOL removePassenger:(NSString *Name)
void setWitchspaceCountdown:(int spin_time)
BOOL awardContract:commodity:start:destination:eta:fee:premium:(unsigned qty,[commodity] NSString *commodity,[start] unsigned start,[destination] unsigned destination,[eta] double eta,[fee] double fee,[premium] double premium)
BOOL removeContract:destination:(NSString *commodity,[destination] unsigned destination)
void setCustomViewDataFromDictionary:withScaling:(NSDictionary *viewDict,[withScaling] BOOL withScaling)
void requestDockingClearance:(StationEntity *stationForDocking)
void noteSwitchToView:fromView:(OOViewID toView,[fromView] OOViewID fromView)
void adjustTradeInFactorBy:(int value)
OOCompassMode compassMode
void setForwardShieldRechargeRate:(float new)
void setMassLockable:(BOOL newValue)
OOEquipmentType * weaponTypeForFacing:strict:(OOWeaponFacing facing, [strict] BOOL strict)
PlayerEntity * sharedPlayer()
void setTargetSystemID:(OOSystemID sid)
void setMaxForwardShieldLevel:(float new)
void decrease_flight_roll:(double delta)
OOWeaponFacing currentWeaponFacing
void setStatus:(OOEntityStatus stat)
void decrease_flight_yaw:(double delta)
void doScriptEvent:withArgument:(jsid message,[withArgument] id argument)
void decrease_flight_pitch:(double delta)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque