# Available requirements:
#
#	SKILLS
#	skill = 2
#
#	LEADER
#	leader = scientist
#	leader = admiral
#	leader = general
#	leader = ruler
#	leader = governor
#	
#	MILITARY SHIPS
#	shipclass_military = 1
#	
#	CIVILIAN SHIPS
#	shipclass_constructor = 2
#	shipclass_science_ship = 1
#	shipclass_colonizer = 2
#	
#	ARMIES
#	shipclass_transport = 1
#	assault_armies = 2
#	defense_armies = 1
#	
#	STATIONS
#	research_station = yes
#	mining_station = yes
#	observation_station = yes
#
#	SCOPES
#	abort_trigger
#	this = country (project owner)
#	from = event scope (planet or ship, MIGHT NOT EXIST)
#	fromfrom = project creation scope (usually equals location)
#	
#	on_success
#	this = event scope (ship or planet)
#	from = project creation scope (usually equals location)
#	
#	on_fail
#	this = country (project owner)
#	from = project creation scope (usually equals location)


special_project = {
	key = "HYPERLANE_STORM_PROJECT_1"
	cost = 200
	tech_department = physics_technology
	icon = "gfx/interface/icons/situation_log/situation_log_physics.dds"
	picture = GFX_evt_hyperlane_storm
	timelimit = 60
	
	event_scope = planet_event
	
	on_success = {
		if = {
		limit = { exists = event_target:project_country }
			event_target:project_country = {
				set_country_flag = solar_storm_intro
				country_event = { id = solarstorm_event.16 }
			}
		}
	}
	
	on_fail = {
	}
}

special_project = {
	key = "HYPERLANE_STORM_PROJECT_2"
	cost = 200
	tech_department = physics_technology
	icon = "gfx/interface/icons/situation_log/situation_log_physics.dds"
	picture = GFX_evt_hyperlane_storm
	timelimit = 60
	
	event_scope = planet_event
	
	on_success = {
		if = {
		limit = { exists = event_target:project_country }
			event_target:project_country = { 
				set_country_flag = solar_storm_intro
				country_event = { id = solarstorm_event.18 }
			}
		}
	}
	
	on_fail = {
	}
}

special_project = {
	key = "HYPERLANE_STORM_PROJECT_3"
	cost = 200
	tech_department = physics_technology
	icon = "gfx/interface/icons/situation_log/situation_log_physics.dds"
	picture = GFX_evt_hyperlane_storm
	timelimit = 60
	
	event_scope = planet_event
	
	on_success = {
		if = {
		limit = { exists = event_target:project_country }
			event_target:project_country = { 
				set_country_flag = solar_storm_intro
				country_event = { id = solarstorm_event.20 }
			}
		}
	}
	
	on_fail = {
	}
}

special_project = {
	key = "RESCUE_PROJECT"
	days_to_research = 10
	tech_department = engineering_technology
	timelimit = 1080
	picture = GFX_evt_unknown_ships
	icon = "gfx/interface/icons/situation_log/situation_log_debris.dds"

	event_scope = ship_event

	requirements = {
		shipclass_constructor = 1
	}

	on_success = {
		owner = {
			country_event = { id = solarstorm_fleet_event.100 }
		}
	}

	on_fail = {
		event_target:fleet_wreckage = {
			destroy_ambient_object = this
		}
		clear_global_event_target = wreckage_country
		clear_global_event_target = fleet_wreckage
	}

	on_start = {
	}

	abort_trigger = {
	
	}
}

special_project = {
	key = EXPLORE_WRECKAGE_PROJECT
	days_to_research = 30
	tech_department = engineering_technology
	timelimit = 1080
	picture = GFX_evt_unknown_ships
	icon = "gfx/interface/icons/situation_log/situation_log_debris.dds"
	
	event_scope = ship_event
	
	requirements = {
		shipclass_science_ship = 1
		leader = scientist
	}
	
	on_success = {
		owner = {
			if = {
				limit = { has_communications = event_target:wreckage_country }
				country_event = { id = solarstorm_fleet_event.101 }
			}
			else = {
				country_event = { id = solarstorm_fleet_event.102 }
			}
		}
	}
	
	on_fail = {
		event_target:fleet_wreckage = {
			destroy_ambient_object = this
		}
		clear_global_event_target = wreckage_country
		clear_global_event_target = fleet_wreckage
	}
}