// Copyright (C) 2014, 2015 Kazuhiro Fujieda <fujieda@users.osdn.me>\r
// \r
-// This program is part of KancolleSniffer.\r
+// Licensed under the Apache License, Version 2.0 (the "License");\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
//\r
-// KancolleSniffer is free software: you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation, either version 3 of the License, or\r
-// (at your option) any later version.\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
//\r
-// This program is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU General Public License\r
-// along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
\r
using System.Collections.Generic;\r
\r
var shipSpec = _shipSpecs[(int)entry.api_id] = new ShipSpec\r
{\r
Id = (int)entry.api_id,\r
+ SortNo = entry.api_sortno() ? (int)entry.api_sortno : 0,\r
Name = ShipName(entry),\r
FuelMax = entry.api_fuel_max() ? (int)entry.api_fuel_max : 0,\r
BullMax = entry.api_bull_max() ? (int)entry.api_bull_max : 0,\r
ShipType = (int)entry.api_stype,\r
ShipTypeName = dict[entry.api_stype]\r
};\r
- shipSpec.ShortName = ShortName(shipSpec.Name);\r
int[] maxEq;\r
shipSpec.MaxEq = entry.api_maxeq()\r
? entry.api_maxeq\r
return name + "(" + flagship + ")";\r
}\r
\r
- private readonly Dictionary<string, string> _shortNameDict = new Dictionary<string, string>\r
- {\r
- {"千代田航改", "千代田航"},\r
- {"千代田航改二", "千代田航"},\r
- {"千歳航改二", "千歳航改"},\r
- {"五十鈴改二", "五十鈴改"},\r
- {"あきつ丸改", "あきつ丸"},\r
- {"Bismarck改", "Bismarck"},\r
- {"Bismarck twei", "Bismarck"},\r
- {"Bismarck drei", "Bismarck"},\r
- {"Prinz Eugen", "Prinz Eug"},\r
- {"Prinz Eugen改", "Prinz Eug"},\r
- {"Graf Zeppelin", "Graf Zep"},\r
- {"Libeccio改", "Libeccio"},\r
- {"阿武隈改二", "阿武隈改"},\r
- {"瑞鶴改二甲", "瑞鶴改二"},\r
- {"翔鶴改二甲", "瑞鶴改二"},\r
- };\r
-\r
- private string ShortName(string name)\r
- {\r
- string r;\r
- return _shortNameDict.TryGetValue(name, out r) ? r : name;\r
- }\r
-\r
public ShipSpec this[int id] => _shipSpecs[id];\r
}\r
\r
public class ShipSpec\r
{\r
public int Id { get; set; }\r
+ public int SortNo { get; set; }\r
public string Name { get; set; }\r
- public string ShortName { get; set; }\r
public int FuelMax { get; set; }\r
public int BullMax { get; set; }\r
public int[] MaxEq { get; set; }\r
}\r
}\r
\r
+ public double TransportPoint\r
+ {\r
+ get\r
+ {\r
+ switch (ShipType)\r
+ {\r
+ case 2:\r
+ return 5.0;\r
+ case 3:\r
+ return 2.0;\r
+ case 6:\r
+ return 4.0;\r
+ case 10:\r
+ return 7.0;\r
+ case 15:\r
+ return 15.0;\r
+ case 16:\r
+ return 9.0;\r
+ case 17:\r
+ return 12.0;\r
+ case 20:\r
+ return 7.0;\r
+ case 21:\r
+ return 6.0;\r
+ default:\r
+ return 0;\r
+ }\r
+ }\r
+ }\r
+\r
public bool IsSubmarine => ShipType == 13 || ShipType == 14;\r
\r
public bool IsAircraftCarrier => ShipType == 7 || ShipType == 11 || ShipType == 18;\r