#######################################
###     Motherly Hive Buildings     ###
#######################################

############################

building_WL_lv_hive_mating_sanctuary = {		
	base_buildtime = @b2_time
	planet_limit = 1
	category = government

	building_sets = {
		government
		urban
		lv_sex_set
	}
	
	potential = {
		exists = owner
		owner = {
			is_hive_empire = yes
			OR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	destroy_trigger = {
		exists = owner
		owner = {
			NOR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	resources = {
    category = planet_buildings
    cost = {
			minerals = @b2_minerals
			food = 300
		}
    upkeep = {
			energy = 4
			food = 4
		}
	}

	upgrades = {
		building_WL_lv_hive_mating_sanctuary_upgraded
	}
	
	planet_modifier = {
		planet_housing_add = 200
		job_WL_lv_hive_sanctuary_mature_queen_add = 50
		job_WL_lv_hive_sanctuary_young_queen_add = 200
		pop_happiness = 0.1
	}
	
	ai_weight_coefficient = 1

	ai_resource_production = {
		energy = 1
		trigger = {
			always = yes
		}
	}
}


building_WL_lv_hive_mating_sanctuary_upgraded = {		
	base_buildtime = @b3_time
	planet_limit = 1
	category = government

	can_build = no

	building_sets = {
		government
		urban
		lv_sex_set
	}
	
	potential = {
		always = no
		exists = owner
		owner = {
			OR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	destroy_trigger = {
		exists = owner
		OR = {
			owner = {
				NOR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
				}
			}
		}
	}
	
	resources = {
    category = planet_buildings
    cost = {
			minerals = @b3_minerals
			food = 650
		}
    upkeep = {
			energy = 4
			food = 5
			exotic_gases = 2
		}
	}

	
	planet_modifier = {
		planet_housing_add = 500
		job_WL_lv_hive_sanctuary_mature_queen_add = 150
		job_WL_lv_hive_sanctuary_young_queen_add = 500
		pop_happiness = 0.1
	}
	
	ai_weight_coefficient = 1

	ai_resource_production = {
		energy = 1
		trigger = {
			always = yes
		}
	}
}

############################

building_WL_lv_hive_caretaker_complex = {		
	base_buildtime = @b1_time
	category = government

	building_sets = {
		government
		urban
	}
	
	potential = {
		exists = owner
		owner = {
			OR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	destroy_trigger = {
		exists = owner
		owner = {
			NOR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	resources = {
    category = planet_buildings
    cost = {
			minerals = @b1_minerals
		}
    upkeep = {
			energy = 2
			food = 1
		}
	}

	planet_modifier = {
		planet_housing_add = 500
		planet_amenities_add = 500
		job_WL_lv_hive_xeno_special_pop_add = 250
	}
	
	ai_weight_coefficient = 1

	ai_resource_production = {
		energy = 1
		trigger = {
			always = yes
		}
	}
}

building_WL_lv_hive_breeders_complex = {		
	base_buildtime = @b2_time
	category = government
	
	building_sets = {
		government
		urban
		lv_sex_set
	}

	potential = {
		exists = owner
		owner = {
			OR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	destroy_trigger = {
		exists = owner
		owner = {
			NOR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	resources = {
    category = planet_buildings
    cost = {
			minerals = @b2_minerals
		}
    upkeep = {
			energy = 2
			food = 1
		}
	}

	planet_modifier = {
		job_WL_lv_hive_sanctuary_breeder_add = 500
	}
	
	ai_weight_coefficient = 1

	ai_resource_production = {
		energy = 1
		trigger = {
			always = yes
		}
	}
}

#########################
###     Happiness     ###
#########################

building_WL_lv_hive_leisure_mega_complex = {		
	base_buildtime = @b3_time
	planet_limit = 1
	category = government
	
	building_sets = {
		government
		urban
	}

	potential = {
		exists = owner
		owner = {
			OR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	destroy_trigger = {
		exists = owner
		owner = {
			NOR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	resources = {
    category = planet_buildings
    cost = {
			minerals = @b3_minerals
		}
    upkeep = {
			energy = 4
		}
	}
	
	planet_modifier = {
		pop_happiness = 0.2
		planet_crime_add = -10
	}

	ai_weight_coefficient = 1
	
	ai_resource_production = {
		energy = 1
		trigger = {
			always = yes
		}
	}
}

building_WL_lv_hive_leisure_complex = {		
	base_buildtime = @b2_time
	category = government
	
	building_sets = {
		government
		urban
	}

	potential = {
		exists = owner
		owner = {
			OR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
			}
		}
	}
	
	destroy_trigger = {
		exists = owner
		OR = {
			owner = {
				NOR = {
				has_civic = civic_WL_lv_motherly_hive	
				has_origin = origin_WL_lv_motherly_hive		
				}
			}
		}
	}
	
	resources = {
    category = planet_buildings
    cost = {
			minerals = @b2_minerals
		}
    upkeep = {
			energy = 2
		}
	}
	
	planet_modifier = {
		pop_happiness = 0.05
		planet_crime_add = -5
	}
	
	ai_weight_coefficient = 1
	
	ai_resource_production = {
		energy = 1
		trigger = {
			always = yes
		}
	}
}