Clean ups
[SmugglerRL.git] / src / item.d
bloba5043a3b0f8d64ff65e24e71f8e16953bcc16351
1 import glyph;
2 import colour;
3 import util;
4 import graphix;
6 enum Item_type {
7 Weapon,
8 Armour,
9 Fooood,
10 Tooool,
11 Shiiit,
12 Otherr,
15 struct Item {
16 Item_type type;
17 string name;
19 void delegate(ref Item self, Graphics1 graphics) _on_pick_up;
20 void delegate(ref Item self, Graphics1 grahpics) _on_use;
22 mixin funcwrapper!_on_pick_up;
23 mixin funcwrapper!_on_use;
27 Item[] items;
29 shared static this() {
30 items = [
31 Item(Item_type.Weapon, "long sword", (ref Item self, Graphics1 graphics) { graphics.pline("Hmmm. On the one hand I think you picked up a%d " ~ self.name ~ ". On the other hand I think you're a bloody idiot.", 7); }),