コミットメタ情報

リビジョンabd3e7bbb5d935ed0314da0a7de96c12693bb536 (tree)
日時2018-08-04 18:35:05
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

帰投後の遠征欄に艦隊の遠征関連のパラメータを表示する

変更サマリ

差分

--- a/KancolleSniffer/MainForm.Designer.cs
+++ b/KancolleSniffer/MainForm.Designer.cs
@@ -165,13 +165,13 @@ namespace KancolleSniffer
165165 this.labelFuelSq4 = new System.Windows.Forms.Label();
166166 this.labelAkashiRepair = new System.Windows.Forms.Label();
167167 this.labelClearQuest = new System.Windows.Forms.Label();
168- this.panelRepairList = new RepairListForMain();
169- this.labelQuestCount1 = new ShipLabel();
170- this.labelQuestCount2 = new ShipLabel();
171- this.labelQuestCount3 = new ShipLabel();
172- this.labelQuestCount4 = new ShipLabel();
173- this.labelQuestCount5 = new ShipLabel();
174- this.labelQuestCount6 = new ShipLabel();
168+ this.panelRepairList = new KancolleSniffer.View.RepairListForMain();
169+ this.labelQuestCount1 = new KancolleSniffer.View.ShipLabel();
170+ this.labelQuestCount2 = new KancolleSniffer.View.ShipLabel();
171+ this.labelQuestCount3 = new KancolleSniffer.View.ShipLabel();
172+ this.labelQuestCount4 = new KancolleSniffer.View.ShipLabel();
173+ this.labelQuestCount5 = new KancolleSniffer.View.ShipLabel();
174+ this.labelQuestCount6 = new KancolleSniffer.View.ShipLabel();
175175 this.panelHeadquarters.SuspendLayout();
176176 this.panelShipInfo.SuspendLayout();
177177 this.panelBattleInfo.SuspendLayout();
@@ -720,34 +720,34 @@ namespace KancolleSniffer
720720 //
721721 // labelMissionName3
722722 //
723- this.labelMissionName3.Location = new System.Drawing.Point(57, 33);
723+ this.labelMissionName3.Location = new System.Drawing.Point(32, 33);
724724 this.labelMissionName3.Name = "labelMissionName3";
725- this.labelMissionName3.Size = new System.Drawing.Size(113, 12);
725+ this.labelMissionName3.Size = new System.Drawing.Size(139, 12);
726726 this.labelMissionName3.TabIndex = 5;
727727 this.labelMissionName3.Click += new System.EventHandler(this.labelMission_Click);
728728 //
729729 // labelMissionName2
730730 //
731- this.labelMissionName2.Location = new System.Drawing.Point(57, 18);
731+ this.labelMissionName2.Location = new System.Drawing.Point(32, 18);
732732 this.labelMissionName2.Name = "labelMissionName2";
733- this.labelMissionName2.Size = new System.Drawing.Size(113, 12);
733+ this.labelMissionName2.Size = new System.Drawing.Size(139, 12);
734734 this.labelMissionName2.TabIndex = 4;
735735 this.labelMissionName2.Click += new System.EventHandler(this.labelMission_Click);
736736 //
737737 // labelMissionName1
738738 //
739- this.labelMissionName1.Location = new System.Drawing.Point(57, 3);
739+ this.labelMissionName1.Location = new System.Drawing.Point(32, 3);
740740 this.labelMissionName1.Name = "labelMissionName1";
741- this.labelMissionName1.Size = new System.Drawing.Size(113, 12);
741+ this.labelMissionName1.Size = new System.Drawing.Size(139, 12);
742742 this.labelMissionName1.TabIndex = 3;
743743 this.labelMissionName1.Click += new System.EventHandler(this.labelMission_Click);
744744 //
745745 // labelMission3
746746 //
747747 this.labelMission3.Cursor = System.Windows.Forms.Cursors.Hand;
748- this.labelMission3.Location = new System.Drawing.Point(171, 32);
748+ this.labelMission3.Location = new System.Drawing.Point(171, 33);
749749 this.labelMission3.Name = "labelMission3";
750- this.labelMission3.Size = new System.Drawing.Size(47, 15);
750+ this.labelMission3.Size = new System.Drawing.Size(47, 12);
751751 this.labelMission3.TabIndex = 8;
752752 this.labelMission3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
753753 this.labelMission3.Click += new System.EventHandler(this.labelMission_Click);
@@ -755,9 +755,9 @@ namespace KancolleSniffer
755755 // labelMission2
756756 //
757757 this.labelMission2.Cursor = System.Windows.Forms.Cursors.Hand;
758- this.labelMission2.Location = new System.Drawing.Point(171, 17);
758+ this.labelMission2.Location = new System.Drawing.Point(171, 18);
759759 this.labelMission2.Name = "labelMission2";
760- this.labelMission2.Size = new System.Drawing.Size(47, 15);
760+ this.labelMission2.Size = new System.Drawing.Size(47, 12);
761761 this.labelMission2.TabIndex = 7;
762762 this.labelMission2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
763763 this.labelMission2.Click += new System.EventHandler(this.labelMission_Click);
@@ -765,9 +765,9 @@ namespace KancolleSniffer
765765 // labelMission1
766766 //
767767 this.labelMission1.Cursor = System.Windows.Forms.Cursors.Hand;
768- this.labelMission1.Location = new System.Drawing.Point(171, 2);
768+ this.labelMission1.Location = new System.Drawing.Point(171, 3);
769769 this.labelMission1.Name = "labelMission1";
770- this.labelMission1.Size = new System.Drawing.Size(47, 15);
770+ this.labelMission1.Size = new System.Drawing.Size(47, 12);
771771 this.labelMission1.TabIndex = 6;
772772 this.labelMission1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
773773 this.labelMission1.Click += new System.EventHandler(this.labelMission_Click);
@@ -777,9 +777,9 @@ namespace KancolleSniffer
777777 this.label15.AutoSize = true;
778778 this.label15.Location = new System.Drawing.Point(2, 33);
779779 this.label15.Name = "label15";
780- this.label15.Size = new System.Drawing.Size(53, 12);
780+ this.label15.Size = new System.Drawing.Size(29, 12);
781781 this.label15.TabIndex = 2;
782- this.label15.Text = "第四艦隊";
782+ this.label15.Text = "第四";
783783 this.label15.Click += new System.EventHandler(this.labelMission_Click);
784784 //
785785 // label14
@@ -787,9 +787,9 @@ namespace KancolleSniffer
787787 this.label14.AutoSize = true;
788788 this.label14.Location = new System.Drawing.Point(2, 18);
789789 this.label14.Name = "label14";
790- this.label14.Size = new System.Drawing.Size(53, 12);
790+ this.label14.Size = new System.Drawing.Size(29, 12);
791791 this.label14.TabIndex = 1;
792- this.label14.Text = "第三艦隊";
792+ this.label14.Text = "第三";
793793 this.label14.Click += new System.EventHandler(this.labelMission_Click);
794794 //
795795 // label13
@@ -797,9 +797,9 @@ namespace KancolleSniffer
797797 this.label13.AutoSize = true;
798798 this.label13.Location = new System.Drawing.Point(2, 3);
799799 this.label13.Name = "label13";
800- this.label13.Size = new System.Drawing.Size(53, 12);
800+ this.label13.Size = new System.Drawing.Size(29, 12);
801801 this.label13.TabIndex = 0;
802- this.label13.Text = "第二艦隊";
802+ this.label13.Text = "第二";
803803 this.label13.Click += new System.EventHandler(this.labelMission_Click);
804804 //
805805 // timerMain
--- a/KancolleSniffer/MainForm.cs
+++ b/KancolleSniffer/MainForm.cs
@@ -613,6 +613,7 @@ namespace KancolleSniffer
613613 NotifyDamagedShip();
614614 UpdateChargeInfo();
615615 UpdateRepairList();
616+ UpdateMissionLabels();
616617 if (_listForm.Visible)
617618 _listForm.UpdateList();
618619 }
@@ -785,10 +786,31 @@ namespace KancolleSniffer
785786
786787 private void UpdateMissionLabels()
787788 {
788- foreach (var entry in
789- new[] {labelMissionName1, labelMissionName2, labelMissionName3}.Zip(_sniffer.Missions,
790- (label, mission) => new {label, mission.Name}))
791- entry.label.Text = entry.Name;
789+ var labels = new[] {labelMissionName1, labelMissionName2, labelMissionName3};
790+ var names = _sniffer.Missions.Select(mission => mission.Name).ToArray();
791+ for (var i = 0; i < ShipInfo.FleetCount - 1; i++)
792+ {
793+ labels[i].Text = string.IsNullOrEmpty(names[i])
794+ ? GenerateFleetSpecForMission(i + 1)
795+ : names[i];
796+ }
797+ }
798+
799+ private string GenerateFleetSpecForMission(int fleetNumber)
800+ {
801+ var result = new List<string>();
802+ var fleet = _sniffer.Fleets[fleetNumber];
803+ var kira = fleet.Ships.Count(ship => ship.Cond > 49);
804+ var plus = fleet.Ships[0].Cond > 49;
805+ if (kira > 0)
806+ result.Add($"キラ{kira}{(plus ? "+" : "")}");
807+ var drums = fleet.Ships.SelectMany(ship => ship.Slot).Count(item => item.Spec.IsDrum);
808+ var drumShips = fleet.Ships.Count(ship => ship.Slot.Any(item => item.Spec.IsDrum));
809+ if (drums > 0)
810+ result.Add($"ド{drums}({drumShips}隻)");
811+ if (fleet.DaihatsuBonus > 0)
812+ result.Add($"ダ{fleet.DaihatsuBonus * 100:f1}%");
813+ return string.Join(" ", result);
792814 }
793815
794816 private void labelMission_Click(object sender, EventArgs e)
--- a/KancolleSniffer/Model/ItemSpec.cs
+++ b/KancolleSniffer/Model/ItemSpec.cs
@@ -141,6 +141,8 @@ namespace KancolleSniffer.Model
141141
142142 public bool IsAntiAirGun => Type == 21;
143143
144+ public bool IsDrum => Id == 75;
145+
144146 public double ContactTriggerRate
145147 {
146148 get
--- a/KancolleSniffer/View/FleetPanel.cs
+++ b/KancolleSniffer/View/FleetPanel.cs
@@ -74,7 +74,7 @@ namespace KancolleSniffer.View
7474
7575 public void Add(ShipStatus s)
7676 {
77- var drum = s.Slot.Count(item => item.Spec.Name == "ドラム缶(輸送用)");
77+ var drum = s.Slot.Count(item => item.Spec.IsDrum);
7878 DrumShips += drum != 0 ? 1 : 0;
7979 Drum += drum;
8080 Level += s.Level;
旧リポジトリブラウザで表示