def change_sim_desire_level(sim_identifier, amount): sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier) if CNSimUtils.is_toddler(sim_info): return change_sim_statistic_value(sim_info, amount, SimCommodity.WW_SEX_MASTER_DESIRE) _update_sim_desire_effects(sim_info)
def test_sim_nudity_permission(sim): if CNSimUtils.is_toddler(sim): return False if CNSimUtils.can_have_sex(sim): return False if sim_ev(sim).is_flashing is True or sim_ev( sim).on_toilet_outfit_state != -1 or sim_ev( sim).on_breast_feeding_outfit_state != -1: return False if not is_sim_in_special_outfit(sim): return False sim_outfit_level = get_sim_outfit_level(sim) if sim_outfit_level != OutfitLevel.NUDE: return False if not is_sim_available(sim): return False for interaction_id in TurboSimUtil.Interaction.get_running_interactions_ids( sim): if interaction_id in NUDITY_EXCEPTION_INTERACTIONS: return for interaction_id in TurboSimUtil.Interaction.get_queued_interactions_ids( sim): if interaction_id in NUDITY_EXCEPTION_INTERACTIONS: return (has_permission, denied_permissions) = has_sim_permission_for_nudity(sim) if has_permission is True: return False sim_ev(sim).last_nudity_denied_permissions = denied_permissions if is_sim_exhibitionist(sim): dress_up_interaction = SimInteraction.WW_EXHIBITIONISM_FORCE_DRESS_UP else: dress_up_interaction = SimInteraction.WW_NATURISM_FORCE_DRESS_UP TurboSimUtil.Interaction.push_affordance( sim, dress_up_interaction, interaction_context=TurboInteractionUtil.InteractionContext. SOURCE_AUTONOMY, insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT, must_run_next=True, run_priority=TurboInteractionUtil.Priority.High, priority=TurboInteractionUtil.Priority.High, skip_if_running=True) return True
def _wickedwhims_on_sims_talking_desire_interactions_outcome( interaction_instance, outcome_result): sim_info = TurboManagerUtil.Sim.get_sim_info( TurboInteractionUtil.get_interaction_sim(interaction_instance)) target_sim_info = TurboManagerUtil.Sim.get_sim_info( TurboInteractionUtil.get_interaction_target(interaction_instance)) if target_sim_info is None: return if CNSimUtils.is_toddler(sim_info) or CNSimUtils.is_toddler( target_sim_info): return sim_is_child = CNSimUtils.is_child_or_teen(sim_info) target_is_child = CNSimUtils.is_child_or_teen(target_sim_info) if not CNSimUtils.teen_sex_is_enabled() and (sim_is_child or target_is_child): return if sim_is_child and TurboSimUtil.Age.is_older_than(target_sim_info, TurboSimUtil.Age.CHILD): return if get_relationship_setting( RelationshipSetting.ROMANCE_AGE_RESTRICTION_STATE, variable_type=bool ) or target_is_child and TurboSimUtil.Age.is_older_than( sim_info, TurboSimUtil.Age.CHILD): return if has_sim_trait(sim_info, SimTrait.WW_SEXUALLY_ABSTINENT): set_sim_desire_level(sim_info, 0) return if int(GameTag.SOCIAL_FLIRTY) in TurboInteractionUtil.get_affordance_tags( interaction_instance): if outcome_result is True: target_desire_amount = 10 sim_desire_amount = 5 if has_sim_trait(sim_info, SimTrait.ALLURING): target_desire_amount += 3 if has_sim_trait(target_sim_info, SimTrait.ROMANTIC): target_desire_amount += 3 if has_sim_trait( target_sim_info, SimTrait.OCCULTVAMPIRE) and is_sim_on_period(sim_info): target_desire_amount += 3 if has_sim_trait(target_sim_info, SimTrait.UNFLIRTY): target_desire_amount -= 5 sim_outfit_level = get_sim_outfit_level(sim_info) if sim_outfit_level == OutfitLevel.NUDE or sim_outfit_level == OutfitLevel.BATHING: target_desire_amount += 3 change_sim_desire_level(target_sim_info, target_desire_amount) change_sim_desire_level(sim_info, sim_desire_amount) else: change_sim_desire_level(target_sim_info, -7.5) change_sim_desire_level(sim_info, -3.5) elif int( GameTag.INTERACTION_FRIENDLY ) in TurboInteractionUtil.get_affordance_tags(interaction_instance): if outcome_result is True: if get_sim_desire_level( sim_info) < 10 and TurboSimUtil.Gender.get_gender( target_sim_info) in get_sim_preferenced_genders( sim_info): nudity_multiplier = 0.0 target_sim_outfit_level = get_sim_outfit_level(target_sim_info) if target_sim_outfit_level == OutfitLevel.NUDE or target_sim_outfit_level == OutfitLevel.BATHING: nudity_multiplier += 2.0 if has_sim_trait(target_sim_info, SimTrait.INCREDIBLYFRIENDLY): change_sim_desire_level(sim_info, 2.5 * nudity_multiplier) else: change_sim_desire_level(sim_info, 1 * nudity_multiplier) if get_sim_desire_level( target_sim_info) < 5 and TurboSimUtil.Gender.get_gender( sim_info) in get_sim_preferenced_genders( target_sim_info): if has_sim_trait(sim_info, SimTrait.INCREDIBLYFRIENDLY): change_sim_desire_level(target_sim_info, 2.5) else: change_sim_desire_level(target_sim_info, 1) elif int(GameTag.INTERACTION_MEAN ) in TurboInteractionUtil.get_affordance_tags( interaction_instance) and outcome_result is True: if not has_sim_trait(target_sim_info, SimTrait.EVIL): change_sim_desire_level(target_sim_info, -9) if not has_sim_trait(sim_info, SimTrait.EVIL): change_sim_desire_level(sim_info, -5)