52static JSBool
PlayerShipSetProperty(JSContext* context, JSObject*
this, jsid propID, JSBool strict, jsval* value);
82static BOOL
ValidateContracts(JSContext* context, uintN argc, jsval* vp, BOOL isCargo,
OOSystemID* start,
OOSystemID* destination,
double* eta,
double* fee,
double* premium, NSString* functionName,
unsigned* risk);
96 JSCLASS_NO_OPTIONAL_MEMBERS
299@implementation PlayerEntity (OOJavaScriptExtensions)
303 return @"PlayerShip";
306- (void)setJSSelf:(JSObject*)val context:(JSContext*)context
311 [[NSNotificationCenter defaultCenter] addObserver:
self
312 selector:@selector(javaScriptEngineWillReset:)
313 name:kOOJavaScriptEngineWillResetNotification
317- (void)javaScriptEngineWillReset:(NSNotification*)notification
320 name:kOOJavaScriptEngineWillResetNotification
323 if (_jsSelf != NULL) {
326 JS_RemoveObjectRoot(context, &_jsSelf);
336 if (!JSID_IS_INT(propID))
349 switch (JSID_TO_INT(propID)) {
351 return JS_NewNumberValue(context, [player activeMissile], value);
354 return JS_NewNumberValue(context, [player fuelLeakRate], value);
407 return JS_NewNumberValue(context, [player forwardShieldLevel], value);
410 return JS_NewNumberValue(context, [player aftShieldLevel], value);
413 return JS_NewNumberValue(context, [player maxForwardShieldLevel], value);
416 return JS_NewNumberValue(context, [player maxAftShieldLevel], value);
420 return JS_NewNumberValue(context, [player forwardShieldRechargeRate], value);
424 return JS_NewNumberValue(context, [player aftShieldRechargeRate], value);
427 return JS_NewNumberValue(context, [[player hud] mfdCount], value);
454 *value = INT_TO_JSVAL([player targetSystemID]);
458 *value = INT_TO_JSVAL([player nextHopTargetSystemID]);
462 *value = INT_TO_JSVAL([player infoSystemID]);
466 *value = INT_TO_JSVAL([player previousSystemID]);
473 result =
@"OPTIMIZED_BY_TIME";
476 result =
@"OPTIMIZED_BY_JUMPS";
479 result =
@"OPTIMIZED_BY_NONE";
518 result = [OOStringFromCompassMode([player
compassMode]) isEqualToString:@"COMPASS_MODE_BASIC"] ?
@"OO_COMPASSTYPE_BASIC" :
@"OO_COMPASSTYPE_ADVANCED";
553 return VectorToJSValue(context, [player viewpointOffsetForward], value);
559 return VectorToJSValue(context, [player viewpointOffsetStarboard], value);
566 return JS_NewNumberValue(context, [
UNIVERSE tradeInValueForCommanderDictionary:[player commanderDataDictionary]], value);
569 return JS_NewNumberValue(context, [player tradeInFactor], value);
572 return JS_NewNumberValue(context, [player renovationCosts], value);
575 return JS_NewNumberValue(context, [player renovationFactor], value);
580 return JS_NewNumberValue(context, -[player flightPitch], value);
583 return JS_NewNumberValue(context, -[player flightRoll], value);
586 return JS_NewNumberValue(context, -[player flightYaw], value);
589 result = [[[UNIVERSE messageGUI] textColor] normalizedArray];
593 result = [[[UNIVERSE messageGUI] textCommsColor] normalizedArray];
608 if (!JSID_IS_INT(propID))
620 NSString* sValue =
nil;
626 switch (JSID_TO_INT(propID)) {
628 if (JS_ValueToNumber(context, *value, &fValue)) {
635 if (JS_ValueToBoolean(context, *value, &bValue)) {
642 if (JS_ValueToBoolean(context, *value, &bValue)) {
652 if (chartMode > OOLRC_MODE_UNKNOWN) {
657 OOJSReportError(context,
@"Unknown chart hightlight mode specified - must be either OOLRC_MODE_SUNCOLOR, OOLRC_MODE_ECONOMY, OOLRC_MODE_GOVERNMENT or OOLRC_MODE_TECHLEVEL.");
676 if ([sValue isEqualToString:
@"OO_COMPASSTYPE_BASIC"]) {
678 }
else if ([sValue isEqualToString:
@"OO_COMPASSTYPE_ADVANCED"]) {
679 if (![player hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"]) {
680 OOJSReportWarning(context,
@"Advanced Compass type requested and set but player ship does not carry the EQ_ADVANCED_COMPASS equipment or has it damaged.");
684 OOJSReportError(context,
@"Unknown compass type specified - must be either OO_COMPASSTYPE_BASIC or OO_COMPASSTYPE_ADVANCED.");
693 if (![player hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"]) {
694 OOJSReportError(context,
@"Compass target cannot be set with a basic compass.");
698 if (!JSVAL_IS_NULL(*value) &&
JSValueToEntity(context, *value, &eValue)) {
703 while ([player compassTarget] != current && [player compassTarget] != eValue) {
716 if (ghBehaviour != GALACTIC_HYPERSPACE_BEHAVIOUR_UNKNOWN) {
724 NSPoint coords = { vValue.
x, vValue.
y };
762 if (JS_ValueToNumber(context, *value, &fValue)) {
772 if (JS_ValueToNumber(context, *value, &fValue)) {
782 if (JS_ValueToNumber(context, *value, &fValue)) {
792 if (JS_ValueToNumber(context, *value, &fValue)) {
799 if (JS_ValueToNumber(context, *value, &fValue)) {
806 if (JS_ValueToNumber(context, *value, &fValue)) {
813 if (JS_ValueToNumber(context, *value, &fValue)) {
820 if (JS_ValueToNumber(context, *value, &fValue)) {
827 if (JS_ValueToNumber(context, *value, &fValue)) {
834 if (JS_ValueToBoolean(context, *value, &bValue)) {
841 if (JS_ValueToBoolean(context, *value, &bValue)) {
848 if (JS_ValueToBoolean(context, *value, &bValue)) {
855 if (JS_ValueToBoolean(context, *value, &bValue)) {
876 NSString* hud = [[[player
hud]
hudName] retain];
881 if (![[player hud] setCrosshairDefinition:sValue]) {
882 OOJSReportWarning(context,
@"Crosshair definition file %@ not found or invalid", sValue);
889 if (JS_ValueToBoolean(context, *value, &bValue)) {
896 if (JS_ValueToNumber(context, *value, &fValue)) {
897 int newLevel = (
int)fValue;
905 if (!exists || sValue ==
nil) {
906 sValue =
@"EQ_WEAPON_NONE";
915 if ([player status] != STATUS_ENTERING_WITCHSPACE) {
921#ifndef OO_DUMP_PLANETINFO
922 if (
EXPECT_NOT([player status] != STATUS_DOCKED && [player status] != STATUS_LAUNCHING)) {
923 OOJSReportError(context,
@"player.ship.targetSystem is read-only unless called when docked.");
928 if (JS_ValueToInt32(context, *value, &iValue)) {
937 OOJSReportError(context,
@"player.ship.targetSystem is read-only unless called when docked.");
942 if (JS_ValueToInt32(context, *value, &iValue)) {
954 if (colorForScript !=
nil || JSVAL_IS_NULL(*value)) {
955 [[UNIVERSE messageGUI] setTextColor:colorForScript];
962 if (colorForScript !=
nil || JSVAL_IS_NULL(*value)) {
963 [[UNIVERSE messageGUI] setTextCommsColor:colorForScript];
970 if (colorForScript !=
nil || JSVAL_IS_NULL(*value)) {
977 if (colorForScript !=
nil || JSVAL_IS_NULL(*value)) {
984 if (colorForScript !=
nil || JSVAL_IS_NULL(*value)) {
1026 if ([player isDocked]) {
1030 OOJSReportError(context,
@"PlayerShip.removeAllCargo only works when docked.");
1046 NSString* name =
nil;
1074 if (stationForDocking ==
nil) {
1110 if (stationForDocking ==
nil) {
1133 if (stationForDocking ==
nil) {
1153 NSString* key =
nil;
1176 NSString* name =
nil;
1178 jsdouble eta = 0.0, fee = 0.0, advance = 0.0;
1182 OOJSReportBadArguments(context,
@"PlayerShip",
@"addPassenger", argc,
OOJS_ARGV,
nil,
@"name, start, destination, ETA, fee");
1192 if (!
ValidateContracts(context, argc, vp, NO, &start, &destination, &eta, &fee, &advance,
@"addPassenger", &risk))
1196 if ([player passengerCount] >= [player passengerCapacity])
1211 NSString* name =
nil;
1236 NSString* name =
nil;
1238 jsdouble eta = 0.0, fee = 0.0, premium = 0.0;
1242 OOJSReportBadArguments(context,
@"PlayerShip",
@"addParcel", argc,
OOJS_ARGV,
nil,
@"name, start, destination, ETA, fee");
1252 if (!
ValidateContracts(context, argc, vp, NO, &start, &destination, &eta, &fee, &premium,
@"addParcel", &risk))
1269 NSString* name =
nil;
1279 OK = [player
parcelCount] > 0 && [name length] > 0;
1294 NSString* key =
nil;
1297 jsdouble eta = 0.0, fee = 0.0, premium = 0.0;
1300 OOJSReportBadArguments(context,
@"PlayerShip",
@"awardContract", argc,
OOJS_ARGV,
nil,
@"quantity, commodity, start, destination, ETA, fee");
1304 if (!JS_ValueToInt32(context,
OOJS_ARGV[0], &qty)) {
1315 if (!
ValidateContracts(context, argc, vp, YES, &start, &destination, &eta, &fee, &premium,
@"awardContract", NULL))
1330 NSString* key =
nil;
1345 if (!JS_ValueToInt32(context,
OOJS_ARGV[1], &dest) || dest < 0 || dest > 255) {
1369 if ([
UNIVERSE viewDirection] != VIEW_CUSTOM) {
1370 OOJSReportError(context,
@"PlayerShip.setCustomView only works when custom view is active.");
1374 NSMutableDictionary* viewData = [NSMutableDictionary dictionaryWithCapacity:3];
1382 NSString* positionstr = [[NSString alloc] initWithFormat:@"%f %f %f", position.x, position.y, position.z];
1390 NSString* orientationstr = [[NSString alloc] initWithFormat:@"%f %f %f %f", orientation.w, orientation.x, orientation.y, orientation.z];
1392 [viewData setObject:positionstr forKey:@"view_position"];
1393 [viewData setObject:orientationstr forKey:@"view_orientation"];
1397 [viewData setObject:facing forKey:@"weapon_facing"];
1403 [positionstr release];
1404 [orientationstr release];
1418 if ([
UNIVERSE viewDirection] != VIEW_CUSTOM) {
1419 OOJSReportError(context,
@"PlayerShip.setCustomView only works when custom view is active.");
1463 int32 witchspaceSpinUpTime = 0;
1466 witchspaceSpinUpTime = 0;
1467#ifdef OO_DUMP_PLANETINFO
1469 witchspaceSpinUpTime = 1;
1472 if (!JS_ValueToInt32(context,
OOJS_ARGV[0], &spin_time) || spin_time < 5 || spin_time > 60) {
1476 if (spin_time < 5) {
1477 witchspaceSpinUpTime = 5;
1479 witchspaceSpinUpTime = spin_time;
1482 if ([player hasHyperspaceMotor] && [player status] == STATUS_IN_FLIGHT && [player witchJumpChecklist:
false]) {
1497 BOOL cancelled = NO;
1498 if ([player hasHyperspaceMotor] && [player status] == STATUS_WITCHSPACE_COUNTDOWN) {
1514 int32 witchspaceSpinUpTime = 5;
1518 if (!JS_ValueToInt32(context,
OOJS_ARGV[0], &spin_time) || spin_time < 5 || spin_time > 60) {
1522 if (spin_time < 5) {
1523 witchspaceSpinUpTime = 5;
1525 witchspaceSpinUpTime = spin_time;
1528 if ([player hasEquipmentItemProviding:
@"EQ_GAL_DRIVE"] && [player status] == STATUS_IN_FLIGHT && [player witchJumpChecklist:
true]) {
1531 [player
setStatus:STATUS_WITCHSPACE_COUNTDOWN];
1534 [UNIVERSE addMessage:[NSString stringWithFormat:DESC(@"witch-galactic-in-f-seconds"), witchspaceSpinUpTime] forCount:1.0];
1546 NSString* key =
nil;
1552 if (!JS_ValueToECMAUint32(context,
OOJS_ARGV[0], &index)) {
1574 NSString* key =
nil;
1575 NSString* value =
nil;
1612 NSString* key =
nil;
1614 JSBool showMsg = YES;
1638 NSString* key =
nil;
1666 NSString* key =
nil;
1687 NSString* key =
nil;
1704static BOOL
ValidateContracts(JSContext* context, uintN argc, jsval* vp, BOOL isCargo,
OOSystemID* start,
OOSystemID* destination,
double* eta,
double* fee,
double* premium, NSString* functionName,
unsigned* risk)
1708 NSCParameterAssert(context != NULL && vp != NULL && start != NULL && destination != NULL && eta != NULL && fee != NULL);
1710 unsigned uValue,
offset = isCargo ? 2 : 1;
1724 *destination = iValue;
1726 if (!JS_ValueToNumber(context,
OOJS_ARGV[
offset + 2], &fValue) || !isfinite(fValue) || fValue <= [
PLAYER clockTime]) {
1732 if (!JS_ValueToNumber(context,
OOJS_ARGV[
offset + 3], &fValue) || !isfinite(fValue) || fValue < 0.0) {
1738 if (argc >
offset + 4 && JS_ValueToNumber(context,
OOJS_ARGV[
offset + 4], &fValue) && isfinite(fValue) && fValue >= 0.0) {
1743 if (argc >
offset + 5 && JS_ValueToECMAUint32(context,
OOJS_ARGV[
offset + 5], &uValue) && isfinite((
double)uValue)) {
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 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)
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[]
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 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