sc2simulator/scenarioMgr/scenarioUnit.py
def convertTechUnit(techUnit, **attrs):
    """convert a tech unit into a scenario unit"""
    u = ScenarioUnit(0)
    u.update(nametype   = techUnit.name,
             code       = techUnit.mType.code,
             energy     = techUnit.energyStart,
             life       = techUnit.healthMax,
             shields    = techUnit.shieldsMax)
    u.update(**attrs) # allow passed attributes to override techUnit defaults
    return u
convert a tech unit into a scenario unit
convert a tech unit into a scenario unit
convert a tech unit into a scenario unit
def convertTechUnit(techUnit, **attrs):
    u = ScenarioUnit(0)
    u.update(nametype   = techUnit.name,
             code       = techUnit.mType.code,
             energy     = techUnit.energyStart,
             life       = techUnit.healthMax,
             shields    = techUnit.shieldsMax)
    u.update(**attrs) 
    return u
def convertTechUnit ( techUnit , ** attrs ) : u = ScenarioUnit ( 0 ) u . update ( nametype = techUnit . name , code = techUnit . mType . code , energy = techUnit . energyStart , life = techUnit . healthMax , shields = techUnit . shieldsMax ) u . update ( ** attrs ) return u
convert a tech unit into a scenario unit
convert a tech unit into a scenario unit
"""convert a tech unit into a scenario unit""" # allow passed attributes to override techUnit defaults
techUnit