19 #ifndef OPENXCOM_CRAFTWEAPON_H
20 #define OPENXCOM_CRAFTWEAPON_H
23 #include <yaml-cpp/yaml.h>
28 class RuleCraftWeapon;
29 class CraftWeaponProjectile;
49 void load(
const YAML::Node& node);
51 YAML::Node
save()
const;
63 int rearm(
const int available,
const int clipSize);
int rearm(const int available, const int clipSize)
Rearms the craft weapon.
Definition: CraftWeapon.cpp:131
bool isRearming() const
Gets the craft weapon's rearming status.
Definition: CraftWeapon.cpp:110
CraftWeaponProjectile * fire() const
Fires the craft weapon. Used during dogfights.
Definition: CraftWeapon.cpp:163
void setRearming(bool rearming)
Sets the craft weapon's rearming status.
Definition: CraftWeapon.cpp:120
Represents a craft weapon equipped by a craft.
Definition: CraftWeapon.h:37
CraftWeapon(RuleCraftWeapon *rules, int ammo)
Creates a craft weapon of the specified type.
Definition: CraftWeapon.cpp:33
RuleCraftWeapon * getRules() const
Gets the craft weapon's ruleset.
Definition: CraftWeapon.cpp:72
YAML::Node save() const
Saves the craft weapon to YAML.
Definition: CraftWeapon.cpp:58
Set of rules and stats for a game.
Definition: Ruleset.h:69
int getAmmo() const
Gets the craft weapon's ammo.
Definition: CraftWeapon.cpp:81
~CraftWeapon()
Cleans up the craft weapon.
Definition: CraftWeapon.cpp:40
void load(const YAML::Node &node)
Loads the craft weapon from YAML.
Definition: CraftWeapon.cpp:48
int getClipsLoaded(Ruleset *ruleset)
get how many clips are loaded into this weapon.
Definition: CraftWeapon.cpp:179
Represents a specific type of craft weapon.
Definition: RuleCraftWeapon.h:35
bool setAmmo(int ammo)
Sets the craft weapon's ammo.
Definition: CraftWeapon.cpp:91
Definition: CraftWeaponProjectile.h:36