From 8dccb20d3ee6a5acd982913977ac0f5415fda588 Mon Sep 17 00:00:00 2001 From: Dipesh Amin Date: Fri, 26 Aug 2011 14:33:04 +0100 Subject: 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. --- being.py | 4 ++-- 1 file 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 -- cgit v1.2.3-70-g09d2