![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a vehicle (tanks etc.) kept in a craft. More...
#include <Vehicle.h>
Public Member Functions | |
| Vehicle (RuleItem *rules, int ammo, int size) | |
| Creates a vehicle of the specified type. More... | |
| ~Vehicle () | |
| Cleans up the vehicle. | |
| void | load (const YAML::Node &node) |
| Loads the vehicle from YAML. More... | |
| YAML::Node | save () const |
| Saves the vehicle to YAML. More... | |
| RuleItem * | getRules () const |
| Gets the vehicle's ruleset. More... | |
| int | getAmmo () const |
| Gets the vehicle's ammo. More... | |
| void | setAmmo (int ammo) |
| Sets the vehicle's ammo. More... | |
| int | getSize () const |
| Gets the vehicle's size. More... | |
Represents a vehicle (tanks etc.) kept in a craft.
Contains variable info about a vehicle like ammo.
| OpenXcom::Vehicle::Vehicle | ( | RuleItem * | rules, |
| int | ammo, | ||
| int | size | ||
| ) |
Creates a vehicle of the specified type.
Initializes a vehicle of the specified type.
| rules | Pointer to ruleset. |
| ammo | Initial ammo. |
| size | Size in tiles. |
| int OpenXcom::Vehicle::getAmmo | ( | ) | const |
Gets the vehicle's ammo.
Returns the ammo contained in this vehicle.
| RuleItem * OpenXcom::Vehicle::getRules | ( | ) | const |
Gets the vehicle's ruleset.
Returns the ruleset for the vehicle's type.
| int OpenXcom::Vehicle::getSize | ( | ) | const |
Gets the vehicle's size.
Returns the size occupied by this vehicle in a transport craft.
| void OpenXcom::Vehicle::load | ( | const YAML::Node & | node | ) |
Loads the vehicle from YAML.
Loads the vehicle from a YAML file.
| node | YAML node. |
| YAML::Node OpenXcom::Vehicle::save | ( | ) | const |
Saves the vehicle to YAML.
Saves the base to a YAML file.
| void OpenXcom::Vehicle::setAmmo | ( | int | ammo | ) |
Sets the vehicle's ammo.
Changes the ammo contained in this vehicle.
| ammo | Weapon ammo. |
1.8.14