namespace = MT_movement

fleet_event = {
	# on_crossing_border
	# Scope = Fleet
	# From = Origin System
	# FromFrom = Destination System
	id = MT_movement.1
	hide_window = yes
	is_triggered_only = yes

	trigger = {
		fromfrom = {
			exists = space_owner
			space_owner = {
				is_country_type = default
				has_active_tradition = tr_mt_movement_constant_tracking
			}
		}
		from = {
			OR = {
				NOT = { exists = space_owner }
				AND = {
					exists = space_owner
					space_owner = { NOT = { is_same_value = root.fromfrom.space_owner } }
					# technically redundant
				}
			}
		}
	}

	immediate = {
		# Return message
		if = {
			limit = {
				fromfrom.space_owner = {
					has_communications = root.owner
				}
			}
			root.owner = {
				save_event_target_as = mt_offending_country
			}
			fromfrom.space_owner = {
				add_intel = { amount = 10 who = event_target:mt_offending_country }
			}
		}
	}
}