fix objective comparison so same objectives are not added twice
This commit is contained in:
		
							parent
							
								
									2125844acb
								
							
						
					
					
						commit
						0346b8e7e7
					
				| @ -1,9 +1,10 @@ | ||||
| using System.Collections.Generic; | ||||
| using System; | ||||
| using System.Text; | ||||
| using Newtonsoft.Json; | ||||
| 
 | ||||
| namespace NonaBGS.BGS { | ||||
|     public class Objective { | ||||
|     public class Objective : IComparable<Objective> { | ||||
|         private string system; | ||||
|         private string station; | ||||
|         private string faction; | ||||
|  | ||||
| @ -21,7 +21,7 @@ namespace NonaBGS.BGS { | ||||
|         } | ||||
| 
 | ||||
|         public bool AddObjective(Objective objective) { | ||||
|             var found = objectives.Find(x => x == objective); | ||||
|             var found = objectives.Find(x => x.CompareTo(objective) == 0); | ||||
|             bool added = false; | ||||
| 
 | ||||
|             if (found == null) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user