#include <subfleet_basic.h>
Inheritance diagram for TSubFleetBasic:
Public Methods | |
TSubFleetBasic (TShipDesign *ShipDesign, int2 NumberOfShips) | |
TSubFleetBasic (TSubFleetBasic &OldSubFleet) | |
virtual | ~TSubFleetBasic () |
virtual bool | getUpgradeCosts (TSubstanceSet *UpgradeCosts) const |
virtual void | getRepairCost (TSubstanceSet *RepairCost) const |
virtual void | RepairSubfleet () |
virtual int4 | getActualHullHP () const |
virtual int4 | getFTLFuelConsumption (double Speed, double Distance=1) const |
virtual double | getFTLMaxSpeed () const |
virtual double | getFTLMovementDistance (double Speed) const |
virtual double | getFTLBreakDownProbability (double Speed) const |
virtual double | getLongScannerRange (TScanner::tScannerType ScannerType) const |
virtual bool | IsColonizer () const |
virtual void | setFuel (int4 Fuel) |
virtual int4 | getFuel () const |
virtual bool | load (TDataPackageList *in) |
virtual bool | save (TDataPackageList *out) const |
virtual TSubFleetBasic & | operator= (const TSubFleetBasic &SubFleet) |
Private Attributes | |
int2 | fFuel |
|
This constructor creates and initializes a new subfleet. The ship design the subfleet is of, is given in the parameter. The number of ships the subfleet should have initailly, is given in the second parameter.
|
|
This constructor also creates a new subfleet. It is initialized with the values of the subfleet given in the parameter. This is the copy constructor. All values ecxept the fleet are copied. The caller is responsible to inform the fleet about its new subfleet. This fleet will then inform the subfleet about its new parent. FIXME, at the moment the fields of TActioObject are NOT copied.
|
|
This destructor destrcucts the object. It has nothing to do, because the destructor of its parent takes care of everything and it is called automatically. |
|
With the method getActualHullHP you can get the amount if hit points the subfleet still has. You don't get any information how they are distributed over different ships.
Reimplemented from TSubFleet. |
|
With the method getBreakDownProbability you can get the probability of an engine failure for traveling with a certain speed. FIXME, do we differ between STL and FTL travel?
Reimplemented from TSubFleet. |
|
With the method getFuelConsumption you can get the amount of fuel a subfleet needs for a given distance with a give speed. The method expacts speed and distance as parameters. The distance can be omitted; then the default value of 1 is chosen.
Reimplemented from TSubFleet. |
|
With the method getMaxSpeed you can get the maximum speed the sublfeet is able to travel with.
Reimplemented from TSubFleet. |
|
With the method getMovementDistance you can get the distance the subfleet can travel within one turn with the given speed.
Reimplemented from TSubFleet. |
|
With the method getFuel you can get the amount of fuel the subfleet has still left.
Reimplemented from TSubFleet. |
|
With the method getLongScannerRange you can get the maximu scanning range of the long range scanner. That means the range the scanners can scan on the star map, not on the battlefield. The range is return in lightyears.
Reimplemented from TSubFleet. |
|
With the method getRepairCost you can get the cost for a repair of all damages on hull, armor and other equipment. The cost for new fighters, SP weapons and ammuntion will not be included. The cost vlaue will be returned in the parameter RepairCost.
Reimplemented from TSubFleet. |
|
With the method getUpgradeCosts you can get the costs the planned upgrade will cost. The costs are returned in the paremeter UpgradeCosts. The costs will be 150% of the cost difference between the two designs. If the old design costs more, then the costs will be zero, but you don't get any refund. FIXME, this implementation does not yet look at singel substances, only at the whole set. That means, if the old design is in only one substance more expensive than the new, there will be no costs. Furthermore the method returns, whether there is an upgrade planned.
Reimplemented from TSubFleet. |
|
With the method IsColonizer you can get the information whether the ship design of the subfleet contains at least on colonization module. What you do with this information is up to the code, which handles the actual colonization. For example, it could get this information and if positive it decreases the number of ships by one and colonizes the planet.
Reimplemented from TSubFleet. |
|
The method Load loads a TSubFleet object from the data packages in the list. Additionally it informs the parent fleet about its new subfleet. For more information look in the documentation of the ancestors of TShipDesign from where this method is inherited.
Reimplemented from TSubFleet. |
|
This is the assignment operator for TSubFleetBasic. It copies all values of the subfleet except the fleet. The caller is responsible to inform the fleet about its new subfleet. This fleet will then inform the subfleet about its new parent. FIXME, at the moment the fields of TActioObject are NOT copied. |
|
With the method RepairSubfleet you can order the subfleet to repair damages to hull, armor and other equipment. But the stocks of fighters, SP weapons and ammuntion will not be filled up. Reimplemented from TSubFleet. |
|
The method Save saves a TSubFleet by adding the data packages to the list. For more information look in the documentation of the ancestors of TShipDesign, because the method Save is inherited from there.
Reimplemented from TSubFleet. |
|
FIXME Reimplemented from TSubFleet. |