示例#1
0
def _wickedwhims_undress_bottom_on_toilet_use(interaction_instance):
    global HAS_SIMS_USING_TOILET
    if not get_nudity_setting(NuditySetting.TOILET_USE_UNDRESS_STATE, variable_type=bool):
        return
    interaction_guid = TurboResourceUtil.Resource.get_guid64(interaction_instance)
    if interaction_guid not in TOILET_USE_INTERACTIONS:
        return
    HAS_SIMS_USING_TOILET = True
    sim = TurboInteractionUtil.get_interaction_sim(interaction_instance)
    if sim_ev(sim).on_toilet_outfit_state != OutfitStateBeforeToiletUse.NONE:
        return
    if TurboSimUtil.Age.is_younger_than(sim, TurboSimUtil.Age.CHILD):
        return
    if has_sim_outfit_bottom(sim):
        bottom_body_state = get_sim_body_state(sim, 7)
        if bottom_body_state != BodyState.NUDE:
            strip_result = strip_outfit(sim, strip_type_bottom=StripType.NUDE, allow_stripping_feet=False)
            if strip_result is True:
                sim_ev(sim).on_toilet_outfit_state = int(OutfitStateBeforeToiletUse.UNDERWEAR if bottom_body_state == BodyState.UNDERWEAR else OutfitStateBeforeToiletUse.OUTFIT)
                set_sim_bottom_naked_state(sim, True)
                set_sim_bottom_underwear_state(sim, False)
            else:
                sim_ev(sim).on_toilet_outfit_state = int(OutfitStateBeforeToiletUse.NONE)
    else:
        top_state = StripType.NUDE if TurboSimUtil.Gender.is_male(sim) else StripType.UNDERWEAR if is_sim_top_underwear(sim) else StripType.NUDE
        strip_result = strip_outfit(sim, strip_type_top=top_state, strip_type_bottom=StripType.NUDE)
        if is_sim_outfit_fullbody(sim) and strip_result is True:
            sim_ev(sim).on_toilet_outfit_state = int(OutfitStateBeforeToiletUse.OUTFIT)
            set_sim_top_naked_state(sim, True)
            set_sim_bottom_naked_state(sim, True)
            set_sim_bottom_underwear_state(sim, False)
示例#2
0
 def on_interaction_test(cls, interaction_context, interaction_target):
     sim = cls.get_interaction_sim(interaction_context)
     if not CNSimUtils.can_have_sex(sim):
         return False
     if is_sim_in_sex(sim) or is_sim_going_to_sex(sim):
         return False
     if is_sim_outfit_fullbody(sim):
         return False
     if get_sim_body_state(
             sim, TurboCASUtil.BodyType.UPPER_BODY) == BodyState.OUTFIT:
         return True
     return False
def _update_dress_up_after_breast_feeding_on_game_update():
    if not get_nudity_setting(NuditySetting.BREAST_FEEDING_UNDRESS_STATE,
                              variable_type=bool):
        return
    for sim in TurboManagerUtil.Sim.get_all_sim_instance_gen(humans=True,
                                                             pets=False):
        if sim_ev(
                sim
        ).on_breast_feeding_outfit_state == OutfitStateBeforeBreastFeeding.NONE:
            continue
        if TurboSimUtil.Age.is_younger_than(sim, TurboSimUtil.Age.CHILD):
            continue
        if TurboSimUtil.Interaction.is_running_interaction(
                sim, BREAST_FEEDING_INTERACTIONS):
            return
        current_outfit = TurboSimUtil.CAS.get_current_outfit(sim)
        if not (current_outfit[0] == TurboCASUtil.OutfitCategory.SPECIAL
                and current_outfit[1] == 0):
            continue
        current_outfit = get_modified_outfit(sim)
        if sim_ev(
                sim
        ).on_breast_feeding_outfit_state == OutfitStateBeforeBreastFeeding.UNDERWEAR:
            set_bodytype_caspart(
                sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0), 6,
                get_sim_underwear_data(sim, current_outfit)[0])
            set_sim_top_underwear_state(sim, True)
            try:
                TurboSimUtil.CAS.refresh_outfit(sim)
            except:
                continue
        elif sim_ev(
                sim
        ).on_breast_feeding_outfit_state == OutfitStateBeforeBreastFeeding.OUTFIT and has_sim_outfit_top(
                sim, outfit_category_and_index=current_outfit):
            part_id = get_sim_outfit_cas_part_from_bodytype(
                sim, 6, outfit_category_and_index=current_outfit)
            set_bodytype_caspart(sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0),
                                 6, part_id)
            set_sim_top_underwear_state(sim, True)
            try:
                TurboSimUtil.CAS.refresh_outfit(sim)
            except:
                continue
        elif is_sim_outfit_fullbody(sim,
                                    outfit_category_and_index=current_outfit):
            dress_up_outfit(sim)
        else:
            dress_up_outfit(sim)
        sim_ev(sim).on_breast_feeding_outfit_state = int(
            OutfitStateBeforeBreastFeeding.NONE)
示例#4
0
 def on_interaction_test(cls, interaction_context, interaction_target):
     sim = cls.get_interaction_sim(interaction_context)
     if is_sim_outfit_fullbody(sim):
         return False
     if is_sim_in_sex(sim) or is_sim_going_to_sex(sim):
         return False
     if TurboSimUtil.CAS.get_current_outfit(
             sim)[0] == TurboCASUtil.OutfitCategory.BATHING:
         return True
     if get_sim_actual_body_state(
             sim, 6) != BodyState.OUTFIT or get_sim_actual_body_state(
                 sim, 7) != BodyState.OUTFIT:
         return True
     return False
示例#5
0
def _undress_bottom(sim_info):
    has_top_underwear_on = TurboSimUtil.Gender.is_female(sim_info) and (
        is_underwear_outfit(get_modified_outfit(sim_info)[0])
        and is_sim_top_underwear(sim_info))
    strip_type_top = StripType.NONE if not is_sim_outfit_fullbody(
        sim_info
    ) else StripType.UNDERWEAR if has_top_underwear_on else StripType.NUDE
    strip_outfit(sim_info,
                 strip_type_top=strip_type_top,
                 strip_type_bottom=StripType.NUDE)
    set_sim_top_naked_state(sim_info, strip_type_top == StripType.NUDE)
    set_sim_bottom_naked_state(sim_info, True)
    set_sim_top_underwear_state(sim_info,
                                strip_type_top == StripType.UNDERWEAR)
    set_sim_bottom_underwear_state(sim_info, False)
示例#6
0
 def on_interaction_start(cls, interaction_instance):
     target = cls.get_interaction_target(interaction_instance)
     (has_permission,
      _) = has_sim_permission_for_nudity(target, nudity_setting_test=True)
     if has_permission is False:
         return False
     if is_sim_outfit_fullbody(target):
         set_sim_top_underwear_state(target, False)
         set_sim_bottom_underwear_state(target, False)
         TurboSimUtil.Interaction.push_affordance(
             target,
             SimInteraction.WW_EXHIBITIONISM_UNDRESS_OUTFIT
             if is_sim_exhibitionist(target) else
             SimInteraction.WW_NATURISM_UNDRESS_OUTFIT,
             interaction_context=TurboInteractionUtil.InteractionContext.
             SOURCE_SCRIPT,
             insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
             must_run_next=True,
             priority=TurboInteractionUtil.Priority.High)
         return True
     if get_sim_body_state(target, 6) != BodyState.NUDE:
         set_sim_top_underwear_state(target, False)
         TurboSimUtil.Interaction.push_affordance(
             target,
             SimInteraction.WW_EXHIBITIONISM_UNDRESS_OUTFIT_TOP
             if is_sim_exhibitionist(target) else
             SimInteraction.WW_NATURISM_UNDRESS_OUTFIT_TOP,
             interaction_context=TurboInteractionUtil.InteractionContext.
             SOURCE_SCRIPT,
             insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
             must_run_next=True,
             priority=TurboInteractionUtil.Priority.High)
         return True
     if get_sim_body_state(target, 7) != BodyState.NUDE:
         set_sim_bottom_underwear_state(target, False)
         TurboSimUtil.Interaction.push_affordance(
             target,
             SimInteraction.WW_EXHIBITIONISM_UNDRESS_OUTFIT_BOTTOM
             if is_sim_exhibitionist(target) else
             SimInteraction.WW_NATURISM_UNDRESS_OUTFIT_BOTTOM,
             interaction_context=TurboInteractionUtil.InteractionContext.
             SOURCE_SCRIPT,
             insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
             must_run_next=True,
             priority=TurboInteractionUtil.Priority.High)
         return True
     return False
示例#7
0
def _update_dress_up_after_toilet_use_on_game_update():
    global HAS_SIMS_USING_TOILET
    if not get_nudity_setting(NuditySetting.TOILET_USE_UNDRESS_STATE, variable_type=bool):
        return
    if HAS_SIMS_USING_TOILET is False:
        return
    has_sims_peeing = False
    for sim in TurboManagerUtil.Sim.get_all_sim_instance_gen(humans=True, pets=False):
        if sim_ev(sim).on_toilet_outfit_state == OutfitStateBeforeToiletUse.NONE:
            continue
        has_sims_peeing = True
        if TurboSimUtil.Age.is_younger_than(sim, TurboSimUtil.Age.CHILD):
            continue
        is_using_toilet = False
        for affordance_id in TOILET_USE_INTERACTIONS:
            if TurboSimUtil.Interaction.is_running_interaction(sim, affordance_id):
                is_using_toilet = True
                break
        if is_using_toilet is True:
            has_sims_peeing = True
        current_outfit = TurboSimUtil.CAS.get_current_outfit(sim)
        if not (current_outfit[0] == TurboCASUtil.OutfitCategory.SPECIAL and current_outfit[1] == 0):
            continue
        current_outfit = get_modified_outfit(sim)
        if sim_ev(sim).on_toilet_outfit_state == OutfitStateBeforeToiletUse.UNDERWEAR:
            set_bodytype_caspart(sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0), TurboCASUtil.BodyType.LOWER_BODY, get_sim_underwear_data(sim, current_outfit)[1])
            set_sim_bottom_underwear_state(sim, True)
            try:
                TurboSimUtil.CAS.refresh_outfit(sim)
            except:
                continue
        elif sim_ev(sim).on_toilet_outfit_state == OutfitStateBeforeToiletUse.OUTFIT and has_sim_outfit_bottom(sim, outfit_category_and_index=current_outfit):
            set_bodytype_caspart(sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0), TurboCASUtil.BodyType.LOWER_BODY, get_sim_outfit_cas_part_from_bodytype(sim, TurboCASUtil.BodyType.LOWER_BODY, outfit_category_and_index=current_outfit))
            set_bodytype_caspart(sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0), TurboCASUtil.BodyType.TIGHTS, get_sim_outfit_cas_part_from_bodytype(sim, TurboCASUtil.BodyType.TIGHTS, outfit_category_and_index=current_outfit))
            set_bodytype_caspart(sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0), TurboCASUtil.BodyType.SOCKS, get_sim_outfit_cas_part_from_bodytype(sim, TurboCASUtil.BodyType.SOCKS, outfit_category_and_index=current_outfit))
            set_sim_bottom_underwear_state(sim, True)
            try:
                TurboSimUtil.CAS.refresh_outfit(sim)
            except:
                continue
        elif is_sim_outfit_fullbody(sim, outfit_category_and_index=current_outfit):
            dress_up_outfit(sim)
        else:
            dress_up_outfit(sim)
        sim_ev(sim).on_toilet_outfit_state = int(OutfitStateBeforeToiletUse.NONE)
    if has_sims_peeing is False:
        HAS_SIMS_USING_TOILET = False
def _wickedwhims_undress_top_on_breast_feeding(interaction_instance):
    if not get_nudity_setting(NuditySetting.BREAST_FEEDING_UNDRESS_STATE,
                              variable_type=bool):
        return
    interaction_guid = TurboResourceUtil.Resource.get_guid64(
        interaction_instance)
    if interaction_guid != BREAST_FEEDING_INTERACTIONS:
        return
    sim = TurboInteractionUtil.get_interaction_sim(interaction_instance)
    if sim_ev(
            sim
    ).on_breast_feeding_outfit_state != OutfitStateBeforeBreastFeeding.NONE:
        return
    if TurboSimUtil.Age.is_younger_than(sim, TurboSimUtil.Age.CHILD):
        return
    if has_sim_outfit_top(sim):
        top_body_state = get_sim_body_state(sim, 6)
        if top_body_state != BodyState.NUDE:
            strip_result = strip_outfit(sim,
                                        strip_type_top=StripType.NUDE,
                                        allow_stripping_gloves=False)
            if strip_result is True:
                sim_ev(sim).on_breast_feeding_outfit_state = int(
                    OutfitStateBeforeBreastFeeding.
                    UNDERWEAR if top_body_state == BodyState.
                    UNDERWEAR else OutfitStateBeforeBreastFeeding.OUTFIT)
                set_sim_top_naked_state(sim, True)
                set_sim_top_underwear_state(sim, False)
            else:
                sim_ev(sim).on_breast_feeding_outfit_state = int(
                    OutfitStateBeforeBreastFeeding.NONE)
    else:
        bottom_state = StripType.UNDERWEAR if is_sim_bottom_underwear(
            sim) else StripType.NUDE
        strip_result = strip_outfit(sim,
                                    strip_type_top=StripType.NUDE,
                                    strip_type_bottom=bottom_state)
        if is_sim_outfit_fullbody(sim) and strip_result is True:
            sim_ev(sim).on_breast_feeding_outfit_state = int(
                OutfitStateBeforeBreastFeeding.OUTFIT)
            set_sim_top_naked_state(sim, True)
            set_sim_top_underwear_state(sim, False)
            set_sim_bottom_naked_state(sim, True)
示例#9
0
 def on_interaction_test(cls, interaction_context, interaction_target):
     if not TurboTypesUtil.Sims.is_sim(interaction_target):
         return False
     sim = cls.get_interaction_sim(interaction_context)
     if not CNSimUtils.teen_sex_is_enabled() and (
             CNSimUtils.is_child_or_teen(sim)
             or CNSimUtils.is_child_or_teen(interaction_target)):
         return False
     skill_level = get_sim_nudity_skill_level(sim)
     if skill_level <= 1:
         return False
     if is_sim_in_sex(sim) or (is_sim_going_to_sex(sim)
                               or is_sim_in_sex(interaction_target)
                               ) or is_sim_going_to_sex(interaction_target):
         return False
     if not has_sim_permission_for_nudity(sim)[0]:
         return False
     if is_sim_outfit_fullbody(interaction_target):
         return True
     if get_sim_body_state(interaction_target, 6) == BodyState.OUTFIT:
         return True
     if get_sim_body_state(interaction_target, 7) == BodyState.OUTFIT:
         return True
     return False
示例#10
0
def undress_sim(sim_identifier, actor_data, is_npc_only=False):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    if is_npc_only is False:
        undressing_type = get_sex_setting(SexSetting.SEX_UNDRESSING_TYPE,
                                          variable_type=int)
    else:
        undressing_type = get_sex_setting(SexSetting.NPC_SEX_UNDRESSING_TYPE,
                                          variable_type=int)
    if undressing_type == SexUndressingLevelSetting.DISABLED:
        return
    update_nude_body_data(sim_info)
    top_body_state = get_sim_actual_body_state(
        sim_info, TurboCASUtil.BodyType.UPPER_BODY)
    bottom_body_state = get_sim_actual_body_state(
        sim_info, TurboCASUtil.BodyType.LOWER_BODY)
    hands_body_state = get_sim_actual_body_state(sim_info,
                                                 TurboCASUtil.BodyType.GLOVES)
    feet_body_state = get_sim_actual_body_state(sim_info,
                                                TurboCASUtil.BodyType.SHOES)
    if undressing_type == SexUndressingLevelSetting.COMPLETE:
        if top_body_state == BodyState.NUDE and (
                bottom_body_state == BodyState.NUDE and hands_body_state
                == BodyState.NUDE) and feet_body_state == BodyState.NUDE:
            return
        if get_nudity_setting(
                NuditySetting.COMPLETE_UNDRESSING_TYPE,
                variable_type=int) == CompleteUndressingTypeSetting.DEFAULT:
            reset_sim_bathing_outfits(sim_info)
            copy_outfit_to_special(
                sim_info,
                set_special_outfit=True,
                outfit_category_and_index=(TurboCASUtil.OutfitCategory.BATHING,
                                           0),
                override_outfit_parts={
                    115: sim_ev(sim_info).nude_outfit_parts[115]
                })
        else:
            copy_outfit_to_special(
                sim_info,
                set_special_outfit=True,
                outfit_category_and_index=get_modified_outfit(sim_info),
                override_outfit_parts={
                    TurboCASUtil.BodyType.UPPER_BODY:
                    sim_ev(sim_info).nude_outfit_parts[
                        TurboCASUtil.BodyType.UPPER_BODY],
                    TurboCASUtil.BodyType.LOWER_BODY:
                    sim_ev(sim_info).nude_outfit_parts[
                        TurboCASUtil.BodyType.LOWER_BODY],
                    TurboCASUtil.BodyType.SHOES:
                    sim_ev(sim_info).nude_outfit_parts[
                        TurboCASUtil.BodyType.SHOES],
                    TurboCASUtil.BodyType.FULL_BODY:
                    0,
                    TurboCASUtil.BodyType.HAT:
                    0,
                    TurboCASUtil.BodyType.CUMMERBUND:
                    0,
                    TurboCASUtil.BodyType.EARRINGS:
                    0,
                    TurboCASUtil.BodyType.GLASSES:
                    0,
                    TurboCASUtil.BodyType.NECKLACE:
                    0,
                    TurboCASUtil.BodyType.GLOVES:
                    0,
                    TurboCASUtil.BodyType.WRIST_LEFT:
                    0,
                    TurboCASUtil.BodyType.WRIST_RIGHT:
                    0,
                    TurboCASUtil.BodyType.SOCKS:
                    0,
                    TurboCASUtil.BodyType.TIGHTS:
                    0,
                    115:
                    sim_ev(sim_info).nude_outfit_parts[115]
                })
        set_sim_top_naked_state(sim_info, True)
        set_sim_bottom_naked_state(sim_info, True)
        set_sim_top_underwear_state(sim_info, False)
        set_sim_bottom_underwear_state(sim_info, False)
        return
    if actor_data.is_forcing_nude_hands(
    ) and hands_body_state != BodyState.NUDE:
        strip_outfit(sim_info, strip_bodytype=TurboCASUtil.BodyType.GLOVES)
    if actor_data.is_forcing_nude_feet() and feet_body_state != BodyState.NUDE:
        strip_outfit(sim_info, strip_bodytype=TurboCASUtil.BodyType.SHOES)
    if actor_data.get_naked_type() == SexNakedType.ALL:
        if top_body_state == BodyState.NUDE and bottom_body_state == BodyState.NUDE:
            return
        if strip_outfit(sim_info,
                        strip_type_top=StripType.NUDE,
                        strip_type_bottom=StripType.NUDE):
            set_sim_top_naked_state(sim_info, True)
            set_sim_bottom_naked_state(sim_info, True)
            set_sim_top_underwear_state(sim_info, False)
            set_sim_bottom_underwear_state(sim_info, False)
    elif actor_data.get_naked_type() == SexNakedType.TOP:
        if top_body_state == BodyState.NUDE:
            return
        has_bottom_underwear_on = is_underwear_outfit(
            get_modified_outfit(sim_info)[0]) and is_sim_bottom_underwear(
                sim_info)
        strip_type_bottom = StripType.NONE if not is_sim_outfit_fullbody(
            sim_info
        ) else StripType.UNDERWEAR if has_bottom_underwear_on else StripType.NUDE
        if strip_outfit(sim_info,
                        strip_type_top=StripType.NUDE,
                        strip_type_bottom=strip_type_bottom):
            set_sim_top_naked_state(sim_info, True)
            set_sim_bottom_naked_state(sim_info,
                                       strip_type_bottom == StripType.NUDE)
            set_sim_top_underwear_state(sim_info, False)
            set_sim_bottom_underwear_state(
                sim_info, strip_type_bottom == StripType.UNDERWEAR)
    elif actor_data.get_naked_type() == SexNakedType.BOTTOM:
        if bottom_body_state == BodyState.NUDE:
            return
        has_top_underwear_on = TurboSimUtil.Gender.is_female(sim_info) and (
            is_underwear_outfit(get_modified_outfit(sim_info)[0])
            and is_sim_top_underwear(sim_info))
        strip_type_top = StripType.NONE if not is_sim_outfit_fullbody(
            sim_info
        ) else StripType.UNDERWEAR if has_top_underwear_on else StripType.NUDE
        if strip_outfit(sim_info,
                        strip_type_top=strip_type_top,
                        strip_type_bottom=StripType.NUDE):
            set_sim_top_naked_state(sim_info, strip_type_top == StripType.NUDE)
            set_sim_bottom_naked_state(sim_info, True)
            set_sim_top_underwear_state(sim_info,
                                        strip_type_top == StripType.UNDERWEAR)
            set_sim_bottom_underwear_state(sim_info, False)
示例#11
0
 def on_interaction_start(cls, interaction_instance):
     sim = cls.get_interaction_target(interaction_instance)
     nudity_debug_info = ''
     nudity_debug_info += 'Body States:\n'
     nudity_debug_info += '  Top: ' + str(get_sim_body_state(sim, 6)) + '\n'
     nudity_debug_info += '  Bottom: ' + str(get_sim_body_state(sim,
                                                                7)) + '\n'
     nudity_debug_info += '\nBody Additional States:\n'
     nudity_debug_info += '  Top: ' + str(
         get_sim_additional_body_state(sim, 6, get_sim_body_state(
             sim, 6))) + '\n'
     nudity_debug_info += '  Bottom: ' + str(
         get_sim_additional_body_state(sim, 7, get_sim_body_state(
             sim, 7))) + '\n'
     nudity_debug_info += '\nBody Actual States:\n'
     nudity_debug_info += '  Top: ' + str(get_sim_actual_body_state(
         sim, 6)) + '\n'
     nudity_debug_info += '  Bottom: ' + str(
         get_sim_actual_body_state(sim, 7)) + '\n'
     nudity_debug_info += '\nOutfit Body Types:\n'
     nudity_debug_info += '  Has Top: ' + str(
         has_sim_outfit_top(sim)) + '\n'
     nudity_debug_info += '  Has Bottom: ' + str(
         has_sim_outfit_bottom(sim)) + '\n'
     nudity_debug_info += '  Has Full Body: ' + str(
         is_sim_outfit_fullbody(sim)) + '\n'
     nudity_debug_info += '\nNudity Outfit Parts:\n'
     nudity_debug_info += '  Top: ' + str(
         sim_ev(sim).nude_outfit_parts[6]) + '\n'
     nudity_debug_info += '  Bottom: ' + str(
         sim_ev(sim).nude_outfit_parts[7]) + '\n'
     nudity_debug_info += '  Feet: ' + str(
         sim_ev(sim).nude_outfit_parts[8]) + '\n'
     nudity_debug_info += '  Penis Texture: ' + str(
         sim_ev(sim).nude_outfit_parts[115]) + '\n'
     nudity_debug_info += '\nPenis Outfit Parts:\n'
     nudity_debug_info += '  Soft: ' + str(
         sim_ev(sim).penis_outfit_parts['soft']) + '\n'
     nudity_debug_info += '  Hard: ' + str(
         sim_ev(sim).penis_outfit_parts['hard']) + '\n'
     nudity_debug_info += '\nPenis Parts Authors:\n'
     nudity_debug_info += '  Soft: ' + str(
         sim_ev(sim).outfit_soft_penis_author) + '\n'
     nudity_debug_info += '  Hard: ' + str(
         sim_ev(sim).outfit_hard_penis_author) + '\n'
     nudity_debug_info += '\nPenis State:\n'
     nudity_debug_info += '  Is Hard: ' + str(
         sim_ev(sim).is_penis_hard) + '\n'
     nudity_debug_info += '  Penis Cooldown: ' + str(
         sim_ev(sim).penis_hard_cooldown) + '\n'
     nudity_debug_info += '\nOriginal Outfit Data:\n'
     nudity_debug_info += '  Has Modifications: ' + str(
         sim_ev(sim).has_original_outfit_modifications) + '\n'
     nudity_debug_info += '  Category: ' + str(
         sim_ev(sim).original_outfit_category) + '\n'
     nudity_debug_info += '  Index: ' + str(
         sim_ev(sim).original_outfit_index) + '\n'
     nudity_debug_info += '  Update Locked: ' + str(
         sim_ev(sim).is_outfit_update_locked) + '\n'
     nudity_debug_info += '\nNudity Skill:\n'
     nudity_debug_info += '  Is Naturist/Is Exhibitionist: ' + str(
         is_sim_naturist(sim)) + '/' + str(is_sim_exhibitionist(sim)) + '\n'
     nudity_debug_info += '  Level: ' + str(
         get_sim_nudity_skill_level(sim) +
         get_sim_nudity_skill_progress(sim)) + '\n'
     nudity_debug_info += '  Influence Score: ' + str(
         sim_ev(sim).nudity_skill_influence_score) + '\n'
     nudity_debug_info += '  Fatigue: ' + str(
         get_sim_statistic_value(
             sim, SimCommodity.WW_NUDITY_SKILL_FATIGUE)) + '\n'
     nudity_debug_info += '\nNudity Reaction:\n'
     nudity_debug_info += '  Full Reaction Cooldown: ' + str(
         sim_ev(sim).full_nudity_reaction_cooldown) + '\n'
     nudity_debug_info += '  Inner Reaction Cooldown: ' + str(
         sim_ev(sim).inner_nudity_reaction_cooldown) + '\n'
     nudity_debug_info += '\nSpecial:\n'
     nudity_debug_info += '  Is Flashing: ' + str(
         sim_ev(sim).is_flashing) + '\n'
     nudity_debug_info += '  Toilet Use Outfit State: ' + str(
         sim_ev(sim).on_toilet_outfit_state) + '\n'
     nudity_debug_info += '  Breast Feeding Outfit State: ' + str(
         sim_ev(sim).on_breast_feeding_outfit_state) + '\n'
     display_notification(text=nudity_debug_info,
                          title=str(TurboSimUtil.Name.get_name(sim)[0]) +
                          ' ' + str(TurboSimUtil.Name.get_name(sim)[1]) +
                          ' Nudity Debug',
                          secondary_icon=sim)
示例#12
0
def trigger_nudity_autonomy(sim):
    if is_sim_naturist(sim):
        if is_sim_outfit_fullbody(sim):
            set_sim_top_underwear_state(sim, False)
            set_sim_bottom_underwear_state(sim, False)
            return TurboSimUtil.Interaction.push_affordance(
                sim,
                SimInteraction.WW_NATURISM_UNDRESS_OUTFIT,
                interaction_context=TurboInteractionUtil.InteractionContext.
                SOURCE_AUTONOMY,
                insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
                priority=TurboInteractionUtil.Priority.High,
                run_priority=TurboInteractionUtil.Priority.High,
                skip_if_running=True)
        top_outfit_state = get_sim_actual_body_state(sim,
                                                     6) == BodyState.OUTFIT
        if top_outfit_state is True:
            set_sim_top_underwear_state(sim, False)
            return TurboSimUtil.Interaction.push_affordance(
                sim,
                SimInteraction.WW_NATURISM_UNDRESS_OUTFIT_TOP,
                interaction_context=TurboInteractionUtil.InteractionContext.
                SOURCE_AUTONOMY,
                insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
                priority=TurboInteractionUtil.Priority.High,
                run_priority=TurboInteractionUtil.Priority.High,
                skip_if_running=True)
        bottom_outfit_state = get_sim_actual_body_state(sim,
                                                        7) == BodyState.OUTFIT
        if bottom_outfit_state is True:
            set_sim_bottom_underwear_state(sim, False)
            return TurboSimUtil.Interaction.push_affordance(
                sim,
                SimInteraction.WW_NATURISM_UNDRESS_OUTFIT_BOTTOM,
                interaction_context=TurboInteractionUtil.InteractionContext.
                SOURCE_AUTONOMY,
                insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
                priority=TurboInteractionUtil.Priority.High,
                run_priority=TurboInteractionUtil.Priority.High,
                skip_if_running=True)
        return False
    else:
        if is_sim_outfit_fullbody(sim):
            set_sim_top_underwear_state(sim, False)
            set_sim_bottom_underwear_state(sim, False)
            return TurboSimUtil.Interaction.push_affordance(
                sim,
                SimInteraction.WW_EXHIBITIONISM_UNDRESS_OUTFIT,
                interaction_context=TurboInteractionUtil.InteractionContext.
                SOURCE_AUTONOMY,
                insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
                priority=TurboInteractionUtil.Priority.High,
                run_priority=TurboInteractionUtil.Priority.High,
                skip_if_running=True)
        top_outfit_state = get_sim_actual_body_state(sim,
                                                     6) == BodyState.OUTFIT
        if top_outfit_state is True:
            set_sim_top_underwear_state(sim, False)
            return TurboSimUtil.Interaction.push_affordance(
                sim,
                SimInteraction.WW_EXHIBITIONISM_UNDRESS_OUTFIT_TOP,
                interaction_context=TurboInteractionUtil.InteractionContext.
                SOURCE_AUTONOMY,
                insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
                priority=TurboInteractionUtil.Priority.High,
                run_priority=TurboInteractionUtil.Priority.High,
                skip_if_running=True)
        bottom_outfit_state = get_sim_actual_body_state(sim,
                                                        7) == BodyState.OUTFIT
        if bottom_outfit_state is True:
            set_sim_bottom_underwear_state(sim, False)
            return TurboSimUtil.Interaction.push_affordance(
                sim,
                SimInteraction.WW_EXHIBITIONISM_UNDRESS_OUTFIT_BOTTOM,
                interaction_context=TurboInteractionUtil.InteractionContext.
                SOURCE_AUTONOMY,
                insert_strategy=TurboInteractionUtil.QueueInsertStrategy.NEXT,
                priority=TurboInteractionUtil.Priority.High,
                run_priority=TurboInteractionUtil.Priority.High,
                skip_if_running=True)
        return False
示例#13
0
def _wickedwhims_undress_swimwear_on_jumping_to_water(interaction_instance):
    if not get_nudity_setting(NuditySetting.NUDITY_SWITCH_STATE,
                              variable_type=bool):
        return
    interaction_guid = TurboResourceUtil.Resource.get_guid64(
        interaction_instance)
    if interaction_guid not in JUMPING_INTERACTIONS:
        return
    sim_info = TurboManagerUtil.Sim.get_sim_info(
        TurboInteractionUtil.get_interaction_sim(interaction_instance))
    if TurboSimUtil.Age.is_younger_than(sim_info, TurboSimUtil.Age.CHILD):
        return
    if get_modified_outfit(
            sim_info)[0] != TurboCASUtil.OutfitCategory.SWIMWEAR:
        return
    if is_sim_outfit_fullbody(sim_info):
        return
    if random.uniform(0, 1) > 0.1:
        return
    has_stripped = False
    if TurboSimUtil.Gender.is_male(sim_info):
        if get_sim_body_state(sim_info, 7) != BodyState.OUTFIT:
            return
        strip_result = strip_outfit(sim_info, strip_type_bottom=StripType.NUDE)
        if strip_result is True:
            set_sim_bottom_naked_state(sim_info, True)
            has_stripped = True
    else:
        can_undress_top = get_sim_body_state(sim_info, 6) == BodyState.OUTFIT
        can_undress_bottom = get_sim_body_state(sim_info,
                                                7) == BodyState.OUTFIT
        undress_top = False
        undress_bottom = False
        if can_undress_top is True and can_undress_bottom is True:
            if bool(random.getrandbits(1)):
                undress_top = True
            else:
                undress_bottom = True
        elif can_undress_top is True:
            undress_top = True
        elif can_undress_bottom is True:
            undress_bottom = True
        if undress_top is False and undress_bottom is False:
            return
        if undress_top is True:
            strip_result = strip_outfit(sim_info,
                                        strip_type_top=StripType.NUDE)
            if strip_result is True:
                set_sim_top_naked_state(sim_info, True)
                has_stripped = True
        elif undress_bottom is True:
            strip_result = strip_outfit(sim_info,
                                        strip_type_bottom=StripType.NUDE)
            if strip_result is True:
                set_sim_bottom_naked_state(sim_info, True)
                has_stripped = True
    if has_stripped is True:
        display_notification(text=267480274,
                             text_tokens=(sim_info, ),
                             secondary_icon=sim_info)
        if not has_sim_permission_for_nudity(sim_info)[0]:
            add_sim_buff(sim_info,
                         SimBuff.OBJECT_JUMPSTAND_SWIMSUITMALFUNCTION)
        if random.uniform(0, 1) <= 0.45:
            add_sim_buff(sim_info, SimBuff.WW_NUDITY_TEMPORARY_BRAVE)