def buildAttributeTemplate(self, object): attribute_list_message = AttributeListMessage() attribute_list_message.object_id = object.id attributes = AttributeList() if len(object.custom_name) > 0: attributes.append("@obj_attr_n:original_name", "@" + object.stf_file + ":" + object.stf_name) attributes.extend([ Attribute("@obj_attr_n:volume", str(object.volume)) ]) SetOptionalAttribute(attributes, '@obj_attr_n:crafter', 'crafter', object, False) SetOptionalAttribute(attributes, '@obj_attr_n:serial_number', 'serial_number', object, False) attribute_list_message.attributes = attributes return attribute_list_message
def buildAttributeTemplate(self, object): attribute_list_message = AttributeListMessage() attribute_list_message.object_id = object.id attributes = AttributeList() SetOptionalAttribute(attributes, '@obj_attr_n:travel_departure_planet', 'travel_departure_planet', object, False) SetOptionalAttribute(attributes, '@obj_attr_n:travel_departure_point', 'travel_departure_point', object, False) SetOptionalAttribute(attributes, '@obj_attr_n:travel_arrival_planet', 'travel_arrival_planet', object, False) SetOptionalAttribute(attributes, '@obj_attr_n:travel_arrival_point', 'travel_arrival_point', object, False) attribute_list_message.attributes = attributes return attribute_list_message
def buildAttributeTemplate(self, object): attribute_list_message = AttributeListMessage() attribute_list_message.object_id = object.id attributes = AttributeList() if len(object.custom_name) > 0: attributes.append("@obj_attr_n:original_name", "@" + object.stf_file + ":" + object.stf_name) attributes.extend([ Attribute( "@obj_attr_n:condition", str(object.max_condition - object.condition_damage) + "/" + str(object.max_condition)), Attribute("@obj_attr_n:volume", str(object.volume)), Attribute("@obj_attr_n:craft_tool_effectiveness", object.getStringAttribute("craft_tool_effectiveness")), Attribute("@obj_attr_n:craft_tool_status", object.getStringAttribute("craft_tool_status")) ]) SetOptionalAttribute(attributes, '@obj_attr_n:crafter', 'crafter', object, False) SetOptionalAttribute(attributes, '@obj_attr_n:serial_number', 'serial_number', object, False) attribute_list_message.attributes = attributes return attribute_list_message
def buildAttributeTemplate(self, object): attribute_list_message = AttributeListMessage() attribute_list_message.object_id = object.id attributes = AttributeList() if len(object.custom_name) > 0: attributes.append("@obj_attr_n:original_name", "@" + object.stf_file + ":" + object.stf_name) attributes.extend([ Attribute( "@obj_attr_n:condition", str(object.max_condition - object.condition_damage) + "/" + str(object.max_condition)), Attribute("@obj_attr_n:volume", str(object.volume)), Attribute("@obj_attr_n:armor_rating", object.getStringAttribute("armor_rating")) ]) SetOptionalAttribute(attributes, '@obj_attr_n:sockets', 'sockets', object, True) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_kinetic", "cat_armor_special_protection.armor_eff_kinetic", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_energy", "cat_armor_special_protection.armor_eff_energy", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_blast", "cat_armor_special_protection.armor_eff_blast", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_stun", "cat_armor_special_protection.armor_eff_stun", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_heat", "cat_armor_special_protection.armor_eff_elemental_heat", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_cold", "cat_armor_special_protection.armor_eff_elemental_cold", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_acid", "cat_armor_special_protection.armor_eff_elemental_acid", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_electrical", "cat_armor_special_protection.armor_eff_elemental_electrical", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_restraint", "cat_armor_special_protection.armor_eff_restraint", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_kinetic", "cat_armor_effectiveness.armor_eff_restraint", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_energy", "cat_armor_effectiveness.armor_eff_energy", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_blast", "cat_armor_effectiveness.armor_eff_blast", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_stun", "cat_armor_effectiveness.armor_eff_stun", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_heat", "cat_armor_effectiveness.armor_eff_elemental_heat", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_cold", "cat_armor_effectiveness.armor_eff_elemental_cold", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_acid", "cat_armor_effectiveness.armor_eff_elemental_acid", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_electrical", "cat_armor_effectiveness.armor_eff_elemental_electrical", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_restraint", "cat_armor_effectiveness.armor_eff_restraint", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_kinetic", "cat_armor_vulnerability.armor_eff_kinetic", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_energy", "cat_armor_vulnerability.armor_eff_energy", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_blast", "cat_armor_vulnerability.armor_eff_blast", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_stun", "cat_armor_vulnerability.armor_eff_stun", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_heat", "cat_armor_vulnerability.armor_eff_elemental_heat", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_cold", "cat_armor_vulnerability.armor_eff_elemental_cold", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_acid", "cat_armor_vulnerability.armor_eff_elemental_acid", object, True, PERCENT_DASH) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_electrical", "cat_armor_vulnerability.armor_eff_elemental_electrical", object, True, PERCENT) SetOptionalAttribute( attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_restraint", "cat_armor_vulnerability.armor_eff_restraint", object, True, PERCENT) SetOptionalAttribute(attributes, "cat_armor_encumbrance.@obj_attr_n:health", "cat_armor_encumbrance.armor_health_encumbrance", object, True) SetOptionalAttribute(attributes, "cat_armor_encumbrance.@obj_attr_n:action", "cat_armor_encumbrance.armor_action_encumbrance", object, True) SetOptionalAttribute(attributes, "cat_armor_encumbrance.@obj_attr_n:mind", "cat_armor_encumbrance.armor_mind_encumbrance", object, True) SetOptionalAttribute(attributes, '@obj_attr_n:crafter', 'crafter', object, False) SetOptionalAttribute(attributes, '@obj_attr_n:serial_number', 'serial_number', object, False) attribute_list_message.attributes = attributes return attribute_list_message
def buildAttributeTemplate(self, object): attribute_list_message = AttributeListMessage() attribute_list_message.object_id = object.id attributes = AttributeList() if len(object.custom_name) > 0: attributes.append("@obj_attr_n:original_name", "@" + object.stf_file + ":" + object.stf_name) attributes.extend([ Attribute("@obj_attr_n:weapon_cert_status", object.getStringAttribute("weapon_cert_status")), Attribute( "@obj_attr_n:condition", str(object.max_condition - object.condition_damage) + "/" + str(object.max_condition)), Attribute("@obj_attr_n:volume", str(object.volume)) ]) SetOptionalAttribute(attributes, "wpn_armor_pierce_rating", "wpn_armor_pierce_rating", object, True) SetOptionalAttribute(attributes, "wpn_attack_speed", "wpn_attack_speed", object, True) SetOptionalAttribute(attributes, "cat_wpn_damage.@obj_attr_n:cat_wpn_damage", "cat_wpn_damage.wpn_damage_type", object, True) SetOptionalAttribute(attributes, "cat_wpn_damage.@obj_attr_n:wpn_damage_min", "cat_wpn_damage.wpn_damage_min", object, True) SetOptionalAttribute(attributes, "cat_wpn_damage.@obj_attr_n:wpn_damage_max", "cat_wpn_damage.wpn_damage_max", object, True) SetOptionalAttribute(attributes, "cat_wpn_damage.@obj_attr_n:wpn_wound_chance", "cat_wpn_damage.wpn_wound_chance", object, True) SetOptionalAttribute(attributes, "cat_wpn_rangemods.@obj_attr_n:wpn_range_zero", "cat_wpn_rangemods.wpn_range_zero", object, True) SetOptionalAttribute(attributes, "cat_wpn_rangemods.@obj_attr_n:wpn_range_mid", "cat_wpn_rangemods.wpn_range_mid", object, True) SetOptionalAttribute(attributes, "cat_wpn_rangemods.@obj_attr_n:wpn_range_max", "cat_wpn_rangemods.wpn_range_max", object, True) SetOptionalAttribute(attributes, "cat_wpn_attack_cost.@obj_attr_n:health", "cat_wpn_attack_cost.wpn_attack_cost_health", object, True) SetOptionalAttribute(attributes, "cat_wpn_attack_cost.@obj_attr_n:action", "cat_wpn_attack_cost.wpn_attack_cost_action", object, True) SetOptionalAttribute(attributes, "cat_wpn_attack_cost.@obj_attr_n:mind", "cat_wpn_attack_cost.wpn_attack_cost_mind", object, True) attribute_list_message.attributes = attributes return attribute_list_message