51 .class_name =
"PlayerShip",
86static BOOL
ValidateContracts(JSContext* context,
int argc, JSValueConst* argv, BOOL isCargo,
OOSystemID* start,
OOSystemID* destination,
double* eta,
double* fee,
double* premium, NSString* functionName,
unsigned* risk);
260 JSValue shipPrototype = JS_GetClassProto(context,
JSShipClassID());
261 NSCAssert(JS_IsObject(shipPrototype),
@"Ship must be initialized before PlayerShip.");
264 JS_FreeValue(context, shipPrototype);
272 JSValue playerObject = JS_GetPropertyStr(context, global,
"player");
273 NSCAssert(JS_IsObject(playerObject),
@"Player must be initialized before PlayerShip.");
278 JS_DefinePropertyValueStr(context, playerObject,
"ship", JS_DupValue(context, shipObject),
OOJS_PROP_READONLY);
281 JS_FreeValue(context, shipObject);
282 JS_FreeValue(context, playerObject);
295 JSValue result = JS_GetPropertyStr(context, playerObject,
"ship");
296 JS_FreeValue(context, playerObject);
301@implementation PlayerEntity (OOJavaScriptExtensions)
305 return @"PlayerShip";
313- (void)setJSSelf:(JSValueConst)val context:(JSContext*)context
319 _jsSelf = JS_DupValue(context, val);
322 selector:@selector(deleteJSSelf)
323 name:kOOJavaScriptEngineWillResetNotification
346 return JS_NewNumber(context, [player activeMissile]);
349 return JS_NewNumber(context, [player fuelLeakRate]);
399 return JS_NewNumber(context, [player forwardShieldLevel]);
402 return JS_NewNumber(context, [player aftShieldLevel]);
405 return JS_NewNumber(context, [player maxForwardShieldLevel]);
408 return JS_NewNumber(context, [player maxAftShieldLevel]);
412 return JS_NewNumber(context, [player forwardShieldRechargeRate]);
416 return JS_NewNumber(context, [player aftShieldRechargeRate]);
419 return JS_NewNumber(context, [[player hud] mfdCount]);
445 return JS_NewInt32(context, [player targetSystemID]);
448 return JS_NewInt32(context, [player nextHopTargetSystemID]);
451 return JS_NewInt32(context, [player infoSystemID]);
454 return JS_NewInt32(context, [player previousSystemID]);
460 result =
@"OPTIMIZED_BY_TIME";
463 result =
@"OPTIMIZED_BY_JUMPS";
466 result =
@"OPTIMIZED_BY_NONE";
498 result = [OOStringFromCompassMode([player
compassMode]) isEqualToString:@"COMPASS_MODE_BASIC"] ?
@"OO_COMPASSTYPE_BASIC" :
@"OO_COMPASSTYPE_ADVANCED";
541 return JS_NewNumber(context, [
UNIVERSE tradeInValueForCommanderDictionary:[player commanderDataDictionary]]);
544 return JS_NewNumber(context, [player tradeInFactor]);
547 return JS_NewNumber(context, [player renovationCosts]);
550 return JS_NewNumber(context, [player renovationFactor]);
555 return JS_NewNumber(context, -[player flightPitch]);
558 return JS_NewNumber(context, -[player flightRoll]);
561 return JS_NewNumber(context, -[player flightYaw]);
564 result = [[[UNIVERSE messageGUI] textColor] normalizedArray];
568 result = [[[UNIVERSE messageGUI] textCommsColor] normalizedArray];
592 NSString* sValue =
nil;
600 if (JS_ToFloat64(context, &fValue, value) == 0) {
607 if ((bValue = JS_ToBool(context, value)) >= 0) {
614 if ((bValue = JS_ToBool(context, value)) >= 0) {
624 if (chartMode > OOLRC_MODE_UNKNOWN) {
629 OOJSReportError(context,
@"Unknown chart hightlight mode specified - must be either OOLRC_MODE_SUNCOLOR, OOLRC_MODE_ECONOMY, OOLRC_MODE_GOVERNMENT or OOLRC_MODE_TECHLEVEL.");
648 if ([sValue isEqualToString:
@"OO_COMPASSTYPE_BASIC"]) {
650 }
else if ([sValue isEqualToString:
@"OO_COMPASSTYPE_ADVANCED"]) {
651 if (![player hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"]) {
652 OOJSReportWarning(context,
@"Advanced Compass type requested and set but player ship does not carry the EQ_ADVANCED_COMPASS equipment or has it damaged.");
656 OOJSReportError(context,
@"Unknown compass type specified - must be either OO_COMPASSTYPE_BASIC or OO_COMPASSTYPE_ADVANCED.");
665 if (![player hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"]) {
666 OOJSReportError(context,
@"Compass target cannot be set with a basic compass.");
675 while ([player compassTarget] != current && [player compassTarget] != eValue) {
680 if ([player compassTarget] == current)
691 if (ghBehaviour != GALACTIC_HYPERSPACE_BEHAVIOUR_UNKNOWN) {
699 NSPoint coords = { vValue.
x, vValue.
y };
733 if (![player setPrimedEquipment:sValue showMessage:NO])
740 if (JS_ToFloat64(context, &fValue, value) == 0) {
750 if (JS_ToFloat64(context, &fValue, value) == 0) {
760 if (JS_ToFloat64(context, &fValue, value) == 0) {
770 if (JS_ToFloat64(context, &fValue, value) == 0) {
777 if (JS_ToFloat64(context, &fValue, value) == 0) {
784 if (JS_ToFloat64(context, &fValue, value) == 0) {
791 if (JS_ToFloat64(context, &fValue, value) == 0) {
798 if (JS_ToFloat64(context, &fValue, value) == 0) {
805 if (JS_ToFloat64(context, &fValue, value) == 0) {
812 if ((bValue = JS_ToBool(context, value)) >= 0) {
819 if ((bValue = JS_ToBool(context, value)) >= 0) {
826 if ((bValue = JS_ToBool(context, value)) >= 0) {
833 if ((bValue = JS_ToBool(context, value)) >= 0) {
854 NSString* hud = [[[player
hud]
hudName] retain];
859 if (![[player hud] setCrosshairDefinition:sValue]) {
860 OOJSReportWarning(context,
@"Crosshair definition file %@ not found or invalid", sValue);
867 if ((bValue = JS_ToBool(context, value)) >= 0) {
874 if (JS_ToFloat64(context, &fValue, value) == 0) {
875 int newLevel = (
int)fValue;
888 if (!exists || sValue ==
nil) {
889 sValue =
@"EQ_WEAPON_NONE";
898 if ([player status] != STATUS_ENTERING_WITCHSPACE) {
904#ifndef OO_DUMP_PLANETINFO
905 if (
EXPECT_NOT([player status] != STATUS_DOCKED && [player status] != STATUS_LAUNCHING)) {
906 OOJSReportError(context,
@"player.ship.targetSystem is read-only unless called when docked.");
925 OOJSReportError(context,
@"player.ship.targetSystem is read-only unless called when docked.");
942 if (colorForScript !=
nil || JS_IsNull(value)) {
943 [[UNIVERSE messageGUI] setTextColor:colorForScript];
950 if (colorForScript !=
nil || JS_IsNull(value)) {
951 [[UNIVERSE messageGUI] setTextCommsColor:colorForScript];
958 if (colorForScript !=
nil || JS_IsNull(value)) {
967 if (colorForScript !=
nil || JS_IsNull(value)) {
976 if (colorForScript !=
nil || JS_IsNull(value)) {
1020 if ([player isDocked]) {
1024 OOJSReportError(context,
@"PlayerShip.removeAllCargo only works when docked.");
1040 NSString* name =
nil;
1068 if (stationForDocking ==
nil) {
1104 if (stationForDocking ==
nil) {
1127 if (stationForDocking ==
nil) {
1147 NSString* key =
nil;
1170 NSString* name =
nil;
1172 double eta = 0.0, fee = 0.0, advance = 0.0;
1176 OOJSReportBadArguments(context,
@"PlayerShip",
@"addPassenger", argc,
OOJS_ARGV,
nil,
@"name, start, destination, ETA, fee");
1186 if (!
ValidateContracts(context, argc,
OOJS_ARGV, NO, &start, &destination, &eta, &fee, &advance,
@"addPassenger", &risk))
1190 if ([player passengerCount] >= [player passengerCapacity])
1205 NSString* name =
nil;
1230 NSString* name =
nil;
1232 double eta = 0.0, fee = 0.0, premium = 0.0;
1236 OOJSReportBadArguments(context,
@"PlayerShip",
@"addParcel", argc,
OOJS_ARGV,
nil,
@"name, start, destination, ETA, fee");
1246 if (!
ValidateContracts(context, argc,
OOJS_ARGV, NO, &start, &destination, &eta, &fee, &premium,
@"addParcel", &risk))
1263 NSString* name =
nil;
1273 OK = [player
parcelCount] > 0 && [name length] > 0;
1288 NSString* key =
nil;
1291 double eta = 0.0, fee = 0.0, premium = 0.0;
1294 OOJSReportBadArguments(context,
@"PlayerShip",
@"awardContract", argc,
OOJS_ARGV,
nil,
@"quantity, commodity, start, destination, ETA, fee");
1309 if (!
ValidateContracts(context, argc,
OOJS_ARGV, YES, &start, &destination, &eta, &fee, &premium,
@"awardContract", NULL))
1324 NSString* key =
nil;
1363 if ([
UNIVERSE viewDirection] != VIEW_CUSTOM) {
1364 OOJSReportError(context,
@"PlayerShip.setCustomView only works when custom view is active.");
1368 NSMutableDictionary* viewData = [NSMutableDictionary dictionaryWithCapacity:3];
1376 NSString* positionstr = [[NSString alloc] initWithFormat:@"%f %f %f", position.x, position.y, position.z];
1381 [positionstr release];
1385 NSString* orientationstr = [[NSString alloc] initWithFormat:@"%f %f %f %f", orientation.w, orientation.x, orientation.y, orientation.z];
1387 [viewData setObject:positionstr forKey:@"view_position"];
1388 [viewData setObject:orientationstr forKey:@"view_orientation"];
1392 [viewData setObject:facing forKey:@"weapon_facing"];
1398 [positionstr release];
1399 [orientationstr release];
1413 if ([
UNIVERSE viewDirection] != VIEW_CUSTOM) {
1414 OOJSReportError(context,
@"PlayerShip.setCustomView only works when custom view is active.");
1458 int32_t witchspaceSpinUpTime = 0;
1461 witchspaceSpinUpTime = 0;
1462#ifdef OO_DUMP_PLANETINFO
1464 witchspaceSpinUpTime = 1;
1471 if (spin_time < 5) {
1472 witchspaceSpinUpTime = 5;
1474 witchspaceSpinUpTime = spin_time;
1477 if ([player hasHyperspaceMotor] && [player status] == STATUS_IN_FLIGHT && [player witchJumpChecklist:
false]) {
1492 BOOL cancelled = NO;
1493 if ([player hasHyperspaceMotor] && [player status] == STATUS_WITCHSPACE_COUNTDOWN) {
1509 int32_t witchspaceSpinUpTime = 5;
1517 if (spin_time < 5) {
1518 witchspaceSpinUpTime = 5;
1520 witchspaceSpinUpTime = spin_time;
1523 if ([player hasEquipmentItemProviding:
@"EQ_GAL_DRIVE"] && [player status] == STATUS_IN_FLIGHT && [player witchJumpChecklist:
true]) {
1526 [player
setStatus:STATUS_WITCHSPACE_COUNTDOWN];
1529 [UNIVERSE addMessage:[NSString stringWithFormat:DESC(@"witch-galactic-in-f-seconds"), witchspaceSpinUpTime] forCount:1.0];
1541 NSString* key =
nil;
1547 if (JS_ToUint32(context, &index,
OOJS_ARGV[0]) != 0) {
1569 NSString* key =
nil;
1570 NSString* value =
nil;
1607 NSString* key =
nil;
1633 NSString* key =
nil;
1661 NSString* key =
nil;
1682 NSString* key =
nil;
1699static BOOL
ValidateContracts(JSContext* context,
int argc, JSValueConst* argv, BOOL isCargo,
OOSystemID* start,
OOSystemID* destination,
double* eta,
double* fee,
double* premium, NSString* functionName,
unsigned* risk)
1703 NSCParameterAssert(context != NULL && argv != NULL && start != NULL && destination != NULL && eta != NULL && fee != NULL);
1706 int offset = isCargo ? 2 : 1;
1720 *destination = iValue;
1722 if (JS_ToFloat64(context, &fValue, argv[
offset + 2]) != 0 || !isfinite(fValue) || fValue <= [
PLAYER clockTime]) {
1728 if (JS_ToFloat64(context, &fValue, argv[
offset + 3]) != 0 || !isfinite(fValue) || fValue < 0.0) {
1736 if (JS_ToFloat64(context, &fValue, argv[
offset + 4]) != 0)
1737 JS_FreeValue(context, JS_GetException(context));
1738 else if (isfinite(fValue) && fValue >= 0.0)
1744 if (JS_ToUint32(context, &uValue, argv[
offset + 5]) != 0)
1745 JS_FreeValue(context, JS_GetException(context));
@ OO_RETICLE_COLOR_TARGET
@ OO_RETICLE_COLOR_WORMHOLE
@ OO_RETICLE_COLOR_TARGET_SENSITIVE
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)
id OOConsumeReference(id OO_NS_CONSUMED value)
#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 JSBool PlayerShipResetScannerZoom(JSContext *context, uintN argc, jsval *vp)
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)
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)
@ 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
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[]
static JSBool PlayerShipBeginGalacticHyperspaceCountdown(JSContext *context, uintN argc, jsval *vp)
static JSBool PlayerShipSetMultiFunctionDisplay(JSContext *context, uintN argc, jsval *vp)
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
BOOL JSValueToVector(JSContext *context, jsval value, Vector *outVector) NONNULL_FUNC
BOOL NSPointToVectorJSValue(JSContext *context, NSPoint point, jsval *outValue) NONNULL_FUNC
id OOJSNativeObjectFromJSValue(JSContext *context, jsval value)
void OOJSReportWarning(JSContext *context, NSString *format,...)
#define OOJS_RETURN_WITH_HELPER(helper, value)
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)
OOINLINE BOOL OOJSValueToInt32(JSContext *context, jsval value, int32_t *outValue)
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
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_RETURN_VECTOR(value)
const Quaternion kIdentityQuaternion
#define OO_SYSTEMS_PER_GALAXY
NSPoint OOInternalCoordinatesFromGalactic(Vector galacticCoordinates)
Vector OOGalacticCoordinatesFromInternal(NSPoint internalCoordinates)
OOGalacticHyperspaceBehaviour
static JSClassID sPlayerShipClassID
JSClassID JSPlayerShipClassID(void)
JSClassID JSShipClassID(void)
#define OOJS_PROPERTY_RW(name, getter, setter, magic)
JSValue OOJSNativeFailure(JSContext *context)
JSClassID OOJSRegisterClass(JSClassID *ioClassID, const JSClassDef *classDef)
#define OOJS_PROPERTY_RO(name, getter, magic)
JSValueConst OOJSInitClass(JSContext *context, JSValueConst global, JSClassID classID, JSValueConst parentPrototype, JSCFunction *constructor, int constructorArgCount, const JSCFunctionListEntry *properties, size_t propertyCount, const JSCFunctionListEntry *methods, size_t methodCount, const JSCFunctionListEntry *staticMethods, size_t staticMethodCount)
#define OOJS_COUNT(array)
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
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)
void setScoopOverride:(BOOL newValue)
NSString * fastEquipmentB()
void disengageAutopilot()
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:(OOJSPropID message,[withArgument] id argument)
void decrease_flight_pitch:(double delta)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque