Mercurial > pyntnclick
comparison gamelib/state.py @ 336:72e4d0c5dfe9
Clean-up two old TODOs.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sat, 28 Aug 2010 14:34:39 +0200 |
parents | a1ffc919d0c1 |
children | 185eca15a42a |
comparison
equal
deleted
inserted
replaced
335:914b0ecaab89 | 336:72e4d0c5dfe9 |
---|---|
386 self.scene = None | 386 self.scene = None |
387 self.state = None | 387 self.state = None |
388 self.current_interact = None | 388 self.current_interact = None |
389 self.rect = None | 389 self.rect = None |
390 self.orig_rect = None | 390 self.orig_rect = None |
391 # TODO: add masks | |
392 | 391 |
393 def _fix_rect(self): | 392 def _fix_rect(self): |
394 """Fix rects to compensate for scene offset""" | 393 """Fix rects to compensate for scene offset""" |
395 # Offset logic is to always work with copies, to avoid | 394 # Offset logic is to always work with copies, to avoid |
396 # flying effects from multiple calls to _fix_rect | 395 # flying effects from multiple calls to _fix_rect |
482 """Base class for inventory items.""" | 481 """Base class for inventory items.""" |
483 | 482 |
484 # image for inventory | 483 # image for inventory |
485 INVENTORY_IMAGE = None | 484 INVENTORY_IMAGE = None |
486 | 485 |
486 # name for interactions (i.e. def interact_with_<TOOL_NAME>) | |
487 TOOL_NAME = None | 487 TOOL_NAME = None |
488 | |
489 # set to instance of CursorSprite | |
490 CURSOR = None | |
488 | 491 |
489 def __init__(self, name): | 492 def __init__(self, name): |
490 self.name = name | 493 self.name = name |
491 self.tool_name = name | 494 self.tool_name = name |
492 if self.TOOL_NAME is not None: | 495 if self.TOOL_NAME is not None: |
493 self.tool_name = self.TOOL_NAME | 496 self.tool_name = self.TOOL_NAME |
494 self.inventory_image = get_image('items', self.INVENTORY_IMAGE) | 497 self.inventory_image = get_image('items', self.INVENTORY_IMAGE) |
495 # TODO: needs cursor | |
496 | 498 |
497 def get_inventory_image(self): | 499 def get_inventory_image(self): |
498 return self.inventory_image | 500 return self.inventory_image |
499 | 501 |
500 def interact(self, tool, state): | 502 def interact(self, tool, state): |