def __init__(self, cont=None, name=""): Struct.__init__(self, "CDataWeaponspec") self.name = String(name) self.sprite_body = Pointer(Sprite, Sprite()) self.sprite_cursor = Pointer(Sprite, Sprite()) self.sprite_proj = Pointer(Sprite, Sprite()) self.sprite_muzzles = Array(Pointer(Sprite, Sprite())) self.visual_size = Int(96) self.firedelay = Int(500) self.maxammo = Int(10) self.ammoregentime = Int(0) self.damage = Int(1) self.offsetx = Float(0) self.offsety = Float(0) self.muzzleoffsetx = Float(0) self.muzzleoffsety = Float(0) self.muzzleduration = Float(5) # dig out sprites if we have a container if cont: for sprite in cont.sprites.items: if sprite.name.value == "weapon_" + name + "_body": self.sprite_body.Set(sprite) elif sprite.name.value == "weapon_" + name + "_cursor": self.sprite_cursor.Set(sprite) elif sprite.name.value == "weapon_" + name + "_proj": self.sprite_proj.Set(sprite) elif "weapon_" + name + "_muzzle" in sprite.name.value: self.sprite_muzzles.Add(Pointer(Sprite, sprite))
def __init__(self): Struct.__init__(self, "CDataWeaponspecLaser") self.base = Pointer(WeaponSpec, WeaponSpec()) self.reach = Float(800.0) self.bounce_delay = Int(150) self.bounce_num = Int(1) self.bounce_cost = Float(0)
def __init__(self): Struct.__init__(self, "CDataWeaponspecShotgun") self.base = Pointer(WeaponSpec, WeaponSpec()) self.curvature = Float(1.25) self.speed = Float(2200) self.speeddiff = Float(0.8) self.lifetime = Float(0.25)
def __init__(self, time=0, x=0, y=0, angle=0): Struct.__init__(self, "CAnimKeyframe") self.time = Float(time) self.x = Float(x) self.y = Float(y) self.angle = Float(angle)
def __init__(self): Struct.__init__(self, "CDataWeaponspecGrenade") self.base = Pointer(WeaponSpec, WeaponSpec()) self.curvature = Float(7.0) self.speed = Float(1000) self.lifetime = Float(2.0)