summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-equip.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-03-13 01:36:26 +0100
committerRobert Vollmert <rvollmert@gmx.net>2010-03-13 14:47:08 +0100
commit9a7f85e4145b4fa6b4fede16be96b1c85149a5ed (patch)
tree0a408a7bfd06385434c8c42d9eb2e2b2dc4b7312 /crawl-ref/source/player-equip.h
parentebad4a412b3459e1def3cb3b5f0edbe051d119d8 (diff)
downloadcrawl-ref-9a7f85e4145b4fa6b4fede16be96b1c85149a5ed.tar.gz
crawl-ref-9a7f85e4145b4fa6b4fede16be96b1c85149a5ed.zip
Concentrate equipping/unequipping in player-equip.cc.
The various equipping effects should eventually move there; for now, they should only be called throuh (un)equip_item.
Diffstat (limited to 'crawl-ref/source/player-equip.h')
-rw-r--r--crawl-ref/source/player-equip.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/player-equip.h b/crawl-ref/source/player-equip.h
new file mode 100644
index 0000000000..094552042b
--- /dev/null
+++ b/crawl-ref/source/player-equip.h
@@ -0,0 +1,18 @@
+#ifndef PLAYER_EQUIP_H
+#define PLAYER_EQUIP_H
+
+// Any code that equips or melds items should go through these, to
+// make sure equip/unequip effects are done the right amount of
+// times, and to make sure melded flags don't get out of sync.
+
+// TODO: move (un)equip_*_effect to player-equip.cc so they can't
+// accidentally be called from somewhere else.
+
+// XXX: the msg flag isn't implemented in all cases.
+void equip_item(equipment_type slot, int item_slot, bool msg=true);
+bool unequip_item(equipment_type slot, bool msg=true);
+bool meld_slot(equipment_type slot, bool msg=true);
+bool unmeld_slot(equipment_type slot, bool msg=true);
+
+#endif
+