Ignore:
Timestamp:
02/03/10 13:21:45 (10 years ago)
Author:
maximinus_parpg
Message:

More clean up of the code.
Finshed first pass.
So should be at least stands compliant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/objects/composed.py

    r451 r477  
    4343        return sum((item.weight for item in self.items.values()), self.own_weight) 
    4444 
    45  
    4645    def setWeight(self, weight): 
    4746        """Set container's own weight. For compatibility with inherited methods""" 
     
    6463                                    str(self.items[b])), self.items,""))+" ]" 
    6564 
    66  
    6765class SingleItemContainer (CarryableContainer) : 
    68     """Container that can only store a single item. This class can represent single-item inventory slots""" 
     66    """Container that can only store a single item. 
     67       This class can represent single-item inventory slots""" 
    6968    def __init__ (self, **kwargs): 
    7069        CarryableContainer.__init__(self, **kwargs) 
     
    7675 
    7776class CarryableItem (GameObject, Carryable): 
    78     """Composite class that will be used for all carryable items, weapons, etc. 
    79     """ 
     77    """Composite class that will be used for all carryable items""" 
    8078    def __init__(self, **kwargs): 
    8179        GameObject.__init__(self,**kwargs) 
     
    8482class Door(GameObject, Lockable, Scriptable, Trappable): 
    8583    """Composite class that can be used to create doors on a map.""" 
    86     def __init__ (self, target_map_name = 'my-map', target_map = 'map/map.xml', target_x = 0.0, \ 
    87                         target_y = 0.0, **kwargs): 
    88         GameObject   .__init__(self, **kwargs) 
    89         Lockable     .__init__(self, **kwargs) 
    90         Scriptable   .__init__(self, **kwargs) 
    91         Trappable    .__init__(self, **kwargs) 
     84    def __init__ (self, target_map_name = 'my-map', target_map = 'map/map.xml', 
     85                  target_x = 0.0, target_y = 0.0, **kwargs): 
     86        GameObject.__init__(self, **kwargs) 
     87        Lockable.__init__(self, **kwargs) 
     88        Scriptable.__init__(self, **kwargs) 
     89        Trappable.__init__(self, **kwargs) 
    9290        self.is_door = True 
    9391        self.target_map_name = target_map_name 
Note: See TracChangeset for help on using the changeset viewer.