Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-11-25 12:06:13 +0000
committerStijn Buys <ingar@osirion.org>2012-11-25 12:06:13 +0000
commitd8be908233fd7b85492d7a9e87f07bb207173990 (patch)
tree70d9103a867688838fc517290bb370366c69fedb /src/core/slot.h
parentedc5ddce817244111b302e449c28a052f2746cc4 (diff)
Moved core::EntityGlobe into a separate file,
added various methods to core::Item and core::Slot, added r_slots cvar to draw entity slots and docks, added game methods for mounting and umounting of weapons, added playerlist to chat window.
Diffstat (limited to 'src/core/slot.h')
-rw-r--r--src/core/slot.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/core/slot.h b/src/core/slot.h
index 2d636b3..5cfeb3e 100644
--- a/src/core/slot.h
+++ b/src/core/slot.h
@@ -22,7 +22,7 @@ namespace core
* */
class Slot {
public:
- enum Flags {Active = 1};
+ enum Flags {Mounted = 1, Active = 2};
/**
* @brief default constructor
@@ -52,6 +52,30 @@ public:
}
/**
+ * @brief slot flags
+ * */
+ inline const unsigned int flags() const
+ {
+ return slot_flags;
+ }
+
+ /**
+ * @brief return true if a specified flag is set
+ * */
+ inline const bool has_flag(const Flags flag)
+ {
+ return ( (slot_flags & flag) == flag );
+ }
+
+ /**
+ * @brief the item this slot is holding
+ * */
+ inline core::Item *item()
+ {
+ return slot_item;
+ }
+
+ /**
* @brief timestamp indicating when the slot was last fired,server-side
* This is a server-side property
* */
@@ -128,6 +152,16 @@ public:
}
/**
+ * @brief set a specified flags
+ * */
+ void set_flag(const Flags flag);
+
+ /**
+ * @brief unset a specified flags
+ * */
+ void unset_flag(const Flags flag);
+
+ /**
* @brief set the slot's timestamp
* The timestamp indicates when the slot's configuration was last changed.
* */