############################
#
# Game Start Events
#
# Written by Annatar
#
############################

namespace = realterraforming

### Sets global flag “has_real_terraforming_mod”
event = {
	id = realterraforming.1
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		set_global_flag = "has_real_terraforming_mod"
	}
}

### Reducing food deposits
event = {
	id = realterraforming.2
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		every_galaxy_planet = {
			limit = { 
				has_owner = no
				OR = {
					is_planet_class = pc_desert
					is_planet_class = pc_tundra
				}
				count_deposits = { category = deposit_cat_food count > 3 }
			}
			random_deposit = {
				limit = { has_deposit_category = deposit_cat_food }
				remove_deposit = yes
			}
			random_deposit = {
				limit = { has_deposit_category = deposit_cat_food }
				remove_deposit = yes
			}
			random_deposit = {
				limit = { has_deposit_category = deposit_cat_food }
				remove_deposit = yes
			}
		}
		every_galaxy_planet = {
			limit = { 
				has_owner = no
				OR = {
					is_planet_class = pc_arid
					is_planet_class = pc_arctic
				}
				count_deposits = { category = deposit_cat_food count > 2 }
			}
			random_deposit = {
				limit = { has_deposit_category = deposit_cat_food }
				remove_deposit = yes
			}
			random_deposit = {
				limit = { has_deposit_category = deposit_cat_food }
				remove_deposit = yes
			}
		}
		every_galaxy_planet = {
			limit = { 
				has_owner = no
				OR = {
					is_planet_class = pc_savannah
					is_planet_class = pc_alpine
				}
				count_deposits = { category = deposit_cat_food count > 1 }
			}
			random_deposit = {
				limit = { has_deposit_category = deposit_cat_food }
				remove_deposit = yes
			}
		}
	}
}