Changeset 538 for trunk/game/scripts


Ignore:
Timestamp:
04/22/10 10:30:01 (10 years ago)
Author:
beliar
Message:

Changed code for the object database a bit. Does the same still but with fewer lines of code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/engine.py

    r537 r538  
    123123            db_attributes = self.object_db[class_name].copy() 
    124124            for key in db_attributes.keys(): 
    125                 if not attributes.has_key(key) or attributes[key] == None: 
    126                     attributes[key] = db_attributes[key] 
     125                attributes[key] = attributes[key] or db_attributes[key] 
    127126         
    128127        obj = createObject(attributes, extra) 
Note: See TracChangeset for help on using the changeset viewer.