def open_start_sex_animations_picker_dialog(pre_sex_handler):
    @exception_watch()
    def animations_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            open_start_sex_animations_category_picker_dialog(pre_sex_handler)
            return False
        animation_instance = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        pre_sex_handler.set_animation_instance(animation_instance)
        start_sex_interaction_from_pre_sex_handler(pre_sex_handler)
        return True

    genders_list = list()
    for sim_info in pre_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(sim_info))
    animations_list = get_animations_with_params(
        pre_sex_handler.get_interaction_type(),
        pre_sex_handler.get_object_identifier(), genders_list)
    animations_rows = list()
    for animation in animations_list:
        animations_rows.append(animation.get_picker_row())
    if len(animations_rows) > 1:
        animations_rows.insert(
            0,
            ChoiceListRandomAnimationPickerRow(
                pre_sex_handler, pre_sex_handler.get_interaction_type()))
    if len(get_available_sex_animations()) <= 4:
        display_ok_dialog(text=1066517691, title=3113927949)
    display_picker_list_dialog(title=get_sex_category_animations_stbl_name(
        pre_sex_handler.get_interaction_type()),
                               picker_rows=animations_rows,
                               callback=animations_picker_callback)
def create_animations_report_file():
    file_path = _get_animations_report_file_path()
    if os.path.isfile(file_path):
        os.remove(file_path)
    log_file = open(file_path, 'a', buffering=1, encoding='utf-8')
    animations_list = get_available_sex_animations()
    log_file.write('---------------------------------\n')
    log_file.write('Animations Count: ' + str(len(animations_list)) + '\n')
    log_file.write('---------------------------------\n\n\n')
    for animation in animations_list:
        log_file.write('Author: ' + str(animation.get_author()) + '\n')
        log_file.write('Name: ' +
                       str(animation.get_display_name(string_hash=True)) +
                       '\n')
        log_file.write('Stage Name: ' + str(animation.get_stage_name()) + '\n')
        log_file.write('Sex Category: ' +
                       str(animation.get_sex_category().name) + '\n')
        log_file.write('Locations: ' + str(', '.join(
            [str(location) for location in animation.get_locations()])) + '\n')
        log_file.write('Custom Locations: ' + str(', '.join(
            [str(location)
             for location in animation.get_custom_locations()])) + '\n')
        log_file.write('Duration (loop): ' + str(animation.get_duration()) +
                       ' (' + str(animation.get_single_loop_duration()) + ')' +
                       '\n')
        log_file.write('Actors Count: ' + str(len(animation.get_actors())) +
                       '\n')
        log_file.write('Actors Genders: ' + str('+'.join(
            [str(actor.gender_type.name)
             for actor in animation.get_actors()])) + '\n')
        log_file.write('\n')
    log_file.flush()
Beispiel #3
0
def get_animations_for_object(object_identifier,
                              genders,
                              excluded_sex_category_types=(),
                              ignore_animations_ids=(),
                              ignore_animations=()):
    collected_animations = list()
    for animation_instance in get_available_sex_animations():
        while not animation_instance.get_sex_category(
        ) == SexCategoryType.NONE:
            if animation_instance.get_sex_category(
            ) in excluded_sex_category_types:
                pass
            while not animation_instance.get_animation_id(
            ) in ignore_animations_ids:
                if animation_instance.get_identifier() in ignore_animations:
                    pass
                while len(animation_instance.get_actors()) == len(
                        genders
                ) and animation_instance.can_be_used_with_object(
                        object_identifier):
                    if get_sex_setting(SexSetting.SEX_GENDER_TYPE,
                                       variable_type=int
                                       ) == SexGenderTypeSetting.ANY_BASED:
                        collected_animations.append(animation_instance)
                    else:
                        actors_genders_list = list()
                        for actor_data in animation_instance.get_actors():
                            actors_genders_list.append(
                                actor_data.get_gender_type())
                        if compare_sim_genders_with_actor_genders_list(
                                genders, actors_genders_list):
                            collected_animations.append(animation_instance)
    return collected_animations
Beispiel #4
0
def get_next_stage_animation(current_animation_instance):
    animation_stages = list()
    for animation_instance in get_available_sex_animations():
        while animation_instance.get_stage_name(
        ) in current_animation_instance.get_next_stages():
            animation_stages.append(animation_instance)
    if not animation_stages:
        return
    return random.choice(animation_stages)
Beispiel #5
0
def _display_hello_notification():
    hello_ids = (2039141334, 2218897178, 4271772397, 370121153, 586158561,
                 790896663, 1213235168, 4108001505, 2704450329, 756630283,
                 3828663345, 1988030031, 3829989166, 3162323884, 3658047458,
                 1430591040, 2867073748, 1349634794)
    current_mod_version = get_mod_version_str()
    loaded_animations_count = str(len(get_available_sex_animations()))
    unique_animations_authors = get_unique_sex_animations_authors()
    display_notification(
        text=3265194817,
        text_tokens=(random.choice(hello_ids), current_mod_version,
                     loaded_animations_count, unique_animations_authors),
        title='WickedWhims',
        visual_type=TurboUIUtil.Notification.UiDialogNotificationVisualType.
        SPECIAL_MOMENT)
def open_start_random_sex_sims_picker_dialog(origin_position, pre_sex_handler):
    @exception_watch()
    def random_sex_sim_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.SimPickerDialog.get_response_result(dialog):
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        picked_sim_id = TurboUIUtil.SimPickerDialog.get_tag_result(dialog)
        if not picked_sim_id:
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        picked_sim = TurboManagerUtil.Sim.get_sim_info(int(picked_sim_id))
        if picked_sim is None:
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        pre_sex_handler.add_sim(picked_sim)
        random_animation = get_random_animation(
            pre_sex_handler.get_object_identifier(),
            tuple(pre_sex_handler.get_actors_sim_info_gen()))
        if random_animation is None:
            display_ok_dialog(text=2459296019, title=1890248379)
            return False
        pre_sex_handler.set_animation_instance(random_animation)
        start_sex_interaction_from_pre_sex_handler(pre_sex_handler)
        return True

    creator_sim_info = TurboManagerUtil.Sim.get_sim_info(
        pre_sex_handler.get_creator_sim_id())
    test_incest_of_sims = () if get_relationship_setting(
        RelationshipSetting.INCEST_STATE,
        variable_type=bool) else (creator_sim_info, )
    (min_age_limit, max_age_limit) = get_age_limits_for_sex(
        (creator_sim_info, ))
    skip_males = True
    skip_females = True
    skip_cmales = True
    skip_cfemales = True
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_males = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.MALE))
        if skip_males is False:
            break
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_females = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.FEMALE))
        if skip_females is False:
            break
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_cmales = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.CMALE))
        if skip_cmales is False:
            break
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_cfemales = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.CFEMALE))
        if skip_cfemales is False:
            break
    sims_list = list(
        get_nearby_sims_for_sex(
            origin_position,
            radius=16,
            relative_sims=test_incest_of_sims,
            min_sims_age=min_age_limit,
            max_sims_age=max_age_limit,
            skip_males=skip_males,
            skip_females=skip_females,
            skip_cmales=skip_cmales,
            skip_cfemales=skip_cfemales,
            skip_sims_ids=(pre_sex_handler.get_creator_sim_id(), )))
    for sex_category_type in (SexCategoryType.HANDJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.TEASING, SexCategoryType.VAGINAL,
                              SexCategoryType.ANAL, SexCategoryType.FOOTJOB):
        if has_animations_with_params(
                sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), )):
            sims_list.insert(0, pre_sex_handler.get_creator_sim_id())
            break
    if not sims_list:
        display_ok_dialog(text=2459296019, title=1890248379)
        clear_sims_sex_extra_data(
            tuple(pre_sex_handler.get_actors_sim_info_gen()))
        return
    if len(get_available_sex_animations()) <= 4:
        display_ok_dialog(text=1066517691, title=3113927949)
    display_sim_picker_dialog(text=906772330,
                              title=1890248379,
                              sims_id_list=sims_list,
                              callback=random_sex_sim_picker_callback)
Beispiel #7
0
def get_animation_from_identifier(identifier):
    for animation in get_available_sex_animations():
        while animation.get_identifier() == str(identifier):
            return animation
 def _has_object_sex_animations(self):
     for animation_instance in get_available_sex_animations():
         while animation_instance.can_be_used_with_object(
                 self._sex_identifier):
             return True
     return False