# possible section models:
# SHIPYARD_STARBASE_SECTION
# REFINERY_STARBASE_SECTION
# SCIENCE_STARBASE_SECTION
# HANGAR_STARBASE_SECTION
# ASSEMBLYYARD_STARBASE_SECTION
#Remember to update operation_sabotage_starbase if you add any new modules.
# You will need to update the description, espionage_sabotage_starbase_module, and remove_sabotage_starbase_flag

#MT_solar_panel_network_copy = { #used in Astronomy Solar Siphon, functions identical to vanilla solar panel network
#	icon = "GFX_solar_panel_network"
#	section = "SCIENCE_STARBASE_SECTION"
#	construction_days = 180
#	initial = yes
#														# IMPORTANT: Defunct as of 4.0.14, however has to be kept in for compatibility purposes.
#	potential = {
#		always = no
#	}
#
#	possible = {
#		solar_system = {
#			custom_tooltip = {
#				fail_text = "requires_no_black_hole_or_dyson_sphere"
#				NOR = {
#					is_star_class = sc_black_hole
#					has_megastructure = dyson_sphere_3
#					has_megastructure = dyson_sphere_4
#					has_megastructure = dyson_sphere_5
#				}
#			}
#		}
#	}
#
#	#show_in_tech = "tech_solar_panel_network"
#
#	resources = {
#		category = starbase_modules
#		cost = {
#			alloys = 50
#		}
#
#		produces = {
#			energy = 6
#		}
#
#		produces = {
#			trigger = {
#				exists = owner
#				owner = {
#					is_galactic_community_member = yes
#				}
#				OR = {
#					is_active_resolution = "resolution_galacticstudies_astral_studies_network"
#					is_active_resolution = "resolution_galacticstudies_advanced_xenostudies"
#					is_active_resolution = "resolution_galacticstudies_ethical_guideline_refactoring"
#					is_active_resolution = "resolution_galacticstudies_extradimensional_experimentation"
#				}
#			}
#			energy = 6
#		}
#	}
#
#	ai_weight = {
#		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
#	}
#}
mt_waystation_energy_beaming = {
	icon = "GFX_mt_starbase_energy_beaming"
	section = "SCIENCE_STARBASE_SECTION"
	construction_days = @waystation_build_time_180
	starbase_type = waystation
	category = sm_economy_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		exists = owner
		owner = {
			has_tradition = tr_mt_astronomy_1
		}
		is_waystation_starbase = yes
	}

	possible = {
		OR = {
			has_starbase_module = waystation_energy_module
			starbase_buildable_is_in_queue_before = {
				first = waystation_energy_module
				second = mt_waystation_energy_beaming
			}
		}
	}

	resources = {
		category = starbase_waystations_modules
		cost = {
			alloys = @waystation_cost_alloys_100
		}
		upkeep = {
			trade = @waystation_upkeep_trade_2
		}
	}

	collected_system_resources = {
		energy = {
			always = yes
		}
	}

	station_modifier = {
		#custom_tooltip = allows_energy_collection
		#show_only_custom_tooltip = no
		starbase_collected_system_energy_mult = 0.5
		starbase_stockpile_energy_capacity_add = 1000
	}

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

MT_waystation_stormseeker_module = {
	icon = "GFX_MT_Hydra_starseeker_observation_post"
	section = "SCIENCE_STARBASE_SECTION"
	construction_days = @waystation_build_time_180
	starbase_type = waystation
	category = sm_economy_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		is_waystation_starbase = yes
		owner? = {
			has_technology = "tech_hydroponics"
		}
	}

	possible = {
		owner? = {
			OR = {
				is_ai = no
				country_uses_food = yes
			}
		}
	}

	resources = {
		category = starbase_waystations_modules
		cost = {
			alloys = @waystation_cost_alloys_50
		}

		upkeep = {
			trade = @waystation_upkeep_trade_2
		}
	}

	station_modifier = {
		starbase_stockpile_physics_research_capacity_add = @waystation_stockpile_375
		starbase_stockpile_society_research_capacity_add = @waystation_stockpile_375
		starbase_stockpile_engineering_research_capacity_add = @waystation_stockpile_375
	}

	station_modifier = {
		custom_tooltip = MT_stormseeker_module_waystation_tt
		show_only_custom_tooltip = no
	}

	triggered_station_modifier = {
		starbase_collected_system_physics_research_add = 1
		mult = solar_system.value:MT_storm_observation_physics
	}
	
	triggered_station_modifier = {
		starbase_collected_system_society_research_add = 1
		mult = solar_system.value:MT_storm_observation_society
	}
	
	triggered_station_modifier = {
		starbase_collected_system_engineering_research_add = 1
		mult = solar_system.value:MT_storm_observation_engineering
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_joyous_enlightenment
			}
			has_neighboring_waystation = yes
		}
		custom_tooltip = blessings_joyous_enlightenment_tt
		show_only_custom_tooltip = no
		starbase_collected_system_physics_research_add = 1
		mult = solar_system.value:MT_storm_observation_physics
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_middle_path
			}
			is_sacred_site_waystation = no
		}
		custom_tooltip = bonus_middle_path_tt
		show_only_custom_tooltip = no
		starbase_collected_system_physics_research_add = 0.5
		mult = solar_system.value:MT_storm_observation_physics
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_middle_path
			}
			is_sacred_site_waystation = yes
		}
		custom_tooltip = bonus_sacred_site_tt
		show_only_custom_tooltip = no
		starbase_collected_system_physics_research_add = 1
		mult = solar_system.value:MT_storm_observation_physics
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_joyous_enlightenment
			}
			has_neighboring_waystation = yes
		}
		custom_tooltip = blessings_joyous_enlightenment_tt
		show_only_custom_tooltip = no
		starbase_collected_system_society_research_add = 1
		mult = solar_system.value:MT_storm_observation_society
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_middle_path
			}
			is_sacred_site_waystation = no
		}
		custom_tooltip = bonus_middle_path_tt
		show_only_custom_tooltip = no
		starbase_collected_system_society_research_add = 0.5
		mult = solar_system.value:MT_storm_observation_society
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_middle_path
			}
			is_sacred_site_waystation = yes
		}
		custom_tooltip = bonus_sacred_site_tt
		show_only_custom_tooltip = no
		starbase_collected_system_society_research_add = 1
		mult = solar_system.value:MT_storm_observation_society
	}
	
	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_joyous_enlightenment
			}
			has_neighboring_waystation = yes
		}
		custom_tooltip = blessings_joyous_enlightenment_tt
		show_only_custom_tooltip = no
		starbase_collected_system_engineering_research_add = 1
		mult = solar_system.value:MT_storm_observation_engineering
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_middle_path
			}
			is_sacred_site_waystation = no
		}
		custom_tooltip = bonus_middle_path_tt
		show_only_custom_tooltip = no
		starbase_collected_system_engineering_research_add = 0.5
		mult = solar_system.value:MT_storm_observation_engineering
	}

	triggered_station_modifier = {
		potential = {
			owner? = {
				has_country_flag = sacred_path_middle_path
			}
			is_sacred_site_waystation = yes
		}
		custom_tooltip = bonus_sacred_site_tt
		show_only_custom_tooltip = no
		starbase_collected_system_engineering_research_add = 1
		mult = solar_system.value:MT_storm_observation_engineering
	}
	
	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}