summaryrefslogtreecommitdiff
path: root/being.py
diff options
context:
space:
mode:
authorDipesh Amin <yaypunkrock@gmail.com>2011-08-26 14:33:04 +0100
committerDipesh Amin <yaypunkrock@gmail.com>2011-08-26 14:33:04 +0100
commit8dccb20d3ee6a5acd982913977ac0f5415fda588 (patch)
tree419d44c50c27d4e9da0401f599a4c0dfe4f3cfb4 /being.py
parentffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52 (diff)
downloadmanamarket-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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/being.py b/being.py
index e5d0b95..3c70616 100644
--- a/being.py
+++ b/being.py
@@ -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