Add skeleton structure for items
[SmugglerRL.git] / src / item.d
blob9964a02ee204621f701682f3275207d6c741b3f5
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 mixin funcwrapper!_on_pick_up;
23 Item[] items;
25 shared static this() {
26 items = [
27 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); }),