Changeset 118 for adventure/thing.py

Show
Ignore:
Timestamp:
10/15/07 18:32:33 (3 years ago)
Author:
elghinn
Message:

plein de bugs en moins \o/

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • adventure/thing.py

    r114 r118  
    55 
    66class Thing: 
    7     def _init__(self, world, name, parent): 
    8         self.word = word 
     7    def __init__(self, world, name, parent): 
     8        self.world = world 
    99        self.name = name 
    1010        self.parent = parent 
    11         self.aliases = list() # Noms alternatifs 
     11        self.aliases = (name,) # Noms alternatifs 
    1212        self.actions = list() 
    1313        self.presence = None 
     
    5454            target = None 
    5555            if command.action[2]: 
    56                 for object_ in self.place.objects: 
    57                     if object_.place == self.place and object_.name == command.action[2]: 
    58                         target = object_ 
    59                         break 
    60                 for participant in self.place.participants: 
    61                     if participant.place == self.place and participant.name == command.action[2]: 
    62                         target = participant 
     56                for thing in self.world.each_thing_by_place(self.place): 
     57                    if thing.name == command.action[2]: 
     58                        target = thing 
    6359                        break 
    6460            #else: