#Synthetic Fertitily Deposits
d_abandoned_cities = {
	time = 360
	icon = d_city_ruins

	is_for_colonizable = yes
	category = deposit_cat_blockers

	potential = { always = no }

	planet_modifier = {
		planet_max_districts_add = -1
	}

	resources = {
		category = deposit_blockers
		cost = {
			energy = 750
			minerals = 250
		}
	}

	on_cleared = {
	}

	ai_weight = {
		weight = 2
	}
}

# Old Towns created during the Digitization situation.
# It assumes the existence of event_target:synthspecies@root.owner and
# the variable owner.synth_opposition in value:num_synth_opposition.
d_old_towns = {
	icon = d_city
	time = 360

	is_for_colonizable = yes
	category = deposit_cat_blockers

	potential = { always = no }

	planet_modifier = {
		planet_max_districts_add = -1
	}

	on_cleared = {
		hidden_effect = {
			root = {
				while = {
					count = value:num_synth_opposition
					create_pop_group = {
						species = event_target:synthspecies@root.owner
					}
				}
			}
		}
		custom_tooltip = d_old_towns_custom_tooltip
	}

	inline_script = deposits/ai_weight_pop_creating_blocker

	resources = {
		category = deposit_blockers
		cost = {
			energy = 1000
			mult = value:num_synth_opposition
		}
	}
}

# Biological Enclaves created during the Digitization situation.
# It assumes the existence of event_target:synthspecies@root.owner and
# the variable owner.synth_opposition in value:num_synth_opposition.
d_biological_enclaves = {
	icon = d_metal_boneyard
	time = 360

	is_for_colonizable = yes
	category = deposit_cat_blockers

	potential = { always = no }

	planet_modifier = {
		planet_max_districts_add = -1
	}

	triggered_planet_modifier = {
		planet_crime_add = 5
		planet_stability_add = -5
		mult = value:num_synth_opposition
	}

	on_cleared = {
		hidden_effect = {
			root = {
				while = {
					count = value:num_synth_opposition
					create_pop_group = {
						species = event_target:synthspecies@root.owner
					}
				}
			}
		}
		custom_tooltip = d_biological_enclaves_custom_tooltip
	}

	inline_script = deposits/ai_weight_pop_creating_blocker

	resources = {
		category = deposit_blockers
		cost = {
			alloys = 1000
			mult = value:num_synth_opposition
		}
	}
}

#genesis Preserve
d_genesis_preserve = {
	is_for_colonizable = yes
	category = deposit_cat_rare

	icon = d_quarantine_zone

	triggered_planet_modifier = {
		potential = {
			is_planet_class = pc_gaia
		}
		planet_jobs_society_research_produces_mult = 0.05
		planet_jobs_unity_produces_mult = 0.05
		mult = owner.value:presapients_guided_mult
	}

	triggered_planet_modifier = {
		potential = {
			NOT = { is_planet_class = pc_gaia }
		}
		planet_jobs_society_research_produces_mult = 0.025
		planet_jobs_unity_produces_mult = 0.025
		mult = owner.value:presapients_guided_mult
	}

	planet_modifier = {
		planet_max_districts_add = -2
	}

	potential = { always = no }

	drop_weight = {
		weight = 0
	}
}

#genesis Preserve
d_genesis_monument = {
	is_for_colonizable = yes
	category = deposit_cat_rare

	icon = d_monument

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_guided_sapience_empire = no
			}
		}
		planet_jobs_unity_produces_mult = 0.10
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_guided_sapience_empire = yes
				is_gestalt = no
			}
		}
		job_biologist_add = 200
		planet_jobs_unity_produces_mult = 0.25
	}

	triggered_planet_modifier = {
		potential = {
			exists = owner
			owner = {
				is_guided_sapience_empire = yes
				is_gestalt = yes
			}
		}
		job_calculator_biologist_add = 200
		planet_jobs_unity_produces_mult = 0.25
	}

	drop_weight = {
		weight = 0
	}
}

# MACHINE ASCENSION DEPOSITS: Nanites

d_nanites_medium = {
	icon = "d_reactor"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_nanotech }
			}
			nanites = 3.6
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_nanotech } }
			}
			nanites = 1.2
		}
	}
	drop_weight = {
        weight = 0
    }
}

d_nanites_small = {
	icon = "d_reactor"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_nanotech }
			}
			nanites = 1.8
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_nanotech } }
			}
			nanites = 0.6
		}
	}
	drop_weight = {
        weight = 0
    }
}

d_nanites_tiny = {
	icon = "d_reactor"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_nanotech }
			}
			nanites = 0.9
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_nanotech } }
			}
			nanites = 0.3
		}
	}
	drop_weight = {
        weight = 0
    }
}

# Nanite Harvester Deposits
d_nanite_harvester_deposit = {
	resources = {
		category = orbital_mining_deposits
		produces = {
			nanites = 0.1
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	drop_weight = {
		weight = 0
	}
}

d_nanite_harvester_deposit_regular = {
	resources = {
		category = orbital_mining_deposits
		produces = {
			nanites = 1.6
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	drop_weight = {
		weight = 0
	}
}

d_nanite_harvester_deposit_large = {
	resources = {
		category = orbital_mining_deposits
		produces = {
			nanites = 25.6
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	drop_weight = {
		weight = 0
	}
}

# MACHINE ASCENSION DEPOSITS: Living Metal

d_living_metal_medium = {
	icon = "d_bubbling_swamp"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_modularity }
			}
			sr_living_metal = 3.6
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_modularity } }
			}
			sr_living_metal = 1.2
		}
	}
	drop_weight = {
        weight = 0
    }
}

d_living_metal_small = {
	icon = "d_bubbling_swamp"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_modularity }
			}
			sr_living_metal = 1.8
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_modularity } }
			}
			sr_living_metal = 0.6
		}
	}
	drop_weight = {
        weight = 0
    }
}

d_living_metal_tiny = {
	icon = "d_bubbling_swamp"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_modularity }
			}
			sr_living_metal = 0.9
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_modularity } }
			}
			sr_living_metal = 0.3
		}
	}
	drop_weight = {
        weight = 0
    }
}

# MACHINE ASCENSION DEPOSITS: Energy

d_virtual_power_medium = {
	icon = "d_station_reactor"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_virtuality }
			}
			sr_dark_matter = 1.2
			energy = 60
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_virtuality } }
			}
			sr_dark_matter = 0.4
			energy = 20
		}
	}
	drop_weight = {
        weight = 0
    }
}

d_virtual_power_small = {
	icon = "d_station_reactor"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_virtuality }
			}
			sr_dark_matter = 0.6
			energy = 36
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_virtuality } }
			}
			sr_dark_matter = 0.2
			energy = 12
		}
	}
	drop_weight = {
        weight = 0
    }
}

d_virtual_power_tiny = {
	icon = "d_station_reactor"
	is_for_colonizable = yes

	category = deposit_cat_rare

	triggered_planet_modifier = {
		potential = {
			is_capital = yes
		}
	}
	resources = {
		category = hab_mining_deposits
		produces = {
			trigger = {
				exists = owner
				owner = { has_country_flag = transformation_virtuality }
			}
			sr_dark_matter = 0.3
			energy = 24
		}
		produces = {
			trigger = {
				exists = owner
				owner = { NOT = { has_country_flag = transformation_virtuality } }
			}
			sr_dark_matter = 0.1
			energy = 8
		}
	}
	drop_weight = {
        weight = 0
    }
}

# Arc Furnace Deposits

d_arc_furnace_1 = {
	icon = d_arc_furnace
	resources = {
		category = orbital_mining_deposits
		produces = {
			minerals = 1
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	potential = {
		can_have_mineral_deposits = yes
	}

	habitat_modifier = {
		district_hab_mining_max_add = 1
	}

	drop_weight = {
		weight = 0
	}
}

d_arc_furnace_2 = {
	icon = d_arc_furnace
	resources = {
		category = orbital_mining_deposits
		produces = {
			minerals = 2
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	potential = {
		can_have_mineral_deposits = yes
	}

	habitat_modifier = {
		district_hab_mining_max_add = 2
	}

	drop_weight = {
		weight = 0
	}
}

d_arc_furnace_3 = {
	icon = d_arc_furnace
	resources = {
		category = orbital_mining_deposits
		produces = {
			trigger = {
				arc_furnace_overclock_minerals = yes
			}
			minerals = @arc_furnace_3_output_minerals_minerals
		}
		produces = {
			trigger = {
				arc_furnace_overclock_balanced = yes
			}
			minerals = @arc_furnace_3_output_balanced_minerals
			alloys = @arc_furnace_3_output_balanced_alloys
		}
		produces = {
			trigger = {
				arc_furnace_overclock_alloys = yes
			}
			alloys = @arc_furnace_3_output_alloys_alloys
		}
		produces = {
			trigger = {
				arc_furnace_overclock_obsessional_directive = yes
			}
			consumer_goods = @arc_furnace_3_output_obsessional_directive_consumer_goods
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	potential = {
		can_have_mineral_deposits = yes
	}

	habitat_modifier = {
		district_hab_mining_max_add = 2
	}

	drop_weight = {
		weight = 0
	}
}

d_arc_furnace_4 = {
	icon = d_arc_furnace
	resources = {
		category = orbital_mining_deposits
		produces = {
			trigger = {
				arc_furnace_overclock_minerals = yes
			}
			minerals = @arc_furnace_4_output_minerals_minerals
		}
		produces = {
			trigger = {
				arc_furnace_overclock_balanced = yes
			}
			minerals = @arc_furnace_4_output_balanced_minerals
			alloys = @arc_furnace_4_output_balanced_alloys
		}
		produces = {
			trigger = {
				arc_furnace_overclock_alloys = yes
			}
			alloys = @arc_furnace_4_output_alloys_alloys
		}
		produces = {
			trigger = {
				arc_furnace_overclock_obsessional_directive = yes
			}
			consumer_goods = @arc_furnace_4_output_obsessional_directive_consumer_goods
		}
	}
	station = shipclass_mining_station
	is_for_colonizable = no

	potential = {
		can_have_mineral_deposits = yes
	}

	habitat_modifier = {
		district_hab_mining_max_add = 2
	}

	drop_weight = {
		weight = 0
	}
}
