1 package org
.sevenchan
.dongs
3 import adobe
.utils
.CustomActions;
4 import org
.sevenchan
.dongs
.items
.*;
5 import org
.sevenchan
.dongs
.screens
.InfoScreen
;
13 public static var Registry
:Object = {};
15 public var id
:int = 0;
16 public var name
:String = "";
17 public var descr
:String = "";
18 public var value
:int = 0;
19 public var amount
:uint = 0;
20 public var isSexuallyTransmitted
:Boolean = false;
22 public function Item
(num
:uint = 0)
27 public function copy
():Item
32 public static function fillRegistry
():void
35 berry_white
: new WhiteBerries
(),
36 harpy_tincture
: new HarpyTincture
(),
37 spider_venom
: new SpiderVenomSac
(),
38 darkharpyegg
: new DarkHarpyEgg
(),
39 potion_pink
: new PinkPotion
(),
40 potion_gold
: new GoldPotion
(),
41 spider_egg
: new SpiderEgg
(),
42 gas_mask
: new GasMask
(),
44 spider_gonad
: new SpiderGonad
(),
45 anchor_stone
: new AnchorStone
()
47 var ids
:Array = new Array();
48 for each (var i
:Item
in Registry
)
50 trace
(i
.name
+"\t"+i
.id
);
51 if (ids
[i
.id
] != null)
52 throw new Error(i
.name
+ " has duplicate ID! Conflicts with " + (ids
[i
.id
] as Item
).name
);
57 public static function findByID
(id
:int):Item
59 trace
("Asked to find", id
);
60 for each (var item
:Item
in Registry
)
62 trace
(item
.name
, item
.id
);
69 public function Use
(host
:Creature
):Boolean
71 InfoScreen
.push
("<h2>Use Item</h2><p>Nothing happens.</p>");