Mercurial > pyntnclick
comparison gamelib/scenes/mess.py @ 302:6d93e04036c9
CursorSprite: Default pointer-position to the centre of the cursor
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 28 Aug 2010 01:32:54 +0200 |
parents | c3ff6ff879e6 |
children | bd9a760eeb18 |
comparison
equal
deleted
inserted
replaced
301:cecdb67f4f4b | 302:6d93e04036c9 |
---|---|
60 | 60 |
61 class EmptyCan(BaseCan): | 61 class EmptyCan(BaseCan): |
62 "After emptying the full can." | 62 "After emptying the full can." |
63 | 63 |
64 INVENTORY_IMAGE = "empty_can.png" | 64 INVENTORY_IMAGE = "empty_can.png" |
65 CURSOR = CursorSprite('empty_can_cursor.png', 20, 30) | 65 CURSOR = CursorSprite('empty_can_cursor.png') |
66 | 66 |
67 def interact_with_titanium_leg(self, item, state): | 67 def interact_with_titanium_leg(self, item, state): |
68 return Result("Flattening the can doesn't look like a useful thing to do.") | 68 return Result("Flattening the can doesn't look like a useful thing to do.") |
69 | 69 |
70 | 70 |
71 class FullCan(BaseCan): | 71 class FullCan(BaseCan): |
72 "Found on the shelf." | 72 "Found on the shelf." |
73 | 73 |
74 INVENTORY_IMAGE = "full_can.png" | 74 INVENTORY_IMAGE = "full_can.png" |
75 CURSOR = CursorSprite('full_can_cursor.png', 20, 30) | 75 CURSOR = CursorSprite('full_can_cursor.png') |
76 | 76 |
77 def interact_with_titanium_leg(self, item, state): | 77 def interact_with_titanium_leg(self, item, state): |
78 dented = DentedCan("dented_can") | 78 dented = DentedCan("dented_can") |
79 state.add_item(dented) | 79 state.add_item(dented) |
80 state.replace_inventory_item(self, dented) | 80 state.replace_inventory_item(self, dented) |
83 | 83 |
84 class DentedCan(BaseCan): | 84 class DentedCan(BaseCan): |
85 "A can banged on with the femur" | 85 "A can banged on with the femur" |
86 | 86 |
87 INVENTORY_IMAGE = "dented_can.png" | 87 INVENTORY_IMAGE = "dented_can.png" |
88 CURSOR = CursorSprite('dented_can_cursor.png', 20, 30) | 88 CURSOR = CursorSprite('dented_can_cursor.png') |
89 | 89 |
90 def interact_with_titanium_leg(self, item, state): | 90 def interact_with_titanium_leg(self, item, state): |
91 return Result("You club the can with the femur. The dents shift around, but it still doesn't open.", soundfile="can_hit.ogg") | 91 return Result("You club the can with the femur. The dents shift around, but it still doesn't open.", soundfile="can_hit.ogg") |
92 | 92 |
93 | 93 |
225 def get_description(self): | 225 def get_description(self): |
226 return "Empty plastic containers. They used to hold dish washer soap." | 226 return "Empty plastic containers. They used to hold dish washer soap." |
227 | 227 |
228 class DetergentBottle(Item): | 228 class DetergentBottle(Item): |
229 INVENTORY_IMAGE = 'triangle.png' | 229 INVENTORY_IMAGE = 'triangle.png' |
230 CURSOR = CursorSprite('triangle.png', 25, 23) | 230 CURSOR = CursorSprite('triangle.png') |
231 | 231 |
232 | 232 |
233 class ToMap(Door): | 233 class ToMap(Door): |
234 | 234 |
235 SCENE = "mess" | 235 SCENE = "mess" |