示例#1
0
def set_sim_penis_state(sim_identifier,
                        is_hard,
                        length,
                        set_if_nude=False,
                        force=False):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    if not has_sim_trait(sim_info, SimTrait.GENDEROPTIONS_TOILET_STANDING):
        return
    has_to_update_state = sim_ev(
        sim_info).is_penis_hard != is_hard or force is True
    sim_ev(sim_info).is_penis_hard = is_hard
    sim_ev(sim_info).penis_hard_cooldown = length
    if has_to_update_state is True:
        update_nude_body_data(sim_info, force_update=True)
        current_outfit = TurboSimUtil.CAS.get_current_outfit(sim_info)
        if set_if_nude is True and (
                current_outfit[0] == TurboCASUtil.OutfitCategory.SPECIAL
                and current_outfit[1] == 0
                or current_outfit[0] == TurboCASUtil.OutfitCategory.BATHING):
            bottom_body_state = get_sim_body_state(
                sim_info, TurboCASUtil.BodyType.LOWER_BODY)
            if bottom_body_state == BodyState.NUDE:
                set_bodytype_caspart(sim_info,
                                     (TurboCASUtil.OutfitCategory.SPECIAL, 0),
                                     TurboCASUtil.BodyType.LOWER_BODY,
                                     sim_ev(sim_info).nude_outfit_parts[7])
                update_sim_penis_texture(sim_info)
                try:
                    TurboSimUtil.CAS.refresh_outfit(sim_info)
                except:
                    pass
def _wickedwhims_command_fix_nude_outfit(output=None):
    output('Started to reset all Sims nude outfit...')
    for sim_info in TurboManagerUtil.Sim.get_all_sim_info_gen(humans=True,
                                                              pets=False):
        reset_sim_bathing_outfits(sim_info,
                                  ignore_nudity_assurance_setting=True)
        update_nude_body_data(sim_info, force_update=True)
    output('Every Sim nude outfit has be reset!')
示例#3
0
def update_sim_body_flags(sim_identifier, update_nude_outfit_data=False):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    if update_nude_outfit_data is True:
        update_nude_body_data(sim_info)
    top_state = get_sim_body_state(sim_info, 6)
    if top_state == BodyState.NUDE:
        set_sim_top_naked_state(sim_info, True)
    else:
        set_sim_top_naked_state(sim_info, False)
    bottom_state = get_sim_body_state(sim_info, 7)
    if bottom_state == BodyState.NUDE:
        set_sim_bottom_naked_state(sim_info, True)
    else:
        set_sim_bottom_naked_state(sim_info, False)
示例#4
0
 def set_callback(dialog):
     global PENIS_SETTING_RANDOM, PENIS_SETTING_RANDOM_INCLUDE_DEFAULT
     if not dialog.accepted:
         open_penis_settings(sim_info)
         return
     penis_author = dialog.get_result_tags()[-1]
     PENIS_SETTING_RANDOM = False
     PENIS_SETTING_RANDOM_INCLUDE_DEFAULT = True
     update_basic_save_data(get_basic_penis_save_data())
     sim_ev(sim_info).outfit_hard_penis_author = penis_author
     dress_up_outfit(sim_info)
     set_sim_penis_state(sim_info, False, 0)
     update_nude_body_data(sim_info, force_update=True)
     open_sim_hard_penis_picker(sim_info)
def _has_sim_visible_cum(sim):
    if has_sim_cas_part_id(sim, get_cum_layer_cas_id(CumLayerType.FACE)):
        return True
    update_nude_body_data(sim)
    if has_sim_cas_part_id(sim, get_cum_layer_cas_id(
            CumLayerType.CHEST)) or has_sim_cas_part_id(
                sim, get_cum_layer_cas_id(CumLayerType.BACK)):
        top_state = get_sim_actual_body_state(sim, 6)
        if top_state == BodyState.NUDE or top_state == BodyState.UNDERWEAR:
            return True
    if has_sim_cas_part_id(sim, get_cum_layer_cas_id(
            CumLayerType.BUTT)) or has_sim_cas_part_id(
                sim, get_cum_layer_cas_id(CumLayerType.V****A)):
        bottom_state = get_sim_actual_body_state(sim, 7)
        if bottom_state == BodyState.NUDE:
            return True
    return False
示例#6
0
 def set_callback(dialog):
     global PENIS_SETTING_HARD_PENIS_AUTHOR, PENIS_SETTING_RANDOM, PENIS_SETTING_RANDOM_INCLUDE_DEFAULT
     if not dialog.accepted:
         open_penis_settings(creator_sim_info)
         return
     penis_author = dialog.get_result_tags()[-1]
     PENIS_SETTING_HARD_PENIS_AUTHOR = penis_author
     PENIS_SETTING_RANDOM = False
     PENIS_SETTING_RANDOM_INCLUDE_DEFAULT = True
     update_basic_save_data(get_basic_penis_save_data())
     for sim_info in TurboManagerUtil.Sim.get_all_sim_info_gen(humans=True,
                                                               pets=False):
         if sim_info is None:
             continue
         sim_ev(sim_info).outfit_hard_penis_author = penis_author
         dress_up_outfit(sim_info)
         set_sim_penis_state(sim_info, False, 0)
         update_nude_body_data(sim_info, force_update=True)
     open_all_sims_hard_penis_picker(creator_sim_info)
示例#7
0
def get_sim_outfit_level(sim_identifier, outfit_category_and_index=None):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier,
                                                 allow_base_wrapper=True)
    sim_nudity_state = OutfitLevel.OUTFIT
    if sim_info is None:
        return sim_nudity_state
    current_outfit = outfit_category_and_index or TurboSimUtil.CAS.get_current_outfit(
        sim_info)
    if current_outfit[0] == TurboCASUtil.OutfitCategory.BATHING:
        return OutfitLevel.BATHING
    if is_sim_in_revealing_outfit(sim_identifier):
        return OutfitLevel.REVEALING
    if current_outfit[
            0] == TurboCASUtil.OutfitCategory.SPECIAL and current_outfit[
                1] == 0:
        update_nude_body_data(sim_info)
        if TurboSimUtil.Gender.is_female(sim_info):
            top_state = get_sim_actual_body_state(
                sim_info, TurboCASUtil.BodyType.UPPER_BODY)
            if top_state == BodyState.NUDE:
                return OutfitLevel.NUDE
            if top_state == BodyState.UNDERWEAR:
                sim_nudity_state = OutfitLevel.UNDERWEAR
            bottom_state = get_sim_actual_body_state(
                sim_info, TurboCASUtil.BodyType.LOWER_BODY)
            if bottom_state == BodyState.NUDE:
                return OutfitLevel.NUDE
            if bottom_state == BodyState.UNDERWEAR:
                sim_nudity_state = OutfitLevel.UNDERWEAR
                bottom_state = get_sim_actual_body_state(
                    sim_info, TurboCASUtil.BodyType.LOWER_BODY)
                if bottom_state == BodyState.NUDE:
                    return OutfitLevel.NUDE
                if bottom_state == BodyState.UNDERWEAR:
                    return OutfitLevel.UNDERWEAR
        else:
            bottom_state = get_sim_actual_body_state(
                sim_info, TurboCASUtil.BodyType.LOWER_BODY)
            if bottom_state == BodyState.NUDE:
                return OutfitLevel.NUDE
            if bottom_state == BodyState.UNDERWEAR:
                return OutfitLevel.UNDERWEAR
    return sim_nudity_state
示例#8
0
def randomized_all_sims_penis_models(sim_identifier,
                                     include_default_penis=False):
    global PENIS_SETTING_RANDOM, PENIS_SETTING_RANDOM_INCLUDE_DEFAULT
    creator_sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    PENIS_SETTING_RANDOM = True
    PENIS_SETTING_RANDOM_INCLUDE_DEFAULT = include_default_penis
    update_basic_save_data(get_basic_penis_save_data())
    penis_author_keys = get_penis_author_keys(
        include_default_author_key=include_default_penis)
    if len(penis_author_keys) == 0:
        open_penis_settings(creator_sim_info)
        return
    for sim_info in TurboManagerUtil.Sim.get_all_sim_info_gen(humans=True,
                                                              pets=False):
        if sim_info is None:
            continue
        random_penis_author = random.choice(penis_author_keys)
        sim_ev(sim_info).outfit_soft_penis_author = random_penis_author
        sim_ev(sim_info).outfit_hard_penis_author = random_penis_author
        dress_up_outfit(sim_info)
        set_sim_penis_state(sim_info, False, 0)
        update_nude_body_data(sim_info, force_update=True)
    open_penis_settings(creator_sim_info)
def _wickedwhims_command_fix_nude_outfit(output=None):
    sim = TurboManagerUtil.Sim.get_active_sim()
    reset_sim_bathing_outfits(sim, ignore_nudity_assurance_setting=True)
    update_nude_body_data(sim, force_update=True)
    output('Active Sim nude outfit has be reset!')
示例#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)