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/containers.py

    r473 r477  
    1717 
    1818"""Containes classes defining concrete container game objects like crates, 
    19 barrels, chests, etc.""" 
     19   barrels, chests, etc.""" 
    2020 
    2121__all__ = ["WoodenCrate", "Footlocker"] 
    2222 
    23 _AGENT_STATE_NONE, _AGENT_STATE_OPENED, _AGENT_STATE_CLOSED, _AGENT_STATE_OPENING, _AGENT_STATE_CLOSING = xrange(5) 
     23_AGENT_STATE_NONE, _AGENT_STATE_OPENED, _AGENT_STATE_CLOSED, \ 
     24_AGENT_STATE_OPENING, _AGENT_STATE_CLOSING = xrange(5) 
    2425 
    2526from composed import ImmovableContainer 
     
    2829 
    2930class WoodenCrate (ImmovableContainer): 
    30     def __init__ (self, ID, name = 'Wooden Crate', \ 
    31             text = 'A battered crate', gfx = 'crate', **kwargs): 
     31    def __init__ (self, ID, name = 'Wooden Crate', 
     32                  text = 'A battered crate', gfx = 'crate', **kwargs): 
    3233        ImmovableContainer.__init__(self, ID = ID, name = name, gfx = gfx, \ 
    3334                text = text, **kwargs) 
     
    3536         
    3637class Footlocker(ImmovableContainer, fife.InstanceActionListener): 
    37     def __init__ (self, ID, agent_layer=None, name = 'Footlocker', \ 
    38                text = 'A Footlocker', gfx = 'lock_box_metal01', **kwargs): 
    39         ImmovableContainer.__init__(self, ID = ID, name = name, gfx = gfx, \ 
    40                 text = text, **kwargs) 
     38    def __init__ (self, ID, agent_layer=None, name = 'Footlocker', 
     39                  text = 'A Footlocker', gfx = 'lock_box_metal01', **kwargs): 
     40        ImmovableContainer.__init__(self, ID = ID, name = name, gfx = gfx, 
     41                                    text = text, **kwargs) 
    4142        self.placeItem(CarryableItem(ID=987,name="Dagger456")) 
    4243 
     
    7475        if self.state != _AGENT_STATE_CLOSED and self.state != _AGENT_STATE_CLOSING: 
    7576            self.agent.act('close', self.agent.getLocation()) 
    76             self.state = _AGENT_STATE_CLOSING        
     77            self.state = _AGENT_STATE_CLOSING 
Note: See TracChangeset for help on using the changeset viewer.