diff options
author | Stijn Buys <ingar@osirion.org> | 2012-11-18 15:10:37 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-11-18 15:10:37 +0000 |
commit | ab61530779c73e7e145193efcb1e23a47c16e7f3 (patch) | |
tree | 9aed75947be45585cf884effc3a59575a1b1bb8e /src/game/base/weapon.h | |
parent | 69b0cd536aee5cf948e5a97af4df3dd75a545bd0 (diff) |
Implements server-side ship damage,
adds a damage key to the weapons.ini file,
configurable spacemine damage.
Diffstat (limited to 'src/game/base/weapon.h')
-rw-r--r-- | src/game/base/weapon.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/game/base/weapon.h b/src/game/base/weapon.h index 01a135b..ba28810 100644 --- a/src/game/base/weapon.h +++ b/src/game/base/weapon.h @@ -19,6 +19,8 @@ public: Weapon(); ~Weapon(); + /* --- inspectors ------------------------------------------ */ + inline SubType subtype() const { return weapon_subtype; } @@ -29,6 +31,24 @@ public: inline int level() const { return weapon_level; } + + /** + * @brief the amount of damage this weapon inflicts + * */ + inline const float damage() const + { + return weapon_damage; + } + + /* --- mutators -------------------------------------------- */ + + /** + * @brief set the amount of damage this weapon inflicts + * */ + inline void set_damage(const float damage) + { + weapon_damage = damage; + } void set_stackable(bool stackable); @@ -53,11 +73,13 @@ public: private: static core::InfoType *weapon_infotype; + SubType weapon_subtype; + int weapon_level; bool weapon_stackable; - SubType weapon_subtype; + float weapon_damage; }; } // namespace game |