def generate_outfit( sim_info: SimInfo, outfit_category_and_index: Tuple[OutfitCategory, int]) -> bool: """generate_outfit(sim_info, outfit_category_and_index) Generate an outfit for a Sim for the specified OutfitCategory and Index. .. note:: If an outfit exists in the specified OutfitCategory and Index, already, it will be overridden. :param sim_info: The Sim to generate an outfit for. :type sim_info: SimInfo :param outfit_category_and_index: The OutfitCategory and Index of the outfit to generate. :type outfit_category_and_index: Tuple[OutfitCategory, int] :return: True, if an outfit was generated successfully. False, if not. :rtype: bool """ try: sim_info.on_outfit_generated( sim_info, CommonOutfitUtils.get_current_outfit(sim_info)) sim_info.generate_outfit(*outfit_category_and_index) return True except Exception as ex: CommonExceptionHandler.log_exception( ModInfo.get_identity().name, 'Problem occurred running function \'{}\'.'.format( CommonOutfitUtils.generate_outfit.__name__), exception=ex) return False
def generate_outfit(sim_info: SimInfo, outfit_category_and_index: Tuple[OutfitCategory, int]): """ Generate an outfit for a sim for the specified OutfitCategory and Index. Note; If an outfit exists in the specified OutfitCategory and index, already, it will be overwritten. """ sim_info.on_outfit_generated( sim_info, CommonOutfitUtils.get_current_outfit(sim_info)) sim_info.generate_outfit(*outfit_category_and_index)
def generate_outfit( sim_info: SimInfo, outfit_category_and_index: Tuple[OutfitCategory, int]) -> bool: """generate_outfit(sim_info, outfit_category_and_index) Generate an outfit for a Sim for the specified OutfitCategory and Index. .. note:: If an outfit exists in the specified OutfitCategory and Index, already, it will be overridden. :param sim_info: The Sim to generate an outfit for. :type sim_info: SimInfo :param outfit_category_and_index: The OutfitCategory and Index of the outfit to generate. :type outfit_category_and_index: Tuple[OutfitCategory, int] :return: True, if an outfit was generated successfully. False, if not. :rtype: bool """ sim_info.on_outfit_generated( sim_info, CommonOutfitUtils.get_current_outfit(sim_info)) sim_info.generate_outfit(*outfit_category_and_index) return True