def on_started(self, interaction_sim: Sim, interaction_target: Sim) -> bool: target_sim_info = CommonSimUtils.get_sim_info(interaction_target) bathing_outfit_category_and_index = (OutfitCategory.BATHING, 0) if not CommonOutfitUtils.has_outfit(target_sim_info, bathing_outfit_category_and_index): if not CommonOutfitUtils.generate_outfit( target_sim_info, bathing_outfit_category_and_index): self.log.format_with_message( 'Failed to generate the bathing outfit for Sim.', sim=target_sim_info) return False CommonOutfitUtils.set_current_outfit( target_sim_info, bathing_outfit_category_and_index) return True
def _regenerate_every_outfit(self, sim_info: SimInfo) -> bool: result = False for occult_base_sim_info in CommonOccultUtils.get_sim_info_for_all_occults_gen( sim_info, (OccultType.MERMAID, )): for outfit_category in CommonOutfitUtils.get_all_outfit_categories( ): for outfit_index in range( get_maximum_outfits_for_category(outfit_category)): if not CommonOutfitUtils.has_outfit( occult_base_sim_info, (outfit_category, outfit_index)): continue if CommonOutfitUtils.generate_outfit( occult_base_sim_info, outfit_category_and_index=(outfit_category, outfit_index)): result = True if result: CommonOutfitUtils.update_outfits(sim_info) return result