37#define RAIDER_MAX_CARGO 5
38#define MERCHANTMAN_MAX_CARGO 125
40#define PIRATES_PREFER_PLAYER YES
42#define TURRET_MINIMUM_COS 0.20f
44#define SHIP_THRUST_FACTOR 5.0f
45#define AFTERBURNER_BURNRATE 0.25f
47#define CLOAKING_DEVICE_ENERGY_RATE 12.8f
48#define CLOAKING_DEVICE_MIN_ENERGY 128
49#define CLOAKING_DEVICE_START_ENERGY 0.75f
51#define MILITARY_JAMMER_ENERGY_RATE 3
52#define MILITARY_JAMMER_MIN_ENERGY 128
54#define COMBAT_IN_RANGE_FACTOR 0.035f
55#define COMBAT_BROADSIDE_IN_RANGE_FACTOR 0.020f
56#define COMBAT_OUT_RANGE_FACTOR 0.500f
57#define COMBAT_BROADSIDE_RANGE_FACTOR 0.900f
58#define COMBAT_WEAPON_RANGE_FACTOR 1.200f
59#define COMBAT_JINK_OFFSET 500.0f
61#define SHIP_COOLING_FACTOR 0.1f
65#define SHIP_ENERGY_DAMAGE_TO_HEAT_FACTOR (mass > 400000 ? 200000 / mass : 0.5)
66#define SHIP_INSULATION_FACTOR 0.00175f
67#define SHIP_MAX_CABIN_TEMP 256.0f
68#define SHIP_MIN_CABIN_TEMP 60.0f
69#define EJECTA_TEMP_FACTOR 0.85f
70#define DEFAULT_HYPERSPACE_SPIN_TIME 15.0f
72#define SUN_TEMPERATURE 1250.0f
75#define ESCORT_SPACING_FACTOR 3.0
77#define SHIPENTITY_MAX_MISSILES 32
79#define TURRET_TYPICAL_ENERGY 25.0f
80#define TURRET_SHOT_SPEED 2000.0f
81#define TURRET_SHOT_DURATION 3.0
82#define TURRET_SHOT_RANGE (TURRET_SHOT_SPEED * TURRET_SHOT_DURATION)
83#define TURRET_SHOT_FREQUENCY (TURRET_SHOT_DURATION * TURRET_SHOT_DURATION * TURRET_SHOT_DURATION / 100.0)
85#define NPC_PLASMA_SPEED 1500.0f
86#define MAIN_PLASMA_DURATION 5.0
87#define NPC_PLASMA_RANGE (MAIN_PLASMA_DURATION * NPC_PLASMA_SPEED)
89#define PLAYER_PLASMA_SPEED 1000.0f
90#define PLAYER_PLASMA_RANGE (MAIN_PLASMA_DURATION * PLAYER_PLASMA_SPEED)
92#define TRACTOR_FORCE 2500.0f
94#define AIMS_AGGRESSOR_SWITCHED_TARGET @"AGGRESSOR_SWITCHED_TARGET"
97#define MAX_SCAN_NUMBER 32
99#define BASELINE_SHIELD_LEVEL 128.0f
100#define INITIAL_SHOT_TIME 100.0
103#ifdef OO_DUMP_PLANETINFO
105#define MAX_JUMP_RANGE 150.0
107#define MAX_JUMP_RANGE 7.0
110#define ENTITY_PERSONALITY_MAX 0x7FFFU
111#define ENTITY_PERSONALITY_INVALID 0xFFFFU
114#define WEAPON_COOLING_FACTOR 6.0f
115#define NPC_MAX_WEAPON_TEMP 256.0f
116#define WEAPON_COOLING_CUTOUT 0.85f
118#define COMBAT_AI_WEAPON_TEMP_READY 0.25f * NPC_MAX_WEAPON_TEMP
119#define COMBAT_AI_WEAPON_TEMP_USABLE WEAPON_COOLING_CUTOUT * NPC_MAX_WEAPON_TEMP
122#define COMBAT_AI_CONFIDENCE_FACTOR 1250000.0f
123#define COMBAT_AI_ISNT_AWFUL 0.0f
125#define COMBAT_AI_IS_SMART 5.0f
127#define COMBAT_AI_FLEES_BETTER 6.0f
129#define COMBAT_AI_DOGFIGHTER 6.5f
131#define COMBAT_AI_TRACKS_CLOSER 7.5f
132#define COMBAT_AI_USES_SNIPING 8.5f
134#define COMBAT_AI_FLEES_BETTER_2 9.0f
136#define COMBAT_AI_STANDARD_REACTION_TIME 1.5f
140#define MAX_LANDING_SPEED 50.0
141#define MAX_LANDING_SPEED2 (MAX_LANDING_SPEED * MAX_LANDING_SPEED)
144#define MAX_COS2 (MAX_COS * MAX_COS)
147#define ENTRY(label, value) label = value,
151#include "OOBehaviour.tbl"
184#define DIFF_STRING_ENTRY(label, string) label,
185#include "OOShipDamageType.tbl"
186#undef DIFF_STRING_ENTRY
360 NSMutableArray *
cargo;
499- (void) setStateMachine:(NSString *)ai_desc;
500- (void) setAI:(
AI *)ai;
504- (void) setShipScript:(NSString *)script_name;
505- (void) removeScript;
510- (double) frustration;
511- (void) setLaunchDelay:(
double)delay;
513- (void) interpretAIMessage:(NSString *)message;
516- (void)setAccuracy:(GLfloat) new_accuracy;
519- (void)setMesh:(
OOMesh *)mesh;
521- (BoundingBox) totalBoundingBox;
523- (Vector) forwardVector;
525- (Vector) rightVector;
527- (NSArray *)subEntities;
528- (NSUInteger) subEntityCount;
529- (BOOL) hasSubEntity:(
Entity<OOSubEntity> *)sub;
531- (NSEnumerator *)subEntityEnumerator;
532- (NSEnumerator *)shipSubEntityEnumerator;
533- (NSEnumerator *)flasherEnumerator;
534- (NSEnumerator *)exhaustEnumerator;
537- (void) setSubEntityTakingDamage:(
ShipEntity *)sub;
539- (void) clearSubEntities;
541- (Quaternion) subEntityRotationalVelocity;
542- (void) setSubEntityRotationalVelocity:(Quaternion)rv;
545- (NSString *) serializeShipSubEntities;
546- (void) deserializeShipSubEntitiesFrom:(NSString *)string;
547- (NSUInteger) maxShipSubEntities;
548- (void) setSubIdx:(NSUInteger)value;
549- (NSUInteger) subIdx;
555- (GLfloat)doesHitLine:(HPVector)v0 :(HPVector)v1;
556- (GLfloat)doesHitLine:(HPVector)v0 :(HPVector)v1 :(
ShipEntity**)hitEntity;
557- (GLfloat)doesHitLine:(HPVector)v0 :(HPVector)v1 withPosition:(HPVector)o andIJK:(Vector)i :(Vector)j :(Vector)k;
559- (BoundingBox) findBoundingBoxRelativeToPosition:(HPVector)opv InVectors:(Vector)i :(Vector)j :(Vector)k;
561- (HPVector)absoluteTractorPosition;
565- (void) setIsBoulder:(BOOL)flag;
569- (BOOL) countsAsKill;
571- (void) setUpEscorts;
572- (void) updateEscortFormation;
574- (id)initWithKey:(NSString *)key definition:(NSDictionary *)dict;
575- (BOOL)setUpFromDictionary:(NSDictionary *) shipDict;
576- (BOOL)setUpShipFromDictionary:(NSDictionary *) shipDict;
577- (BOOL)setUpSubEntities;
578- (BOOL) setUpOneStandardSubentity:(NSDictionary *) subentDict asTurret:(BOOL)asTurret;
579- (GLfloat)frustumRadius;
581- (NSString *) shipDataKey;
582- (NSString *) shipDataKeyAutoRole;
583- (void)setShipDataKey:(NSString *)key;
585- (NSDictionary *)shipInfoDictionary;
587- (NSArray *) getWeaponOffsetFrom:(NSDictionary *)dict withKey:(NSString *)key inMode:(NSString *)mode;
588- (NSArray *) aftWeaponOffset;
589- (NSArray *) forwardWeaponOffset;
590- (NSArray *) portWeaponOffset;
591- (NSArray *) starboardWeaponOffset;
592- (BOOL) hasAutoWeapons;
595- (BOOL) suppressFlightNotifications;
597- (void) respondToAttackFrom:(
Entity *)from becauseOf:(
Entity *)other;
601- (BOOL) hasEquipmentItem:(
id)equipmentKeys includeWeapons:(BOOL)includeWeapons whileLoading:(BOOL)loading;
602- (BOOL) hasEquipmentItem:(
id)equipmentKeys;
603- (NSUInteger) countEquipmentItem:(NSString *)eqkey;
604- (NSString *) equipmentItemProviding:(NSString *)equipmentType;
605- (BOOL) hasEquipmentItemProviding:(NSString *)equipmentType;
606- (BOOL) hasAllEquipment:(
id)equipmentKeys includeWeapons:(BOOL)includeWeapons whileLoading:(BOOL)loading;
607- (BOOL) hasAllEquipment:(
id)equipmentKeys;
608- (BOOL) setWeaponMount:(
OOWeaponFacing)facing toWeapon:(NSString *)eqKey;
609- (BOOL) canAddEquipment:(NSString *)equipmentKey inContext:(NSString *)context;
610- (BOOL) equipmentValidToAdd:(NSString *)equipmentKey inContext:(NSString *)context;
611- (BOOL) equipmentValidToAdd:(NSString *)equipmentKey whileLoading:(BOOL)loading inContext:(NSString *)context;
612- (BOOL) addEquipmentItem:(NSString *)equipmentKey inContext:(NSString *)context;
613- (BOOL) addEquipmentItem:(NSString *)equipmentKey withValidation:(BOOL)validateAddition inContext:(NSString *)context;
614- (BOOL) hasHyperspaceMotor;
615- (float) hyperspaceSpinTime;
616- (void) setHyperspaceSpinTime:(
float)new;
619- (NSEnumerator *) equipmentEnumerator;
620- (NSUInteger) equipmentCount;
621- (void) removeEquipmentItem:(NSString *)equipmentKey;
622- (void) removeAllEquipment;
627- (BOOL) hasOneEquipmentItem:(NSString *)itemKey includeWeapons:(BOOL)includeMissiles whileLoading:(BOOL)loading;
628- (BOOL) hasOneEquipmentItem:(NSString *)itemKey includeMissiles:(BOOL)includeMissiles whileLoading:(BOOL)loading;
633- (NSUInteger) parcelCount;
634- (NSUInteger) passengerCount;
635- (NSUInteger) passengerCapacity;
637- (NSUInteger) missileCount;
638- (NSUInteger) missileCapacity;
640- (NSUInteger) extraCargo;
645- (BOOL) hasFuelScoop;
646- (BOOL) hasCargoScoop;
648- (BOOL) hasCloakingDevice;
649- (BOOL) hasMilitaryScannerFilter;
650- (BOOL) hasMilitaryJammer;
651- (BOOL) hasExpandedCargoBay;
652- (BOOL) hasShieldBooster;
653- (BOOL) hasMilitaryShieldEnhancer;
654- (BOOL) hasHeatShield;
655- (BOOL) hasFuelInjection;
656- (BOOL) hasCascadeMine;
657- (BOOL) hasEscapePod;
658- (BOOL) hasDockingComputer;
659- (BOOL) hasGalacticHyperdrive;
662- (float) shieldBoostFactor;
663- (float) maxForwardShieldLevel;
664- (float) maxAftShieldLevel;
665- (float) shieldRechargeRate;
667- (double) maxHyperspaceDistance;
668- (float) afterburnerFactor;
669- (float) afterburnerRate;
670- (void) setAfterburnerFactor:(GLfloat)new;
671- (void) setAfterburnerRate:(GLfloat)new;
675- (void) setMaxThrust:(GLfloat)new;
676- (void) setMaxFlightPitch:(GLfloat)new;
677- (void) setMaxFlightSpeed:(GLfloat)new;
678- (void) setMaxFlightRoll:(GLfloat)new;
679- (void) setMaxFlightYaw:(GLfloat)new;
680- (void) setEnergyRechargeRate:(GLfloat)new;
685- (void) behaviour_stop_still:(
double) delta_t;
686- (void) behaviour_idle:(
double) delta_t;
687- (void) behaviour_tumble:(
double) delta_t;
688- (void) behaviour_tractored:(
double) delta_t;
689- (void) behaviour_track_target:(
double) delta_t;
690- (void) behaviour_intercept_target:(
double) delta_t;
691- (void) behaviour_attack_target:(
double) delta_t;
692- (void) behaviour_attack_slow_dogfight:(
double) delta_t;
693- (void) behaviour_evasive_action:(
double) delta_t;
694- (void) behaviour_attack_break_off_target:(
double) delta_t;
695- (void) behaviour_fly_to_target_six:(
double) delta_t;
696- (void) behaviour_attack_mining_target:(
double) delta_t;
697- (void) behaviour_attack_fly_to_target:(
double) delta_t;
698- (void) behaviour_attack_fly_from_target:(
double) delta_t;
699- (void) behaviour_running_defense:(
double) delta_t;
700- (void) behaviour_flee_target:(
double) delta_t;
701- (void) behaviour_attack_broadside:(
double) delta_t;
702- (void) behaviour_attack_broadside_left:(
double) delta_t;
703- (void) behaviour_attack_broadside_right:(
double) delta_t;
704- (void) behaviour_close_to_broadside_range:(
double) delta_t;
705- (void) behaviour_close_with_target:(
double) delta_t;
706- (void) behaviour_attack_broadside_target:(
double) delta_t leftside:(BOOL)leftside;
707- (void) behaviour_attack_sniper:(
double) delta_t;
708- (void) behaviour_fly_range_from_destination:(
double) delta_t;
709- (void) behaviour_face_destination:(
double) delta_t;
710- (void) behaviour_land_on_planet:(
double) delta_t;
711- (void) behaviour_formation_form_up:(
double) delta_t;
712- (void) behaviour_fly_to_destination:(
double) delta_t;
713- (void) behaviour_fly_from_destination:(
double) delta_t;
714- (void) behaviour_avoid_collision:(
double) delta_t;
715- (void) behaviour_track_as_turret:(
double) delta_t;
716- (void) behaviour_fly_thru_navpoints:(
double) delta_t;
717- (void) behaviour_scripted_ai:(
double) delta_t;
719- (float) reactionTime;
720- (void) setReactionTime: (
float) newReactionTime;
721- (HPVector) calculateTargetPosition;
722- (void) startTrackingCurve;
723- (void) updateTrackingCurve;
724- (void) calculateTrackingCurve;
726- (GLfloat *) scannerDisplayColorForShip:(
ShipEntity*)otherShip :(BOOL)isHostile :(BOOL)flash :(
OOColor *)scannerDisplayColor1 :(
OOColor *)scannerDisplayColor2 :(
OOColor *)scannerDisplayColorH1 :(
OOColor *)scannerDisplayColorH2;
727- (void)setScannerDisplayColor1:(
OOColor *)color1;
728- (void)setScannerDisplayColor2:(
OOColor *)color2;
729- (
OOColor *)scannerDisplayColor1;
730- (
OOColor *)scannerDisplayColor2;
731- (void)setScannerDisplayColorHostile1:(
OOColor *)color1;
732- (void)setScannerDisplayColorHostile2:(
OOColor *)color2;
733- (
OOColor *)scannerDisplayColorHostile1;
734- (
OOColor *)scannerDisplayColorHostile2;
737- (void)setCloaked:(BOOL)cloak;
739- (void)setAutoCloak:(BOOL)automatic;
741- (void) applyThrust:(
double) delta_t;
742- (void) applyAttitudeChanges:(
double) delta_t;
744- (void) avoidCollision;
745- (void) resumePostProximityAlert;
747- (double) messageTime;
748- (void) setMessageTime:(
double) value;
759- (NSEnumerator *) escortEnumerator;
760- (NSArray *) escortArray;
762- (uint8_t) escortCount;
765- (uint8_t) pendingEscortCount;
766- (void) setPendingEscortCount:(uint8_t)count;
769- (uint8_t) maxEscortCount;
770- (void) setMaxEscortCount:(uint8_t)newCount;
772- (NSUInteger) turretCount;
775- (NSString *) shipUniqueName;
776- (NSString *) shipClassName;
777- (NSString *) displayName;
778- (NSString *) scanDescription;
779- (NSString *) scanDescriptionForScripting;
780- (void) setName:(NSString *)inName;
781- (void) setShipUniqueName:(NSString *)inName;
782- (void) setShipClassName:(NSString *)inName;
783- (void) setDisplayName:(NSString *)inName;
784- (void) setScanDescription:(NSString *)inName;
785- (NSString *) identFromShip:(
ShipEntity*) otherShip;
787- (BOOL) hasRole:(NSString *)role;
790- (void) addRole:(NSString *)role;
791- (void) addRole:(NSString *)role withProbability:(
float)probability;
792- (void) removeRole:(NSString *)role;
794- (NSString *)primaryRole;
795- (void)setPrimaryRole:(NSString *)role;
796- (BOOL)hasPrimaryRole:(NSString *)role;
808- (BOOL)isPirateVictim;
809- (BOOL)isExplicitlyUnpiloted;
814- (BOOL) hasHostileTarget;
815- (BOOL) isHostileTo:(
Entity *)entity;
818- (NSUInteger) defenseTargetCount;
819- (NSArray *) allDefenseTargets;
820- (NSEnumerator *) defenseTargetEnumerator;
821- (void) validateDefenseTargets;
822- (BOOL) addDefenseTarget:(
Entity *)target;
823- (BOOL) isDefenseTarget:(
Entity *)target;
824- (void) removeDefenseTarget:(
Entity *)target;
825- (void) removeAllDefenseTargets;
828- (NSArray *) collisionExceptions;
829- (void) addCollisionException:(
ShipEntity *)ship;
830- (void) removeCollisionException:(
ShipEntity *)ship;
831- (BOOL) collisionExceptedFor:(
ShipEntity *)ship;
835- (GLfloat) weaponRange;
836- (void) setWeaponRange:(GLfloat) value;
837- (void) setWeaponDataFromType:(
OOWeaponType)weapon_type;
838- (float) energyRechargeRate;
839- (float) weaponRechargeRate;
840- (void) setWeaponRechargeRate:(
float)value;
841- (void) setWeaponEnergy:(
float)value;
844- (GLfloat) scannerRange;
845- (void) setScannerRange:(GLfloat)value;
848- (void) setReference:(Vector)v;
850- (BOOL) reportAIMessages;
851- (void) setReportAIMessages:(BOOL)yn;
853- (void) transitionToAegisNone;
854- (OOPlanetEntity *) findNearestPlanet;
855- (
Entity<OOStellarBody> *) findNearestStellarBody;
856- (OOPlanetEntity *) findNearestPlanetExcludingMoons;
858- (void) forceAegisCheck;
859- (BOOL) withinStationAegis;
860- (void) setLastAegisLock:(
Entity<OOStellarBody> *)lastAegisLock;
869- (NSArray *) crewForScripting;
870- (void) setCrew:(NSArray *)crewArray;
875- (void) setSingleCrewWithRole:(NSString *)crewRole;
882- (GLfloat) fuelChargeRate;
884- (void) setRoll:(
double)amount;
885- (void) setRawRoll:(
double)amount;
886- (void) setPitch:(
double)amount;
887- (void) setYaw:(
double)amount;
888- (void) setThrust:(
double)amount;
889- (void) applySticks:(
double)delta_t;
892- (void)setThrustForDemo:(
float)factor;
900- (void) setBounty:(
OOCreditsQuantity)amount withReasonAsString:(NSString *)reason;
905- (BOOL) isTemplateCargoPod;
906- (void) setUpCargoType:(NSString *)cargoString;
917- (NSArray *) cargoListForScripting;
918- (NSMutableArray *) cargo;
919- (void) setCargo:(NSArray *)some_cargo;
920- (BOOL) addCargo:(NSArray *) some_cargo;
922- (BOOL) showScoopMessage;
924- (NSArray *) passengerListForScripting;
925- (NSArray *) parcelListForScripting;
926- (NSArray *) contractListForScripting;
927- (NSArray *) equipmentListForScripting;
930- (NSArray *) missilesList;
935- (void) setSpeed:(
double)amount;
936- (double) desiredSpeed;
937- (void) setDesiredSpeed:(
double)amount;
938- (double) desiredRange;
939- (void) setDesiredRange:(
double)amount;
941- (double) cruiseSpeed;
943- (Vector) thrustVector;
944- (void) setTotalVelocity:(Vector)vel;
946- (void) increase_flight_speed:(
double)delta;
947- (void) decrease_flight_speed:(
double)delta;
948- (void) increase_flight_roll:(
double)delta;
949- (void) decrease_flight_roll:(
double)delta;
950- (void) increase_flight_pitch:(
double)delta;
951- (void) decrease_flight_pitch:(
double)delta;
952- (void) increase_flight_yaw:(
double)delta;
953- (void) decrease_flight_yaw:(
double)delta;
955- (GLfloat) flightRoll;
956- (GLfloat) flightPitch;
957- (GLfloat) flightYaw;
958- (GLfloat) flightSpeed;
959- (GLfloat) maxFlightPitch;
960- (GLfloat) maxFlightSpeed;
961- (GLfloat) maxFlightRoll;
962- (GLfloat) maxFlightYaw;
963- (GLfloat) speedFactor;
965- (GLfloat) temperature;
966- (void) setTemperature:(GLfloat) value;
967- (GLfloat) heatInsulation;
968- (void) setHeatInsulation:(GLfloat) value;
970- (float) randomEjectaTemperature;
971- (float) randomEjectaTemperatureWithMaxFactor:(
float)factor;
976- (void) dealEnergyDamage:(GLfloat) baseDamage atRange:(GLfloat) range withBias:(GLfloat) velocityBias;
977- (void) dealEnergyDamageWithinDesiredRange;
978- (void) dealMomentumWithinDesiredRange:(
double)amount;
986- (void) becomeExplosion;
987- (void) becomeLargeExplosion:(
double) factor;
988- (void) becomeEnergyBlast;
989- (void) broadcastEnergyBlastImminent;
990- (void) setIsWreckage:(BOOL)isw;
993- (Vector) positionOffsetForAlignment:(NSString*) align;
994Vector positionOffsetForShipInRotationToAlignment(
ShipEntity* ship, Quaternion q, NSString* align);
998- (BoundingBox) findSubentityBoundingBox;
1000- (Triangle) absoluteIJKForSubentity;
1002- (GLfloat)weaponRecoveryTime;
1003- (GLfloat)laserHeatLevel;
1004- (GLfloat)laserHeatLevelAft;
1005- (GLfloat)laserHeatLevelForward;
1006- (GLfloat)laserHeatLevelPort;
1007- (GLfloat)laserHeatLevelStarboard;
1008- (GLfloat)hullHeatLevel;
1009- (GLfloat)entityPersonality;
1010- (GLint)entityPersonalityInt;
1011- (void) setEntityPersonalityInt:(uint16_t)value;
1013- (void)setSuppressExplosion:(BOOL)suppress;
1015- (void) resetExhaustPlumes;
1027- (void) checkScanner;
1028- (void) checkScannerIgnoringUnpowered;
1030- (
int) numberOfScannedShips;
1033- (
Entity *)primaryAggressor;
1034- (
Entity *)lastEscortTarget;
1036- (
Entity *)rememberedShip;
1037- (
Entity *)proximityAlert;
1038- (void) setFoundTarget:(
Entity *) targetEntity;
1039- (void) setPrimaryAggressor:(
Entity *) targetEntity;
1040- (void) setLastEscortTarget:(
Entity *) targetEntity;
1041- (void) setThankedShip:(
Entity *) targetEntity;
1042- (void) setRememberedShip:(
Entity *) targetEntity;
1043- (void) setProximityAlert:(
ShipEntity *) targetEntity;
1044- (void) setTargetStation:(
Entity *) targetEntity;
1045- (BOOL) isValidTarget:(
Entity *) target;
1046- (void) addTarget:(
Entity *) targetEntity;
1047- (void) removeTarget:(
Entity *) targetEntity;
1048- (BOOL) canStillTrackPrimaryTarget;
1049- (id) primaryTarget;
1050- (id) primaryTargetWithoutValidityCheck;
1053- (BOOL) isFriendlyTo:(
ShipEntity *)otherShip;
1057- (void) noteLostTarget;
1058- (void) noteLostTargetAndGoIdle;
1059- (void) noteTargetDestroyed:(
ShipEntity *)target;
1064- (void) trackOntoTarget:(
double) delta_t withDForward: (GLfloat) dp;
1066- (double) ballTrackLeadingTarget:(
double) delta_t atTarget:(
Entity *)target;
1068- (GLfloat) rollToMatchUp:(Vector) up_vec rotating:(GLfloat) match_roll;
1070- (GLfloat) rangeToDestination;
1071- (double) trackDestination:(
double) delta_t :(BOOL) retreat;
1073- (void) setCoordinate:(HPVector)coord;
1074- (HPVector) coordinates;
1075- (HPVector) destination;
1076- (HPVector) distance_six: (GLfloat) dist;
1077- (HPVector) distance_twelve: (GLfloat) dist withOffset:(GLfloat)offset;
1079- (void) setEvasiveJink:(GLfloat) z;
1080- (void) evasiveAction:(
double) delta_t;
1081- (double) trackPrimaryTarget:(
double) delta_t :(BOOL) retreat;
1082- (double) trackSideTarget:(
double) delta_t :(BOOL) leftside;
1083- (double) missileTrackPrimaryTarget:(
double) delta_t;
1086- (double) rangeToPrimaryTarget;
1087- (double) approachAspectToPrimaryTarget;
1088- (double) rangeToSecondaryTarget:(
Entity *)target;
1089- (BOOL) hasProximityAlertIgnoringTarget:(BOOL)ignore_target;
1090- (GLfloat) currentAimTolerance;
1097- (GLfloat) lookingAtSunWithThresholdAngleCos:(GLfloat) thresholdAngleCos;
1102- (void) resetShotTime;
1104- (BOOL) fireMainWeapon:(
double)range;
1105- (BOOL) fireAftWeapon:(
double)range;
1106- (BOOL) firePortWeapon:(
double)range;
1107- (BOOL) fireStarboardWeapon:(
double)range;
1108- (BOOL) fireTurretCannon:(
double)range;
1109- (void) setLaserColor:(
OOColor *)color;
1110- (void) setExhaustEmissiveColor:(
OOColor *)color;
1112- (
OOColor *)exhaustEmissiveColor;
1113- (BOOL) fireSubentityLaserShot:(
double)range;
1114- (BOOL) fireDirectLaserShot:(
double)range;
1115- (BOOL) fireDirectLaserDefensiveShot;
1116- (BOOL) fireDirectLaserShotAt:(
Entity *)my_target;
1118- (BOOL) fireLaserShotInDirection:(
OOWeaponFacing)direction weaponIdentifier:(NSString *)weaponIdentifier;
1119- (void) adjustMissedShots:(
int)delta;
1121- (void) considerFiringMissile:(
double)delta_t;
1122- (Vector) missileLaunchPosition;
1124- (
ShipEntity *) fireMissileWithIdentifier:(NSString *) identifier andTarget:(
Entity *) target;
1125- (BOOL) isMissileFlagSet;
1126- (void) setIsMissileFlag:(BOOL)newValue;
1128- (void) setMissileLoadTime:(
OOTimeDelta)newMissileLoadTime;
1131- (BOOL) cascadeIfAppropriateWithDamageAmount:(
double)amount cascadeOwner:(
Entity *)owner;
1132- (BOOL) activateCloakingDevice;
1133- (void) deactivateCloakingDevice;
1134- (BOOL) launchCascadeMine;
1140- (void) manageCollisions;
1142- (void) adjustVelocity:(Vector) xVel;
1143- (void) addImpactMoment:(Vector) moment fraction:(GLfloat) howmuch;
1148- (void) scoopUpProcess:(
ShipEntity *)other processEvents:(BOOL) proc_events processMessages:(BOOL) proc_messages;
1150- (BOOL) abandonShip;
1152- (void) takeScrapeDamage:(
double) amount from:(
Entity *) ent;
1153- (void) takeHeatDamage:(
double) amount;
1159- (void) enterWormhole:(
WormholeEntity *) w_hole replacing:(BOOL)replacing;
1160- (void) enterWitchspace;
1161- (void) leaveWitchspace;
1162- (BOOL) witchspaceLeavingEffects;
1168- (void) markAsOffender:(
int)offence_value;
1171- (void) switchLightsOn;
1172- (void) switchLightsOff;
1173- (BOOL) lightsActive;
1175- (void) setDestination:(HPVector) dest;
1176- (void) setEscortDestination:(HPVector) dest;
1178- (BOOL) canAcceptEscort:(
ShipEntity *)potentialEscort;
1179- (BOOL) acceptAsEscort:(
ShipEntity *) other_ship;
1180- (void) deployEscorts;
1181- (void) dockEscorts;
1183- (void) setTargetToNearestFriendlyStation;
1184- (void) setTargetToNearestStation;
1185- (void) setTargetToSystemStation;
1187- (void) landOnPlanet:(OOPlanetEntity *)planet;
1189- (void) abortDocking;
1190- (NSDictionary *) dockingInstructions;
1192- (void) broadcastThargoidDestroyed;
1194- (void) broadcastHitByLaserFrom:(
ShipEntity*) aggressor_ship;
1197- (GLfloat) sunGlareFilter;
1198- (void) setSunGlareFilter:(GLfloat)newValue;
1201- (void) sendExpandedMessage:(NSString *) message_text toShip:(
ShipEntity*) other_ship;
1202- (void) sendMessage:(NSString *) message_text toShip:(
ShipEntity*) other_ship withUnpilotedOverride:(BOOL)unpilotedOverride;
1203- (void) broadcastAIMessage:(NSString *) ai_message;
1204- (void) broadcastMessage:(NSString *) message_text withUnpilotedOverride:(BOOL) unpilotedOverride;
1205- (void) setCommsMessageColor;
1206- (void) receiveCommsMessage:(NSString *) message_text from:(
ShipEntity *) other;
1207- (void) commsMessage:(NSString *)valueString withUnpilotedOverride:(BOOL)unpilotedOverride;
1209- (BOOL) markedForFines;
1210- (BOOL) markForFines;
1214- (void) spawn:(NSString *)roles_number;
1216- (
int) checkShipsInVicinityForWitchJumpExit;
1218- (BOOL) trackCloseContacts;
1219- (void) setTrackCloseContacts:(BOOL) value;
1225- (void) setHulk:(BOOL) isNowHulk;
1227#if OO_SALVAGE_SUPPORT
1228- (void) claimAsSalvage;
1229- (void) sendCoordinatesToPilot;
1230- (void) pilotArrived;
1236- (NSDictionary *) scriptInfo;
1237- (void) overrideScriptInfo:(NSDictionary *)override;
1239- (BOOL) scriptedMisjump;
1240- (void) setScriptedMisjump:(BOOL)newValue;
1241- (GLfloat) scriptedMisjumpRange;
1242- (void) setScriptedMisjumpRange:(GLfloat)newValue;
1245- (
Entity *)entityForShaderProperties;
1248- (void) setDemoShip: (
OOScalar) demoRate;
1256- (void) doScriptEvent:(jsid)message;
1257- (void) doScriptEvent:(jsid)message withArgument:(
id)argument;
1258- (void) doScriptEvent:(jsid)message withArgument:(
id)argument1 andArgument:(
id)argument2;
1259- (void) doScriptEvent:(jsid)message withArguments:(NSArray *)arguments;
1260- (void) doScriptEvent:(jsid)message withArguments:(jsval *)argv count:(uintN)argc;
1261- (void) doScriptEvent:(jsid)message inContext:(JSContext *)context withArguments:(jsval *)argv count:(uintN)argc;
1266#define ShipScriptEvent(context, ship, event, ...) do { \
1267jsval argv[] = { __VA_ARGS__ }; \
1268uintN argc = sizeof argv / sizeof *argv; \
1269[ship doScriptEvent:OOJSID(event) inContext:context withArguments:argv count:argc]; \
1272#define ShipScriptEventNoCx(ship, event, ...) do { \
1273jsval argv[] = { __VA_ARGS__ }; \
1274uintN argc = sizeof argv / sizeof *argv; \
1275[ship doScriptEvent:OOJSID(event) withArguments:argv count:argc]; \
1278- (void) reactToAIMessage:(NSString *)message context:(NSString *)debugContext;
1279- (void) sendAIMessage:(NSString *)message;
1280- (void) doScriptEvent:(jsid)scriptEvent andReactToAIMessage:(NSString *)aiMessage;
1281- (void) doScriptEvent:(jsid)scriptEvent withArgument:(
id)argument andReactToAIMessage:(NSString *)aiMessage;
1287@interface ShipEntity (Debug)
1295@interface Entity (SubEntityRelationship)
1300- (BOOL) isShipWithSubEntityShip:(
Entity *)other;
uint8_t OOWeaponFacingSet
NSString * OOCommodityType
uint64_t OOCreditsQuantity
OOEquipmentType * OOWeaponType
BOOL isWeaponNone(OOWeaponType weapon)
OOWeaponType OOWeaponTypeFromEquipmentIdentifierStrict(NSString *string) PURE_FUNC
OOWeaponType OOWeaponTypeFromEquipmentIdentifierLegacy(NSString *string)
NSDictionary * OODefaultShipShaderMacros(void)
GLfloat getWeaponRangeFromType(OOWeaponType weapon_type)
NSString * OOStringFromShipDamageType(OOShipDamageType type) CONST_FUNC
NSString * OOStringFromWeaponType(OOWeaponType weapon) CONST_FUNC
NSString * OOEquipmentIdentifierFromWeaponType(OOWeaponType weapon) CONST_FUNC
NSString * OODisplayStringFromAlertCondition(OOAlertCondition alertCondition)
NSString * OOStringFromBehaviour(OOBehaviour behaviour) CONST_FUNC
OOWeaponType OOWeaponTypeFromEquipmentIdentifierSloppy(NSString *string) PURE_FUNC
@ kOOShipDamageTypeDefault
OOWeaponType OOWeaponTypeFromString(NSString *string) PURE_FUNC
OOShipGroup * rawEscortGroup()
OOWeaponFacingSet weapon_facings
OOTimeAbsolute last_shot_time
OOCargoQuantity commodity_amount
unsigned suppressExplosion
OOWeakReference * _targetStation
unsigned trackCloseContacts
OOCommodityType commodity_type
OOTimeAbsolute aiScriptWakeTime
OOWeakReference * _shipHitByLaser
NSDictionary * scriptInfo
OOColor * scanner_display_color_hostile2
OOTimeAbsolute cargo_dump_time
BOOL _escortPositionsValid
OOWeakReference * _thankedShip
OOSystemID destination_system
OOWeakReference * _rememberedShip
unsigned reportAIMessages
OOWeaponFacing currentWeaponFacing
unsigned isNearPlanetSurface
OOTimeAbsolute trackingCurveTimes[4]
NSDictionary * dockingInstructions
GLfloat weapon_damage_override
GLfloat weapon_energy_use
GLfloat afterburner_speed_factor
ShipEntity * scanned_ships[MAX_SCAN_NUMBER+1]
GLfloat _scriptedMisjumpRange
NSDictionary * shipinfoDictionary
unsigned suppressAegisMessages
NSMutableArray * _equipment
OOColor * scanner_display_color2
OOWeakReference * _subEntityTakingDamage
OOWeakReference * _primaryAggressor
unsigned number_of_navpoints
NSArray * portWeaponOffset
Quaternion subentityRotationalVelocity
float hyperspaceMotorSpinTime
OOTimeDelta missile_load_time
OOWeakSet * _collisionExceptions
OOWeaponType aft_weapon_type
BoundingBox totalBoundingBox
OOUniversalID planetForLanding
OOWeakReference * _lastAegisLock
OOWeakReference * _lastEscortTarget
NSMutableDictionary * previousCondition
OOWeakReference * _primaryTarget
NSArray * starboardWeaponOffset
OOEquipmentType * missile_list[SHIPENTITY_MAX_MISSILES]
id< OOHUDBeaconIcon > _beaconDrawable
OOAegisStatus aegis_status
NSMutableDictionary * closeContactsInfo
NSString * scan_description
GLfloat distance2_scanned_ships[MAX_SCAN_NUMBER+1]
uint16_t entity_personality
OOWeakReference * _proximityAlert
OOTimeAbsolute missile_launch_time
GLfloat forward_weapon_temp
NSString * shipUniqueName
OOCargoQuantity likely_cargo
OOColor * exhaust_emissive_color
Vector _escortPositions[MAX_ESCORTS]
GLfloat starboard_weapon_temp
NSArray * aftWeaponOffset
NSArray * forwardWeaponOffset
OOColor * scanner_display_color1
OOWeaponType starboard_weapon_type
unsigned scripted_misjump
OOTimeAbsolute demoStartTime
unsigned military_jammer_active
GLfloat weapon_shot_temperature
GLfloat energy_recharge_rate
OOColor * default_laser_color
float weapon_recharge_rate
OOShipGroup * _escortGroup
HPVector trackingCurveCoeffs[3]
OOWeaponType port_weapon_type
OOCargoQuantity max_cargo
uint8_t _pendingEscortCount
Quaternion demoStartOrientation
unsigned next_navpoint_index
OOWeakReference * _nextBeacon
OOWeakSet * _defenseTargets
OOColor * scanner_display_color_hostile1
unsigned docking_match_rotation
OOWeaponType forward_weapon_type
unsigned cloaking_device_active
OOCargoQuantity extra_cargo
NSMutableArray * subEntities
OOCargoQuantity equipment_weight
unsigned _explicitlyUnpiloted
HPVector trackingCurvePositions[4]
OOWeakReference * _prevBeacon
OOWeakReference * _foundTarget
NSString * lastRadioMessage
NSUInteger _maxShipSubIdx
OOBehaviour debugLastBehaviour
unsigned haveExecutedSpawnAction
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque