Changeset 615


Ignore:
Timestamp:
08/02/10 12:04:03 (9 years ago)
Author:
beliar
Message:

Patch by Beliar.

  • When checking for attributes in items and none are found the default class "CarryableItem?" will be used. This fixes the crash on changing maps.
  • CarryableContainer? now adds the attribute "Container" when getting the state for saving.
  • Moved "Wild potato" into a visible area on the Farm map.
Location:
trunk/game
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/maps/all_agents.yaml

    r610 r615  
    207207    ItemType: "Wild potato" 
    208208    Map: "Farm" 
    209     Position: [-9.0, -3.0] 
     209    Position: [-4.0, -8.0] 
    210210    Rotation: 0 
    211211--- 
  • trunk/game/scripts/gamemodel.py

    r610 r615  
    158158                 
    159159                new_item = CarryableContainer(ID = ID, **info)  
     160            else: 
     161                new_item = CarryableItem(ID = ID, **info)  
    160162        else: 
    161163            new_item = CarryableItem(ID = ID, **info)  
  • trunk/game/scripts/objects/composed.py

    r611 r615  
    114114        """ 
    115115        state = Container.getStateForSaving(self) 
     116        if not state.has_key("attributes"): 
     117            state["attributes"] = [] 
     118        state["attributes"].append("Container") 
    116119        state.update(CarryableItem.getStateForSaving(self)) 
    117120        return state 
Note: See TracChangeset for help on using the changeset viewer.