1 package org
.sevenchan
.dongs
3 import adobe
.utils
.CustomActions;
4 import org
.sevenchan
.dongs
.clothing
.*;
5 import org
.sevenchan
.dongs
.items
.*;
6 import org
.sevenchan
.dongs
.screens
.InfoScreen
;
14 public static var Registry
:Object = { };
15 public static var IDs
:Array = new Array();
17 public var id
:int = 0;
18 public var name
:String = "";
19 public var descr
:String = "";
20 public var value
:int = 0;
21 public var amount
:uint = 0;
22 public var isSexuallyTransmitted
:Boolean = false;
24 public function Item
(num
:uint = 0)
29 public function copy
():Item
34 public static function fillRegistry
():void
37 berry_white
: new WhiteBerries
(),
38 harpy_tincture
: new HarpyTincture
(),
39 spider_venom
: new SpiderVenomSac
(),
40 darkharpyegg
: new DarkHarpyEgg
(),
41 potion_pink
: new PinkPotion
(),
42 potion_gold
: new GoldPotion
(),
43 spider_egg
: new SpiderEgg
(),
44 gas_mask
: new GasMask
(),
46 spider_gonad
: new SpiderGonad
(),
47 anchor_stone
: new AnchorStone
(),
51 for each (var i
:Item
in Registry
)
53 trace
(i
.name
+"\t"+i
.id
);
54 if (IDs
[i
.id
] != null)
55 throw new Error(i
.name
+ " has duplicate ID! Conflicts with " + (IDs
[i
.id
] as Item
).name
);
60 public static function findByID
(id
:int):Item
62 trace
("Asked to find", id
);
63 for each (var item
:Item
in Registry
)
65 trace
(item
.name
, item
.id
);
72 public function Use
(host
:Creature
):Boolean
74 InfoScreen
.push
("<h2>Use Item</h2><p>Nothing happens.</p>");