<commit_before>package Components {
	import flash.geom.Point;
	import flash.utils.ByteArray;
	import Layouts.PortLayout;
	import Modules.Module;
	/**
	 * ...
	 * @author Nicholas "PleasingFungus" Feinberg
	 */
	public class Link {
		
		public var source:Port;
		public var destination:Port;
		public var deleted:Boolean = false; //only necessary to cleanup 'hovering' links that never get attached
		public var placed:Boolean = false;
		public var hovering:Boolean = false;
		public var FIXED:Boolean = false;
		public function Link(Source:Port, Destination:Port, Hovering:Boolean = false) {
			source = Source;
			destination = Destination;
			hovering = Hovering;
		}
		
		public function get exists():Boolean {
			return !deleted && (hovering || (source.physParent.exists && destination.physParent.exists &&
											 destination.source == source));
		}
		
		public function get deployed():Boolean {
			return !hovering && placed && source.physParent.deployed && destination.physParent.deployed;
		}
		
		public function get mouseable():Boolean {
			return exists && deployed && !source.Loc.equals(destination.Loc);
		}
		
		public function get saveIncluded():Boolean {
			return exists && !FIXED;
		}
		
		public function equals(link:Link):Boolean {
			return ((source == link.source && destination == link.destination) ||
					(destination == link.source && source == link.destination)) &&
					exists == link.exists;
		}
		
		public function inVec(links:Vector.<Link>):Boolean {
			for each (var link:Link in links)
				if (equals(link))
					return true;
			return false;
		}
		<commit_msg>Fixed links not appearing on placement<commit_after>package Components {
	import flash.geom.Point;
	import flash.utils.ByteArray;
	import Layouts.PortLayout;
	import Modules.Module;
	/**
	 * ...
	 * @author Nicholas "PleasingFungus" Feinberg
	 */
	public class Link {
		
		public var source:Port;
		public var destination:Port;
		public var deleted:Boolean = false; //only necessary to cleanup 'hovering' links that never get attached
		public var placed:Boolean = false;
		public var hovering:Boolean = false;
		public var FIXED:Boolean = false;
		public function Link(Source:Port, Destination:Port, Hovering:Boolean = false) {
			source = Source;
			destination = Destination;
			hovering = Hovering;
		}
		
		public function get exists():Boolean {
			if (hovering)
				return !deleted;
			return (source.physParent.exists && destination.physParent.exists &&
					destination.source == source);
		}
		
		public function get deployed():Boolean {
			return !hovering && placed && source.physParent.deployed && destination.physParent.deployed;
		}
		
		public function get mouseable():Boolean {
			return exists && deployed && !source.Loc.equals(destination.Loc);
		}
		
		public function get saveIncluded():Boolean {
			return exists && !FIXED;
		}
		
		public function equals(link:Link):Boolean {
			return ((source == link.source && destination == link.destination) ||
					(destination == link.source && source == link.destination)) &&
					exists == link.exists;
		}
		
		public function inVec(links:Vector.<Link>):Boolean {
			for each (var link:Link in links)
				if (equals(link))
					return true;
			return false;
		}
		
{'fraction_non_alphanumeric': 0.11431226765799256, 'fraction_numerical': 0.0, 'mean_word_length': 3.693313953488372, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4403152', 'n_tokens_mistral': 1077, 'n_tokens_neox': 894, 'n_words': 257}