19 #ifndef OPENXCOM_TRANSFER_H
20 #define OPENXCOM_TRANSFER_H
23 #include <yaml-cpp/yaml.h>
28 enum TransferType { TRANSFER_SOLDIER, TRANSFER_CRAFT, TRANSFER_ITEM, TRANSFER_SCIENTIST, TRANSFER_ENGINEER };
49 int _itemQty, _scientists, _engineers;
59 YAML::Node
save()
const;
69 void setItems(
const std::string &
id,
int qty = 1);
void advance(Base *base)
Advances the transfer.
Definition: Transfer.cpp:285
Represents a craft stored in a base.
Definition: Craft.h:44
int getQuantity() const
Gets the quantity of the transfer.
Definition: Transfer.cpp:238
int getHours() const
Gets the hours remaining of the transfer.
Definition: Transfer.cpp:229
Transfer(int hours)
Creates a new transfer.
Definition: Transfer.cpp:34
The game data that gets written to disk when the game is saved.
Definition: SavedGame.h:80
Represents an item transfer.
Definition: Transfer.h:42
void setItems(const std::string &id, int qty=1)
Sets the items of the transfer.
Definition: Transfer.cpp:174
Soldier * getSoldier()
Get a pointer to the soldier being transferred.
Definition: Transfer.cpp:320
~Transfer()
Cleans up the transfer.
Definition: Transfer.cpp:41
Contains strings used throughout the game for localization.
Definition: Language.h:42
Set of rules and stats for a game.
Definition: Ruleset.h:69
bool load(const YAML::Node &node, Base *base, const Ruleset *rule, SavedGame *save)
Loads the transfer from YAML.
Definition: Transfer.cpp:58
Represents a soldier hired by the player.
Definition: Soldier.h:49
YAML::Node save() const
Saves the transfer to YAML.
Definition: Transfer.cpp:101
void setCraft(Craft *craft)
Sets the craft of the transfer.
Definition: Transfer.cpp:146
Represents a player base on the globe.
Definition: Base.h:47
std::wstring getName(Language *lang) const
Gets the name of the transfer.
Definition: Transfer.cpp:203
TransferType getType() const
Gets the type of the transfer.
Definition: Transfer.cpp:259
void setScientists(int scientists)
Sets the scientists of the transfer.
Definition: Transfer.cpp:184
Craft * getCraft()
Gets the craft of the transfer.
Definition: Transfer.cpp:155
void setSoldier(Soldier *soldier)
Sets the soldier of the transfer.
Definition: Transfer.cpp:137
std::string getItems() const
Gets the items of the transfer.
Definition: Transfer.cpp:164
void setEngineers(int engineers)
Sets the engineers of the transfer.
Definition: Transfer.cpp:193