﻿# Generous Motherhood
#
# Adds gm_gene_bust_growth (common/genes/gm_genes_special.txt) to mothers at the strength of
# gm_bust_growth_strength (common/script_values/gm_values.txt). Her own DNA is untouched.
#
# The three modifiers mirror vanilla clothes_effect (01_clothes_base.txt), which swaps the bust
# to the bust_clothes template when she is dressed: the growth must use the same blend shapes as
# the template vanilla shows, or clothes would not follow it.

gm_motherhood_bust = {
	usage = game
	selection_behavior = max

	gm_bust_growth_clothed = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gm_gene_bust_growth
				template = gm_bust_growth_clothed
				value = {
					value = 0
					if = {
						limit = { exists = root }
						add = gm_bust_growth_strength
					}
				}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 1000
				NOR = {
					should_be_fully_naked_portrait_trigger = yes
					should_be_topless_portrait_trigger = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					NOT = { exists = this }
					is_female = no
					gm_birth_count < 1
				}
			}
		}
	}

	gm_bust_growth_unclothed = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gm_gene_bust_growth
				template = gm_bust_growth_unclothed
				value = {
					value = 0
					if = {
						limit = { exists = root }
						add = gm_bust_growth_strength
					}
				}
			}
		}
		weight = {
			base = 10
			modifier = {
				factor = 0
				OR = {
					NOT = { exists = this }
					is_female = no
					gm_birth_count < 1
				}
			}
		}
	}

	# Events that ask for no clothes. Outfit tags can keep this one valid at weight 1 for anyone,
	# which is harmless: the value is 0 for men and for women without children.
	gm_bust_growth_unclothed_event = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gm_gene_bust_growth
				template = gm_bust_growth_unclothed
				value = {
					value = 0
					if = {
						limit = {
							exists = root
							is_female = yes
						}
						add = gm_bust_growth_strength
					}
				}
			}
		}
		outfit_tags = { no_clothes }
		require_outfit_tags = yes
		weight = {
			base = 1000
			modifier = {
				factor = 0
				OR = {
					NOT = { exists = this }
					is_female = no
					gm_birth_count < 1
				}
			}
		}
	}
}
