From e227e7f26ee1ddbb28b95f67f688750e41e34042 Mon Sep 17 00:00:00 2001 From: Pavel_Sorokin Date: Mon, 5 Dec 2022 22:35:54 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Liner/Liner/ShipCompareByColor.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Liner/Liner/ShipCompareByColor.cs b/Liner/Liner/ShipCompareByColor.cs index c97e27c..b522de5 100644 --- a/Liner/Liner/ShipCompareByColor.cs +++ b/Liner/Liner/ShipCompareByColor.cs @@ -42,6 +42,14 @@ namespace Liner { return xShipColor.CompareTo(yShipColor); } + if (xShip.GetShip.GetType().Name != yShip.GetShip.GetType().Name) + { + if (xShip.GetShip.GetType().Name == "DrawingShip") + { + return -1; + } + return 1; + } if (xShip.GetShip.Ship is EntityLiner xLiner && yShip.GetShip.Ship is EntityLiner yLiner) { string xShipDopColor = xLiner.DopColor.Name;