def SiftItemProtos(): from mud.world.item import ItemProto sounds = ("sndAttack1","sndAttack2","sndAttack3","sndAttack4","sndAttack5", "sndAttack6","sndAttack7","sndAttack8", "sndHit1","sndHit2","sndHit3","sndHit4","sndHit5","sndHit6", "sndHit7","sndHit8","sndUse","sndEquip") for item in ItemProto.select(): if not item.bitmap: print "WARNING: %s has no bitmap"%item.name else: texture = "./$/data/ui/items/%s/0_0_0"%item.bitmap AddTexture(texture) if item.model: AddDTS("./$/data/shapes/equipment/%s"%item.model) if item.material and "head/" not in item.material.lower() and \ "weapons/" not in item.material.lower(): AddTexture("./$/data/shapes/character/textures/%s"%item.material) elif item.material: AddTexture("./$/data/shapes/equipment/%s"%item.material) if item.sndProfile: for s in sounds: snd = getattr(item.sndProfile,s) if snd: AddSound("./$/data/sound/%s"%snd)
def SiftItemProtos(): from mud.world.item import ItemProto sounds = ("sndAttack1", "sndAttack2", "sndAttack3", "sndAttack4", "sndAttack5", "sndAttack6", "sndAttack7", "sndAttack8", "sndHit1", "sndHit2", "sndHit3", "sndHit4", "sndHit5", "sndHit6", "sndHit7", "sndHit8", "sndUse", "sndEquip") for item in ItemProto.select(): if not item.bitmap: print "WARNING: %s has no bitmap" % item.name else: texture = "./$/data/ui/items/%s/0_0_0" % item.bitmap AddTexture(texture) if item.model: AddDTS("./$/data/shapes/equipment/%s" % item.model) if item.material and "head/" not in item.material.lower() and \ "weapons/" not in item.material.lower(): AddTexture("./$/data/shapes/character/textures/%s" % item.material) elif item.material: AddTexture("./$/data/shapes/equipment/%s" % item.material) if item.sndProfile: for s in sounds: snd = getattr(item.sndProfile, s) if snd: AddSound("./$/data/sound/%s" % snd)