Esempio n. 1
0
def open_all_sims_hard_penis_picker(sim_identifier):
    creator_sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)

    @exception_watch()
    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)

    hard_penis_picker_rows = get_hard_penis_picker_rows(
        selected_part=PENIS_SETTING_HARD_PENIS_AUTHOR)
    display_picker_list_dialog(title=1516569631,
                               picker_rows=hard_penis_picker_rows,
                               callback=set_callback)
def _open_animation_category_picker(author_name, autonomy=False):
    global _CURRENT_AUTHOR_NAME
    _CURRENT_AUTHOR_NAME = author_name

    @exception_watch()
    def animation_categories_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            _open_animation_authors_picker(autonomy=autonomy)
            return False
        (result_author_name, result_category_type) = TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog)
        _open_animations_picker(result_author_name, result_category_type, autonomy=autonomy)
        return True

    category_picker_rows = list()
    animation_categories = ((0, SexCategoryType.TEASING, 1782200665), (1, SexCategoryType.HANDJOB, 2036049244), (3, SexCategoryType.FOOTJOB, 122220731), (4, SexCategoryType.ORALJOB, 1133298919), (5, SexCategoryType.VAGINAL, 2874903428), (6, SexCategoryType.ANAL, 3553429146), (7, SexCategoryType.CLIMAX, 1579105152))
    for (index, animation_category_type, animation_category_name) in animation_categories:
        overall_animations_count = 0
        enabled_animations_count = 0
        for animation_instance in get_all_sex_animations():
            while animation_instance.get_sex_category() == animation_category_type and animation_instance.get_author() == author_name:
                overall_animations_count += 1
                if not is_sex_animation_disabled(animation_instance.get_identifier(), autonomy=autonomy):
                    enabled_animations_count += 1
        if overall_animations_count <= 0:
            pass
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(index, animation_category_name, TurboL18NUtil.get_localized_string(583685786, (str(enabled_animations_count) + '/' + str(overall_animations_count), author_name)), skip_tooltip=True, icon=get_arrow_icon(), tag=(author_name, animation_category_type))
        category_picker_rows.append(picker_row)
    if autonomy is False:
        title = TurboL18NUtil.get_localized_string(2380367292, (author_name,))
    else:
        title = TurboL18NUtil.get_localized_string(3773354670, (author_name,))
    display_picker_list_dialog(title=title, picker_rows=category_picker_rows, sim=get_menu_sim(), callback=animation_categories_callback)
Esempio n. 3
0
def open_sim_hard_penis_picker(sim_identifier):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)

    @exception_watch()
    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)

    hard_penis_picker_rows = get_hard_penis_picker_rows(
        selected_part=get_sim_hard_penis_author_key(sim_info),
        specific_part_type=_get_sim_hard_penis_type(sim_info))
    display_picker_list_dialog(title=1516569631,
                               picker_rows=hard_penis_picker_rows,
                               callback=set_callback)
Esempio n. 4
0
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 _open_animation_authors_picker(autonomy=False):
    global _CURRENT_AUTHOR_NAME
    _CURRENT_AUTHOR_NAME = None

    @exception_watch()
    def animation_authors_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            update_disabled_sex_animation_data()
            recollect_sex_animation_packages()
            from wickedwhims.sex.settings.sex_settings import _open_sex_settings, _open_sex_autonomy_settings
            if autonomy is False:
                _open_sex_settings()
            else:
                _open_sex_autonomy_settings()
            return False
        result_author_name = str(TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog))
        _open_animation_category_picker(result_author_name, autonomy=autonomy)
        return True

    animation_author_picker_rows = list()
    animation_authors = OrderedDict()
    for animation_instance in get_all_sex_animations():
        is_enabled = not is_sex_animation_disabled(animation_instance.get_identifier(), autonomy=autonomy)
        if animation_instance.get_author() not in animation_authors:
            animation_authors[animation_instance.get_author()] = (1, 1 if is_enabled else 0)
        else:
            (overall_animations, enabled_animations) = animation_authors[animation_instance.get_author()]
            animation_authors[animation_instance.get_author()] = (overall_animations + 1, enabled_animations + (1 if is_enabled else 0))
    index = 0
    for (animation_author_name, (overall_animations_count, enabled_animations_count)) in animation_authors.items():
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(index, animation_author_name, TurboL18NUtil.get_localized_string(2223654951, (str(enabled_animations_count) + '/' + str(overall_animations_count),)), skip_tooltip=True, icon=get_arrow_icon(), tag=animation_author_name)
        animation_author_picker_rows.append(picker_row)
        index += 1
    display_picker_list_dialog(text=4285227430, title=1853900111 if autonomy is False else 2284702213, picker_rows=animation_author_picker_rows, sim=get_menu_sim(), callback=animation_authors_callback)
Esempio n. 6
0
def _open_settings_import_export_menu():
    export_option = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        1,
        128859011,
        1330537389,
        icon=get_action_icon(),
        tag=_export_current_settings)
    import_option = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        2,
        3126397785,
        543237095,
        icon=get_arrow_icon(),
        tag=_import_settings_menu)
    delete_option = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        3,
        4268061051,
        645194174,
        icon=get_arrow_icon(),
        tag=_delete_settings_menu)

    def import_export_menu_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            from wickedwhims.main.settings.main_settings import open_main_settings
            open_main_settings()
            return False
        result_option = TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog)
        result_option()
        clear_menu_sim()
        return True

    display_picker_list_dialog(title=237356084,
                               picker_rows=(export_option, import_option,
                                            delete_option),
                               sim=get_menu_sim(),
                               callback=import_export_menu_callback)
def _open_animations_picker(author_name, animation_category, autonomy=False):

    @exception_watch()
    def _get_animations_list():
        animations_list = list()
        for animation_instance_x in get_all_sex_animations():
            while animation_instance_x.get_sex_category() == animation_category and animation_instance_x.get_author() == author_name:
                is_disabled_x = is_sex_animation_disabled(animation_instance_x.get_identifier(), autonomy=autonomy)
                animations_list.append((animation_instance_x, is_disabled_x))
        return animations_list

    @exception_watch()
    def animations_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            if _CURRENT_AUTHOR_NAME is None:
                _open_animation_authors_picker(autonomy=autonomy)
            else:
                _open_animation_category_picker(_CURRENT_AUTHOR_NAME, autonomy=autonomy)
            return False
        (result_author_name, result_animation_category, result_animation_identifier) = TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog)
        if result_animation_identifier is None:
            animations_to_toggle = _get_animations_list()
            has_disabled_animations = False
            for (_, is_disabled_y) in animations_to_toggle:
                while is_disabled_y is True:
                    has_disabled_animations = True
                    break
            for (animation_instance_y, is_disabled_y) in animations_to_toggle:
                if has_disabled_animations is True and is_disabled_y is True:
                    switch_disabled_sex_animation(animation_instance_y.get_identifier(), autonomy=autonomy)
                else:
                    while has_disabled_animations is False and is_disabled_y is False:
                        switch_disabled_sex_animation(animation_instance_y.get_identifier(), autonomy=autonomy)
        else:
            switch_disabled_sex_animation(result_animation_identifier, autonomy=autonomy)
        _open_animations_picker(result_author_name, result_animation_category, autonomy=autonomy)
        return True

    animation_picker_rows = list()
    toggle_select = TurboUIUtil.ObjectPickerDialog.ListPickerRow(0, 4201638866, 1537618859, icon=get_action_icon(), tag=(author_name, animation_category, None))
    animation_picker_rows.append(toggle_select)
    index = 1
    for (animation_instance, is_disabled) in _get_animations_list():
        animation_locations = list()
        for animation_location in animation_instance.get_locations():
            animation_locations.append(SexLocationType.get_user_name(animation_location))
        if animation_instance.get_custom_locations():
            animation_locations.append('Custom Locations')
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(index, animation_instance.get_display_name(), TurboL18NUtil.get_localized_string(708866741, (', '.join(animation_locations),)), skip_tooltip=True, icon=get_unselected_icon() if is_disabled is True else get_selected_icon(), tag=(author_name, animation_category, animation_instance.get_identifier()))
        animation_picker_rows.append(picker_row)
        index += 1
    if autonomy is False:
        title = TurboL18NUtil.get_localized_string(2380367292, (author_name,))
    else:
        title = TurboL18NUtil.get_localized_string(3773354670, (author_name,))
    display_picker_list_dialog(title=title, picker_rows=animation_picker_rows, sim=get_menu_sim(), callback=animations_callback)
Esempio n. 8
0
def _import_settings_menu():
    def _import_done_dialog_callback(_):
        _open_settings_import_export_menu()

    def _import_settings_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            _open_settings_import_export_menu()
            return False
        result_save_name = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        save_file_path = _get_settings_import_export_dir()
        load_basic_save_data(
            load_file_path_override=''.join((save_file_path, result_save_name,
                                             '_general.json')))
        load_disabled_animations_save_data(
            load_file_path_override=''.join((save_file_path, result_save_name,
                                             '_disabled_animations.json')))
        apply_nudity_settings_from_basic_save_data()
        apply_relationship_settings_from_basic_save_data()
        apply_sex_settings_from_basic_save_data()
        apply_disabled_sex_animations_from_dict(
            get_disabled_animations_save_data())
        recollect_sex_animation_packages()
        display_ok_dialog(text=3165307094,
                          text_tokens=(result_save_name, ),
                          title=3126397785,
                          callback=_import_done_dialog_callback)
        return True

    save_export_dict = _get_settings_export_dict()
    if not save_export_dict:
        display_ok_dialog(text=4228795842,
                          title=3126397785,
                          callback=_import_done_dialog_callback)
        return
    picker_rows = list()
    i = 0
    for (save_name, save_data) in save_export_dict.items():
        save_time = save_data[1]
        save_date_time = datetime.datetime.fromtimestamp(save_time).strftime(
            '%Y-%m-%d %H:%M')
        picker_rows.append(
            TurboUIUtil.ObjectPickerDialog.ListPickerRow(
                i,
                save_name,
                TurboL18NUtil.get_localized_string(2878507029,
                                                   tokens=(save_date_time, )),
                skip_tooltip=True,
                icon=get_action_icon(),
                tag=save_name))
        i += 1
    display_picker_list_dialog(title=3126397785,
                               picker_rows=picker_rows,
                               sim=get_menu_sim(),
                               callback=_import_settings_callback)
Esempio n. 9
0
 def open_window(self,
                 allow_open_callback=True,
                 allow_change_callback=False):
     display_picker_list_dialog(title=self.window_title,
                                picker_rows=self.window_picker_rows,
                                sim=get_menu_sim(),
                                callback=self._window_callback)
     if allow_open_callback and self.open_callback is not None:
         self.open_callback()
     if allow_change_callback and self.change_callback is not None:
         self.change_callback()
Esempio n. 10
0
def open_change_sex_animations_category_picker_dialog(active_sex_handler):
    @exception_watch()
    def animation_categories_picker_callback(dialog):
        if active_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            return False
        result_sex_category_type = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        open_change_sex_animations_picker_dialog(active_sex_handler,
                                                 result_sex_category_type)
        return True

    genders_list = list()
    for sim_info in active_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(sim_info))
    category_picker_rows = list()
    animation_categories = ((0, SexCategoryType.TEASING, 77458156),
                            (1, SexCategoryType.HANDJOB, 1425559843),
                            (3, SexCategoryType.FOOTJOB, 223939754),
                            (4, SexCategoryType.ORALJOB, 2747124438),
                            (5, SexCategoryType.VAGINAL,
                             574589211), (6, SexCategoryType.ANAL, 1610085053),
                            (7, SexCategoryType.CLIMAX, 3986970407))
    for (index, animation_sex_category_type,
         animation_sex_category_name) in animation_categories:
        if not active_sex_handler.is_at_climax and animation_sex_category_type == SexCategoryType.CLIMAX:
            pass
        if not has_animations_with_params(
                animation_sex_category_type,
                active_sex_handler.get_object_identifier(), genders_list):
            pass
        animations_list = get_animations_with_params(
            animation_sex_category_type,
            active_sex_handler.get_object_identifier(), genders_list)
        if not animations_list:
            pass
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
            index,
            animation_sex_category_name,
            TurboL18NUtil.get_localized_string(3166569584,
                                               tokens=(str(
                                                   len(animations_list)), )),
            skip_tooltip=True,
            icon=get_arrow_icon(),
            tag=animation_sex_category_type)
        category_picker_rows.append(picker_row)
    if len(category_picker_rows) <= 1:
        return
    display_picker_list_dialog(title=2301874612,
                               picker_rows=category_picker_rows,
                               callback=animation_categories_picker_callback)
Esempio n. 11
0
def _delete_settings_menu():
    save_export_dict = _get_settings_export_dict()

    def _delete_done_dialog_callback(_):
        _open_settings_import_export_menu()

    def _delete_settings_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            _open_settings_import_export_menu()
            return False
        (result_save_name, result_save_time
         ) = TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog)
        for (_save_name, _save_data) in save_export_dict.items():
            _save_time = _save_data[1]
            while _save_name == result_save_name and _save_time == result_save_time:
                save_export_dict.pop(_save_name)
                break
        _save_settings_export_dict(save_export_dict)
        display_ok_dialog(text=3421488172,
                          text_tokens=(result_save_name, ),
                          title=4268061051,
                          callback=_delete_done_dialog_callback)
        return True

    if not save_export_dict:
        display_ok_dialog(text=294911225,
                          title=4268061051,
                          callback=_delete_done_dialog_callback)
        return
    picker_rows = list()
    i = 0
    for (save_name, save_data) in save_export_dict.items():
        save_time = save_data[1]
        save_date_time = datetime.datetime.fromtimestamp(save_time).strftime(
            '%Y-%m-%d %H:%M')
        picker_rows.append(
            TurboUIUtil.ObjectPickerDialog.ListPickerRow(
                i,
                save_name,
                TurboL18NUtil.get_localized_string(2878507029,
                                                   tokens=(save_date_time, )),
                skip_tooltip=True,
                icon=get_action_icon(),
                tag=(save_name, save_time)))
        i += 1
    display_picker_list_dialog(title=4268061051,
                               picker_rows=picker_rows,
                               sim=get_menu_sim(),
                               callback=_delete_settings_callback)
Esempio n. 12
0
def open_change_sex_location_animations_picker_dialog(
        active_sex_handler, sex_category_type, new_object_identifier,
        game_object_id, object_height, location_x, location_y, location_z,
        location_level, location_angle, route_x, route_y, route_z,
        route_level):
    @exception_watch()
    def change_sex_location_animation_picker_callback(dialog):
        if active_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            return False
        animation_instance = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        active_sex_handler.set_animation_instance(animation_instance,
                                                  is_manual=True)
        active_sex_handler.set_object_identifier(new_object_identifier)
        active_sex_handler.set_game_object_id(game_object_id)
        active_sex_handler.set_object_height(object_height)
        active_sex_handler.set_location(location_x, location_y, location_z,
                                        location_level, location_angle)
        active_sex_handler.set_route_position(route_x, route_y, route_z,
                                              route_level)
        active_sex_handler.reassign_actors()
        active_sex_handler.restart()
        return True

    genders_list = list()
    for sim_info in active_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(sim_info))
    animations_list = get_animations_with_params(sex_category_type,
                                                 new_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(
                active_sex_handler,
                sex_category_type,
                object_identifier=new_object_identifier))
    display_picker_list_dialog(
        title=get_sex_category_animations_stbl_name(sex_category_type),
        picker_rows=animations_rows,
        callback=change_sex_location_animation_picker_callback)
Esempio n. 13
0
def open_start_sex_animations_category_picker_dialog(pre_sex_handler):
    @exception_watch()
    def animation_categories_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        result_sex_category_type = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        pre_sex_handler.set_interaction_type(result_sex_category_type)
        open_start_sex_animations_picker_dialog(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))
    category_picker_rows = list()
    animation_categories = ((0, SexCategoryType.TEASING, 77458156),
                            (1, SexCategoryType.HANDJOB, 1425559843),
                            (3, SexCategoryType.FOOTJOB, 223939754),
                            (4, SexCategoryType.ORALJOB, 2747124438),
                            (5, SexCategoryType.VAGINAL,
                             574589211), (6, SexCategoryType.ANAL, 1610085053))
    for (index, animation_sex_category_type,
         animation_sex_category_name) in animation_categories:
        animations_list = get_animations_with_params(
            animation_sex_category_type,
            pre_sex_handler.get_object_identifier(), genders_list)
        if not animations_list:
            continue
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
            index,
            animation_sex_category_name,
            TurboL18NUtil.get_localized_string(3166569584,
                                               tokens=(str(
                                                   len(animations_list)), )),
            skip_tooltip=True,
            icon=get_arrow_icon(),
            tag=animation_sex_category_type)
        category_picker_rows.append(picker_row)
    display_picker_list_dialog(title=2301874612,
                               picker_rows=category_picker_rows,
                               callback=animation_categories_picker_callback)
Esempio n. 14
0
def open_change_sex_animations_picker_dialog(active_sex_handler,
                                             sex_category_type):
    @exception_watch()
    def animation_picker_callback(dialog):
        if active_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            open_change_sex_animations_category_picker_dialog(
                active_sex_handler)
            return False
        animation_instance = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        if animation_instance is not None and animation_instance is not active_sex_handler.get_animation_instance(
        ):
            active_sex_handler.set_animation_instance(animation_instance,
                                                      is_animation_change=True,
                                                      is_manual=True)
            active_sex_handler.play(is_animation_change=True)
            return True
        return False

    genders_list = list()
    for sim_info in active_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(sim_info))
    animations_list = get_animations_with_params(
        sex_category_type, active_sex_handler.get_object_identifier(),
        genders_list)
    animations_rows = list()
    for animation in animations_list:
        animations_rows.append(
            animation.get_picker_row(
                display_selected=animation.get_animation_id() ==
                active_sex_handler.get_animation_instance().get_animation_id())
        )
    if len(animations_rows) > 1:
        animations_rows.insert(
            0,
            ChoiceListRandomAnimationPickerRow(active_sex_handler,
                                               sex_category_type))
    display_picker_list_dialog(
        title=get_sex_category_animations_stbl_name(sex_category_type),
        picker_rows=animations_rows,
        callback=animation_picker_callback)
Esempio n. 15
0
def open_join_sex_animations_picker_dialog(pre_sex_handler,
                                           joining_sims_list,
                                           sex_category_type,
                                           flip_relationship_check=False):
    @exception_watch()
    def join_sex_animation_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            return False
        animation_instance = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        pre_sex_handler.set_animation_instance(animation_instance)
        join_sex_interaction_from_pre_sex_handler(
            pre_sex_handler,
            joining_sims_list,
            flip_relationship_check=flip_relationship_check)
        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(
        sex_category_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_list) > 1:
        animations_rows.insert(
            0,
            ChoiceListRandomAnimationPickerRow(pre_sex_handler,
                                               sex_category_type))
    display_picker_list_dialog(
        title=get_sex_category_animations_stbl_name(sex_category_type),
        picker_rows=animations_rows,
        sim=pre_sex_handler.get_creator_sim_id(),
        callback=join_sex_animation_picker_callback)
Esempio n. 16
0
def open_penis_settings(sim_identifier):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    sim_soft_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        10,
        TurboL18NUtil.get_localized_string(2898758693),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    sim_hard_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        11,
        TurboL18NUtil.get_localized_string(1072923186),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    all_sims_soft_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        20,
        TurboL18NUtil.get_localized_string(2966523311),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    all_sims_hard_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        21,
        TurboL18NUtil.get_localized_string(4002037116),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    randomize_all_sims_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        30,
        TurboL18NUtil.get_localized_string(1952075710),
        TurboL18NUtil.get_localized_string(0),
        icon=get_selected_icon() if PENIS_SETTING_RANDOM is True
        and PENIS_SETTING_RANDOM_INCLUDE_DEFAULT is True else
        get_unselected_icon())
    randomize_all_sims_penis_non_default = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        31,
        TurboL18NUtil.get_localized_string(1952075710),
        TurboL18NUtil.get_localized_string(1490222904),
        icon=get_selected_icon() if PENIS_SETTING_RANDOM is True
        and PENIS_SETTING_RANDOM_INCLUDE_DEFAULT is False else
        get_unselected_icon())

    @exception_watch()
    def set_callback(dialog):
        if not dialog.accepted:
            return
        result = dialog.get_result_tags()[-1]
        if result == 10:
            open_sim_soft_penis_picker(sim_info)
        elif result == 11:
            open_sim_hard_penis_picker(sim_info)
        elif result == 20:
            open_all_sims_soft_penis_picker(sim_info)
        elif result == 21:
            open_all_sims_hard_penis_picker(sim_info)
        elif result == 30:
            randomized_all_sims_penis_models(sim_info,
                                             include_default_penis=True)
        elif result == 31:
            randomized_all_sims_penis_models(sim_info)

    display_picker_list_dialog(title=253781263,
                               picker_rows=[
                                   sim_soft_penis, sim_hard_penis,
                                   all_sims_soft_penis, all_sims_hard_penis,
                                   randomize_all_sims_penis,
                                   randomize_all_sims_penis_non_default
                               ],
                               callback=set_callback)