17#include "difficulty.h"
27#include "nlua_pilot.h"
28#include "nlua_pilotoutfit.h"
29#include "nlua_outfit.h"
69 *a =
FABS( angle_diff( ang, p->solid->dir ) );
123 for (
int i=0; i<
array_size(p->outfits); i++) {
155 a = (double)(p->tsy * p->ship->gfx_space->sx + p->tsx);
156 a *= p->ship->mangle;
164 m = &w->sslot->mount;
167 x = m->
x * cm + m->
y * sm;
168 y = m->
x *-sm + m->
y * cm;
177 vec2_cset( v, x, y );
195 if (p->dockpilot != target->
id)
200 if (dockslot == NULL)
204 if (vec2_dist(&p->solid->pos, &target->
solid->
pos) >
209 if (vec2_dist2( &p->solid->vel, &target->
solid->
vel ) >
pow2(MAX_HYPERSPACE_VEL))
226 if ((target->
escorts[i].
type == ESCORT_TYPE_BAY) &&
253 for (
int i=0; i<
array_size(p->outfits); i++) {
254 if (p->outfits[i]->outfit == NULL)
257 if (p->outfits[i]->u.ammo.deployed > 0)
278 s->
state = PILOT_OUTFIT_OFF;
338 WARN( _(
"Pilot '%s': trying to add outfit '%s' to slot that already has an outfit"),
345 WARN( _(
"Pilot '%s': Not enough CPU to add outfit '%s'"),
351 WARN( _(
"Pilot '%s': Trying to add outfit but %s"),
391 WARN(_(
"Instrinsic outfits must be modifiers!"));
400 if (pilot->
id > 0 && ret==0)
429 if (s->
state==PILOT_OUTFIT_ON)
460 luaL_unref( naevL, LUA_REGISTRYINDEX, s->
lua_mem );
480 WARN(_(
"Pilot '%s': Trying to remove outfit but %s"),
502 if ((p->outfits[i]->outfit != NULL) &&
503 !
outfit_fitsSlot( p->outfits[i]->outfit, &p->outfits[i]->sslot->slot ))
517 if (p->outfits[i]->sslot->required && p->outfits[i]->outfit == NULL)
543#define SPACEWORTHY_CHECK(cond,msg) \
547 pos += scnprintf( &buf[pos], bufSize-pos, "\n" ); \
548 pos += scnprintf( &buf[pos], bufSize-pos, (msg) ); } }
555 SPACEWORTHY_CHECK( p->cpu < 0, _(
"!! Insufficient CPU") );
558 SPACEWORTHY_CHECK( p->thrust < 0, _(
"!! Insufficient Thrust") );
559 SPACEWORTHY_CHECK( p->speed < 0, _(
"!! Insufficient Speed") );
560 SPACEWORTHY_CHECK( p->turn < 0, _(
"!! Insufficient Turn") );
563 SPACEWORTHY_CHECK( p->armour < 0., _(
"!! Insufficient Armour") );
564 SPACEWORTHY_CHECK( p->armour_regen < 0., _(
"!! Insufficient Armour Regeneration") );
565 SPACEWORTHY_CHECK( p->shield < 0., _(
"!! Insufficient Shield") );
566 SPACEWORTHY_CHECK( p->shield_regen < 0., _(
"!! Insufficient Shield Regeneration") );
567 SPACEWORTHY_CHECK( p->energy_max < 0., _(
"!! Insufficient Energy") );
568 SPACEWORTHY_CHECK( (p->energy_regen <= 0.) && (p->energy_max > 0.), _(
"!! Insufficient Energy Regeneration") );
571 SPACEWORTHY_CHECK( p->fuel_max < 0, _(
"!! Insufficient Fuel Maximum") );
572 SPACEWORTHY_CHECK( p->fuel_consumption < 0, _(
"!! Insufficient Fuel Consumption") );
573 SPACEWORTHY_CHECK( p->cargo_free < 0, _(
"!! Insufficient Free Cargo Space") );
574 SPACEWORTHY_CHECK( p->crew < 0, _(
"!! Insufficient Crew") );
581 if (pos > bufSize-1) {
589 pos +=
scnprintf( buf, bufSize, _(
"Spaceworthy"));
590 if (ship_isFlag(p->ship, SHIP_NOPLAYER))
591 pos +=
scnprintf( &buf[pos], bufSize-pos,
"\n#o%s#0", _(
"Escort only") );
592 if (ship_isFlag(p->ship, SHIP_NOESCORT))
593 pos +=
scnprintf( &buf[pos], bufSize-pos,
"\n#o%s#0", _(
"Lead ship only") );
598#undef SPACEWORTHY_CHECK
609 for (
int i = 0; i<
array_size(p->outfits); i++) {
610 const Outfit *o = p->outfits[i]->outfit;
613 if ((o->
limit != NULL) && (strcmp(o->
limit,limit)==0))
630 if ((p==NULL) || (s==NULL))
631 return _(
"Nothing selected.");
636 return _(
"Does not fit slot.");
639 return _(
"Already have an outfit of this type installed");
642 return _(
"Can only install unique outfit once.");
647 return _(
"Recall the fighters first");
667 WARN(_(
"Pilot '%s': Trying to add ammo to unequipped slot."), pilot->
name );
700 else if (s->
outfit == NULL) {
701 WARN(_(
"Pilot '%s': Trying to remove ammo from unequipped slot."), pilot->
name );
773 max = round( (
double)o->
u.
lau.
amount * p->stats.ammo_capacity );
775 max = round( (
double)o->
u.
bay.
amount * p->stats.fbay_capacity );
841 if (slot->
lua_mem != LUA_NOREF)
851 if (slot->
active && !(slot->
state==PILOT_OUTFIT_ON))
859 if (slot->
active && !(slot->
state==PILOT_OUTFIT_ON))
863 pilot_setFlag( pilot, PILOT_AFTERBURNER );
879 double ac, sc, ec, tm;
923 if (pilot_isPlayer(pilot))
924 difficulty_apply( s );
944 if (pilot_isFlag(pilot, PILOT_STEALTH)) {
996 if (!pilot_isFlag( pilot, PILOT_AFTERBURNER ))
1038 if (pilot_isPlayer(pilot) && (tm != s->
time_mod))
1086 double mass, factor;
1100 if (pilot_isFlag(pilot, PILOT_HASSPEEDLIMIT)) {
1103 if (pilot->
speed < 0.) {
1139 pilotoutfit_modified = 0;
1140 for (
int i=0; i<
array_size(p->outfits); i++) {
1144 func( p, po, data );
1146 for (
int i=0; i<
array_size(p->outfit_intrinsic); i++) {
1150 func( p, po, data );
1153 if (pilotoutfit_modified)
1156static void outfitLRunWarning(
const Pilot *p,
const Outfit *o,
const char *name,
const char *error )
1158 WARN( _(
"Pilot '%s''s outfit '%s' -> '%s':\n%s"), p->name, o->
name, name, error );
1167 if (po->
lua_mem == LUA_NOREF) {
1169 lua_newtable(naevL);
1170 po->
lua_mem = luaL_ref(naevL,LUA_REGISTRYINDEX);
1173 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1174 nlua_setenv( naevL, env,
"mem" );
1177static const char* pilot_outfitLDescExtra(
const Pilot *p,
const Outfit *o )
1179 static char descextra[STRMAX];
1189 lua_pushnil( naevL );
1191 if (nlua_pcall( o->
lua_env, 2, 1 )) {
1192 outfitLRunWarning( p, o,
"descextra", lua_tostring(naevL,-1) );
1194 descextra[0] =
'\0';
1197 de = luaL_checkstring( naevL, -1 );
1198 strncpy( descextra, de,
sizeof(descextra)-1 );
1199 lua_pop( naevL, 1 );
1214 static char o_description[STRMAX];
1215 const char *de = pilot_outfitLDescExtra( p, o );
1218 snprintf( o_description,
sizeof(o_description),
"%s\n%s", _(o->
desc_raw), de );
1219 return o_description;
1235 static char o_summary[STRMAX];
1236 const char *de = pilot_outfitLDescExtra( p, o );
1239 snprintf( o_summary,
sizeof(o_summary),
"%s\n%s", _(o->
name), o->
summary_raw );
1241 snprintf( o_summary,
sizeof(o_summary),
"%s", o->
summary_raw );
1245 snprintf( o_summary,
sizeof(o_summary),
"%s\n%s\n%s", _(o->
name), o->
summary_raw, de );
1247 snprintf( o_summary,
sizeof(o_summary),
"%s\n%s", o->
summary_raw, de );
1259 pilotoutfit_modified = 0;
1265 if (pilotoutfit_modified)
1287 outfitLRunWarning( pilot, po->
outfit,
"onadd", lua_tostring(naevL,-1) );
1312 outfitLRunWarning( pilot, po->
outfit,
"onremove", lua_tostring(naevL,-1) );
1343 if (lua_init == LUA_NOREF)
1347 lua_rawgeti(naevL, LUA_REGISTRYINDEX, lua_init);
1350 if (nlua_pcall( lua_env, 2, 0 )) {
1351 outfitLRunWarning( pilot, po->
outfit,
"init", lua_tostring(naevL,-1) );
1367 dt = *(
double*)data;
1370 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1371 nlua_setenv(naevL, env,
"mem");
1377 lua_pushnumber(naevL, dt);
1378 if (nlua_pcall( env, 3, 0 )) {
1379 outfitLRunWarning( pilot, po->
outfit,
"update", lua_tostring(naevL,-1) );
1405 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1406 nlua_setenv(naevL, env,
"mem");
1412 if (nlua_pcall( env, 2, 0 )) {
1413 outfitLRunWarning( pilot, po->
outfit,
"outofenergy", lua_tostring(naevL,-1) );
1430 unsigned int attacker;
1434 double armour, shield;
1435 unsigned int attacker;
1445 armour = odat->armour;
1446 shield = odat->shield;
1447 attacker = odat->attacker;
1450 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1451 nlua_setenv(naevL, env,
"mem");
1457 lua_pushnumber(naevL, armour );
1458 lua_pushnumber(naevL, shield );
1460 if (nlua_pcall( env, 5, 0 )) {
1461 outfitLRunWarning( pilot, po->
outfit,
"onhit", lua_tostring(naevL,-1) );
1475 const struct OnhitData data = { .armour = armour, .shield = shield, .attacker = attacker };
1491 pilotoutfit_modified = 0;
1494 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1495 nlua_setenv(naevL, env,
"mem");
1501 lua_pushboolean(naevL, on);
1502 if (nlua_pcall( env, 3, 1 )) {
1503 outfitLRunWarning( pilot, po->
outfit,
"ontoggle", lua_tostring(naevL,-1) );
1509 ret = lua_toboolean(naevL, -1);
1511 return ret || pilotoutfit_modified;
1532 success = cdat->success;
1533 timer = cdat->timer;
1536 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1537 nlua_setenv(naevL, env,
"mem");
1543 lua_pushboolean(naevL, done);
1545 lua_pushboolean(naevL, success);
1547 lua_pushnumber(naevL, timer);
1548 if (nlua_pcall( env, 4, 0 )) {
1549 outfitLRunWarning( pilot, po->
outfit,
"cooldown", lua_tostring(naevL,-1) );
1563 const struct CooldownData data = { .done = done, .success = success, .timer = timer };
1576 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1577 nlua_setenv(naevL, env,
"mem");
1583 if (nlua_pcall( env, 2, 0 )) {
1584 outfitLRunWarning( pilot, po->
outfit,
"onshoot", lua_tostring(naevL,-1) );
1607 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1608 nlua_setenv(naevL, env,
"mem");
1614 lua_pushboolean(naevL, pilot_isFlag(pilot,PILOT_STEALTH) );
1615 if (nlua_pcall( env, 3, 0 )) {
1616 outfitLRunWarning( pilot, po->
outfit,
"onstealth", lua_tostring(naevL,-1) );
1629 return pilotoutfit_modified;
1641 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1642 nlua_setenv(naevL, env,
"mem");
1649 if (nlua_pcall( env, 3, 0 )) {
1650 outfitLRunWarning( pilot, po->
outfit,
"onscan", lua_tostring(naevL,-1) );
1666 const Pilot *scanner;
1671 scanner = (
const Pilot*) data;
1674 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1675 nlua_setenv(naevL, env,
"mem");
1682 if (nlua_pcall( env, 3, 0 )) {
1683 outfitLRunWarning( pilot, po->
outfit,
"onscanned", lua_tostring(naevL,-1) );
1707 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1708 nlua_setenv(naevL, env,
"mem");
1714 if (nlua_pcall( env, 2, 0 )) {
1715 outfitLRunWarning( pilot, po->
outfit,
"land", lua_tostring(naevL,-1) );
1738 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1739 nlua_setenv(naevL, env,
"mem");
1745 if (nlua_pcall( env, 2, 0 )) {
1746 outfitLRunWarning( pilot, po->
outfit,
"takeoff", lua_tostring(naevL,-1) );
1769 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1770 nlua_setenv(naevL, env,
"mem");
1776 if (nlua_pcall( env, 2, 0 )) {
1777 outfitLRunWarning( pilot, po->
outfit,
"jumpin", lua_tostring(naevL,-1) );
1799 pilotoutfit_modified = 0;
1814 lua_rawgeti(naevL, LUA_REGISTRYINDEX, po->
lua_mem);
1815 nlua_setenv(naevL, env,
"mem");
1821 if (nlua_pcall( env, 2, 0 )) {
1822 outfitLRunWarning( pilot, po->
outfit,
"cleanup", lua_tostring(naevL,-1) );
Provides macros to work with dynamic arrays.
#define array_erase(ptr_array, first, last)
Erases elements in interval [first, last).
static ALWAYS_INLINE int array_size(const void *array)
Returns number of elements in the array.
#define array_grow(ptr_array)
Increases the number of elements by one and returns the last element.
#define array_create(basic_type)
Creates a new dynamic array of ‘basic_type’.
void effect_compute(ShipStats *s, const Effect *efxlist)
Updates shipstats from effect list.
void escort_freeList(Pilot *p)
Remove all escorts from a pilot.
void escort_rmListIndex(Pilot *p, int i)
Remove from escorts list.
void gui_setGeneric(const Pilot *pilot)
Calls trigger functions depending on who the pilot is.
Header file with generic functions and naev-specifics.
const Outfit ** lua_pushoutfit(lua_State *L, const Outfit *outfit)
Pushes a outfit on the stack.
LuaPilot * lua_pushpilot(lua_State *L, LuaPilot pilot)
Pushes a pilot on the stack.
PilotOutfitSlot ** lua_pushpilotoutfit(lua_State *L, PilotOutfitSlot *po)
Pushes a pilot outfit on the stack.
int scnprintf(char *text, size_t maxlen, const char *fmt,...)
Like snprintf(), but returns the number of characters ACTUALLY "printed" into the buffer....
int outfit_isBeam(const Outfit *o)
Checks if outfit is a beam type weapon.
double outfit_cpu(const Outfit *o)
Gets the outfit's cpu usage.
int outfit_isActive(const Outfit *o)
Checks if outfit is an active outfit.
int outfit_isLauncher(const Outfit *o)
Checks if outfit is a weapon launcher.
int outfit_isSeeker(const Outfit *o)
Checks if outfit is a seeking weapon.
int outfit_isToggleable(const Outfit *o)
Checks if outfit can be toggled.
int outfit_fitsSlot(const Outfit *o, const OutfitSlot *s)
Checks to see if an outfit fits a slot.
int outfit_isFighterBay(const Outfit *o)
Checks if outfit is a fighter bay.
int outfit_isAfterburner(const Outfit *o)
Checks if outfit is an afterburner.
int outfit_isTurret(const Outfit *o)
Checks if outfit is a turret class weapon.
double outfit_ammoMass(const Outfit *o)
Gets the outfit's ammunition mass.
int outfit_isMod(const Outfit *o)
Checks if outfit is a ship modification.
int outfit_isBolt(const Outfit *o)
Checks if outfit is bolt type weapon.
PilotOutfitSlot * pilot_getDockSlot(Pilot *p)
Gets the dock slot of the pilot.
Pilot * pilot_get(unsigned int id)
Pulls a pilot out of the pilot_stack based on ID.
void pilot_delete(Pilot *p)
Deletes a pilot.
int pilot_numOutfit(const Pilot *p, const Outfit *o)
Checks to see how many of an outfit a pilot has.
void pilot_cargoCalc(Pilot *pilot)
Calculates how much cargo ship has left and such.
double pilot_ewWeaponTrack(const Pilot *p, const Pilot *t, double trackmin, double trackmax)
Calculates the weapon lead (1. is 100%, 0. is 0%)..
void pilot_ewUpdateStatic(Pilot *p)
Updates the pilot's static electronic warfare properties.
void pilot_heatCalcSlot(PilotOutfitSlot *o)
Calculates the heat parameters for a pilot's slot.
void pilot_heatCalc(Pilot *p)
Calculates the heat parameters for a pilot.
int pilot_runHook(Pilot *p, int hook_type)
Tries to run a pilot hook if he has it.
int pilot_getMount(const Pilot *p, const PilotOutfitSlot *w, vec2 *v)
Gets the mount position of a pilot.
int pilot_rmOutfit(Pilot *pilot, PilotOutfitSlot *s)
Removes an outfit from the pilot.
static void pilot_outfitLmem(PilotOutfitSlot *po, nlua_env env)
Sets up the outfit memory for a slot.
int pilot_outfitLInit(Pilot *pilot, PilotOutfitSlot *po)
Runs the pilot's Lua outfits init script for an outfit.
void pilot_updateMass(Pilot *pilot)
Updates the pilot stats after mass change.
void pilot_outfitLCooldown(Pilot *pilot, int done, int success, double timer)
Handle cooldown hooks for outfits.
static int pilot_hasOutfitLimit(const Pilot *p, const char *limit)
Checks to see if a pilot has an outfit with a specific outfit type.
void pilot_outfitLOutfofenergy(Pilot *pilot)
Handles when the pilot runs out of energy.
const char * pilot_outfitDescription(const Pilot *p, const Outfit *o)
Gets the description of an outfit for a given pilot.
int pilot_hasDeployed(Pilot *p)
Checks to see if the pilot has deployed ships.
void pilot_healLanded(Pilot *pilot)
Cures the pilot as if he was landed.
int pilot_slotsCheckRequired(const Pilot *p)
Pilot required (core) slot filled check - makes sure they are filled.
int pilot_slotsCheckSafety(const Pilot *p)
Pilot slot safety check - makes sure stats are safe.
void pilot_outfitLOnshoot(Pilot *pilot)
Runs the pilot's Lua outfits onshoot script.
int pilot_maxAmmoO(const Pilot *p, const Outfit *o)
Gets the maximum available ammo for a pilot for a specific outfit.
int pilot_addOutfit(Pilot *pilot, const Outfit *outfit, PilotOutfitSlot *s)
Adds an outfit to the pilot.
void pilot_outfitLOnjumpin(Pilot *pilot)
Runs Lua outfits when pilot jumps into a system.
int pilot_slotIsToggleable(const PilotOutfitSlot *o)
Checks to see if a slot has an active outfit that can be toggleable.
void pilot_outfitLOntakeoff(Pilot *pilot)
Runs Lua outfits when pilot takes off from a spob.
void pilot_calcStats(Pilot *pilot)
Recalculates the pilot's stats based on his outfits.
void pilot_fillAmmo(Pilot *pilot)
Fills pilot's ammo completely.
int pilot_addAmmo(Pilot *pilot, PilotOutfitSlot *s, int quantity)
Adds some ammo to the pilot stock.
const char * pilot_outfitSummary(const Pilot *p, const Outfit *o, int withname)
Gets the summary of an outfit for a give pilot.
int pilot_rmOutfitRaw(Pilot *pilot, PilotOutfitSlot *s)
Removes an outfit from the pilot without doing any checks.
int pilot_outfitLRemove(Pilot *pilot, PilotOutfitSlot *po)
Outfit is removed froma ship.
static void pilot_calcStatsSlot(Pilot *pilot, PilotOutfitSlot *slot)
Computes the stats for a pilot's slot.
int pilot_countAmmo(const Pilot *pilot)
Gets the number of ammo units on the ship.
void pilot_lockClear(Pilot *p)
Clears pilot's missile lockon timers.
int pilot_outfitLOnstealth(Pilot *pilot)
Runs the pilot's Lua outfits onhit script.
void pilot_outfitLCleanup(Pilot *pilot)
Handle cleanup hooks for outfits.
PilotOutfitSlot * pilot_getSlotByName(Pilot *pilot, const char *name)
Gets the outfit slot by name.
int pilot_maxAmmo(const Pilot *pilot)
The maximum amount of ammo the pilot's current ship can hold.
void pilot_outfitLOnscan(Pilot *pilot)
Runs Lua outfits when pilot scanned their target.
int pilot_reportSpaceworthy(const Pilot *p, char *buf, int bufSize)
Pilot safety report - makes sure stats are safe.
int pilot_outfitLAdd(Pilot *pilot, PilotOutfitSlot *po)
Outfit is added to a ship.
int pilot_outfitLOntoggle(Pilot *pilot, PilotOutfitSlot *po, int on)
Handle the manual toggle of an outfit.
int pilot_rmAmmo(Pilot *pilot, PilotOutfitSlot *s, int quantity)
Removes some ammo from the pilot stock.
void pilot_outfitLOnland(Pilot *pilot)
Runs Lua outfits when pilot lands on a spob.
int pilot_dock(Pilot *p, Pilot *target)
Docks the pilot on its target pilot.
void pilot_outfitLOnscanned(Pilot *pilot, const Pilot *scanner)
Runs Lua outfits when pilot was scanned by scanner.
const char * pilot_canEquip(const Pilot *p, const PilotOutfitSlot *s, const Outfit *o)
Checks to see if can equip/remove an outfit from a slot.
void pilot_lockUpdateSlot(Pilot *p, PilotOutfitSlot *o, Pilot *t, double *a, double dt)
Updates the lockons on the pilot's launchers.
int pilot_addOutfitTest(Pilot *pilot, const Outfit *outfit, PilotOutfitSlot *s, int warn)
Tests to see if an outfit can be added.
void pilot_outfitLUpdate(Pilot *pilot, double dt)
Runs the pilot's Lua outfits update script.
int pilot_rmOutfitIntrinsic(Pilot *pilot, PilotOutfitSlot *s)
Removes an outfit from an intrinsic slot.
int pilot_addOutfitRaw(Pilot *pilot, const Outfit *outfit, PilotOutfitSlot *s)
Adds an outfit to the pilot, ignoring CPU or other limits.
static void pilot_outfitLRun(Pilot *p, void(*const func)(const Pilot *p, PilotOutfitSlot *po, const void *data), const void *data)
Wrapper that does all the work for us.
int pilot_isSpaceworthy(const Pilot *p)
Pilot safety check - makes sure stats are safe.
int pilot_addOutfitIntrinsic(Pilot *pilot, const Outfit *outfit)
Adds an outfit as an intrinsic slot.
void pilot_outfitLOnhit(Pilot *pilot, double armour, double shield, unsigned int attacker)
Runs the pilot's Lua outfits onhit script.
void pilot_outfitLInitAll(Pilot *pilot)
Runs the pilot's Lua outfits init script.
int pilot_outfitOff(Pilot *p, PilotOutfitSlot *o)
Disables a given active outfit.
void pilot_weapSetUpdateStats(Pilot *p)
Update the weapon sets given pilot stat changes.
void player_resetSpeed(void)
Resets the player speed stuff.
int ss_statsMerge(ShipStats *dest, const ShipStats *src)
Merges two different ship stats.
int ss_statsModFromList(ShipStats *stats, const ShipStatList *list)
Updates a stat structure from a stat list.
int ss_statsInit(ShipStats *stats)
Initializes a stat structure.
int sp_required(unsigned int spid)
Gets whether or not a slot property is required.
A ship outfit, depends radically on the type.
OutfitAfterburnerData afb
Stores an outfit the pilot has.
The representation of an in-game pilot.
PilotOutfitSlot ** outfits
PilotOutfitSlot * outfit_intrinsic
ShipStats intrinsic_stats
PilotOutfitSlot * afterburner
Represents a ship weapon mount point.
Represents ship statistics, properties ship can use.
double shield_regen_malus
double energy_regen_malus
double armour_regen_malus