# AI weight modifiers for the harvest automation options.
# Used by arkship_harvest_resources, arkship_strip_mine, and logistic_harvest_resources (the actions that expose the options).
# Scope: planet (this = target planet, from = acting fleet)

# Unsurveyed Targets allowed: low weight, prefer surveying first
modifier = {
	factor = @ai_action_weight_factor_0_05
	is_surveyed = {
		who = FROM.controller
		status = no
	}
	FROM = {
		has_automation_setting = unsurveyed_targets
	}
}
# Unsurveyed Targets not allowed: block
modifier = {
	factor = 0
	is_surveyed = {
		who = FROM.controller
		status = no
	}
	FROM = {
		NOT = {
			has_automation_setting = unsurveyed_targets
		}
	}
}
# Waystation Systems allowed: low weight where we own
modifier = {
	factor = @ai_action_weight_factor_0_05
	solar_system = {
		or = {
			space_owner? = { is_same_value = FROM.controller }
			any_starbase_in_system = {
				is_waystation_starbase = yes
				owner? = {
					is_same_value = FROM.controller
				}
			}
		}
	}
	FROM = {
		has_automation_setting = our_systems
	}
}
# Waystation Systems not allowed: block where we own
modifier = {
	factor = 0
	solar_system = {
		or = {
			space_owner? = { is_same_value = FROM.controller }
			any_starbase_in_system = {
				is_waystation_starbase = yes
				owner? = {
					is_same_value = FROM.controller
				}
			}
		}
	}
	FROM = {
		NOT = {
			has_automation_setting = our_systems
		}
	}
}
# Friendly Systems not allowed: block owned systems that are not hostile
modifier = {
	factor = 0
	space_owner? = {
		NOR = {
			is_hostile_to = FROM.controller
			is_same_value = FROM.controller
		}
	}
	FROM = {
		NOT = {
			has_automation_setting = friendly_systems
		}
	}
}
# Hostile Systems not allowed: block owned systems that are hostile
modifier = {
	factor = 0
	space_owner? = {
		is_hostile_to = FROM.controller
	}
	FROM = {
		NOT = {
			has_automation_setting = hostile_systems
		}
	}
}
