Starshatter_Open
Open source Starshatter engine
|
#include <Component.h>
Public Types | |
enum | STATUS { DESTROYED, CRITICAL, DEGRADED, NOMINAL, REPLACE, REPAIR } |
enum | DAMAGE { DAMAGE_EFFICIENCY = 0x01, DAMAGE_SAFETY = 0x02, DAMAGE_STABILITY = 0x04 } |
Public Member Functions | |
Component (ComponentDesign *d, System *s) | |
Component (const Component &c) | |
virtual | ~Component () |
const char * | Name () const |
const char * | Abbreviation () const |
float | RepairTime () const |
float | ReplaceTime () const |
bool | DamageEfficiency () const |
bool | DamageSafety () const |
bool | DamageStability () const |
STATUS | Status () const |
float | Availability () const |
float | TimeRemaining () const |
int | SpareCount () const |
bool | IsJerried () const |
int | NumJerried () const |
void | SetSystem (System *s) |
System * | GetSystem () const |
virtual void | ApplyDamage (double damage) |
virtual void | ExecMaintFrame (double seconds) |
virtual void | Repair () |
virtual void | Replace () |
Static Public Member Functions | |
static const char * | TYPENAME () |
Protected Attributes | |
ComponentDesign * | design |
STATUS | status |
float | availability |
float | time_remaining |
int | spares |
int | jerried |
System * | system |
Definition at line 49 of file Component.h.
enum Component::DAMAGE |
Definition at line 55 of file Component.h.
enum Component::STATUS |
Definition at line 54 of file Component.h.
Component::Component | ( | ComponentDesign * | d, |
System * | s | ||
) |
Definition at line 33 of file Component.cpp.
Component::Component | ( | const Component & | c | ) |
Definition at line 44 of file Component.cpp.
|
virtual |
Definition at line 53 of file Component.cpp.
|
inline |
Definition at line 64 of file Component.h.
|
virtual |
Definition at line 97 of file Component.cpp.
float Component::Availability | ( | ) | const |
Definition at line 147 of file Component.cpp.
|
inline |
Definition at line 68 of file Component.h.
|
inline |
Definition at line 69 of file Component.h.
|
inline |
Definition at line 70 of file Component.h.
|
virtual |
Definition at line 59 of file Component.cpp.
|
inline |
Definition at line 80 of file Component.h.
bool Component::IsJerried | ( | ) | const |
Definition at line 168 of file Component.cpp.
|
inline |
Definition at line 63 of file Component.h.
int Component::NumJerried | ( | ) | const |
Definition at line 174 of file Component.cpp.
|
virtual |
Definition at line 118 of file Component.cpp.
|
inline |
Definition at line 65 of file Component.h.
|
virtual |
Definition at line 132 of file Component.cpp.
|
inline |
Definition at line 66 of file Component.h.
|
inline |
Definition at line 79 of file Component.h.
int Component::SpareCount | ( | ) | const |
Definition at line 162 of file Component.cpp.
|
inline |
Definition at line 72 of file Component.h.
float Component::TimeRemaining | ( | ) | const |
Definition at line 156 of file Component.cpp.
|
inlinestatic |
Definition at line 52 of file Component.h.
|
protected |
Definition at line 92 of file Component.h.
|
protected |
Definition at line 88 of file Component.h.
|
protected |
Definition at line 95 of file Component.h.
|
protected |
Definition at line 94 of file Component.h.
|
protected |
Definition at line 91 of file Component.h.
|
protected |
Definition at line 96 of file Component.h.
|
protected |
Definition at line 93 of file Component.h.