def build(self): """ Build item Returns: Item """ item = Item(effects_collection=EffectsCollection()) item.name = self.name item.appearance = self.appearance item.location = self.location item.icon = self.icon item.tags = self.tags if self.weapon_data is not None: item.weapon_data = self.weapon_data item.tags.append('weapon') if self.armour_data is not None: item.armour_data = self.armour_data item.tags.append('armour') if self.ammunition_data is not None: item.ammunition_data = self.ammunition_data item.tags.append('ammunition') if self.trap_data is not None: item.trap_data = self.trap_data item.tags.append('trap bag') if self.boots_data is not None: item.boots_data = self.boots_data item.tags.append('boots') for handle in self.effect_handles: item.add_effect_handle(handle) for effect in self.effects: item.add_effect(effect) return item
def build(self): """ Build item Returns: Item """ item = Item(effects_collection = EffectsCollection()) item.name = self.name item.appearance = self.appearance item.location = self.location item.icon = self.icon if self.weapon_data != None: item.weapon_data = self.weapon_data for handle in self.effect_handles: item.add_effect_handle(handle) item.tags = self.tags return item