OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a soldier-equipment layout item which is used on the beginning of the Battlescape. More...
#include <EquipmentLayoutItem.h>
Public Member Functions | |
EquipmentLayoutItem (const YAML::Node &node) | |
Creates a new soldier-equipment layout item and loads its contents from YAML. More... | |
EquipmentLayoutItem (std::string itemType, std::string slot, int slotX, int slotY, std::string ammoItem, int fuseTimer) | |
Creates a new soldier-equipment layout item. More... | |
~EquipmentLayoutItem () | |
Cleans up the soldier-equipment layout item. | |
std::string | getItemType () const |
Gets the item's type which has to be in a slot. More... | |
std::string | getSlot () const |
Gets the slot to be occupied. More... | |
int | getSlotX () const |
Gets the slotX to be occupied. More... | |
int | getSlotY () const |
Gets the slotY to be occupied. More... | |
std::string | getAmmoItem () const |
Gets the ammo item. More... | |
int | getFuseTimer () const |
Gets the turn until explosion. More... | |
void | load (const YAML::Node &node) |
Loads the soldier-equipment layout item from YAML. More... | |
YAML::Node | save () const |
Saves the soldier-equipment layout item to YAML. More... | |
Represents a soldier-equipment layout item which is used on the beginning of the Battlescape.
OpenXcom::EquipmentLayoutItem::EquipmentLayoutItem | ( | const YAML::Node & | node | ) |
Creates a new soldier-equipment layout item and loads its contents from YAML.
Initializes a new soldier-equipment layout item from YAML.
node | YAML node. |
OpenXcom::EquipmentLayoutItem::EquipmentLayoutItem | ( | std::string | itemType, |
std::string | slot, | ||
int | slotX, | ||
int | slotY, | ||
std::string | ammoItem, | ||
int | fuseTimer | ||
) |
Creates a new soldier-equipment layout item.
Initializes a new soldier-equipment layout item.
itemType | Item's type. |
slot | Occupied slot's id. |
slotX | Position-X in the occupied slot. |
slotY | Position-Y in the occupied slot. |
ammoItem | The ammo has to be loaded into the item. (it's type) |
fuseTimer | The turn until explosion of the item. (if it's an activated grenade-type) |
std::string OpenXcom::EquipmentLayoutItem::getAmmoItem | ( | ) | const |
Gets the ammo item.
Returns the ammo has to be loaded into the item.
int OpenXcom::EquipmentLayoutItem::getFuseTimer | ( | ) | const |
Gets the turn until explosion.
Returns the turn until explosion of the item.
(if it's an activated grenade-type)
std::string OpenXcom::EquipmentLayoutItem::getItemType | ( | ) | const |
Gets the item's type which has to be in a slot.
Returns the item's type which has to be in a slot.
std::string OpenXcom::EquipmentLayoutItem::getSlot | ( | ) | const |
Gets the slot to be occupied.
Returns the slot to be occupied.
int OpenXcom::EquipmentLayoutItem::getSlotX | ( | ) | const |
Gets the slotX to be occupied.
Returns the position-X in the slot to be occupied.
int OpenXcom::EquipmentLayoutItem::getSlotY | ( | ) | const |
Gets the slotY to be occupied.
Returns the position-Y in the slot to be occupied.
void OpenXcom::EquipmentLayoutItem::load | ( | const YAML::Node & | node | ) |
Loads the soldier-equipment layout item from YAML.
Loads the soldier-equipment layout item from a YAML file.
node | YAML node. |
YAML::Node OpenXcom::EquipmentLayoutItem::save | ( | ) | const |
Saves the soldier-equipment layout item to YAML.
Saves the soldier-equipment layout item to a YAML file.