﻿become_child_interaction_father = {
	category = interaction_category_uncategorized
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		NOT = {
			scope:actor = scope:recipient
			scope:actor = { exists = father }			
		}
		scope:actor = { age < scope:recipient.age }			
		scope:recipient = { is_female = no }
		years_from_game_start < 1
	}

	on_accept = {
		scope:actor = {
			set_father = scope:recipient
		}
	}

	auto_accept = yes
	ai_will_do = {
		base = 0
	}
}

become_child_interaction_mother = {
	category = interaction_category_uncategorized
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		NOT = {
			scope:actor = scope:recipient
			scope:actor = { exists = mother }			
		}
		scope:actor = { age < scope:recipient.age }	
		scope:recipient = { is_female = yes }
		years_from_game_start < 1
	}

	on_accept = {
		scope:actor = {
			set_mother = scope:recipient
		}
	}

	auto_accept = yes
	ai_will_do = {
		base = 0
	}
}

become_sibling_interaction = {
	category = interaction_category_uncategorized
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		NOT = {
			scope:actor = scope:recipient
			scope:actor = { exists = father }	
			scope:actor = { exists = mother }	
		}	
		years_from_game_start < 1
	}

	on_accept = {
		scope:actor = {
			set_house = scope:recipient.house
			set_father = scope:recipient.father
			set_mother = scope:recipient.mother
			add_character_flag = joined_parent_house
			every_child = {
						limit = {
								is_child_of = scope:actor
							}
							set_house = scope:recipient.house
						}

		}
	}

	auto_accept = yes
	ai_will_do = {
		base = 0
	}
}

join_house_interaction = {
	category = interaction_category_uncategorized
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		NOT = {
			scope:actor = scope:recipient
			scope:actor = { has_character_flag = joined_parent_house }				
		}
		scope:recipient = { is_parent_of = scope:actor }
		years_from_game_start < 1
	}

	on_accept = {
		scope:actor = {
			set_house = scope:recipient.house
			house = { save_scope_as = coa_target }
			add_character_flag = joined_parent_house
			every_child = {
						limit = {
								is_child_of = scope:actor
						}
								set_house = scope:recipient.house
			}
		}
	}

	auto_accept = yes
	ai_will_do = {
		base = 0
	}
}

create_cadet_interaction = {
	category = interaction_category_uncategorized
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		NOT = {
			scope:actor = { has_character_flag = created_cadet_house }				
		}
		scope:actor = scope:recipient
		scope:actor = { has_character_flag = joined_parent_house }			
		years_from_game_start < 1
	}

	on_accept = {
		scope:actor = {
			create_cadet_branch = yes
			add_character_flag = created_cadet_house
			house = {
				set_coa = scope:coa_target
				set_house_name_from_house = scope:coa_target
			}			
			every_child = {
						limit = {
								is_child_of = scope:actor
						}
								set_house = scope:actor.house
			}
		}
	}

	auto_accept = yes
	ai_will_do = {
		base = 0
	}
}