diff options
author | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-26 14:33:04 +0100 |
---|---|---|
committer | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-26 14:33:04 +0100 |
commit | 8dccb20d3ee6a5acd982913977ac0f5415fda588 (patch) | |
tree | 419d44c50c27d4e9da0401f599a4c0dfe4f3cfb4 /being.py | |
parent | ffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52 (diff) | |
download | manamarket-8dccb20d3ee6a5acd982913977ac0f5415fda588.tar.gz manamarket-8dccb20d3ee6a5acd982913977ac0f5415fda588.tar.bz2 manamarket-8dccb20d3ee6a5acd982913977ac0f5415fda588.tar.xz manamarket-8dccb20d3ee6a5acd982913977ac0f5415fda588.zip |
Make sure the ID provided is of the type wanted: default to player.
Incase someone has the same name as an npc in the room.
Diffstat (limited to 'being.py')
-rw-r--r-- | being.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -21,9 +21,9 @@ class BeingManager: def __init__(self): self.container = {} - def findId(self, name): + def findId(self, name, type="player"): for i in self.container: - if self.container[i].name == name: + if self.container[i].name == name and self.container[i].type == type: return i return -10 |