Exemplo n.º 1
0
 def on_building_basic_elements(cls, interaction_instance, sequence):
     sim = cls.get_interaction_sim(interaction_instance)
     has_top_underwear_on = TurboSimUtil.Gender.is_female(sim) and (
         is_underwear_outfit(get_modified_outfit(sim)[0])
         and is_sim_top_underwear(sim))
     has_bottom_underwear_on = is_underwear_outfit(
         get_modified_outfit(sim)[0]) and is_sim_bottom_underwear(sim)
     strip_type_top = StripType.UNDERWEAR if has_top_underwear_on else StripType.NUDE
     strip_type_bottom = StripType.UNDERWEAR if has_bottom_underwear_on else StripType.NUDE
     strip_result = strip_outfit(sim,
                                 strip_type_top=strip_type_top,
                                 strip_type_bottom=strip_type_bottom,
                                 skip_outfit_change=True)
     if strip_result is True:
         set_sim_top_naked_state(sim, strip_type_top == StripType.NUDE)
         set_sim_bottom_naked_state(sim,
                                    strip_type_bottom == StripType.NUDE)
         set_sim_top_underwear_state(sim,
                                     strip_type_top == StripType.UNDERWEAR)
         set_sim_bottom_underwear_state(
             sim, strip_type_bottom == StripType.UNDERWEAR)
         nudity_notification(
             text=2191667249,
             text_tokens=(sim, ),
             icon=sim,
             sims=(sim, ),
             is_autonomy=cls.get_interaction_source(interaction_instance) ==
             TurboInteractionUtil.InteractionSource.AUTONOMY)
         return TurboSimUtil.CAS.get_change_outfit_element(
             sim, (TurboCASUtil.OutfitCategory.SPECIAL, 0),
             do_spin=True,
             interaction=interaction_instance)
Exemplo n.º 2
0
 def on_interaction_start(cls, interaction_instance):
     target = cls.get_interaction_target(interaction_instance)
     strip_type_top = StripType.NUDE if get_sim_body_state(
         target, TurboCASUtil.BodyType.UPPER_BODY
     ) == BodyState.UNDERWEAR else StripType.UNDERWEAR if TurboSimUtil.Gender.is_female(
         target) and is_underwear_outfit(
             get_modified_outfit(target)[0]) else StripType.NUDE
     strip_type_bottom = StripType.NUDE if get_sim_body_state(
         target, TurboCASUtil.BodyType.LOWER_BODY
     ) == BodyState.UNDERWEAR else StripType.UNDERWEAR if is_underwear_outfit(
         get_modified_outfit(target)[0]) else StripType.NUDE
     strip_outfit(target,
                  strip_type_top=strip_type_top,
                  strip_type_bottom=strip_type_bottom)
     set_sim_top_naked_state(target, strip_type_top == StripType.NUDE)
     set_sim_top_underwear_state(target, strip_type_top != StripType.NUDE)
     set_sim_bottom_naked_state(target, strip_type_bottom == StripType.NUDE)
     set_sim_bottom_underwear_state(target,
                                    strip_type_bottom != StripType.NUDE)
     return True
Exemplo n.º 3
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)
Exemplo n.º 4
0
 def on_interaction_test(cls, interaction_context, interaction_target):
     sim = cls.get_interaction_sim(interaction_context)
     if not get_nudity_setting(NuditySetting.UNDERWEAR_SWITCH_STATE,
                               variable_type=bool) or has_sim_trait(
                                   sim, SimTrait.WW_NO_UNDERWEAR):
         return False
     if is_sim_in_sex(sim) or is_sim_going_to_sex(sim):
         return False
     if TurboSimUtil.Gender.is_male(sim):
         return False
     if is_underwear_outfit(get_modified_outfit(sim)[0]) and (
             not is_sim_bottom_underwear(sim)
             or TurboSimUtil.Gender.is_female(sim)
             and not is_sim_top_underwear(sim)):
         return True
     return False
Exemplo n.º 5
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)