#####################
# Buildings
#####################

### Hypervelocity Gun

sws_building_hypervelocity_gun = {
	base_buildtime = @b3_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b2_upkeep
		}
	}

	prerequisites = {
		"tech_sws_hypervelocity_gun"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_desc = {
		trigger = {
			exists = owner
		}
		text = sws_hypervelocity_gun_effect_desc
	}
}

### Planetary Ion Cannon

# sws_building_planetary_ion_cannon = {
#	base_buildtime = @b3_time
#	base_cap_amount = 1
#	can_be_ruined = no
#	category = army
#
#	building_sets = {
#		fortress
#	}
#
#	resources = {
#		cost = {
#			minerals = @b2_minerals
#		}
#		upkeep = {
#			energy = @b2_upkeep
#		}
#	}
#
#	inline_script = {
#		script = jobs/soldiers_add
#		AMOUNT = @building_static_jobs
#	}
#
#	prerequisites = {
#		"tech_sws_planetary_ion_cannon"
#	}
# }

### Communications Outpost

sws_building_communications_outpost_01 = {
	base_buildtime = @b1_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b1_minerals
		}
		upkeep = {
			energy = @b1_upkeep
		}
	}

	upgrades = {
		sws_building_communications_outpost_02
	}

	prerequisites = {
		"tech_sws_communications_outpost_T1"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_sensor_range_add = 12
	}
}

### Communications Center

sws_building_communications_outpost_02 = {
	base_buildtime = @b1_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b2_upkeep
		}
	}

	prerequisites = {
		"tech_sws_communications_outpost_T2"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_sensor_range_add = 32
	}
}

### Planetary Turbolasers - Red

sws_building_planetary_turbolasers_red = {
	base_buildtime = @b2_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b1_upkeep
		}
	}

	prerequisites = {
		"tech_sws_planetary_turbolasers_red"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_stability_add = 40
		planet_crime_mult = -0.80
	}
}

### Planetary Turbolasers - Blue

sws_building_planetary_turbolasers_blue = {
	base_buildtime = @b2_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b1_upkeep
		}
	}

	prerequisites = {
		"tech_sws_planetary_turbolasers_blue"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_stability_add = 40
		planet_crime_mult = -0.80
	}
}

### Planetary Turbolasers - Green

sws_building_planetary_turbolasers_green = {
	base_buildtime = @b2_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b1_upkeep
		}
	}

	prerequisites = {
		"tech_sws_planetary_turbolasers_green"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_stability_add = 40
		planet_crime_mult = -0.80
	}
}

### Planetary Turbolasers - Purple

sws_building_planetary_turbolasers_purple = {
	base_buildtime = @b2_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b1_upkeep
		}
	}

	prerequisites = {
		"tech_sws_planetary_turbolasers_purple"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_stability_add = 40
		planet_crime_mult = -0.80
	}
}

### Planetary Turbolasers - Yellow

sws_building_planetary_turbolasers_yellow = {
	base_buildtime = @b2_time
	base_cap_amount = 1
	can_be_ruined = no
	category = army

	building_sets = {
		fortress
	}

	resources = {
		cost = {
			minerals = @b2_minerals
		}
		upkeep = {
			energy = @b1_upkeep
		}
	}

	prerequisites = {
		"tech_sws_planetary_turbolasers_yellow"
	}

	inline_script = {
		script = jobs/soldiers_add
		AMOUNT = @building_static_jobs
	}

	triggered_planet_modifier = {
		planet_stability_add = 40
		planet_crime_mult = -0.80
	}
}
