Ignore:
Timestamp:
11/06/09 16:43:40 (10 years ago)
Author:
saritor
Message:

Ticket #151: Patch by saritor.

  • Modifies door object calling arguements to properly use target position data passed with map xml file.
  • fixes[s:trac, t:151]
Location:
trunk/game/scripts/objects
Files:
2 edited

Legend:

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

    r354 r373  
    6666class Door(GameObject, Lockable, Scriptable, Trappable): 
    6767    """Composite class that can be used to create doors on a map.""" 
    68     def __init__ (self, target_map_name = 'my-map', target_map = 'map/map.xml', target_pos = (0.0, 0.0), \ 
    69                         **kwargs): 
     68    def __init__ (self, target_map_name = 'my-map', target_map = 'map/map.xml', target_x = 0.0, \ 
     69                        target_y = 0.0, **kwargs): 
    7070        GameObject   .__init__(self, **kwargs) 
    7171        Lockable     .__init__(self, **kwargs) 
     
    7575        self.target_map_name = target_map_name 
    7676        self.target_map = target_map 
    77         self.target_pos = target_pos 
     77        self.target_pos = (target_x, target_y) 
    7878        self.blocking = True 
  • trunk/game/scripts/objects/doors.py

    r317 r373  
    2525    def __init__ (self, ID, name = 'Shanty Door', \ 
    2626            text = 'A door', gfx = 'shanty-door', target_map_name = 'my-map', \ 
    27             target_map = 'map.xml', target_pos = (0.0, 0.0), \ 
     27            target_map = 'map.xml', target_x = 0.0, target_y = 0.0,\ 
    2828            **kwargs): 
    2929        Door.__init__(self, ID = ID, name = name, text = text, gfx = gfx, \ 
    3030            target_map_name = target_map_name, target_map = target_map, \ 
    31             target_pos = target_pos, **kwargs) 
     31            target_x = target_x, target_y = target_y, **kwargs) 
    3232 
Note: See TracChangeset for help on using the changeset viewer.