﻿### Archaeology: The First Music
special_project = {
	key = "ASP_SIGNAL_ANALYSIS_OF_MACHINE_PROJECT"
	picture = GFX_evt_ASP_lifeseeded_specialprojects
	icon = "gfx/interface/icons/situation_log/situation_log_scanning_beam.dds"
	tech_department = physics_technology
	days_to_research = 1800

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
	}

	on_success = {
		ship_event = { id = ASPmod.23 }
	}
}

### ASP_kessler_syndrome
special_project = {
	key = "ASP_KESSLER_SYNDROME_STORAGE_RESTORE_PROJECT"
	cost = 5000
	tech_department = engineering_technology
	icon = "gfx/interface/icons/situation_log/situation_log_engineering.dds"
	picture = GFX_evt_synth_sabotage

	event_scope = planet_event

	on_success = {
		# PREV is the guaranteed project owner in special_project on_success.
		prev = {
			if = {
				limit = { exists = event_target:asp_kessler_syndrome_world }
				country_event = { id = asp.12 }
			}
			else = {
				clear_global_event_target = asp_kessler_syndrome_world
				clear_global_event_target = asp_kessler_syndrome_country
			}
		}
	}
	on_cancel = {
		if = {
			limit = { exists = event_target:asp_kessler_syndrome_world }
			event_target:asp_kessler_syndrome_world = {
				remove_planet_flag = ASP_kessler_syndrome_flag_1
				remove_planet_flag = ASP_kessler_syndrome_flag_2
			}
		}
		clear_global_event_target = asp_kessler_syndrome_world
		clear_global_event_target = asp_kessler_syndrome_country
	}
}

### ASP_site_rain_world
special_project = {
	key = "ASP_AI_RE_PROGRAMMING_PROJECT"
	cost = {
		base = 8000
	}
	tech_department = engineering_technology
	icon = "gfx/interface/icons/situation_log/situation_log_ai.dds"
	picture = GFX_evt_synth_sabotage
	location = no
	
	event_scope = planet_event

	on_success = {
		prev = {
			if = {
				limit = { exists = event_target:ASP_site_rain_world_target }
				country_event = { id = asp.34 }
			}
			else = { clear_global_event_target = ASP_site_rain_world_target }
		}
	}
	on_cancel = { clear_global_event_target = ASP_site_rain_world_target }
}
special_project = {
	key = "ASP_WHITE_MOLLUSC_MAMMAL_PROJECT"
	cost = {
		base = 5000
	}
	tech_department = society_technology
	icon = "gfx/interface/icons/situation_log/situation_log_society.dds"
	picture = GFX_evt_ASP_WHITE_MOLLUSC_MAMMAL_PROJECT
	location = no
	
	event_scope = planet_event

	on_success = {
		prev = {
			if = {
				limit = { exists = event_target:ASP_site_rain_world_target }
				country_event = { id = asp.35 }
			}
			else = { clear_global_event_target = ASP_site_rain_world_target }
		}
	}
	on_cancel = { clear_global_event_target = ASP_site_rain_world_target }
}
### ASP_site_beyond_earth_purity
special_project = {
	key = "ASP_BEYOND_EARTH_PURITY_PROJECT"
	cost = 0
	days_to_research = 90
	tech_department = society_technology
	icon = "gfx/interface/icons/situation_log/situation_log_combat.dds"
	picture = GFX_evt_interior_battle

	requirements = {
		shipclass_transport = 1
	}
	
	event_scope = ship_event

	on_success = {
		if = {
			limit = { exists = event_target:ASP_site_beyond_earth_purity_planet_2 }
			ship_event = { id = asp.75 }
		}
		else = {
			clear_global_event_target = ASP_site_beyond_earth_purity_planet_2
			clear_global_event_target = ASP_site_beyond_earth_purity_1_system
		}
	}
	on_cancel = {
		if = {
			limit = { NOT = { has_country_flag = aspmod_beyond_earth_project_transfer } }
			if = {
				limit = { exists = event_target:ASP_site_beyond_earth_purity_planet_2 }
				event_target:ASP_site_beyond_earth_purity_planet_2 = { set_planet_flag = ASP_site_beyond_earth_purity_2_dig_stopped }
			}
			clear_global_event_target = ASP_site_beyond_earth_purity_planet_2
			clear_global_event_target = ASP_site_beyond_earth_purity_1_system
		}
	}
}
special_project = {
	key = "ASP_BEYOND_EARTH_PURITY_PROJECT_2"
	cost = 0
	days_to_research = 90
	tech_department = physics_technology
	icon = "gfx/interface/icons/situation_log/situation_log_scanning_beam.dds"
	picture = GFX_evt_shielded_planet

	requirements = {
		shipclass_science_ship = 1
	}
	
	event_scope = ship_event

	on_success = {
		if = {
			limit = { exists = event_target:ASP_site_beyond_earth_purity_planet_2 }
			ship_event = { id = asp.76 }
		}
		else = {
			clear_global_event_target = ASP_site_beyond_earth_purity_planet_2
			clear_global_event_target = ASP_site_beyond_earth_purity_1_system
		}
	}
	on_cancel = {
		if = {
			limit = { NOT = { has_country_flag = aspmod_beyond_earth_project_transfer } }
			if = {
				limit = { exists = event_target:ASP_site_beyond_earth_purity_planet_2 }
				event_target:ASP_site_beyond_earth_purity_planet_2 = { set_planet_flag = ASP_site_beyond_earth_purity_2_dig_stopped }
			}
			clear_global_event_target = ASP_site_beyond_earth_purity_planet_2
			clear_global_event_target = ASP_site_beyond_earth_purity_1_system
		}
	}
}
