using System;

namespace skyscraper5.Skyscraper.Equipment
{
	public class DishType : BaseEquipment
	{
		public DishType(string name, int diameter, DishShape shape)
		{
			this.Name = name;
			this.Diameter = diameter;
			this.Shape = shape;
		}

		public DishType()
		{
		}

		public int Diameter { get; set; }

		public DishShape Shape { get; set; }

		protected bool Equals(DishType other)
		{
			return Diameter == other.Diameter && Shape == other.Shape;
		}

		public override bool Equals(object obj)
		{
			if (ReferenceEquals(null, obj)) return false;
			if (ReferenceEquals(this, obj)) return true;
			if (obj.GetType() != this.GetType()) return false;
			return Equals((DishType)obj);
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(Diameter, (int)Shape);
		}

		public override string ToString()
		{
			return this.Name;
		}
	}

	public enum DishShape : int
	{
		Offset,
		PrimeFocus,
		Mesh,
		Mobisat,
		Selfsat
	}
}
