def has_feminine_frame(sim_info: SimInfo) -> bool:
        """has_feminine_frame(sim_info)

        Determine if a sim has a Feminine Body Frame.

        :param sim_info: The Sim to check.
        :type sim_info: SimInfo
        :return: True, if the Sim does. False, if the Sim does not.
        :rtype: bool
        """
        from sims4communitylib.utils.sims.common_sim_gender_option_utils import CommonSimGenderOptionUtils
        return CommonSimGenderOptionUtils.has_feminine_frame(sim_info)
Example #2
0
    def get_body_frame(sim_info: SimInfo) -> 'CommonBodyFrame':
        """get_body_frame(sim_info)

        Retrieve the CommonBodyFrame of a sim.

        :param sim_info: An instance of a Sim.
        :type sim_info: SimInfo
        :return: The body frame of the Sim or CommonBodyFrame.INVALID if their current body frame cannot be determined.
        :rtype: CommonBodyFrame
        """
        from sims4communitylib.utils.sims.common_sim_gender_option_utils import CommonSimGenderOptionUtils
        if CommonSpeciesUtils.is_pet(sim_info):
            if CommonGenderUtils.is_male(sim_info):
                return CommonBodyFrame.MASCULINE
            if CommonGenderUtils.is_female(sim_info):
                return CommonBodyFrame.FEMININE
            return CommonBodyFrame.INVALID

        if CommonSimGenderOptionUtils.has_masculine_frame(sim_info):
            return CommonBodyFrame.MASCULINE
        if CommonSimGenderOptionUtils.has_feminine_frame(sim_info):
            return CommonBodyFrame.FEMININE
        return CommonBodyFrame.INVALID
Example #3
0
 def _update_gender_options(self, sim_info: SimInfo):
     update_outfits = False
     if self._setting_utils.force_all_sims_to_male(
     ) and not CommonGenderUtils.is_male(sim_info):
         CommonGenderUtils.swap_gender(sim_info,
                                       update_gender_options=False)
         update_outfits = True
     elif self._setting_utils.force_all_sims_to_female(
     ) and not CommonGenderUtils.is_female(sim_info):
         CommonGenderUtils.swap_gender(sim_info,
                                       update_gender_options=False)
         update_outfits = True
     if CommonGenderUtils.is_male(sim_info):
         if CommonSpeciesUtils.is_pet(sim_info):
             if self._setting_utils.all_male_options.can_reproduce(
             ) and not CommonSimGenderOptionUtils.can_reproduce(sim_info):
                 CommonSimGenderOptionUtils.update_can_reproduce(
                     sim_info, True)
             if self._setting_utils.all_male_options.cannot_reproduce(
             ) and not CommonSimGenderOptionUtils.can_not_reproduce(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_reproduce(
                     sim_info, False)
         elif CommonSpeciesUtils.is_human(sim_info):
             if self._setting_utils.all_male_options.use_toilet_standing(
             ) and not CommonSimGenderOptionUtils.uses_toilet_standing(
                     sim_info):
                 CommonSimGenderOptionUtils.update_toilet_usage(
                     sim_info, True)
                 update_outfits = True
             if self._setting_utils.all_male_options.use_toilet_sitting(
             ) and not CommonSimGenderOptionUtils.uses_toilet_sitting(
                     sim_info):
                 CommonSimGenderOptionUtils.update_toilet_usage(
                     sim_info, False)
                 update_outfits = True
             if self._setting_utils.all_male_options.prefer_menswear(
             ) and not CommonSimGenderOptionUtils.prefers_menswear(
                     sim_info):
                 CommonSimGenderOptionUtils.update_clothing_preference(
                     sim_info, True)
             if self._setting_utils.all_male_options.prefer_womenswear(
             ) and not CommonSimGenderOptionUtils.prefers_womenswear(
                     sim_info):
                 CommonSimGenderOptionUtils.update_clothing_preference(
                     sim_info, False)
             if self._setting_utils.all_male_options.force_masculine_body_frame(
             ) and not CommonSimGenderOptionUtils.has_masculine_frame(
                     sim_info):
                 CommonSimGenderOptionUtils.update_body_frame(
                     sim_info, True)
             if self._setting_utils.all_male_options.force_feminine_body_frame(
             ) and not CommonSimGenderOptionUtils.has_feminine_frame(
                     sim_info):
                 CommonSimGenderOptionUtils.update_body_frame(
                     sim_info, False)
             if self._setting_utils.all_male_options.can_impregnate(
             ) and not CommonSimGenderOptionUtils.can_impregnate(sim_info):
                 CommonSimGenderOptionUtils.update_can_impregnate(
                     sim_info, True)
             if self._setting_utils.all_male_options.cannot_impregnate(
             ) and not CommonSimGenderOptionUtils.can_not_impregnate(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_impregnate(
                     sim_info, False)
             if self._setting_utils.all_male_options.can_be_impregnated(
             ) and not CommonSimGenderOptionUtils.can_be_impregnated(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_be_impregnated(
                     sim_info, True)
             if self._setting_utils.all_male_options.cannot_be_impregnated(
             ) and not CommonSimGenderOptionUtils.can_not_be_impregnated(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_be_impregnated(
                     sim_info, False)
             if self._setting_utils.all_male_options.force_breasts_on(
             ) and not CommonSimGenderOptionUtils.has_breasts(sim_info):
                 CommonSimGenderOptionUtils.update_has_breasts(
                     sim_info, True)
                 update_outfits = True
             if self._setting_utils.all_male_options.force_breasts_off(
             ) and CommonSimGenderOptionUtils.has_breasts(sim_info):
                 CommonSimGenderOptionUtils.update_has_breasts(
                     sim_info, False)
                 update_outfits = True
     elif CommonGenderUtils.is_female(sim_info):
         if CommonSpeciesUtils.is_pet(sim_info):
             if self._setting_utils.all_female_options.can_reproduce(
             ) and not CommonSimGenderOptionUtils.can_reproduce(sim_info):
                 CommonSimGenderOptionUtils.update_can_reproduce(
                     sim_info, True)
             if self._setting_utils.all_female_options.cannot_reproduce(
             ) and not CommonSimGenderOptionUtils.can_not_reproduce(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_reproduce(
                     sim_info, False)
         elif CommonSpeciesUtils.is_human(sim_info):
             if self._setting_utils.all_female_options.use_toilet_standing(
             ) and not CommonSimGenderOptionUtils.uses_toilet_standing(
                     sim_info):
                 CommonSimGenderOptionUtils.update_toilet_usage(
                     sim_info, True)
                 update_outfits = True
             if self._setting_utils.all_female_options.use_toilet_sitting(
             ) and not CommonSimGenderOptionUtils.uses_toilet_sitting(
                     sim_info):
                 CommonSimGenderOptionUtils.update_toilet_usage(
                     sim_info, False)
                 update_outfits = True
             if self._setting_utils.all_female_options.prefer_menswear(
             ) and not CommonSimGenderOptionUtils.prefers_menswear(
                     sim_info):
                 CommonSimGenderOptionUtils.update_clothing_preference(
                     sim_info, True)
             if self._setting_utils.all_female_options.prefer_womenswear(
             ) and not CommonSimGenderOptionUtils.prefers_womenswear(
                     sim_info):
                 CommonSimGenderOptionUtils.update_clothing_preference(
                     sim_info, False)
             if self._setting_utils.all_female_options.force_masculine_body_frame(
             ) and not CommonSimGenderOptionUtils.has_masculine_frame(
                     sim_info):
                 CommonSimGenderOptionUtils.update_body_frame(
                     sim_info, True)
             if self._setting_utils.all_female_options.force_feminine_body_frame(
             ) and not CommonSimGenderOptionUtils.has_feminine_frame(
                     sim_info):
                 CommonSimGenderOptionUtils.update_body_frame(
                     sim_info, False)
             if self._setting_utils.all_female_options.can_impregnate(
             ) and not CommonSimGenderOptionUtils.can_impregnate(sim_info):
                 CommonSimGenderOptionUtils.update_can_impregnate(
                     sim_info, True)
             if self._setting_utils.all_female_options.cannot_impregnate(
             ) and not CommonSimGenderOptionUtils.can_not_impregnate(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_impregnate(
                     sim_info, False)
             if self._setting_utils.all_female_options.can_be_impregnated(
             ) and not CommonSimGenderOptionUtils.can_be_impregnated(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_be_impregnated(
                     sim_info, True)
             if self._setting_utils.all_female_options.cannot_be_impregnated(
             ) and not CommonSimGenderOptionUtils.can_not_be_impregnated(
                     sim_info):
                 CommonSimGenderOptionUtils.update_can_be_impregnated(
                     sim_info, False)
             if self._setting_utils.all_female_options.force_breasts_on(
             ) and not CommonSimGenderOptionUtils.has_breasts(sim_info):
                 CommonSimGenderOptionUtils.update_has_breasts(
                     sim_info, True)
                 update_outfits = True
             if self._setting_utils.all_female_options.force_breasts_off(
             ) and CommonSimGenderOptionUtils.has_breasts(sim_info):
                 CommonSimGenderOptionUtils.update_has_breasts(
                     sim_info, False)
                 update_outfits = True
     if update_outfits:
         CommonOutfitUtils.update_outfits(sim_info)