From 2f22277e2ae725db651ad0b1f8638bb5749c04a9 Mon Sep 17 00:00:00 2001 From: Andante Date: Mon, 26 Jun 2017 23:06:28 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=E8=89=A6=E9=9A=8A=EF=BC=9A=E7=8A=B6?= =?UTF-8?q?=E6=85=8B=E8=A1=A8=E7=A4=BA=E3=81=AE=E5=84=AA=E5=85=88=E5=BA=A6?= =?UTF-8?q?=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronicObserver/Data/FleetData.cs | 3 + .../Other/Information/kcmemo.md | 110 ++++++++-------- ElectronicObserver/Window/FormFleet.cs | 119 +++++++----------- 3 files changed, 106 insertions(+), 126 deletions(-) diff --git a/ElectronicObserver/Data/FleetData.cs b/ElectronicObserver/Data/FleetData.cs index f85dc4d4f..8c9720824 100644 --- a/ElectronicObserver/Data/FleetData.cs +++ b/ElectronicObserver/Data/FleetData.cs @@ -442,6 +442,9 @@ public bool CanAnchorageRepair { } + /// + /// 疲労が回復すると予測される日時 (疲労していない場合は null) + /// public DateTime? ConditionTime { get; private set; } public void UpdateConditionTime() { diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index 99547c09f..ca2c714be 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -998,61 +998,61 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |任務ID|種別|任務名|達成条件|備考| |--:|-:-|:--|:--|:--| -|201|日|敵艦隊を撃破せよ!|勝利1 -|216|日|敵艦隊主力を撃滅せよ!|戦闘1 ※ボス戦闘での敗北はカウントに含まない -|210|日|敵艦隊を10回邀撃せよ!|戦闘10 -|211|変|敵空母を3隻撃沈せよ!|空母3|日付の1の位が 3,7,0 の場合出現, デイリー扱い -|212|変|敵輸送船団を叩け!|輸送5|日付の1の位が 2,8 の場合出現, デイリー扱い -|218|日|敵補給艦を3隻撃沈せよ!|輸送3 -|226|日|南西諸島海域の制海権を握れ!|2-(1~5)ボス勝利5 -|230|日|敵潜水艦を制圧せよ!|潜水6 -|213|週|海上通商破壊作戦|輸送20 -|214|週|あ号作戦|出撃36/S勝利6/ボス24/ボス勝利12 -|220|週|い号作戦|空母20 -|221|週|ろ号作戦|輸送50 -|228|週|海上護衛戦|潜水15 -|229|週|敵東方艦隊を撃滅せよ!|4-(1~5)ボス勝利12 -|242|週|敵東方中枢艦隊を撃破せよ!|4-4ボス勝利1 -|243|週|南方海域珊瑚諸島沖の制空権を握れ!|5-2ボスS勝利2 -|261|週|海上輸送路の安全確保に努めよ!|1-5ボスA勝利3 -|241|週|敵北方艦隊主力を撃滅せよ!|3-(3~5)ボス勝利5 -|256|月|「潜水艦隊」出撃せよ!|6-1ボスS勝利3 -|257|月|「水雷戦隊」南西へ!|1-4ボスS勝利1|要軽巡旗艦、軽巡3隻まで、他駆逐艦 他艦種禁止 -|249|月|「第五戦隊」出撃せよ!|2-5ボスS勝利1|要「那智」「妙高」「羽黒」 -|259|月|「水上打撃部隊」南方へ!|5-1ボスS勝利1|要(大和型or長門型or伊勢型or扶桑型)3/軽巡1 巡戦禁止、戦艦追加禁止 -|265|月|海上護衛強化月間|1-5ボスA勝利10 -|264|月|「空母機動部隊」西へ!|4-2ボスS勝利1|要(空母or軽母or装母)2/駆逐2 -|266|月|「水上反撃部隊」突入せよ!|2-5ボスS勝利1|要駆逐旗艦、重巡1軽巡1駆逐4 -|822|季|沖ノ島海域迎撃戦|2-4ボスS勝利2 -|854|季|戦果拡張任務!「Z作戦」前段作戦|2-4・6-1・6-3ボスA勝利各1/6-4ボスS勝利1 -|303|日|「演習」で練度向上!|演習3 -|304|日|「演習」で他提督を圧倒せよ!|演習勝利5 -|302|週|大規模演習|演習勝利20 -|311|月|精鋭艦隊演習|演習勝利7|デイリー扱い -|402|日|「遠征」を3回成功させよう!|遠征成功3 -|403|日|「遠征」を10回成功させよう!|遠征成功10 -|404|週|大規模遠征作戦、発令!|遠征成功30 -|410|週|南方への輸送作戦を成功させよ!|「東京急行」「東京急行(弐)」成功1 -|411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6 -|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4 -|503|日|艦隊大整備!|入渠5 -|504|日|艦隊酒保祭り!|補給15回 -|605|日|新装備「開発」指令|開発1(失敗可) -|606|日|新造艦「建造」指令|建造1 -|607|日|装備「開発」集中強化!|開発3(失敗可) -|608|日|艦娘「建造」艦隊強化!|建造3 -|609|日|軍縮条約対応!|解体2 -|619|日|装備の改修強化|装備改修1(失敗可) -|613|週|資源の再利用|廃棄24回 -|638|週|対空機銃量産|機銃廃棄6個|回ではない -|626|月|精鋭「艦戦」隊の新編成|熟練搭乗員+零式艦戦21型》装備の鳳翔旗艦+零式艦戦21型x2・九六式艦戦x1廃棄 -|628|月|機種転換|零式艦戦21型(熟練)》装備の空母旗艦+零式艦戦52型x2廃棄 -|645|月|「洋上補給」物資の調達|三式弾廃棄+(燃料750+弾薬750+ドラム缶(輸送用)x2+九一式徹甲弾)保有 -|637|季|「熟練搭乗員」養成|九六式艦戦》★10装備の鳳翔旗艦+勲章2 -|643|季|主力「陸攻」の調達|零式艦戦21型x2廃棄+(九六式陸攻x1+九七式艦攻x2)保有 -|633|季|新型艤装の継続研究|大口径主砲x10廃棄+鋼材18000保有 -|702|日|艦の「近代化改修」を実施せよ!|近代化改修成功2 -|703|週|「近代化改修」を進め、戦備を整えよ!|近代化改修成功15 +|201|日|敵艦隊を撃破せよ!|勝利1|| +|216|日|敵艦隊主力を撃滅せよ!|戦闘1 ※ボス戦闘での敗北はカウントに含まない|| +|210|日|敵艦隊を10回邀撃せよ!|戦闘10|| +|211|変|敵空母を3隻撃沈せよ!|空母3|日付の1の位が 3,7,0 の場合出現, デイリー扱い| +|212|変|敵輸送船団を叩け!|輸送5|日付の1の位が 2,8 の場合出現, デイリー扱い| +|218|日|敵補給艦を3隻撃沈せよ!|輸送3|| +|226|日|南西諸島海域の制海権を握れ!|2-(1~5)ボス勝利5|| +|230|日|敵潜水艦を制圧せよ!|潜水6|| +|213|週|海上通商破壊作戦|輸送20|| +|214|週|あ号作戦|出撃36/S勝利6/ボス24/ボス勝利12|| +|220|週|い号作戦|空母20|| +|221|週|ろ号作戦|輸送50|| +|228|週|海上護衛戦|潜水15|| +|229|週|敵東方艦隊を撃滅せよ!|4-(1~5)ボス勝利12|| +|242|週|敵東方中枢艦隊を撃破せよ!|4-4ボス勝利1|| +|243|週|南方海域珊瑚諸島沖の制空権を握れ!|5-2ボスS勝利2|| +|261|週|海上輸送路の安全確保に努めよ!|1-5ボスA勝利3|| +|241|週|敵北方艦隊主力を撃滅せよ!|3-(3~5)ボス勝利5|| +|256|月|「潜水艦隊」出撃せよ!|6-1ボスS勝利3|| +|257|月|「水雷戦隊」南西へ!|1-4ボスS勝利1|要軽巡旗艦、軽巡3隻まで、他駆逐艦 他艦種禁止| +|249|月|「第五戦隊」出撃せよ!|2-5ボスS勝利1|要「那智」「妙高」「羽黒」| +|259|月|「水上打撃部隊」南方へ!|5-1ボスS勝利1|要(大和型or長門型or伊勢型or扶桑型)3/軽巡1 巡戦禁止、戦艦追加禁止| +|265|月|海上護衛強化月間|1-5ボスA勝利10|| +|264|月|「空母機動部隊」西へ!|4-2ボスS勝利1|要(空母or軽母or装母)2/駆逐2| +|266|月|「水上反撃部隊」突入せよ!|2-5ボスS勝利1|要駆逐旗艦、重巡1軽巡1駆逐4| +|822|季|沖ノ島海域迎撃戦|2-4ボスS勝利2|| +|854|季|戦果拡張任務!「Z作戦」前段作戦|2-4・6-1・6-3ボスA勝利各1/6-4ボスS勝利1|| +|303|日|「演習」で練度向上!|演習3|| +|304|日|「演習」で他提督を圧倒せよ!|演習勝利5|| +|302|週|大規模演習|演習勝利20|| +|311|月|精鋭艦隊演習|演習勝利7|デイリー扱い| +|402|日|「遠征」を3回成功させよう!|遠征成功3|| +|403|日|「遠征」を10回成功させよう!|遠征成功10|| +|404|週|大規模遠征作戦、発令!|遠征成功30|| +|410|週|南方への輸送作戦を成功させよ!|「東京急行」「東京急行(弐)」成功1|| +|411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6|| +|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4|| +|503|日|艦隊大整備!|入渠5|| +|504|日|艦隊酒保祭り!|補給15回|| +|605|日|新装備「開発」指令|開発1(失敗可)|| +|606|日|新造艦「建造」指令|建造1|| +|607|日|装備「開発」集中強化!|開発3(失敗可)|| +|608|日|艦娘「建造」艦隊強化!|建造3|| +|609|日|軍縮条約対応!|解体2|| +|619|日|装備の改修強化|装備改修1(失敗可)|| +|613|週|資源の再利用|廃棄24回|| +|638|週|対空機銃量産|機銃廃棄6個|回ではない| +|626|月|精鋭「艦戦」隊の新編成|熟練搭乗員+零式艦戦21型》装備の鳳翔旗艦+零式艦戦21型x2・九六式艦戦x1廃棄|| +|628|月|機種転換|零式艦戦21型(熟練)》装備の空母旗艦+零式艦戦52型x2廃棄|| +|645|月|「洋上補給」物資の調達|三式弾廃棄+(燃料750+弾薬750+ドラム缶(輸送用)x2+九一式徹甲弾)保有|| +|637|季|「熟練搭乗員」養成|九六式艦戦》★10装備の鳳翔旗艦+勲章2|| +|643|季|主力「陸攻」の調達|零式艦戦21型x2廃棄+(九六式陸攻x1+九七式艦攻x2)保有|| +|633|季|新型艤装の継続研究|大口径主砲x10廃棄+鋼材18000保有|| +|702|日|艦の「近代化改修」を実施せよ!|近代化改修成功2|| +|703|週|「近代化改修」を進め、戦備を整えよ!|近代化改修成功15|| #### 任務の特殊仕様について diff --git a/ElectronicObserver/Window/FormFleet.cs b/ElectronicObserver/Window/FormFleet.cs index 47fa71dd0..6ef4b5df3 100644 --- a/ElectronicObserver/Window/FormFleet.cs +++ b/ElectronicObserver/Window/FormFleet.cs @@ -1200,42 +1200,17 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T //所属艦なし - if ( fleet == null || fleet.Members.Count( id => id != -1 ) == 0 ) { + if ( fleet == null || fleet.Members.All( id => id == -1 ) ) { label.Text = "所属艦なし"; label.ImageIndex = (int)ResourceManager.IconContent.FleetNoShip; return FleetStates.NoShip; } - { //入渠中 - long ntime = db.Docks.Values.Max( - dock => { - if ( dock.State == 1 && fleet.Members.Count( ( id => id == dock.ShipID ) ) > 0 ) - return dock.CompletionTime.Ticks; - else return 0; - } - ); - - if ( ntime > 0 ) { //入渠中 - - timer = new DateTime( ntime ); - label.Text = "入渠中 " + DateTimeHelper.ToTimeRemainString( timer ); - label.ImageIndex = (int)ResourceManager.IconContent.FleetDocking; - - tooltip.SetToolTip( label, "完了日時 : " + DateTimeHelper.TimeToCSVString( timer ) ); - - return FleetStates.Docking; - } - - } - - if ( fleet.IsInSortie ) { //大破出撃中 - if ( fleet.MembersInstance.Count( s => - ( s != null && !fleet.EscapedShipList.Contains( s.MasterID ) && (double)s.HPCurrent / s.HPMax <= 0.25 ) - ) > 0 ) { + if ( fleet.MembersWithoutEscaped.Any( s => s != null && s.HPRate <= 0.25 ) ) { label.Text = "!!大破進撃中!!"; label.ImageIndex = (int)ResourceManager.IconContent.FleetSortieDamaged; @@ -1253,7 +1228,6 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T } - //遠征中 if ( fleet.ExpeditionState != 0 ) { @@ -1270,9 +1244,7 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T } //大破艦あり - if ( fleet.MembersInstance.Count( s => - ( s != null && !fleet.EscapedShipList.Contains( s.MasterID ) && (double)s.HPCurrent / s.HPMax <= 0.25 ) - ) > 0 ) { + if ( fleet.MembersWithoutEscaped.Any( s => s != null && s.HPRate <= 0.25 && s.RepairingDockID == -1 ) ) { label.Text = "大破艦あり!"; label.ImageIndex = (int)ResourceManager.IconContent.FleetDamaged; @@ -1282,57 +1254,62 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T } //泊地修理中 - { - if ( fleet.CanAnchorageRepair ) { + if ( fleet.CanAnchorageRepair ) { - label.Text = "泊地修理中 " + DateTimeHelper.ToTimeElapsedString( db.Fleet.AnchorageRepairingTimer ); - label.ImageIndex = (int)ResourceManager.IconContent.FleetAnchorageRepairing; + label.Text = "泊地修理中 " + DateTimeHelper.ToTimeElapsedString( db.Fleet.AnchorageRepairingTimer ); + label.ImageIndex = (int)ResourceManager.IconContent.FleetAnchorageRepairing; - StringBuilder sb = new StringBuilder(); - sb.AppendFormat( "開始日時 : {0}\r\n修理時間 :\r\n", - DateTimeHelper.TimeToCSVString( db.Fleet.AnchorageRepairingTimer ) ); - - for ( int i = 0; i < fleet.Members.Count; i++ ) { - var ship = fleet.MembersInstance[i]; - if ( ship != null && ship.HPRate < 1.0 ) { - var totaltime = DateTimeHelper.FromAPITimeSpan( ship.RepairTime ); - var unittime = Calculator.CalculateDockingUnitTime( ship ); - sb.AppendFormat( "#{0} : {1:00}:{2:00}:{3:00} @ {4:00}:{5:00}:{6:00} x -{7} HP\r\n", - i + 1, - (int)totaltime.TotalHours, - totaltime.Minutes, - totaltime.Seconds, - (int)unittime.TotalHours, - unittime.Minutes, - unittime.Seconds, - ship.HPMax - ship.HPCurrent - ); - } else { - sb.Append( "#" ).Append( i + 1 ).Append( " : ----\r\n" ); - } + StringBuilder sb = new StringBuilder(); + sb.AppendFormat( "開始日時 : {0}\r\n修理時間 :\r\n", + DateTimeHelper.TimeToCSVString( db.Fleet.AnchorageRepairingTimer ) ); + + for ( int i = 0; i < fleet.Members.Count; i++ ) { + var ship = fleet.MembersInstance[i]; + if ( ship != null && ship.HPRate < 1.0 ) { + var totaltime = DateTimeHelper.FromAPITimeSpan( ship.RepairTime ); + var unittime = Calculator.CalculateDockingUnitTime( ship ); + sb.AppendFormat( "#{0} : {1:00}:{2:00}:{3:00} @ {4:00}:{5:00}:{6:00} x -{7} HP\r\n", + i + 1, + (int)totaltime.TotalHours, + totaltime.Minutes, + totaltime.Seconds, + (int)unittime.TotalHours, + unittime.Minutes, + unittime.Seconds, + ship.HPMax - ship.HPCurrent + ); + } else { + sb.Append( "#" ).Append( i + 1 ).Append( " : ----\r\n" ); } + } + + tooltip.SetToolTip( label, sb.ToString() ); + + return FleetStates.AnchorageRepairing; + } + + //入渠中 + { + long ntime = db.Docks.Values.Where( d => d.State == 1 && fleet.Members.Contains( d.ShipID ) ).Select( d => d.CompletionTime.Ticks ).DefaultIfEmpty().Max(); + + if ( ntime > 0 ) { //入渠中 + + timer = new DateTime( ntime ); + label.Text = "入渠中 " + DateTimeHelper.ToTimeRemainString( timer ); + label.ImageIndex = (int)ResourceManager.IconContent.FleetDocking; - tooltip.SetToolTip( label, sb.ToString() ); + tooltip.SetToolTip( label, "完了日時 : " + DateTimeHelper.TimeToCSVString( timer ) ); - return FleetStates.AnchorageRepairing; + return FleetStates.Docking; } + } //未補給 { int fuel = fleet.MembersInstance.Sum( ship => ship == null ? 0 : (int)( ( ship.FuelMax - ship.Fuel ) * ( ship.IsMarried ? 0.85 : 1.00 ) ) ); int ammo = fleet.MembersInstance.Sum( ship => ship == null ? 0 : (int)( ( ship.AmmoMax - ship.Ammo ) * ( ship.IsMarried ? 0.85 : 1.00 ) ) ); - int aircraft = fleet.MembersInstance.Sum( - ship => { - if ( ship == null ) return 0; - else { - int c = 0; - for ( int i = 0; i < ship.Slot.Count; i++ ) { - c += ship.MasterShip.Aircraft[i] - ship.Aircraft[i]; - } - return c; - } - } ); + int aircraft = fleet.MembersInstance.Where( s => s != null ).SelectMany( s => s.MasterShip.Aircraft.Zip( s.Aircraft, ( max, now ) => max - now ) ).Sum(); int bauxite = aircraft * 5; if ( fuel > 0 || ammo > 0 || bauxite > 0 ) { @@ -1368,7 +1345,7 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T label.ImageIndex = (int)ResourceManager.IconContent.ConditionLittleTired; - tooltip.SetToolTip( label, string.Format( "回復目安日時: {0}\r\n(予測誤差: {1})", + tooltip.SetToolTip( label, string.Format( "回復目安日時: {0}\r\n(予測誤差: {1})", DateTimeHelper.TimeToCSVString( timer ), DateTimeHelper.ToTimeRemainString( TimeSpan.FromSeconds( db.Fleet.ConditionBorderAccuracy ) ) ) ); if ( emphasizesSubFleetInPort ) From b6d9b269cbdaf829f84b1f9dd5a2df17da868487 Mon Sep 17 00:00:00 2001 From: Andante Date: Mon, 26 Jun 2017 23:25:06 +0900 Subject: [PATCH 02/14] =?UTF-8?q?=E3=83=A1=E3=83=A2=EF=BC=9A=E4=BB=BB?= =?UTF-8?q?=E5=8B=99=E3=81=AE=E8=A1=A8=E7=A4=BA=E5=B4=A9=E3=82=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 今度は大丈夫なはず --- .../Other/Information/kcmemo.md | 112 +++++++++--------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index ca2c714be..d1d2656a8 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -997,62 +997,62 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの 繰り返し出現する任務の一覧を以下に示す。 |任務ID|種別|任務名|達成条件|備考| -|--:|-:-|:--|:--|:--| -|201|日|敵艦隊を撃破せよ!|勝利1|| -|216|日|敵艦隊主力を撃滅せよ!|戦闘1 ※ボス戦闘での敗北はカウントに含まない|| -|210|日|敵艦隊を10回邀撃せよ!|戦闘10|| -|211|変|敵空母を3隻撃沈せよ!|空母3|日付の1の位が 3,7,0 の場合出現, デイリー扱い| -|212|変|敵輸送船団を叩け!|輸送5|日付の1の位が 2,8 の場合出現, デイリー扱い| -|218|日|敵補給艦を3隻撃沈せよ!|輸送3|| -|226|日|南西諸島海域の制海権を握れ!|2-(1~5)ボス勝利5|| -|230|日|敵潜水艦を制圧せよ!|潜水6|| -|213|週|海上通商破壊作戦|輸送20|| -|214|週|あ号作戦|出撃36/S勝利6/ボス24/ボス勝利12|| -|220|週|い号作戦|空母20|| -|221|週|ろ号作戦|輸送50|| -|228|週|海上護衛戦|潜水15|| -|229|週|敵東方艦隊を撃滅せよ!|4-(1~5)ボス勝利12|| -|242|週|敵東方中枢艦隊を撃破せよ!|4-4ボス勝利1|| -|243|週|南方海域珊瑚諸島沖の制空権を握れ!|5-2ボスS勝利2|| -|261|週|海上輸送路の安全確保に努めよ!|1-5ボスA勝利3|| -|241|週|敵北方艦隊主力を撃滅せよ!|3-(3~5)ボス勝利5|| -|256|月|「潜水艦隊」出撃せよ!|6-1ボスS勝利3|| -|257|月|「水雷戦隊」南西へ!|1-4ボスS勝利1|要軽巡旗艦、軽巡3隻まで、他駆逐艦 他艦種禁止| -|249|月|「第五戦隊」出撃せよ!|2-5ボスS勝利1|要「那智」「妙高」「羽黒」| -|259|月|「水上打撃部隊」南方へ!|5-1ボスS勝利1|要(大和型or長門型or伊勢型or扶桑型)3/軽巡1 巡戦禁止、戦艦追加禁止| -|265|月|海上護衛強化月間|1-5ボスA勝利10|| -|264|月|「空母機動部隊」西へ!|4-2ボスS勝利1|要(空母or軽母or装母)2/駆逐2| -|266|月|「水上反撃部隊」突入せよ!|2-5ボスS勝利1|要駆逐旗艦、重巡1軽巡1駆逐4| -|822|季|沖ノ島海域迎撃戦|2-4ボスS勝利2|| -|854|季|戦果拡張任務!「Z作戦」前段作戦|2-4・6-1・6-3ボスA勝利各1/6-4ボスS勝利1|| -|303|日|「演習」で練度向上!|演習3|| -|304|日|「演習」で他提督を圧倒せよ!|演習勝利5|| -|302|週|大規模演習|演習勝利20|| -|311|月|精鋭艦隊演習|演習勝利7|デイリー扱い| -|402|日|「遠征」を3回成功させよう!|遠征成功3|| -|403|日|「遠征」を10回成功させよう!|遠征成功10|| -|404|週|大規模遠征作戦、発令!|遠征成功30|| -|410|週|南方への輸送作戦を成功させよ!|「東京急行」「東京急行(弐)」成功1|| -|411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6|| -|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4|| -|503|日|艦隊大整備!|入渠5|| -|504|日|艦隊酒保祭り!|補給15回|| -|605|日|新装備「開発」指令|開発1(失敗可)|| -|606|日|新造艦「建造」指令|建造1|| -|607|日|装備「開発」集中強化!|開発3(失敗可)|| -|608|日|艦娘「建造」艦隊強化!|建造3|| -|609|日|軍縮条約対応!|解体2|| -|619|日|装備の改修強化|装備改修1(失敗可)|| -|613|週|資源の再利用|廃棄24回|| -|638|週|対空機銃量産|機銃廃棄6個|回ではない| -|626|月|精鋭「艦戦」隊の新編成|熟練搭乗員+零式艦戦21型》装備の鳳翔旗艦+零式艦戦21型x2・九六式艦戦x1廃棄|| -|628|月|機種転換|零式艦戦21型(熟練)》装備の空母旗艦+零式艦戦52型x2廃棄|| -|645|月|「洋上補給」物資の調達|三式弾廃棄+(燃料750+弾薬750+ドラム缶(輸送用)x2+九一式徹甲弾)保有|| -|637|季|「熟練搭乗員」養成|九六式艦戦》★10装備の鳳翔旗艦+勲章2|| -|643|季|主力「陸攻」の調達|零式艦戦21型x2廃棄+(九六式陸攻x1+九七式艦攻x2)保有|| -|633|季|新型艤装の継続研究|大口径主砲x10廃棄+鋼材18000保有|| -|702|日|艦の「近代化改修」を実施せよ!|近代化改修成功2|| -|703|週|「近代化改修」を進め、戦備を整えよ!|近代化改修成功15|| +|--:|:-:|:--|:--|:--| +|201|日|敵艦隊を撃破せよ!|勝利1 +|216|日|敵艦隊主力を撃滅せよ!|戦闘1 ※ボス戦闘での敗北はカウントに含まない +|210|日|敵艦隊を10回邀撃せよ!|戦闘10 +|211|変|敵空母を3隻撃沈せよ!|空母3|日付の1の位が 3,7,0 の場合出現, デイリー扱い +|212|変|敵輸送船団を叩け!|輸送5|日付の1の位が 2,8 の場合出現, デイリー扱い +|218|日|敵補給艦を3隻撃沈せよ!|輸送3 +|226|日|南西諸島海域の制海権を握れ!|2-(1~5)ボス勝利5 +|230|日|敵潜水艦を制圧せよ!|潜水6 +|213|週|海上通商破壊作戦|輸送20 +|214|週|あ号作戦|出撃36/S勝利6/ボス24/ボス勝利12 +|220|週|い号作戦|空母20 +|221|週|ろ号作戦|輸送50 +|228|週|海上護衛戦|潜水15 +|229|週|敵東方艦隊を撃滅せよ!|4-(1~5)ボス勝利12 +|242|週|敵東方中枢艦隊を撃破せよ!|4-4ボス勝利1 +|243|週|南方海域珊瑚諸島沖の制空権を握れ!|5-2ボスS勝利2 +|261|週|海上輸送路の安全確保に努めよ!|1-5ボスA勝利3 +|241|週|敵北方艦隊主力を撃滅せよ!|3-(3~5)ボス勝利5 +|256|月|「潜水艦隊」出撃せよ!|6-1ボスS勝利3 +|257|月|「水雷戦隊」南西へ!|1-4ボスS勝利1|要軽巡旗艦、軽巡3隻まで、他駆逐艦 他艦種禁止 +|249|月|「第五戦隊」出撃せよ!|2-5ボスS勝利1|要「那智」「妙高」「羽黒」 +|259|月|「水上打撃部隊」南方へ!|5-1ボスS勝利1|要(大和型or長門型or伊勢型or扶桑型)3/軽巡1 巡戦禁止、戦艦追加禁止 +|265|月|海上護衛強化月間|1-5ボスA勝利10 +|264|月|「空母機動部隊」西へ!|4-2ボスS勝利1|要(空母or軽母or装母)2/駆逐2 +|266|月|「水上反撃部隊」突入せよ!|2-5ボスS勝利1|要駆逐旗艦、重巡1軽巡1駆逐4 +|822|季|沖ノ島海域迎撃戦|2-4ボスS勝利2 +|854|季|戦果拡張任務!「Z作戦」前段作戦|2-4・6-1・6-3ボスA勝利各1/6-4ボスS勝利1 +|303|日|「演習」で練度向上!|演習3 +|304|日|「演習」で他提督を圧倒せよ!|演習勝利5 +|302|週|大規模演習|演習勝利20 +|311|月|精鋭艦隊演習|演習勝利7|デイリー扱い +|402|日|「遠征」を3回成功させよう!|遠征成功3 +|403|日|「遠征」を10回成功させよう!|遠征成功10 +|404|週|大規模遠征作戦、発令!|遠征成功30 +|410|週|南方への輸送作戦を成功させよ!|「東京急行」「東京急行(弐)」成功1 +|411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6 +|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4 +|503|日|艦隊大整備!|入渠5 +|504|日|艦隊酒保祭り!|補給15回 +|605|日|新装備「開発」指令|開発1(失敗可) +|606|日|新造艦「建造」指令|建造1 +|607|日|装備「開発」集中強化!|開発3(失敗可) +|608|日|艦娘「建造」艦隊強化!|建造3 +|609|日|軍縮条約対応!|解体2 +|619|日|装備の改修強化|装備改修1(失敗可) +|613|週|資源の再利用|廃棄24回 +|638|週|対空機銃量産|機銃廃棄6個|回ではない +|626|月|精鋭「艦戦」隊の新編成|熟練搭乗員+零式艦戦21型》装備の鳳翔旗艦+零式艦戦21型x2・九六式艦戦x1廃棄 +|628|月|機種転換|零式艦戦21型(熟練)》装備の空母旗艦+零式艦戦52型x2廃棄 +|645|月|「洋上補給」物資の調達|三式弾廃棄+(燃料750+弾薬750+ドラム缶(輸送用)x2+九一式徹甲弾)保有 +|637|季|「熟練搭乗員」養成|九六式艦戦》★10装備の鳳翔旗艦+勲章2 +|643|季|主力「陸攻」の調達|零式艦戦21型x2廃棄+(九六式陸攻x1+九七式艦攻x2)保有 +|633|季|新型艤装の継続研究|大口径主砲x10廃棄+鋼材18000保有 +|702|日|艦の「近代化改修」を実施せよ!|近代化改修成功2 +|703|週|「近代化改修」を進め、戦備を整えよ!|近代化改修成功15 #### 任務の特殊仕様について From aad135f6b2fdc9e5aec5439cda760851e82945a7 Mon Sep 17 00:00:00 2001 From: Andante Date: Tue, 27 Jun 2017 22:51:53 +0900 Subject: [PATCH 03/14] =?UTF-8?q?=E8=89=A6=E9=9A=8A=EF=BC=9A=E7=8A=B6?= =?UTF-8?q?=E6=85=8B=E8=A1=A8=E7=A4=BA=E3=82=92=E8=A4=87=E6=95=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 「泊地修理中」アイコンリソースを変更 --- ElectronicObserver/Assets.zip | Bin 219215 -> 219180 bytes .../Assets/Fleet/AnchorageRepairing.png | Bin 270 -> 229 bytes ElectronicObserver/ElectronicObserver.csproj | 9 + .../Window/Control/FleetState.Designer.cs | 56 +++ .../Window/Control/FleetState.cs | 436 ++++++++++++++++++ .../Window/Control/FleetState.resx | 120 +++++ ElectronicObserver/Window/FormFleet.cs | 313 +------------ .../Window/FormFleetOverview.cs | 35 +- 8 files changed, 641 insertions(+), 328 deletions(-) create mode 100644 ElectronicObserver/Window/Control/FleetState.Designer.cs create mode 100644 ElectronicObserver/Window/Control/FleetState.cs create mode 100644 ElectronicObserver/Window/Control/FleetState.resx diff --git a/ElectronicObserver/Assets.zip b/ElectronicObserver/Assets.zip index 9a526cdfca10966b269c090b3b32dde180ca49ac..8ab16d9c5c8846a6ee2f9989ed75e854635c7ec8 100644 GIT binary patch delta 2317 zcmZuy2~3nn6yBMKiUv^L_7}H#6_ef40h`vdW~Y zz06=sTzj0~B-?&0IFCGjm$kk9qfkz&@v&3TA`Gcr3b|k8dn->CY0Q&<# zg9T17#nk(2V@>=0RyK@yzzHU!w-Fd%uLf+f)d_q}U4KblQ4rD0@YHz=@{wJXVJ>?j-$$N8Mo+n~PJY!#Y-opH7FB1U=J9nT**U1XkGK z0qgmUI%!RvGcK7yTdA#=Sc4Nb%luIzI(otirp4`^u!dD*w~9eaNyH5BpGQEq_U7moykWlgbIdEN#8)fMqgo>X7tTEYZ}LTvfQ#7dA3Iw)oO2 zd8qe;CG0cY=LdQG_H`WZPdD?)4e87c7t9KvoB7J0ZsugCG}P&Uz$a?yJEC_+5Q+jH z*PUx+^WqtIP>qgIT;}5h=?4n??Uh93&uB>p2OqBu>sP+G?amz{vp}p40ZZk;8bd(C zOZq6t87IsJW9_CA;W&cFFTb_~44qAZd-~h=Gu`a83{;icx?%&)>B}`kP;ZD2XpnY$^YxF)q0w)!?<4$%XtyQsdH!w zEyJi|Du;zZ#>Qf?tQp|KoCM4m@5`DT14XlIEHlK6a7g8c#t4^_;jomu82)E1Hl z2#VP@UbvJ;z(Rh|NC-nlY#dIBB(us`XtqYeBEHN-2=^i(gI`e#Au|dxxt*C1)|*jv zEm1US8_{tNtmgYB$_5L3IFT}bGlw#EP7`gPGy1XjsNV zaBnoMf}J)DTWpv$+Q&c=G}~?1(^Peg{Krc?hoO|Mm1Y$=#SSrJ5nAH_y zR;*IZJOM8a=dWmy06tpySOji zw&{I>#S5v5zvt6xUQdOff5yk+{B(K^-|Kln(;#bZ_Ks>MVB`Xd()S6?!3ETy*e`^K e{alT@g=Bs@AZs>q{h+XzEP{}+dxto^0RI96Atguv delta 2251 zcmZuy3s6+&6~6yHu7Y6^j4Uh*E@YRNiY#EFJX{_svg-nh0@X-JNr;jdE7e-3)#9|B z)afMAO=U@@iX4L+svcJ!Kv| z&`^EE9XjsUYd7aLl(jcT(e@q94Z(e%Oi&HwZx62cu<_x2AMPLM_u-zw0ljBer?YiM z=ldrmNjk5bd}viV9<}?_17RTpZLEH#s>rgFPU#xDOzhB5Kdck9gN-92?u2p1Iyf;k zOoZWBf(W8JA9OWdOb`XNRQ|iJpGDV+#^^dZ_y;)Zq9Ej2XnN?yYKLz5wstX!TPNnL z9PKkG5+7M82j)cbn_x}WknYiN~`4s2NnClNCcEo0N#$F zTv>NW8Ll_N6GMd}1?jQ0PV``JEUl9L4lClY5s7hBD9>zUJ4DHBdqDRS}m$EoItOO zomexCRxw`O+j2D zr3)u26X`W^3Fi~pE&qa&b0HKZGs%Xi2{bOk(fOA%DMFGm`LRe={!;2Mik~&@JoRZD znMqUeXgv9i&+B;ZkB2_R&6zYyT!S%*UY9p@Dm9&vSpFP$ZnKT7xST{&#Tj^$s7efC zg^gb3o*%bSl^pzc#3r-41#c#EBHpXY?W-n)rf|+LcPr)HX1t-=eb;a>l?>=riRE*R z6sOYjq7nyExhZcUViuLljW?9~8z%g67EcSfiGR-G*3_fuS=u1?+)}RIGUMj6JY;t( zv)wUjf`#%ukK*x|(aN^ijL_NqRd-_BY$|Z@@^-3akN)&yjR;~Xu1}J3)~~PHus+FE zwXteV(nMc>BuPkN(#GF}X19LUAvDDHITVgL{3jRpDPMUbux<`5l@ssz?CYv+y06-b z?Y<6WX`Ge6*Ee=LjmP>`I~r-}tl#Z4B;_!p*lLUqWg&7Ox^Y+QYFXr=xdk;hN+3&<;fu_kK96wpW zkta?;=K?;`R>Gb~uhD6Pz)=H-xf0BW#N|B76{!eYNEM<2n-+4AKjFFxx8clZNJoPT zwTN&~wJ63L4n6^Q;f{k=(<@ei7p;6l)HpeZIGk|OE3`3QU|qa0B6ktlv|Hq(B0gW6 z@y;TOocH|z;|tS1?hvCGkug7P#@Frtvk~~Nar&)v=LgkFQp$1qzm0GUeT#T8B$bT3 z)YaP|x?Bbh2%C!x>eU2?i%c}TP9V8X#NsU%1q41kS@W-d@YLH6!qlmIT>LeEg{v<5 zwm1uW0e9@Tr)0c;N{+zU0^}|=6ET0HKlwhd!Ox7i5cB}vOlgbxP+o` zqF>fwZwZI;f2b*@QeLo?11br}&r9iBa?_wjhD&LsY#h?aj3Id%P4dF Ku@RYf=YIgbLKo2h diff --git a/ElectronicObserver/Assets/Fleet/AnchorageRepairing.png b/ElectronicObserver/Assets/Fleet/AnchorageRepairing.png index 7249511adf7a1577f6dd2ef07fe61fe5f5ccfe5b..ea793aa24eec3800a7c06eeac76bdfbf10a6477e 100644 GIT binary patch delta 195 zcmeBUddfIKt9};4Qij+SbIf=c7#KJUJR*x37`TN&n2}-D90{Nxdx@v7EBif8Nj?L% zA5p^LK%pW}7sn8b)5!@71Pp{0XIwqg_y5L`!}tjYX3ZyjpIy u$fdUMBp(s?II^Q<;*}*m<~(dH3=9*OHSh0G-TxP8J%gvKpUXO@geCyE`9t;q delta 236 zcmaFL*vB+MtNuR&5H8red@=(A180FpWHAE+w=f7ZGR&GI0Tg5}@$_|NzsD)cXT&R> zA^sF7B%2u$QR1ARo12O-a~sgL`@E{e809#+M14F?bZHtN9PwFvEZ@%T?out3wlsH3@?@B3Vb*2)JM-E55 fX0^=w>(gw-nC`CK70=>x800QbS3j3^P6 + + UserControl + + + FleetState.cs + Component @@ -620,6 +626,9 @@ Form + + FleetState.cs + ImageLabel.cs diff --git a/ElectronicObserver/Window/Control/FleetState.Designer.cs b/ElectronicObserver/Window/Control/FleetState.Designer.cs new file mode 100644 index 000000000..f84593222 --- /dev/null +++ b/ElectronicObserver/Window/Control/FleetState.Designer.cs @@ -0,0 +1,56 @@ +namespace ElectronicObserver.Window.Control { + partial class FleetState { + /// + /// 必要なデザイナー変数です。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 使用中のリソースをすべてクリーンアップします。 + /// + /// マネージ リソースが破棄される場合 true、破棄されない場合は false です。 + protected override void Dispose( bool disposing ) { + if ( disposing && ( components != null ) ) { + components.Dispose(); + } + base.Dispose( disposing ); + } + + #region コンポーネント デザイナーで生成されたコード + + /// + /// デザイナー サポートに必要なメソッドです。このメソッドの内容を + /// コード エディターで変更しないでください。 + /// + private void InitializeComponent() { + this.LayoutBase = new System.Windows.Forms.FlowLayoutPanel(); + this.SuspendLayout(); + // + // LayoutBase + // + this.LayoutBase.AutoSize = true; + this.LayoutBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.LayoutBase.Dock = System.Windows.Forms.DockStyle.Fill; + this.LayoutBase.Location = new System.Drawing.Point(0, 0); + this.LayoutBase.Name = "LayoutBase"; + this.LayoutBase.Size = new System.Drawing.Size(0, 0); + this.LayoutBase.TabIndex = 0; + // + // FleetState + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.Controls.Add(this.LayoutBase); + this.Name = "FleetState"; + this.Size = new System.Drawing.Size(0, 0); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel LayoutBase; + } +} diff --git a/ElectronicObserver/Window/Control/FleetState.cs b/ElectronicObserver/Window/Control/FleetState.cs new file mode 100644 index 000000000..ef2d38003 --- /dev/null +++ b/ElectronicObserver/Window/Control/FleetState.cs @@ -0,0 +1,436 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ElectronicObserver.Resource; +using ElectronicObserver.Data; +using ElectronicObserver.Utility.Mathematics; +using ElectronicObserver.Utility.Data; + +namespace ElectronicObserver.Window.Control { + + /// + /// 艦隊の状態を表示します。 + /// + public partial class FleetState : UserControl { + + [System.Diagnostics.DebuggerDisplay( "{State}" )] + private class StateLabel { + public FleetStates State; + public ImageLabel Label; + public DateTime Timer; + private bool _onmouse; + + private string _text; + public string Text { + get { return _text; } + set { + _text = value; + UpdateText(); + } + } + private string _shortenedText; + public string ShortenedText { + get { return _shortenedText; } + set { + _shortenedText = value; + UpdateText(); + } + } + private bool _autoShorten; + public bool AutoShorten { + get { return _autoShorten; } + set { + _autoShorten = value; + UpdateText(); + } + } + + public bool Enabled { + get { return Label.Visible; } + set { Label.Visible = value; } + } + + + public StateLabel() { + Label = GetDefaultLabel(); + Label.MouseEnter += Label_MouseEnter; + Label.MouseLeave += Label_MouseLeave; + Enabled = false; + } + + public static ImageLabel GetDefaultLabel() { + var label = new ImageLabel(); + label.Anchor = AnchorStyles.Left; + label.ImageList = ResourceManager.Instance.Icons; + label.Padding = new Padding( 2, 2, 2, 2 ); + label.Margin = new Padding( 2, 0, 2, 0 ); + label.AutoSize = true; + return label; + } + + public void SetInformation( FleetStates state, string text, string shortenedText, int imageIndex, Color backColor ) { + State = state; + Text = text; + ShortenedText = shortenedText; + UpdateText(); + Label.ImageIndex = imageIndex; + Label.BackColor = backColor; + } + + public void SetInformation( FleetStates state, string text, string shortenedText, int imageIndex ) { + SetInformation( state, text, shortenedText, imageIndex, Color.Transparent ); + } + + public void UpdateText() { + Label.Text = ( !AutoShorten || _onmouse ) ? Text : ShortenedText; + } + + + void Label_MouseEnter( object sender, EventArgs e ) { + _onmouse = true; + UpdateText(); + } + + void Label_MouseLeave( object sender, EventArgs e ) { + _onmouse = false; + UpdateText(); + } + + } + + + public override Font Font { + get { + return base.Font; + } + set { + base.Font = value; + foreach ( var state in StateLabels ) + state.Label.Font = value; + } + } + + + private List StateLabels; + + + public FleetState() { + InitializeComponent(); + + StateLabels = new List(); + } + + + private StateLabel AddStateLabel() { + StateLabels.Add( new StateLabel() ); + var ret = StateLabels.Last(); + LayoutBase.Controls.Add( ret.Label ); + return ret; + } + + private StateLabel GetStateLabel( int index ) { + if ( index >= StateLabels.Count ) { + for ( int i = StateLabels.Count; i <= index; i++ ) + AddStateLabel(); + } + StateLabels[index].Enabled = true; + return StateLabels[index]; + } + + + + public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { + + KCDatabase db = KCDatabase.Instance; + + int index = 0; + + + bool emphasizesSubFleetInPort = Utility.Configuration.Config.FormFleet.EmphasizesSubFleetInPort && + ( db.Fleet.CombinedFlag > 0 ? fleet.FleetID >= 3 : fleet.FleetID >= 2 ); + + Color colorDanger = Color.LightCoral; + Color colorInPort = emphasizesSubFleetInPort ? Color.LightGreen : Color.Transparent; + + + //所属艦なし + if ( fleet == null || fleet.Members.All( id => id == -1 ) ) { + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.NoShip, "所属艦なし", "", (int)ResourceManager.IconContent.FleetNoShip ); + tooltip.SetToolTip( state.Label, null ); + + index++; + + } else { + + if ( fleet.IsInSortie ) { + + //大破出撃中 + if ( fleet.MembersWithoutEscaped.Any( s => s != null && s.HPRate <= 0.25 ) ) { + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.SortieDamaged, "!!大破進撃中!!", "!!大破進撃中!!", (int)ResourceManager.IconContent.FleetSortieDamaged, colorDanger ); + tooltip.SetToolTip( state.Label, null ); + + index++; + + } else { //出撃中 + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.Sortie, "出撃中", "", (int)ResourceManager.IconContent.FleetSortie ); + tooltip.SetToolTip( state.Label, null ); + + index++; + } + + } + + //遠征中 + if ( fleet.ExpeditionState != 0 ) { + var state = GetStateLabel( index ); + + state.Timer = fleet.ExpeditionTime; + state.SetInformation( FleetStates.Expedition, + "遠征中 " + DateTimeHelper.ToTimeRemainString( state.Timer ), + DateTimeHelper.ToTimeRemainString( state.Timer ), + (int)ResourceManager.IconContent.FleetExpedition ); + + var dest = db.Mission[fleet.ExpeditionDestination]; + tooltip.SetToolTip( state.Label, + string.Format( "{0} : {1}\r\n完了日時 : {2}", + dest.ID, dest.Name, DateTimeHelper.TimeToCSVString( state.Timer ) ) ); + + index++; + } + + //大破艦あり + if ( !fleet.IsInSortie && fleet.MembersWithoutEscaped.Any( s => s != null && s.HPRate <= 0.25 && s.RepairingDockID == -1 ) ) { + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.Damaged, "大破艦あり!", "大破艦あり!", (int)ResourceManager.IconContent.FleetDamaged, colorDanger ); + tooltip.SetToolTip( state.Label, null ); + + index++; + } + + //泊地修理中 + if ( fleet.CanAnchorageRepair ) { + var state = GetStateLabel( index ); + + state.Timer = db.Fleet.AnchorageRepairingTimer; + state.SetInformation( FleetStates.AnchorageRepairing, + "泊地修理中 " + DateTimeHelper.ToTimeElapsedString( state.Timer ), + DateTimeHelper.ToTimeElapsedString( state.Timer ), + (int)ResourceManager.IconContent.FleetAnchorageRepairing ); + + + StringBuilder sb = new StringBuilder(); + sb.AppendFormat( "開始日時 : {0}\r\n修理時間 :\r\n", + DateTimeHelper.TimeToCSVString( db.Fleet.AnchorageRepairingTimer ) ); + + for ( int i = 0; i < fleet.Members.Count; i++ ) { + var ship = fleet.MembersInstance[i]; + if ( ship != null && ship.HPRate < 1.0 ) { + var totaltime = DateTimeHelper.FromAPITimeSpan( ship.RepairTime ); + var unittime = Calculator.CalculateDockingUnitTime( ship ); + sb.AppendFormat( "#{0} : {1} @ {2} x -{3} HP\r\n", + i + 1, + DateTimeHelper.ToTimeRemainString( totaltime ), + DateTimeHelper.ToTimeRemainString( unittime ), + ship.HPMax - ship.HPCurrent + ); + } else { + sb.Append( "#" ).Append( i + 1 ).Append( " : ----\r\n" ); + } + } + + tooltip.SetToolTip( state.Label, sb.ToString() ); + + index++; + } + + //入渠中 + { + long ntime = db.Docks.Values.Where( d => d.State == 1 && fleet.Members.Contains( d.ShipID ) ).Select( d => d.CompletionTime.Ticks ).DefaultIfEmpty().Max(); + + if ( ntime > 0 ) { //入渠中 + var state = GetStateLabel( index ); + + state.Timer = new DateTime( ntime ); + state.SetInformation( FleetStates.Docking, + "入渠中 " + DateTimeHelper.ToTimeRemainString( state.Timer ), + DateTimeHelper.ToTimeRemainString( state.Timer ), + (int)ResourceManager.IconContent.FleetDocking ); + + tooltip.SetToolTip( state.Label, "完了日時 : " + DateTimeHelper.TimeToCSVString( state.Timer ) ); + + index++; + } + + } + + //未補給 + { + int fuel = fleet.MembersInstance.Sum( ship => ship == null ? 0 : (int)( ( ship.FuelMax - ship.Fuel ) * ( ship.IsMarried ? 0.85 : 1.00 ) ) ); + int ammo = fleet.MembersInstance.Sum( ship => ship == null ? 0 : (int)( ( ship.AmmoMax - ship.Ammo ) * ( ship.IsMarried ? 0.85 : 1.00 ) ) ); + int aircraft = fleet.MembersInstance.Where( s => s != null ).SelectMany( s => s.MasterShip.Aircraft.Zip( s.Aircraft, ( max, now ) => max - now ) ).Sum(); + int bauxite = aircraft * 5; + + if ( fuel > 0 || ammo > 0 || bauxite > 0 ) { + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.NotReplenished, "未補給", "", (int)ResourceManager.IconContent.FleetNotReplenished, colorInPort ); + tooltip.SetToolTip( state.Label, string.Format( "燃 : {0}\r\n弾 : {1}\r\nボ : {2} ({3}機)", fuel, ammo, bauxite, aircraft ) ); + + index++; + } + } + + //疲労 + { + int cond = fleet.MembersInstance.Min( s => s == null ? 100 : s.Condition ); + + if ( cond < Utility.Configuration.Config.Control.ConditionBorder && fleet.ConditionTime != null ) { + var state = GetStateLabel( index ); + + int iconIndex; + if ( cond < 20 ) + iconIndex = (int)ResourceManager.IconContent.ConditionVeryTired; + else if ( cond < 30 ) + iconIndex = (int)ResourceManager.IconContent.ConditionTired; + else + iconIndex = (int)ResourceManager.IconContent.ConditionLittleTired; + + state.Timer = (DateTime)fleet.ConditionTime; + state.SetInformation( FleetStates.Tired, + "疲労 " + DateTimeHelper.ToTimeRemainString( state.Timer ), + DateTimeHelper.ToTimeRemainString( state.Timer ), + iconIndex, + colorInPort ); + + tooltip.SetToolTip( state.Label, string.Format( "回復目安日時: {0}\r\n(予測誤差: {1})", + DateTimeHelper.TimeToCSVString( state.Timer ), DateTimeHelper.ToTimeRemainString( TimeSpan.FromSeconds( db.Fleet.ConditionBorderAccuracy ) ) ) ); + + index++; + + } else if ( cond >= 50 ) { //戦意高揚 + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.Sparkled, "戦意高揚!", "", (int)ResourceManager.IconContent.ConditionSparkle, colorInPort ); + tooltip.SetToolTip( state.Label, string.Format( "最低cond: {0}\r\nあと {1} 回遠征可能", cond, Math.Ceiling( ( cond - 49 ) / 3.0 ) ) ); + + index++; + } + + } + + //出撃可能! + if ( index == 0 ) { + var state = GetStateLabel( index ); + + state.SetInformation( FleetStates.Ready, "出撃可能!", "", (int)ResourceManager.IconContent.FleetReady, colorInPort ); + tooltip.SetToolTip( state.Label, null ); + + index++; + } + + } + + for ( int i = index; i < StateLabels.Count; i++ ) + StateLabels[i].Enabled = false; + + + if ( index == 1 ) { + StateLabels[0].AutoShorten = false; + + } else { + for ( int i = 0; i < index; i++ ) + StateLabels[i].AutoShorten = true; + } + } + + + public void RefreshFleetState() { + + foreach ( var state in StateLabels ) { + + if ( !state.Enabled ) + continue; + + switch ( state.State ) { + + case FleetStates.Damaged: + if ( Utility.Configuration.Config.FormFleet.BlinkAtDamaged ) + state.Label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightCoral : Color.Transparent; + break; + + case FleetStates.SortieDamaged: + state.Label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightCoral : Color.Transparent; + break; + + case FleetStates.Docking: + state.ShortenedText = DateTimeHelper.ToTimeRemainString( state.Timer ); + state.Text = "入渠中 " + state.ShortenedText; + state.UpdateText(); + if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( state.Timer - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierRepair.AccelInterval ) + state.Label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent; + break; + + case FleetStates.Expedition: + state.ShortenedText = DateTimeHelper.ToTimeRemainString( state.Timer ); + state.Text = "遠征中 " + state.ShortenedText; + state.UpdateText(); + if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( state.Timer - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierExpedition.AccelInterval ) + state.Label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent; + break; + + case FleetStates.Tired: + state.ShortenedText = DateTimeHelper.ToTimeRemainString( state.Timer ); + state.Text = "疲労 " + state.ShortenedText; + state.UpdateText(); + if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( state.Timer - DateTime.Now ).TotalMilliseconds <= 0 ) + state.Label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent; + break; + + case FleetStates.AnchorageRepairing: + state.ShortenedText = DateTimeHelper.ToTimeElapsedString( KCDatabase.Instance.Fleet.AnchorageRepairingTimer ); + state.Text = "泊地修理中 " + state.ShortenedText; + state.UpdateText(); + break; + + } + + } + + } + + public int GetIconIndex() { + return StateLabels.OrderBy( s => s.State ).First().Label.ImageIndex; + } + + } + + /// + /// 艦隊の状態を表します。 + /// + public enum FleetStates { + NoShip, + SortieDamaged, + Sortie, + Expedition, + Damaged, + AnchorageRepairing, + Docking, + NotReplenished, + Tired, + Sparkled, + Ready, + } +} diff --git a/ElectronicObserver/Window/Control/FleetState.resx b/ElectronicObserver/Window/Control/FleetState.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/ElectronicObserver/Window/Control/FleetState.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ElectronicObserver/Window/FormFleet.cs b/ElectronicObserver/Window/FormFleet.cs index 6ef4b5df3..994de62c5 100644 --- a/ElectronicObserver/Window/FormFleet.cs +++ b/ElectronicObserver/Window/FormFleet.cs @@ -29,13 +29,11 @@ public partial class FormFleet : DockContent { private class TableFleetControl { public Label Name; - public ImageLabel StateMain; + public FleetState State; public ImageLabel AirSuperiority; public ImageLabel SearchingAbility; public ImageLabel AntiAirPower; public ToolTip ToolTipInfo; - public FleetStates State; - public DateTime Timer; public TableFleetControl( FormFleet parent ) { @@ -51,13 +49,12 @@ public TableFleetControl( FormFleet parent ) { //Name.Visible = false; Name.Cursor = Cursors.Help; - StateMain = new ImageLabel(); - StateMain.Anchor = AnchorStyles.Left; - StateMain.ForeColor = parent.MainFontColor; - StateMain.ImageList = ResourceManager.Instance.Icons; - StateMain.Padding = new Padding( 2, 2, 2, 2 ); - StateMain.Margin = new Padding( 2, 0, 2, 0 ); - StateMain.AutoSize = true; + State = new FleetState(); + State.Anchor = AnchorStyles.Left; + State.ForeColor = parent.MainFontColor; + State.Padding = new Padding(); + State.Margin = new Padding(); + State.AutoSize = true; AirSuperiority = new ImageLabel(); AirSuperiority.Anchor = AnchorStyles.Left; @@ -90,8 +87,6 @@ public TableFleetControl( FormFleet parent ) { ConfigurationChanged( parent ); ToolTipInfo = parent.ToolTipInfo; - State = FleetStates.NoShip; - Timer = DateTime.Now; #endregion @@ -106,7 +101,7 @@ public void AddToTable( TableLayoutPanel table ) { table.SuspendLayout(); table.Controls.Add( Name, 0, 0 ); - table.Controls.Add( StateMain, 1, 0 ); + table.Controls.Add( State, 1, 0 ); table.Controls.Add( AirSuperiority, 2, 0 ); table.Controls.Add( SearchingAbility, 3, 0 ); table.Controls.Add( AntiAirPower, 4, 0 ); @@ -159,7 +154,7 @@ public void Update( FleetData fleet ) { } - State = UpdateFleetState( fleet, StateMain, ToolTipInfo, State, ref Timer ); + State.UpdateFleetState( fleet, ToolTipInfo ); //制空戦力計算 @@ -220,20 +215,16 @@ public void Update( FleetData fleet ) { } - public void ResetState() { - State = FleetStates.NoShip; - } - public void Refresh() { - RefreshFleetState( StateMain, State, Timer ); + State.RefreshFleetState(); } public void ConfigurationChanged( FormFleet parent ) { Name.Font = parent.MainFont; - StateMain.Font = parent.MainFont; - StateMain.BackColor = Color.Transparent; + State.Font = parent.MainFont; + State.RefreshFleetState(); AirSuperiority.Font = parent.MainFont; SearchingAbility.Font = parent.MainFont; AntiAirPower.Font = parent.MainFont; @@ -738,12 +729,6 @@ private void FormFleet_Load( object sender, EventArgs e ) { APIObserver o = APIObserver.Instance; - o.APIList["api_req_hensei/change"].RequestReceived += ChangeOrganization; - o.APIList["api_req_kousyou/destroyship"].RequestReceived += ChangeOrganization; - o.APIList["api_req_kaisou/remodeling"].RequestReceived += ChangeOrganization; - o.APIList["api_req_kaisou/powerup"].ResponseReceived += ChangeOrganization; - o.APIList["api_req_hensei/preset_select"].ResponseReceived += ChangeOrganization; - o.APIList["api_req_nyukyo/start"].RequestReceived += Updated; o.APIList["api_req_nyukyo/speedchange"].RequestReceived += Updated; o.APIList["api_req_hensei/change"].RequestReceived += Updated; @@ -814,18 +799,12 @@ void Updated( string apiname, dynamic data ) { if ( Icon != null ) ResourceManager.DestroyIcon( Icon ); - Icon = ResourceManager.ImageToIcon( ControlFleet.StateMain.Image ); + Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[ControlFleet.State.GetIconIndex()] ); if ( Parent != null ) Parent.Refresh(); //アイコンを更新するため } - void ChangeOrganization( string apiname, dynamic data ) { - - ControlFleet.ResetState(); - - } - - + void UpdateTimerTick() { FleetData fleet = KCDatabase.Instance.Fleet.Fleets[FleetID]; @@ -1158,270 +1137,6 @@ void ConfigurationChanged() { - - /// - /// 艦隊の状態を表します。 - /// - public enum FleetStates { - NoShip, - Docking, - SortieDamaged, - Sortie, - Expedition, - Damaged, - NotReplenished, - Tired, - Sparkled, - AnchorageRepairing, - Ready, - } - - - /// - /// 艦隊の状態の情報をラベルに適用します。 - /// - /// 艦隊データ。 - /// 適用するラベル。 - /// 適用するツールチップ。 - /// 前回の状態。 - /// 日時。 - /// 艦隊の状態を表す定数。 - public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, ToolTip tooltip, FleetStates prevstate, ref DateTime timer ) { - - KCDatabase db = KCDatabase.Instance; - - - //初期化 - tooltip.SetToolTip( label, null ); - label.BackColor = Color.Transparent; - - bool emphasizesSubFleetInPort = Utility.Configuration.Config.FormFleet.EmphasizesSubFleetInPort && - ( db.Fleet.CombinedFlag > 0 ? fleet.FleetID >= 3 : fleet.FleetID >= 2 ); - - - //所属艦なし - if ( fleet == null || fleet.Members.All( id => id == -1 ) ) { - label.Text = "所属艦なし"; - label.ImageIndex = (int)ResourceManager.IconContent.FleetNoShip; - - return FleetStates.NoShip; - } - - if ( fleet.IsInSortie ) { - - //大破出撃中 - if ( fleet.MembersWithoutEscaped.Any( s => s != null && s.HPRate <= 0.25 ) ) { - - label.Text = "!!大破進撃中!!"; - label.ImageIndex = (int)ResourceManager.IconContent.FleetSortieDamaged; - label.BackColor = Color.LightCoral; - - return FleetStates.SortieDamaged; - - } else { //出撃中 - - label.Text = "出撃中"; - label.ImageIndex = (int)ResourceManager.IconContent.FleetSortie; - - return FleetStates.Sortie; - } - - } - - //遠征中 - if ( fleet.ExpeditionState != 0 ) { - - timer = fleet.ExpeditionTime; - label.Text = "遠征中 " + DateTimeHelper.ToTimeRemainString( timer ); - label.ImageIndex = (int)ResourceManager.IconContent.FleetExpedition; - - tooltip.SetToolTip( label, string.Format( "{0} : {1}\r\n完了日時 : {2}", - db.Mission[fleet.ExpeditionDestination].ID, - db.Mission[fleet.ExpeditionDestination].Name, - DateTimeHelper.TimeToCSVString( timer ) ) ); - - return FleetStates.Expedition; - } - - //大破艦あり - if ( fleet.MembersWithoutEscaped.Any( s => s != null && s.HPRate <= 0.25 && s.RepairingDockID == -1 ) ) { - - label.Text = "大破艦あり!"; - label.ImageIndex = (int)ResourceManager.IconContent.FleetDamaged; - label.BackColor = Color.LightCoral; - - return FleetStates.Damaged; - } - - //泊地修理中 - if ( fleet.CanAnchorageRepair ) { - - label.Text = "泊地修理中 " + DateTimeHelper.ToTimeElapsedString( db.Fleet.AnchorageRepairingTimer ); - label.ImageIndex = (int)ResourceManager.IconContent.FleetAnchorageRepairing; - - StringBuilder sb = new StringBuilder(); - sb.AppendFormat( "開始日時 : {0}\r\n修理時間 :\r\n", - DateTimeHelper.TimeToCSVString( db.Fleet.AnchorageRepairingTimer ) ); - - for ( int i = 0; i < fleet.Members.Count; i++ ) { - var ship = fleet.MembersInstance[i]; - if ( ship != null && ship.HPRate < 1.0 ) { - var totaltime = DateTimeHelper.FromAPITimeSpan( ship.RepairTime ); - var unittime = Calculator.CalculateDockingUnitTime( ship ); - sb.AppendFormat( "#{0} : {1:00}:{2:00}:{3:00} @ {4:00}:{5:00}:{6:00} x -{7} HP\r\n", - i + 1, - (int)totaltime.TotalHours, - totaltime.Minutes, - totaltime.Seconds, - (int)unittime.TotalHours, - unittime.Minutes, - unittime.Seconds, - ship.HPMax - ship.HPCurrent - ); - } else { - sb.Append( "#" ).Append( i + 1 ).Append( " : ----\r\n" ); - } - } - - tooltip.SetToolTip( label, sb.ToString() ); - - return FleetStates.AnchorageRepairing; - } - - //入渠中 - { - long ntime = db.Docks.Values.Where( d => d.State == 1 && fleet.Members.Contains( d.ShipID ) ).Select( d => d.CompletionTime.Ticks ).DefaultIfEmpty().Max(); - - if ( ntime > 0 ) { //入渠中 - - timer = new DateTime( ntime ); - label.Text = "入渠中 " + DateTimeHelper.ToTimeRemainString( timer ); - label.ImageIndex = (int)ResourceManager.IconContent.FleetDocking; - - tooltip.SetToolTip( label, "完了日時 : " + DateTimeHelper.TimeToCSVString( timer ) ); - - return FleetStates.Docking; - } - - } - - //未補給 - { - int fuel = fleet.MembersInstance.Sum( ship => ship == null ? 0 : (int)( ( ship.FuelMax - ship.Fuel ) * ( ship.IsMarried ? 0.85 : 1.00 ) ) ); - int ammo = fleet.MembersInstance.Sum( ship => ship == null ? 0 : (int)( ( ship.AmmoMax - ship.Ammo ) * ( ship.IsMarried ? 0.85 : 1.00 ) ) ); - int aircraft = fleet.MembersInstance.Where( s => s != null ).SelectMany( s => s.MasterShip.Aircraft.Zip( s.Aircraft, ( max, now ) => max - now ) ).Sum(); - int bauxite = aircraft * 5; - - if ( fuel > 0 || ammo > 0 || bauxite > 0 ) { - - label.Text = "未補給"; - label.ImageIndex = (int)ResourceManager.IconContent.FleetNotReplenished; - - tooltip.SetToolTip( label, string.Format( "燃 : {0}\r\n弾 : {1}\r\nボ : {2} ({3}機)", fuel, ammo, bauxite, aircraft ) ); - - if ( emphasizesSubFleetInPort ) - label.BackColor = Color.LightGreen; - - return FleetStates.NotReplenished; - } - } - - //疲労 - { - int cond = fleet.MembersInstance.Min( s => s == null ? 100 : s.Condition ); - - if ( cond < Utility.Configuration.Config.Control.ConditionBorder && fleet.ConditionTime != null ) { - - timer = (DateTime)fleet.ConditionTime; - - - label.Text = "疲労 " + DateTimeHelper.ToTimeRemainString( timer ); - - if ( cond < 20 ) - label.ImageIndex = (int)ResourceManager.IconContent.ConditionVeryTired; - else if ( cond < 30 ) - label.ImageIndex = (int)ResourceManager.IconContent.ConditionTired; - else - label.ImageIndex = (int)ResourceManager.IconContent.ConditionLittleTired; - - - tooltip.SetToolTip( label, string.Format( "回復目安日時: {0}\r\n(予測誤差: {1})", - DateTimeHelper.TimeToCSVString( timer ), DateTimeHelper.ToTimeRemainString( TimeSpan.FromSeconds( db.Fleet.ConditionBorderAccuracy ) ) ) ); - - if ( emphasizesSubFleetInPort ) - label.BackColor = Color.LightGreen; - - return FleetStates.Tired; - - - } else if ( cond >= 50 ) { //戦意高揚 - - label.Text = "戦意高揚!"; - label.ImageIndex = (int)ResourceManager.IconContent.ConditionSparkle; - tooltip.SetToolTip( label, string.Format( "最低cond: {0}\r\nあと {1} 回遠征可能", cond, Math.Ceiling( ( cond - 49 ) / 3.0 ) ) ); - - if ( emphasizesSubFleetInPort ) - label.BackColor = Color.LightGreen; - - return FleetStates.Sparkled; - - } - - } - - //出撃可能! - { - label.Text = "出撃可能!"; - label.ImageIndex = (int)ResourceManager.IconContent.FleetReady; - if ( emphasizesSubFleetInPort ) - label.BackColor = Color.LightGreen; - - return FleetStates.Ready; - } - - } - - - /// - /// 艦隊の状態の情報をもとにラベルを更新します。 - /// - /// 更新するラベル。 - /// 艦隊の状態。 - /// 日時。 - public static void RefreshFleetState( ImageLabel label, FleetStates state, DateTime timer ) { - - switch ( state ) { - case FleetStates.Damaged: - if ( Utility.Configuration.Config.FormFleet.BlinkAtDamaged ) - label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightCoral : Color.Transparent; - break; - case FleetStates.SortieDamaged: - label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightCoral : Color.Transparent; - break; - case FleetStates.Docking: - label.Text = "入渠中 " + DateTimeHelper.ToTimeRemainString( timer ); - if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( timer - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierRepair.AccelInterval ) - label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent; - break; - case FleetStates.Expedition: - label.Text = "遠征中 " + DateTimeHelper.ToTimeRemainString( timer ); - if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( timer - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierExpedition.AccelInterval ) - label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent; - break; - case FleetStates.Tired: - label.Text = "疲労 " + DateTimeHelper.ToTimeRemainString( timer ); - if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( timer - DateTime.Now ).TotalMilliseconds <= 0 ) - label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent; - break; - case FleetStates.AnchorageRepairing: - label.Text = "泊地修理中 " + DateTimeHelper.ToTimeElapsedString( KCDatabase.Instance.Fleet.AnchorageRepairingTimer ); - break; - } - - } - - - private void TableMember_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) { e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 ); } diff --git a/ElectronicObserver/Window/FormFleetOverview.cs b/ElectronicObserver/Window/FormFleetOverview.cs index 31c98536e..11551da6f 100644 --- a/ElectronicObserver/Window/FormFleetOverview.cs +++ b/ElectronicObserver/Window/FormFleetOverview.cs @@ -23,7 +23,7 @@ public partial class FormFleetOverview : DockContent { private class TableFleetControl { public ImageLabel Number; - public ImageLabel State; + public FleetState State; public ToolTip ToolTipInfo; private int fleetID; @@ -38,16 +38,12 @@ public TableFleetControl( FormFleetOverview parent, int fleetID ) { Number.Margin = new Padding( 2, 1, 2, 1 ); Number.Text = string.Format( "#{0}:", fleetID ); Number.AutoSize = true; - Number.Tag = null; - State = new ImageLabel(); + State = new FleetState(); State.Anchor = AnchorStyles.Left; - State.Padding = new Padding( 0, 1, 0, 1 ); - State.Margin = new Padding( 2, 1, 2, 1 ); - State.ImageList = ResourceManager.Instance.Icons; - State.Text = "-"; + State.Padding = new Padding(); + State.Margin = new Padding(); State.AutoSize = true; - State.Tag = FormFleet.FleetStates.NoShip; ConfigurationChanged( parent ); @@ -77,20 +73,15 @@ public void Update() { FleetData fleet = KCDatabase.Instance.Fleet[fleetID]; if ( fleet == null ) return; - DateTime dt = (DateTime?)Number.Tag ?? DateTime.Now; - State.Tag = FormFleet.UpdateFleetState( fleet, State, ToolTipInfo, (FormFleet.FleetStates)State.Tag, ref dt ); - Number.Tag = dt; + State.UpdateFleetState( fleet, ToolTipInfo ); ToolTipInfo.SetToolTip( Number, fleet.Name ); } - public void ResetState() { - State.Tag = FormFleet.FleetStates.NoShip; - } public void Refresh() { - FormFleet.RefreshFleetState( State, (FormFleet.FleetStates)State.Tag, (DateTime?)Number.Tag ?? DateTime.Now ); + State.RefreshFleetState(); } @@ -164,17 +155,9 @@ public FormFleetOverview( FormMain parent ) { private void FormFleetOverview_Load( object sender, EventArgs e ) { - - //api register APIObserver o = APIObserver.Instance; - o.APIList["api_req_hensei/change"].RequestReceived += ChangeOrganization; - o.APIList["api_req_kousyou/destroyship"].RequestReceived += ChangeOrganization; - o.APIList["api_req_kaisou/remodeling"].RequestReceived += ChangeOrganization; - o.APIList["api_req_kaisou/powerup"].ResponseReceived += ChangeOrganization; - o.APIList["api_req_hensei/preset_select"].ResponseReceived += ChangeOrganization; - o.APIList["api_req_nyukyo/start"].RequestReceived += Updated; o.APIList["api_req_nyukyo/speedchange"].RequestReceived += Updated; o.APIList["api_req_hensei/change"].RequestReceived += Updated; @@ -271,12 +254,6 @@ private void Updated( string apiname, dynamic data ) { TableFleet.ResumeLayout(); } - void ChangeOrganization( string apiname, dynamic data ) { - - for ( int i = 0; i < ControlFleet.Count; i++ ) - ControlFleet[i].ResetState(); - - } void UpdateTimerTick() { From dba07be946b44e7c2df9f88d40557fa5a54c0034 Mon Sep 17 00:00:00 2001 From: RadarNyan Date: Wed, 28 Jun 2017 05:46:54 +0900 Subject: [PATCH 04/14] Don't convert encoding of ShipGroups.xml * Settings xmls are encoded in utf-8 --- ElectronicObserver/Data/ShipGroupManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronicObserver/Data/ShipGroupManager.cs b/ElectronicObserver/Data/ShipGroupManager.cs index ce2012904..2b3279b24 100644 --- a/ElectronicObserver/Data/ShipGroupManager.cs +++ b/ElectronicObserver/Data/ShipGroupManager.cs @@ -67,7 +67,7 @@ public int GetUniqueID() { public ShipGroupManager Load() { - ResourceManager.CopyDocumentFromArchive( DefaultFilePath.Replace( "\\", "/" ), DefaultFilePath ); + ResourceManager.CopyFromArchive( DefaultFilePath.Replace( "\\", "/" ), DefaultFilePath, true, false ); return (ShipGroupManager)Load( DefaultFilePath ); } From a55129e9e2e3a01235616c13da85fe384b69cfb9 Mon Sep 17 00:00:00 2001 From: Andante Date: Sun, 2 Jul 2017 01:54:51 +0900 Subject: [PATCH 05/14] =?UTF-8?q?=E7=96=B2=E5=8A=B4=E5=BA=A6=E3=82=B7?= =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=A0=E3=81=AE=E4=BA=88=E6=B8=AC=E3=81=8C?= =?UTF-8?q?=E9=80=9F=E3=81=8F=E3=81=AA=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 任務進捗:マンスリー海上護衛遠征任務:3/4のときに80%達成になる仕様に追従 * DataStorage のエラーメッセージを改善 * ドキュメント更新 --- ElectronicObserver/Data/FleetManager.cs | 37 +++++-- .../Data/Quest/QuestProgressManager.cs | 1 + .../Other/Information/kcmemo.md | 99 ++++++++++++++++--- .../Utility/Storage/DataStorage.cs | 22 ++--- README.md | 31 +++--- 5 files changed, 135 insertions(+), 55 deletions(-) diff --git a/ElectronicObserver/Data/FleetManager.cs b/ElectronicObserver/Data/FleetManager.cs index cd3639c43..5ffd7221e 100644 --- a/ElectronicObserver/Data/FleetManager.cs +++ b/ElectronicObserver/Data/FleetManager.cs @@ -227,7 +227,7 @@ public void UpdateConditionPrediction() { var now = DateTime.Now; - //Utility.Logger.Add( 1, "Cond-Update: Now: " + DateTimeHelper.TimeToCSVString( now ) ); + AddConditionDebugLog( "Cond-Update: Now: " + DateTimeHelper.TimeToCSVString( now ) ); var conditionDiff = PreviousShips.Where( s => s.Value.Condition < 49 ) .Join( KCDatabase.Instance.Ships.Values, pair => pair.Key, ship => ship.ID, ( pair, ship ) => ship.Condition - pair.Value.Condition ); @@ -238,8 +238,8 @@ public void UpdateConditionPrediction() { int healed = (int)Math.Ceiling( conditionDiff.Max() / 3.0 ); int predictedHealLow = (int)Math.Floor( ( now - LastConditionUpdated ).TotalSeconds / ConditionHealingSpan.TotalSeconds ); - //Utility.Logger.Add( 1, "Cond-Update: Healed: " + conditionDiff.Max() + " / " + healed ); - //Utility.Logger.Add( 1, "Cond-Update: PredictHealLow: " + predictedHealLow ); + AddConditionDebugLog( "Cond-Update: Healed: " + conditionDiff.Max() + " / " + healed ); + AddConditionDebugLog( "Cond-Update: PredictHealLow: " + predictedHealLow ); if ( healed < predictedHealLow ) { @@ -297,8 +297,10 @@ public void UpdateConditionPrediction() { ConditionPredictMin = amin; else if ( startsWithBmin ) ConditionPredictMin = bmin; - else + else { ConditionPredictMin = newPredictMin; // 空集合; 新しいほうを設定 + AddConditionDebugLog( "Cond-Update: empty-start: " + newPredictMin ); + } if ( endsWithBpre ) ConditionPredictMax = bpre; @@ -306,14 +308,16 @@ public void UpdateConditionPrediction() { ConditionPredictMax = amax; else if ( endsWidthBmax ) ConditionPredictMax = bmax; - else + else { ConditionPredictMax = newPredictMax; // 空集合; 新しいほうを設定 + AddConditionDebugLog( "Cond-Update: empty-end: " + newPredictMax ); + } } LabelFinally: - //Utility.Logger.Add( 1, "Cond-Update: Accuracy: " + ConditionBorderAccuracy ); + AddConditionDebugLog( "Cond-Update: Accuracy: " + ConditionBorderAccuracy ); LastConditionUpdated = now; foreach ( var f in Fleets.Values ) @@ -335,17 +339,30 @@ public DateTime CalculateConditionHealingEstimation( int healAmount ) { double last = TimeSpan.FromTicks( LastConditionUpdated.Ticks % ConditionHealingSpan.Ticks ).TotalSeconds; - var offset = TimeSpan.FromSeconds( ConditionBorderSeconds - last ) + TimeSpan.FromSeconds( ConditionHealingSpan.TotalSeconds * ( healAmount - 1 ) ); + var firstHeal = TimeSpan.FromSeconds( ConditionBorderSeconds - last ); + var afterHeal = TimeSpan.FromSeconds( ConditionHealingSpan.TotalSeconds * ( healAmount - 1 ) ); - if ( last >= ConditionBorderSeconds ) - offset += ConditionHealingSpan; + if ( ConditionPredictMin <= last && last <= ConditionPredictMax ) + firstHeal = ConditionHealingSpan; + if ( firstHeal.Ticks <= 0 ) + firstHeal += ConditionHealingSpan; - //Utility.Logger.Add( 1, "Cond-Heal: offset: " + DateTimeHelper.ToTimeElapsedString( offset ) ); + var offset = firstHeal + afterHeal; + + + AddConditionDebugLog( "Cond-Heal: offset: " + DateTimeHelper.ToTimeElapsedString( offset ) ); return LastConditionUpdated + offset; } + + private void AddConditionDebugLog( string str ) { + if ( Utility.Configuration.Config.Debug.EnableDebugMenu ) { + Utility.Logger.Add( 1, str ); + } + } + } } diff --git a/ElectronicObserver/Data/Quest/QuestProgressManager.cs b/ElectronicObserver/Data/Quest/QuestProgressManager.cs index f82cb1f78..7a9514cca 100644 --- a/ElectronicObserver/Data/Quest/QuestProgressManager.cs +++ b/ElectronicObserver/Data/Quest/QuestProgressManager.cs @@ -311,6 +311,7 @@ void QuestUpdated( string apiname, dynamic data ) { break; case 424: //|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4 Progresses.Add( new ProgressExpedition( q, 4, new int[] { 5 } ) ); + Progresses[q.QuestID].SharedCounterShift = 1; break; case 503: //|503|艦隊大整備!|入渠5 diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index d1d2656a8..b89a2ed8c 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -730,7 +730,7 @@ return flag; 参考文献:[【プリセット明石修理】明石カウンターの詳細についての仮説 及びツール作成者様に対応お願いしたいことについて:ニラのブロマガ - ブロマガ](http://ch.nicovideo.jp/nila/blomaga/ar904333) -##### 泊地修理における HP 回復量について +#### 泊地修理における HP 回復量 実験より、以下のように推測する。 @@ -741,8 +741,8 @@ return flag; (但し、 1 <= 回復HP <= 被ダメージ ) ``` -簡単に言えば、修理した時間(分以上だけ見る; 秒部は切り捨て) を 1HPあたりの回復時間 で割った値となる。 -なお、 `入渠秒数` は API から得られた値 (=艦これクライアントの「入渠」画面で表示される値) である。 +簡単に言えば、修理した分数(秒部は切り捨て) を 1HPあたりの回復時間 で割った値となる。 +なお、 `入渠秒数` は API から得られた値 (=艦これクライアントの「入渠」画面で表示される値) である (小数点以下を含む)。 逆に、HPをある値回復したい場合の最低修理時間は以下のようになる。 @@ -930,7 +930,7 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの #### 補強スロットの装備判定 -補強スロットに装備可能な装備は、以下に該当する中で**通常スロットにも装備可能であるもの**である。 +補強スロットに装備可能な装備は、以下に該当する中で **通常スロットにも装備可能であるもの** (and をとったもの) である。 2017/05/27 現在のデータを以下に示す。 * `api_start2.api_mst_equip_exslot` で指定されているカテゴリの装備 @@ -999,11 +999,11 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |任務ID|種別|任務名|達成条件|備考| |--:|:-:|:--|:--|:--| |201|日|敵艦隊を撃破せよ!|勝利1 -|216|日|敵艦隊主力を撃滅せよ!|戦闘1 ※ボス戦闘での敗北はカウントに含まない +|216|日|敵艦隊主力を撃滅せよ!|戦闘1|ボス戦闘での敗北はカウントに含まない |210|日|敵艦隊を10回邀撃せよ!|戦闘10 |211|変|敵空母を3隻撃沈せよ!|空母3|日付の1の位が 3,7,0 の場合出現, デイリー扱い -|212|変|敵輸送船団を叩け!|輸送5|日付の1の位が 2,8 の場合出現, デイリー扱い -|218|日|敵補給艦を3隻撃沈せよ!|輸送3 +|212|変|敵輸送船団を叩け!|輸送5|日付の1の位が 2,8 の場合出現, デイリー扱い, 218:『敵補給艦を3隻撃沈せよ!』とカウンタが干渉 +|218|日|敵補給艦を3隻撃沈せよ!|輸送3|212:『敵輸送船団を叩け!』とカウンタが干渉 |226|日|南西諸島海域の制海権を握れ!|2-(1~5)ボス勝利5 |230|日|敵潜水艦を制圧せよ!|潜水6 |213|週|海上通商破壊作戦|輸送20 @@ -1033,14 +1033,14 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |403|日|「遠征」を10回成功させよう!|遠征成功10 |404|週|大規模遠征作戦、発令!|遠征成功30 |410|週|南方への輸送作戦を成功させよ!|「東京急行」「東京急行(弐)」成功1 -|411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6 -|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4 +|411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6|410:『南方への輸送作戦を成功させよ!』の進捗を引き継ぐ(1/7から始まる) +|424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4|進捗は1/5から始まる(3回成功時点で80%達成になる) |503|日|艦隊大整備!|入渠5 |504|日|艦隊酒保祭り!|補給15回 |605|日|新装備「開発」指令|開発1(失敗可) |606|日|新造艦「建造」指令|建造1 -|607|日|装備「開発」集中強化!|開発3(失敗可) -|608|日|艦娘「建造」艦隊強化!|建造3 +|607|日|装備「開発」集中強化!|開発3(失敗可)|605:『新装備「開発」指令』の進捗を引き継ぐ(1/4から始まる) +|608|日|艦娘「建造」艦隊強化!|建造3|606:『新造艦「建造」指令』の進捗を引き継ぐ(1/4から始まる) |609|日|軍縮条約対応!|解体2 |619|日|装備の改修強化|装備改修1(失敗可) |613|週|資源の再利用|廃棄24回 @@ -1050,7 +1050,7 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |645|月|「洋上補給」物資の調達|三式弾廃棄+(燃料750+弾薬750+ドラム缶(輸送用)x2+九一式徹甲弾)保有 |637|季|「熟練搭乗員」養成|九六式艦戦》★10装備の鳳翔旗艦+勲章2 |643|季|主力「陸攻」の調達|零式艦戦21型x2廃棄+(九六式陸攻x1+九七式艦攻x2)保有 -|633|季|新型艤装の継続研究|大口径主砲x10廃棄+鋼材18000保有 +|663|季|新型艤装の継続研究|大口径主砲x10廃棄+鋼材18000保有 |702|日|艦の「近代化改修」を実施せよ!|近代化改修成功2 |703|週|「近代化改修」を進め、戦備を整えよ!|近代化改修成功15 @@ -1058,13 +1058,18 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの * デイリー開発・建造任務はカウンタが共用。2回目の操作(3回任務の1回目)を行った時点で50%になる * 東京急行遠征任務も共用。7回とあるが6回でok +* 「輸送船団護衛を強化せよ!」は内部処理的に進捗が 1/5 から始まる + * 3回達成時点で "80%以上達成" になるため * 輸送船5隻の変則デイリーと輸送船3隻のデイリーはカウンタが干渉。1隻撃沈で2増える * 場合によっては3隻撃沈のほうが「80%以上達成」になることがある(2/3=50%, 3/3は達成となるため本来発生しえない) * あ号作戦の「出撃」は文字通りであり、戦闘を行う必要はない(ex. 6-1で戦艦2を含めて即帰投しても増える) * 精鋭艦隊演習はマンスリーだが、デイリー(翌朝5:00)で進捗がリセットされる。 -* 機種転換系任務において「機種転換」「部隊編成」でメッセージが異なったり、「熟練搭乗員」を要求する場合があるが、これらの処理は `Consts` に書かれているリストに載っているかで判定される。 +* クォータリー任務の範囲は 3-5, 6-8, 9-11, 12-2 (月) +* 機種転換系任務において「機種転換」「部隊編成」でメッセージが異なったり、「熟練搭乗員」を要求する場合があるが、これらの処理はクライアント側で判定される。 + `Core.swf/core/consts/DutyConst` を参照せよ。 * 216: 「敵艦隊主力を撃滅せよ!」において、 2-2 ボス直行ルートにて敗北した場合に達成にならない現象が確認されている。 そのため、実際の達成条件は「通常戦闘1回もしくはボス勝利1回」であると思われる。 +* 854: 『戦果拡張任務!「Z作戦」前段作戦』では、4つ中3つクリアすると "80%以上" になる ##### クライアント側で達成判定がなされる任務 @@ -1081,9 +1086,11 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの * 651: ネ式エンジンの増産 * 652: 「特注家具」の調達 * 653: 節分特別任務:節分準備! +* 654: 【丙】作戦「彩雲」調達&輸送分解 * 655: 「彩雲」輸送分解 -* 656: 六三一空「晴嵐」隊の編成 -* 659: 精鋭「水戦」隊の新編成 +* 657: 春の準備任務:桃の節句準備! +* 658: 潜水艦武装の強化 +* 666: 精鋭「瑞雲」隊の編成 以上の任務には、このような特性が存在する。 @@ -1093,7 +1100,7 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの * 蔵側には異なる進捗率が表示されることがある これは、装備の保有判定を蔵側で行っており、それによって達成/遂行中を切り替えているためである。 - +`DutyMain.swf/scene/duty/models/DutyData` に判定が記載されている。 #### EnemySlotItemImage @@ -1591,3 +1598,63 @@ elite 級か flagship 級であれば先制雷撃を行う。 放置時の小ジャンプ・ぐりぐり動作や、次の動作までの待ち時間決定で乱数を消費するため、これで調整すれば*理論上は*無限にクリックし続けることができる。 +#### 鎮守府カウンターバーについて + +艦船の読み(一部例外あり)と現在時刻をベースにして内容が決定されている。 +以下に示す情報は 2017/07/01 時点でのもの。 + +艦娘カテゴリは、艦名読み (`api_yomi`) をキーとして下表から決定される。 + +艦娘カテゴリ|艦名読み +--:|:-- + 0|(その他) + 1|ちとせ, きそ, やましろ, きりしま, かもい + 2|ほうしょう, ずいほう, やまと, かが, うんりゅう, ひりゅう, みょうこう, はつはる, あかし, しょうほう, あきつまる, きくづき, あまぎ, いせ, ひゅうが, じんつう, たいげい・りゅうほう, はつかぜ, みずほ, おきなみ, かみかぜ + 3|なち, あしがら, むつ, はやしも, ガングート + 4|ちくま, きさらぎ, おおよど, たいほう, ゆうぐも, ながなみ, もがみ, いそかぜ, やはぎ + 5|ビスマルク, かとり, い8, むらさめ, たつた + 6|はるな, ひよう, そうりゅう, むらくも + 7|じゅんよう, むさし, かこ, あさしも, い19, い14 + 8|むつき, やよい, うづき, ふみづき, あかつき, いかづち, いなづま, あけぼの, おぼろ, あさしお, おおしお, てんりゅう, しらつゆ, はるさめ, あさぐも, やまぐも, まいかぜ, きよしも, まきぐも, ながと, しまかぜ, ゆきかぜ, さかわ, たかなみ, ふぶき, しらゆき, はつゆき, みゆき, いそなみ, あやなみ, しきなみ, リベッチオ, ひびき, みなづき, い26, うらなみ, ふじなみ, しむしゅ, くなしり + 9|リットリオ・イタリア, ローマ, ザラ, アクィラ +10|あきづき, かすみ, しぐれ, あかぎ, あぶくま, あきつしま, かつらぎ, てるづき, い401, まるゆ, はやすい, かわかぜ, かざぐも, あらし, はつづき, おやしお, やまかぜ +11|い58, い168, あがの, のしろ, ゆうばり, くまの, すずや, あまつかぜ, プリンツ・オイゲン, はぎかぜ, グラーフ・ツェッペリン, ゆー511・ろ500, ずいかく, い13, えとろふ +12|ポーラ +13|アイオワ +14|コマンダン・テスト, たいよう +15|サラトガ +16|はるかぜ, あさかぜ, まつかぜ +17|こんごう, ウォースパイト + +なお、以下に示す艦は例外的に別のカテゴリに所属する。 + +艦船ID | 艦船名 | 艦娘カテゴリ +--:|:--|--: +147 | Верный | 4 +466 | 翔鶴改二甲 | 1 +461 | 翔鶴改二 | 2 +436 | 呂500 | 6 + +カテゴリごとの表示される食事は以下の通り。 + +艦娘カテゴリ|05:00~|19:00~|21:00~|22:00~|25:00~ +--:|:--|:--|:--|:--|:-- + 0|なし|ビール|ビール|なし|なし + 1|なし|ビール|日本酒|日本酒|日本酒 + 2|なし|ビール|日本酒|日本酒|なし + 3|なし|ビール|ウイスキー|ウイスキー|ウイスキー + 4|なし|ビール|ウイスキー|ウイスキー|なし + 5|なし|ビール|ワイン|ワイン|ワイン + 6|なし|ビール|ワイン|ワイン|なし + 7|なし|ビール|日本酒|飲みすぎワイン|ウイスキー + 8|ジュース|ジュース|なし|なし|なし + 9|イタリアワイン|イタリアワイン|イタリアワイン|ワイン|なし +10|なし|戦闘糧食|なし|戦闘糧食|なし +11|なし|ジュース|ワイン|ワイン|なし +12|イタリアワイン|イタリアワイン|飲みすぎワイン|飲みすぎワイン|飲みすぎワイン +13|ハンバーガー|ステーキ|ハンバーガー|ウイスキー|なし +14|フランスワイン|フルコース|フルコース|フランスワイン|フランスワイン +15|ターキーサンド|ステーキ|ステーキ|ウイスキー|飲みすぎワイン +16|ターキーサンド|ビール|戦闘糧食|ワイン|なし +17|ターキーサンド|ビール|ウイスキー|ウイスキー|なし + diff --git a/ElectronicObserver/Utility/Storage/DataStorage.cs b/ElectronicObserver/Utility/Storage/DataStorage.cs index 12ea5d5ec..33750afa4 100644 --- a/ElectronicObserver/Utility/Storage/DataStorage.cs +++ b/ElectronicObserver/Utility/Storage/DataStorage.cs @@ -52,7 +52,7 @@ public void Save( string path ) { } catch ( Exception ex ) { - Utility.ErrorReporter.SendErrorReport( ex, "DataStorage の書き込みに失敗しました。" ); + Utility.ErrorReporter.SendErrorReport( ex, GetType().Name + " の書き込みに失敗しました。" ); } } @@ -64,7 +64,7 @@ public void Save( StringBuilder stringBuilder ) { serializer.WriteObject( xw, this ); } } catch ( Exception ex ) { - Utility.ErrorReporter.SendErrorReport( ex, "DataStorage の書き込みに失敗しました。" ); + Utility.ErrorReporter.SendErrorReport( ex, GetType().Name + " の書き込みに失敗しました。" ); } } @@ -81,15 +81,15 @@ public DataStorage Load( string path ) { } catch ( FileNotFoundException ) { - Utility.Logger.Add( 3, string.Format( "DataStorage {0} は存在しません。", path ) ); + Utility.Logger.Add( 3, string.Format( "{0}: {1} は存在しません。", GetType().Name, path ) ); } catch ( DirectoryNotFoundException ) { - Utility.Logger.Add( 3, string.Format( "DataStorage {0} は存在しません。", path ) ); + Utility.Logger.Add( 3, string.Format( "{0}: {1} は存在しません。", GetType().Name, path ) ); } catch ( Exception ex ) { - Utility.ErrorReporter.SendErrorReport( ex, "DataStorage の読み込みに失敗しました。" ); + Utility.ErrorReporter.SendErrorReport( ex, GetType().Name + " の読み込みに失敗しました。" ); } @@ -119,7 +119,7 @@ public void Save( Stream stream ) { } catch ( Exception ex ) { - Utility.ErrorReporter.SendErrorReport( ex, "DataStorage の書き込みに失敗しました。" ); + Utility.ErrorReporter.SendErrorReport( ex, GetType().Name + " の書き込みに失敗しました。" ); } } @@ -137,15 +137,15 @@ public DataStorage Load( Stream stream ) { } catch ( FileNotFoundException ) { - Utility.Logger.Add( 3, string.Format( "DataStorage ファイルは存在しません。" ) ); + Utility.Logger.Add( 3, GetType().Name + ": ファイルは存在しません。" ); } catch ( DirectoryNotFoundException ) { - Utility.Logger.Add( 3, string.Format( "DataStorage ファイルは存在しません。" ) ); + Utility.Logger.Add( 3, GetType().Name + ": ファイルは存在しません。" ); } catch ( Exception ex ) { - Utility.ErrorReporter.SendErrorReport( ex, "DataStorage の読み込みに失敗しました。" ); + Utility.ErrorReporter.SendErrorReport( ex, GetType().Name + " の読み込みに失敗しました。" ); } @@ -161,11 +161,11 @@ public DataStorage Load( TextReader reader ) { } } catch ( DirectoryNotFoundException ) { - Utility.Logger.Add( 3, string.Format( "DataStorage ファイルは存在しません。" ) ); + Utility.Logger.Add( 3, GetType().Name + ": ファイルは存在しません。" ); } catch ( Exception ex ) { - Utility.ErrorReporter.SendErrorReport( ex, "DataStorage の読み込みに失敗しました。" ); + Utility.ErrorReporter.SendErrorReport( ex, GetType().Name + " の読み込みに失敗しました。" ); } diff --git a/README.md b/README.md index 8f2d05368..b3c580f1e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -## 七四式電子観測儀 ---- +# 七四式電子観測儀 現在鋭意開発中の艦これ補助ブラウザです。 -### 実装されている機能 ---- + +## 実装されている機能 ![](https://github.com/andanteyk/ElectronicObserver/wiki/media/mainimage2.png) @@ -32,8 +31,8 @@ なお、全ての機能において艦これ本体の送受信する情報に干渉する操作は行っていません。 -### ダウンロード ---- + +## ダウンロード *このリンクの更新は遅れる可能性があります。最新版は[こちら](http://electronicobserver.blog.fc2.com/)で確認してください。* @@ -41,23 +40,18 @@ [更新内容・履歴はこちらで確認できます。](https://github.com/andanteyk/ElectronicObserver/wiki/ChangeLog) -### 開発者の皆様へ ---- + +## 開発者の皆様へ + +[開発のための情報はこちらに掲載しています。](https://github.com/andanteyk/ElectronicObserver/wiki/ForDev) [Other/Information/](https://github.com/andanteyk/ElectronicObserver/tree/develop/ElectronicObserver/Other/Information) に艦これのAPIや仕様についての情報を掲載しています。 ご自由にお持ちください。但し内容は保証しません。 [ライセンスは MIT License です。](https://github.com/andanteyk/ElectronicObserver/blob/master/LICENSE) -#### ビルド・実行方法 -1. `git clone` (もしくはその他の方法でソースコードを入手) -2. `git submodule init` -3. `git submodule update` -4. 「全てリビルド」して実行 - -### 使用しているライブラリ ---- +## 使用しているライブラリ * [DynamicJson](http://dynamicjson.codeplex.com/) (JSON データの読み書き) - [Ms-PL](https://github.com/andanteyk/ElectronicObserver/blob/master/Licenses/Ms-PL.txt) * [DockPanel Suite](http://dockpanelsuite.com/) (ウィンドウレイアウト) - [MIT License](https://github.com/andanteyk/ElectronicObserver/blob/master/Licenses/DockPanelSuite.txt) @@ -67,8 +61,9 @@ * [SwfExtractor](https://github.com/andanteyk/SwfExtractor) (swf からファイル抽出) - [MIT License](https://github.com/andanteyk/ElectronicObserver/blob/master/Licenses/SwfExtractor.txt) * [LZMA SDK (Software Development Kit)](http://www.7-zip.org/sdk.html) - Public Domain -### 連絡先など ---- + +## 連絡先など * 配布サイト:[ブルネイ工廠電気実験部](http://electronicobserver.blog.fc2.com/) (バグ報告・要望等はこちらにお願いします) * 開発:[Andante](https://twitter.com/andanteyk) + From 94850eded9e5888b7531916919eba06ff6daf422 Mon Sep 17 00:00:00 2001 From: RadarNyan Date: Mon, 3 Jul 2017 08:43:36 +0900 Subject: [PATCH 06/14] Merge Duplicate DestroyItem Log --- .../Observer/kcsapi/api_req_kousyou/destroyitem2.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs index c03d961ba..b82a1f17e 100644 --- a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs +++ b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs @@ -17,13 +17,20 @@ public override void OnRequestReceived( Dictionary data ) { // 削除処理が終わってからだと装備データが取れないため db.QuestProgress.EquipmentDiscarded( APIName, data ); + Dictionary itemsDestroyed = new Dictionary(); foreach ( string sid in data["api_slotitem_ids"].Split( ",".ToCharArray() ) ) { - int id = int.Parse( sid ); - Utility.Logger.Add( 2, KCDatabase.Instance.Equipments[id].NameWithLevel + " を廃棄しました。" ); + string name = KCDatabase.Instance.Equipments[id].NameWithLevel; + int amount; + itemsDestroyed.TryGetValue( name, out amount ); + itemsDestroyed[name] = amount + 1; db.Equipments.Remove( id ); } + + foreach ( var item in itemsDestroyed ) { + Utility.Logger.Add( 2, String.Format( "{0}{1} を廃棄しました。", item.Key, item.Value > 1 ? " x " + item.Value : "" ) ); + } base.OnRequestReceived( data ); } From 21ba67e945144fd79219b24e743b51aac9964c33 Mon Sep 17 00:00:00 2001 From: Andante Date: Mon, 3 Jul 2017 23:54:49 +0900 Subject: [PATCH 07/14] =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E?= =?UTF-8?q?=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ついでに処理を調整 --- .../Observer/kcsapi/api_req_kousyou/destroyitem2.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs index b82a1f17e..ecf3ca8c2 100644 --- a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs +++ b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyitem2.cs @@ -11,7 +11,7 @@ public class destroyitem2 : APIBase { public override void OnRequestReceived( Dictionary data ) { - + KCDatabase db = KCDatabase.Instance; // 削除処理が終わってからだと装備データが取れないため @@ -19,19 +19,19 @@ public override void OnRequestReceived( Dictionary data ) { Dictionary itemsDestroyed = new Dictionary(); - foreach ( string sid in data["api_slotitem_ids"].Split( ",".ToCharArray() ) ) { - int id = int.Parse( sid ); + foreach ( int id in data["api_slotitem_ids"].Split( ",".ToCharArray() ).Select( str => int.Parse( str ) ) ) { string name = KCDatabase.Instance.Equipments[id].NameWithLevel; int amount; itemsDestroyed.TryGetValue( name, out amount ); itemsDestroyed[name] = amount + 1; + db.Equipments.Remove( id ); } foreach ( var item in itemsDestroyed ) { Utility.Logger.Add( 2, String.Format( "{0}{1} を廃棄しました。", item.Key, item.Value > 1 ? " x " + item.Value : "" ) ); } - + base.OnRequestReceived( data ); } From 9456968498a1c7df7005328760b956daa5ce5570 Mon Sep 17 00:00:00 2001 From: Andante Date: Wed, 2 Aug 2017 23:09:35 +0900 Subject: [PATCH 08/14] =?UTF-8?q?=E6=88=A6=E9=97=98=E3=83=AD=E3=82=B0?= =?UTF-8?q?=EF=BC=9A=E3=81=8B=E3=81=B0=E3=81=86=E3=83=95=E3=83=A9=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=9D=E5=AD=98=E5=8F=AF=E8=83=BD=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ダメージ処理を double に変更 * 表示装備を処理できるように(たぶん要らないのでログには書かない) --- .../Data/Battle/Detail/BattleDetail.cs | 38 ++++++++++++++----- .../Data/Battle/Phase/PhaseAirBattle.cs | 10 ++--- .../Data/Battle/Phase/PhaseAirBattleBase.cs | 37 +++++++++--------- .../Data/Battle/Phase/PhaseBaseAirAttack.cs | 8 ++-- .../Data/Battle/Phase/PhaseBaseAirRaid.cs | 8 ++-- .../Data/Battle/Phase/PhaseJetAirBattle.cs | 10 ++--- .../Battle/Phase/PhaseJetBaseAirAttack.cs | 8 ++-- .../Data/Battle/Phase/PhaseNightBattle.cs | 19 +++++++--- .../Data/Battle/Phase/PhaseShelling.cs | 28 ++++++++------ .../Data/Battle/Phase/PhaseSupport.cs | 18 ++++----- .../Data/Battle/Phase/PhaseTorpedo.cs | 27 ++++++------- ElectronicObserver/Utility/Data/Calculator.cs | 26 +++++++++---- 12 files changed, 140 insertions(+), 97 deletions(-) diff --git a/ElectronicObserver/Data/Battle/Detail/BattleDetail.cs b/ElectronicObserver/Data/Battle/Detail/BattleDetail.cs index 0a51ae9ae..be42a87b8 100644 --- a/ElectronicObserver/Data/Battle/Detail/BattleDetail.cs +++ b/ElectronicObserver/Data/Battle/Detail/BattleDetail.cs @@ -11,9 +11,12 @@ namespace ElectronicObserver.Data.Battle.Detail { /// public abstract class BattleDetail { + public double[] RawDamages { get; protected set; } public int[] Damages { get; protected set; } + public bool[] GuardsFlagship { get; protected set; } public CriticalType[] CriticalTypes { get; protected set; } public int AttackType { get; protected set; } + public int[] EquipmentIDs { get; protected set; } public int DefenderHP { get; protected set; } public ShipDataMaster Attacker { get; protected set; } @@ -42,13 +45,16 @@ public enum CriticalType { /// 命中判定の配列。 /// 攻撃種別。 /// 防御側の攻撃を受ける直前のHP。 - public BattleDetail( BattleData bd, int attackerIndex, int defenderIndex, int[] damages, int[] criticalTypes, int attackType, int defenderHP ) { + public BattleDetail( BattleData bd, int attackerIndex, int defenderIndex, double[] damages, int[] criticalTypes, int attackType, int[] equipmentIDs, int defenderHP ) { AttackerIndex = attackerIndex; DefenderIndex = defenderIndex; - Damages = damages; + RawDamages = damages; + Damages = damages.Select( dmg => (int)dmg ).ToArray(); + GuardsFlagship = damages.Select( dmg => dmg != Math.Floor( dmg ) ).ToArray(); CriticalTypes = criticalTypes.Select( i => (CriticalType)i ).ToArray(); AttackType = attackType; + EquipmentIDs = equipmentIDs; DefenderHP = defenderHP; int[] slots; @@ -107,6 +113,14 @@ public override string ToString() { if ( AttackType >= 0 ) builder.Append( "[" ).Append( GetAttackKind() ).Append( "] " ); + /*// it may be useless + if ( EquipmentIDs != null ) { + var eqs = EquipmentIDs.Select( id => KCDatabase.Instance.MasterEquipments[id] ).Where( eq => eq != null ).Select( eq => eq.Name ); + if ( eqs.Any() ) + builder.Append( "(" ).Append( string.Join( ", ", eqs ) ).Append( ") " ); + } + //*/ + for ( int i = 0; i < Damages.Length; i++ ) { if ( CriticalTypes[i] == CriticalType.Invalid ) // カットイン(主砲/主砲)、カットイン(主砲/副砲)時に発生する continue; @@ -114,6 +128,9 @@ public override string ToString() { if ( i > 0 ) builder.Append( " , " ); + if ( GuardsFlagship[i] ) + builder.Append( "<かばう> " ); + switch ( CriticalTypes[i] ) { case CriticalType.Miss: builder.Append( "Miss" ); @@ -125,6 +142,7 @@ public override string ToString() { builder.Append( Damages[i] ).Append( " Critical!" ); break; } + } { @@ -175,8 +193,8 @@ protected virtual string GetDefenderName() { /// public class BattleDayDetail : BattleDetail { - public BattleDayDetail( BattleData bd, int attackerId, int defenderId, int[] damages, int[] criticalTypes, int attackType, int defenderHP ) - : base( bd, attackerId, defenderId, damages, criticalTypes, attackType, defenderHP ) { + public BattleDayDetail( BattleData bd, int attackerId, int defenderId, double[] damages, int[] criticalTypes, int attackType, int[] equipmentIDs, int defenderHP ) + : base( bd, attackerId, defenderId, damages, criticalTypes, attackType, equipmentIDs, defenderHP ) { } protected override int CaclulateAttackKind( int[] slots, int attackerShipID, int defenderShipID ) { @@ -193,8 +211,8 @@ protected override string GetAttackKind() { /// public class BattleSupportDetail : BattleDetail { - public BattleSupportDetail( BattleData bd, int defenderId, int damage, int criticalType, int attackType, int defenderHP ) - : base( bd, -1, defenderId, new int[] { damage }, new int[] { criticalType }, attackType, defenderHP ) { + public BattleSupportDetail( BattleData bd, int defenderId, double damage, int criticalType, int attackType, int defenderHP ) + : base( bd, -1, defenderId, new double[] { damage }, new int[] { criticalType }, attackType, null, defenderHP ) { } protected override string GetAttackerName() { @@ -225,8 +243,8 @@ protected override string GetAttackKind() { /// public class BattleNightDetail : BattleDetail { - public BattleNightDetail( BattleData bd, int attackerId, int defenderId, int[] damages, int[] criticalTypes, int attackType, int defenderHP ) - : base( bd, attackerId, defenderId, damages, criticalTypes, attackType, defenderHP ) { + public BattleNightDetail( BattleData bd, int attackerId, int defenderId, double[] damages, int[] criticalTypes, int attackType, int[] equipmentIDs, int defenderHP ) + : base( bd, attackerId, defenderId, damages, criticalTypes, attackType, equipmentIDs, defenderHP ) { } protected override int CaclulateAttackKind( int[] slots, int attackerShipID, int defenderShipID ) { @@ -245,8 +263,8 @@ public class BattleAirDetail : BattleDayDetail { public int WaveIndex { get; protected set; } - public BattleAirDetail( BattleData bd, int waveIndex, int defenderId, int damage, int criticalType, int attackType, int defenderHP ) - : base( bd, -1, defenderId, new int[] { damage }, new int[] { criticalType }, attackType, defenderHP ) { + public BattleAirDetail( BattleData bd, int waveIndex, int defenderId, double damage, int criticalType, int attackType, int defenderHP ) + : base( bd, -1, defenderId, new double[] { damage }, new int[] { criticalType }, attackType, null, defenderHP ) { WaveIndex = waveIndex; } diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseAirBattle.cs b/ElectronicObserver/Data/Battle/Phase/PhaseAirBattle.cs index 94757916f..021932d28 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseAirBattle.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseAirBattle.cs @@ -21,10 +21,10 @@ public PhaseAirBattle( BattleData data, string title, string suffix = "" ) LaunchedShipIndexFriend = GetLaunchedShipIndex( 0 ); LaunchedShipIndexEnemy = GetLaunchedShipIndex( 1 ); - TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); - BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); - Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); - Damages = ConcatStage3Array( "api_fdam", "api_edam" ); + TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); + BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); + Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); + Damages = ConcatStage3Array( "api_fdam", "api_edam" ); } @@ -84,7 +84,7 @@ private void CalculateAttackDamage( int[] damages ) { } int totalFirepower = firepower.Sum(); - int totalDamage = Damages.Skip( 6 ).Take( 6 ).Sum() + damages.Skip( 18 ).Take( 6 ).Sum(); + int totalDamage = Damages.Select( dmg => (int)dmg ).Skip( 6 ).Take( 6 ).Sum() + damages.Skip( 18 ).Take( 6 ).Sum(); for ( int i = 0; i < firepower.Length; i++ ) { damages[( i < 6 ? i : ( i + 6 ) )] += (int)Math.Round( (double)totalDamage * firepower[i] / Math.Max( totalFirepower, 1 ) ); diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseAirBattleBase.cs b/ElectronicObserver/Data/Battle/Phase/PhaseAirBattleBase.cs index 88ad0c81e..e07d2e254 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseAirBattleBase.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseAirBattleBase.cs @@ -36,7 +36,7 @@ protected void CalculateAttack( int waveIndex, int[] hps ) { // 航空戦は miss/hit=0, critical=1 のため +1 する(通常は miss=0, hit=1, critical=2) BattleDetails.Add( new BattleAirDetail( _battleData, waveIndex, i, Damages[i], Criticals[i] + 1, attackType, hps[i] ) ); - AddDamage( hps, i, Damages[i] ); + AddDamage( hps, i, (int)Damages[i] ); } } } @@ -81,7 +81,7 @@ protected int[] GetLaunchedShipIndex( int index ) { if ( data == null || !data.IsArray ) return new int[0]; - var planes = ( dynamic[] )data; + var planes = (dynamic[])data; if ( planes.Length > index ) { return ( (int[])planes[index] ).Where( i => i > 0 ).Select( i => i - 1 ).ToArray(); } @@ -202,32 +202,33 @@ public ShipData AACutInShip { public bool IsStage3CombinedAvailable { get { return StageFlag != null && StageFlag[2] != 0 && AirBattleData.api_stage3_combined() && AirBattleData.api_stage3_combined != null; } } - protected int[] ConcatStage3Array( string friendName, string enemyName ) { + protected T[] ConcatStage3Array( string friendName, string enemyName ) where T : struct, IComparable { - int[] ret = new int[24]; + T[] ret = new T[24]; + Func toPositive = ( a ) => a.CompareTo( default(T) ) >= 0 ? a : default(T); // => Math.Max( a, 0 ); if ( IsStage3CombinedAvailable ) { - int[] friend = AirBattleData.api_stage3.IsDefined( friendName ) ? (int[])AirBattleData.api_stage3[friendName] : new int[7]; - int[] enemy = AirBattleData.api_stage3.IsDefined( enemyName ) ? (int[])AirBattleData.api_stage3[enemyName] : new int[7]; - int[] friendescort = AirBattleData.api_stage3_combined.IsDefined( friendName ) ? (int[])AirBattleData.api_stage3_combined[friendName] : new int[7]; - int[] enemyescort = AirBattleData.api_stage3_combined.IsDefined( enemyName ) ? (int[])AirBattleData.api_stage3_combined[enemyName] : new int[7]; + T[] friend = AirBattleData.api_stage3.IsDefined( friendName ) ? (T[])AirBattleData.api_stage3[friendName] : new T[7]; + T[] enemy = AirBattleData.api_stage3.IsDefined( enemyName ) ? (T[])AirBattleData.api_stage3[enemyName] : new T[7]; + T[] friendescort = AirBattleData.api_stage3_combined.IsDefined( friendName ) ? (T[])AirBattleData.api_stage3_combined[friendName] : new T[7]; + T[] enemyescort = AirBattleData.api_stage3_combined.IsDefined( enemyName ) ? (T[])AirBattleData.api_stage3_combined[enemyName] : new T[7]; for ( int i = 0; i < 6; i++ ) { - ret[i] = Math.Max( friend[i + 1], 0 ); - ret[i + 6] = Math.Max( enemy[i + 1], 0 ); - ret[i + 12] = Math.Max( friendescort[i + 1], 0 ); - ret[i + 18] = Math.Max( enemyescort[i + 1], 0 ); + ret[i] = toPositive(friend[i + 1]); + ret[i + 6] = toPositive( enemy[i + 1] ); + ret[i + 12] = toPositive( friendescort[i + 1] ); + ret[i + 18] = toPositive( enemyescort[i + 1] ); } } else if ( IsStage3Available ) { - int[] friend = AirBattleData.api_stage3.IsDefined( friendName ) ? (int[])AirBattleData.api_stage3[friendName] : new int[7]; - int[] enemy = AirBattleData.api_stage3.IsDefined( enemyName ) ? (int[])AirBattleData.api_stage3[enemyName] : new int[7]; + T[] friend = AirBattleData.api_stage3.IsDefined( friendName ) ? (T[])AirBattleData.api_stage3[friendName] : new T[7]; + T[] enemy = AirBattleData.api_stage3.IsDefined( enemyName ) ? (T[])AirBattleData.api_stage3[enemyName] : new T[7]; for ( int i = 0; i < 6; i++ ) { - ret[i] = Math.Max( friend[i + 1], 0 ); - ret[i + 6] = Math.Max( enemy[i + 1], 0 ); - ret[i + 12] = ret[i + 18] = 0; + ret[i] = toPositive( friend[i + 1] ); + ret[i + 6] = toPositive( enemy[i + 1] ); + ret[i + 12] = ret[i + 18] = default(T); } } @@ -254,6 +255,6 @@ protected int[] ConcatStage3Array( string friendName, string enemyName ) { /// /// 各艦の被ダメージ /// - public int[] Damages { get; protected set; } + public double[] Damages { get; protected set; } } } diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirAttack.cs b/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirAttack.cs index e12100f75..be0e62609 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirAttack.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirAttack.cs @@ -31,10 +31,10 @@ public PhaseBaseAirAttackUnit( BattleData data, string title, int index ) _squadrons = GetSquadrons().ToArray(); - TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); - BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); - Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); - Damages = ConcatStage3Array( "api_fdam", "api_edam" ); + TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); + BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); + Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); + Damages = ConcatStage3Array( "api_fdam", "api_edam" ); } diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirRaid.cs b/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirRaid.cs index 5d77a82ca..9e6dd862a 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirRaid.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseBaseAirRaid.cs @@ -44,10 +44,10 @@ public PhaseBaseAirRaid( BattleData data, string title ) _squadrons = GetSquadrons().ToArray(); - TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); - BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); - Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); - Damages = ConcatStage3Array( "api_fdam", "api_edam" ); + TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); + BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); + Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); + Damages = ConcatStage3Array( "api_fdam", "api_edam" ); } public override void EmulateBattle( int[] hps, int[] damages ) { diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseJetAirBattle.cs b/ElectronicObserver/Data/Battle/Phase/PhaseJetAirBattle.cs index 6f78be85a..fea938baa 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseJetAirBattle.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseJetAirBattle.cs @@ -27,10 +27,10 @@ public PhaseJetAirBattle( BattleData data, string title ) LaunchedShipIndexFriend = GetLaunchedShipIndex( 0 ); LaunchedShipIndexEnemy = GetLaunchedShipIndex( 1 ); - TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); - BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); - Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); - Damages = ConcatStage3Array( "api_fdam", "api_edam" ); + TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); + BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); + Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); + Damages = ConcatStage3Array( "api_fdam", "api_edam" ); } public override void EmulateBattle( int[] hps, int[] damages ) { @@ -85,7 +85,7 @@ private void CalculateAttackDamage( int[] damages ) { } int totalFirepower = firepower.Sum(); - int totalDamage = Damages.Skip( 6 ).Take( 6 ).Sum() + damages.Skip( 18 ).Take( 6 ).Sum(); + int totalDamage = Damages.Select( dmg => (int)dmg ).Skip( 6 ).Take( 6 ).Sum() + damages.Skip( 18 ).Take( 6 ).Sum(); for ( int i = 0; i < firepower.Length; i++ ) { damages[( i < 6 ? i : ( i + 6 ) )] += (int)Math.Round( (double)totalDamage * firepower[i] / Math.Max( totalFirepower, 1 ) ); diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseJetBaseAirAttack.cs b/ElectronicObserver/Data/Battle/Phase/PhaseJetBaseAirAttack.cs index e3ebb2dac..34959d89c 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseJetBaseAirAttack.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseJetBaseAirAttack.cs @@ -39,10 +39,10 @@ public PhaseJetBaseAirAttackUnit( BattleData data, string title, int index ) _squadrons = GetSquadrons().ToArray(); - TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); - BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); - Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); - Damages = ConcatStage3Array( "api_fdam", "api_edam" ); + TorpedoFlags = ConcatStage3Array( "api_frai_flag", "api_erai_flag" ); + BomberFlags = ConcatStage3Array( "api_fbak_flag", "api_ebak_flag" ); + Criticals = ConcatStage3Array( "api_fcl_flag", "api_ecl_flag" ); + Damages = ConcatStage3Array( "api_fdam", "api_edam" ); } diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseNightBattle.cs b/ElectronicObserver/Data/Battle/Phase/PhaseNightBattle.cs index 79e6dba42..e7f7e94cc 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseNightBattle.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseNightBattle.cs @@ -26,9 +26,10 @@ public PhaseNightBattle( BattleData data, string title, bool isEscort ) int[] attackers = ( (int[])ShellingData.api_at_list ).Skip( 1 ).ToArray(); int[] attackTypes = ( (int[])ShellingData.api_sp_list ).Skip( 1 ).ToArray(); int[][] defenders = ( (dynamic[])ShellingData.api_df_list ).Skip( 1 ).Select( elem => ( (int[])elem ).Where( e => e != -1 ).ToArray() ).ToArray(); + int[][] attackEquipments = ( (dynamic[])ShellingData.api_si_list ).Skip( 1 ).Select( elem => ( (dynamic[])elem ).Select( ch => ch is string ? int.Parse( ch ) : (int)ch ).ToArray() ).ToArray(); int[][] criticals = ( (dynamic[])ShellingData.api_cl_list ).Skip( 1 ).Select( elem => ( (int[])elem ).Where( e => e != -1 ).ToArray() ).ToArray(); - int[][] damages = ( (dynamic[])ShellingData.api_damage ).Skip( 1 ).Select( elem => ( (int[])elem ).Where( e => e != -1 ).ToArray() ).ToArray(); - + double[][] rawDamages = ( (dynamic[])ShellingData.api_damage ).Skip( 1 ).Select( elem => ( (double[])elem ).Where( e => e != -1 ).ToArray() ).ToArray(); + Attacks = new List(); for ( int i = 0; i < attackers.Length; i++ ) { @@ -36,13 +37,14 @@ public PhaseNightBattle( BattleData data, string title, bool isEscort ) attack.Attacker = GetIndex( attackers[i] ); attack.AttackType = attackTypes[i]; + attack.EquipmentIDs = attackEquipments[i]; attack.Defenders = new List(); for ( int k = 0; k < defenders[i].Length; k++ ) { var defender = new PhaseNightBattleDefender(); defender.Defender = GetIndex( defenders[i][k] ); defender.CriticalFlag = criticals[i][k]; - defender.Damage = damages[i][k]; + defender.RawDamage = rawDamages[i][k]; attack.Defenders.Add( defender ); } @@ -66,7 +68,7 @@ public override void EmulateBattle( int[] hps, int[] damages ) { foreach ( var attack in Attacks ) { foreach ( var defs in attack.Defenders.GroupBy( d => d.Defender ) ) { - BattleDetails.Add( new BattleNightDetail( _battleData, attack.Attacker, defs.Key, defs.Select( d => d.Damage ).ToArray(), defs.Select( d => d.CriticalFlag ).ToArray(), attack.AttackType, hps[defs.Key] ) ); + BattleDetails.Add( new BattleNightDetail( _battleData, attack.Attacker, defs.Key, defs.Select( d => d.RawDamage ).ToArray(), defs.Select( d => d.CriticalFlag ).ToArray(), attack.AttackType, attack.EquipmentIDs, hps[defs.Key] ) ); AddDamage( hps, defs.Key, defs.Sum( d => d.Damage ) ); } @@ -81,6 +83,7 @@ public class PhaseNightBattleAttack { public int Attacker; public int AttackType; public List Defenders; + public int[] EquipmentIDs; public PhaseNightBattleAttack() { } @@ -91,10 +94,14 @@ public override string ToString() { public class PhaseNightBattleDefender { public int Defender; public int CriticalFlag; - public int Damage; + public double RawDamage; + public bool GuardsFlagship { get { return RawDamage != Math.Floor( RawDamage ); } } + public int Damage { get { return (int)RawDamage; } } public override string ToString() { - return string.Format( "{0};{1}-{2}", Defender, Damage, CriticalFlag == 0 ? "miss" : CriticalFlag == 1 ? "dmg" : CriticalFlag == 2 ? "crit" : "INVALID" ); + return string.Format( "{0};{1}-{2}{3}", Defender, Damage, + CriticalFlag == 0 ? "miss" : CriticalFlag == 1 ? "dmg" : CriticalFlag == 2 ? "crit" : "INVALID", + GuardsFlagship ? " (guard)" : "" ); } } diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseShelling.cs b/ElectronicObserver/Data/Battle/Phase/PhaseShelling.cs index 2627cb9ed..3469a0f0a 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseShelling.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseShelling.cs @@ -24,6 +24,7 @@ public class PhaseShellingAttack { public int Attacker; public int AttackType; public List Defenders; + public int[] EquipmentIDs; public PhaseShellingAttack() { } @@ -34,10 +35,14 @@ public override string ToString() { public class PhaseShellingDefender { public int Defender; public int CriticalFlag; - public int Damage; + public double RawDamage; + public bool GuardsFlagship { get { return RawDamage != Math.Floor( RawDamage ); } } + public int Damage { get { return (int)RawDamage; } } public override string ToString() { - return string.Format( "{0};{1}-{2}", Defender, Damage, CriticalFlag == 0 ? "miss" : CriticalFlag == 1 ? "dmg" : CriticalFlag == 2 ? "crit" : "INVALID" ); + return string.Format( "{0};{1}-{2}{3}", Defender, Damage, + CriticalFlag == 0 ? "miss" : CriticalFlag == 1 ? "dmg" : CriticalFlag == 2 ? "crit" : "INVALID", + GuardsFlagship ? " (guard)" : "" ); } } @@ -60,10 +65,10 @@ public PhaseShelling( BattleData data, string title, int phaseID, string suffix, int[] attackers = ( (int[])ShellingData.api_at_list ).Skip( 1 ).ToArray(); int[] attackTypes = ( (int[])ShellingData.api_at_type ).Skip( 1 ).ToArray(); int[][] defenders = ( (dynamic[])ShellingData.api_df_list ).Skip( 1 ).Select( elem => (int[])elem ).ToArray(); + int[][] attackEquipments = ( (dynamic[])ShellingData.api_si_list ).Skip( 1 ).Select( elem => ((dynamic[])elem).Select( ch => ch is string ? int.Parse( ch ) : (int)ch ).ToArray() ).ToArray(); int[][] criticalFlags = ( (dynamic[])ShellingData.api_cl_list ).Skip( 1 ).Select( elem => (int[])elem ).ToArray(); - int[][] damages = ( (dynamic[])ShellingData.api_damage ).Skip( 1 ).Select( elem => ( (int[])elem ).Select( p => Math.Max( p, 0 ) ).ToArray() ).ToArray(); - - + double[][] rawDamages = ( (dynamic[])ShellingData.api_damage ).Skip( 1 ).Select( elem => ( (double[])elem ).Select( p => Math.Max( p, 0 ) ).ToArray() ).ToArray(); + Attacks = new List(); for ( int i = 0; i < attackers.Length; i++ ) { @@ -95,8 +100,8 @@ public PhaseShelling( BattleData data, string title, int phaseID, string suffix, defender.Defender += 6; defender.CriticalFlag = criticalFlags[i][k]; - defender.Damage = damages[i][k]; - + defender.RawDamage = rawDamages[i][k]; + attack.Defenders.Add( defender ); } @@ -114,7 +119,7 @@ public PhaseShelling( BattleData data, string title, int phaseID, string suffix, defender.Defender += 12; defender.CriticalFlag = criticalFlags[i][k]; - defender.Damage = damages[i][k]; + defender.RawDamage = rawDamages[i][k]; attack.Defenders.Add( defender ); } @@ -127,14 +132,15 @@ public PhaseShelling( BattleData data, string title, int phaseID, string suffix, defender.Defender = defenders[i][k] - 1; defender.CriticalFlag = criticalFlags[i][k]; - defender.Damage = damages[i][k]; - + defender.RawDamage = rawDamages[i][k]; + attack.Defenders.Add( defender ); } } attack.AttackType = attackTypes[i]; + attack.EquipmentIDs = attackEquipments[i]; Attacks.Add( attack ); } @@ -160,7 +166,7 @@ public override void EmulateBattle( int[] hps, int[] damages ) { foreach ( var attack in Attacks ) { foreach ( var defs in attack.Defenders.GroupBy( d => d.Defender ) ) { - BattleDetails.Add( new BattleDayDetail( _battleData, attack.Attacker, defs.Key, defs.Select( d => d.Damage ).ToArray(), defs.Select( d => d.CriticalFlag ).ToArray(), attack.AttackType, hps[defs.Key] ) ); + BattleDetails.Add( new BattleDayDetail( _battleData, attack.Attacker, defs.Key, defs.Select( d => d.RawDamage ).ToArray(), defs.Select( d => d.CriticalFlag ).ToArray(), attack.AttackType, attack.EquipmentIDs, hps[defs.Key] ) ); AddDamage( hps, defs.Key, defs.Sum( d => d.Damage ) ); } diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseSupport.cs b/ElectronicObserver/Data/Battle/Phase/PhaseSupport.cs index 59b84ee79..d820d94f2 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseSupport.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseSupport.cs @@ -16,8 +16,6 @@ public class PhaseSupport : PhaseBase { public PhaseSupport( BattleData data, string title ) : base( data, title ) { - var empty = Enumerable.Repeat( 0, 6 ); - switch ( SupportFlag ) { case 1: // 空撃 { @@ -25,7 +23,7 @@ public PhaseSupport( BattleData data, string title ) // 敵連合でも api_stage3_combined は存在せず、[13] になる - Damages = ( (int[])RawData.api_support_info.api_support_airatack.api_stage3.api_edam ).Skip( 1 ).ToArray(); + Damages = ( (double[])RawData.api_support_info.api_support_airatack.api_stage3.api_edam ).Skip( 1 ).ToArray(); Criticals = ( (int[])RawData.api_support_info.api_support_airatack.api_stage3.api_ecl_flag ).Skip( 1 ).ToArray(); // 航空戦なので crit フラグが違う @@ -39,23 +37,23 @@ public PhaseSupport( BattleData data, string title ) case 2: // 砲撃 case 3: // 雷撃 { - var dmg = ( (int[])RawData.api_support_info.api_support_hourai.api_damage ).Skip( 1 ); + var dmg = ( (double[])RawData.api_support_info.api_support_hourai.api_damage ).Skip( 1 ); var cl = ( (int[])RawData.api_support_info.api_support_hourai.api_cl_list ).Skip( 1 ); if ( dmg.Count() == 12 ) Damages = dmg.ToArray(); else if ( dmg.Count() == 6 ) - Damages = dmg.Concat( empty ).ToArray(); + Damages = dmg.Concat( Enumerable.Repeat( 0.0, 6 ) ).ToArray(); if ( cl.Count() == 12 ) Criticals = cl.ToArray(); else if ( cl.Count() == 6 ) - Criticals = cl.Concat( empty ).ToArray(); + Criticals = cl.Concat( Enumerable.Repeat( 0, 6 ) ).ToArray(); } break; default: - Damages = new int[12]; + Damages = new double[12]; Criticals = new int[12]; break; } @@ -73,14 +71,14 @@ public override void EmulateBattle( int[] hps, int[] damages ) { for ( int i = 0; i < 6; i++ ) { if ( _battleData.Initial.EnemyMembers[i] > 0 ) { BattleDetails.Add( new BattleSupportDetail( _battleData, i + 6, Damages[i], Criticals[i], SupportFlag, hps[i + 6] ) ); - AddDamage( hps, i + 6, Damages[i] ); + AddDamage( hps, i + 6, (int)Damages[i] ); } } if ( ( _battleData.BattleType & BattleData.BattleTypeFlag.EnemyCombined ) != 0 ) { for ( int i = 0; i < 6; i++ ) { if ( _battleData.Initial.EnemyMembersEscort[i] > 0 ) { BattleDetails.Add( new BattleSupportDetail( _battleData, i + 18, Damages[i + 6], Criticals[i + 6], SupportFlag, hps[i + 18] ) ); - AddDamage( hps, i + 18, Damages[i + 6] ); + AddDamage( hps, i + 18, (int)Damages[i + 6] ); } } } @@ -127,7 +125,7 @@ public FleetData SupportFleet { /// /// 与ダメージ [12] /// - public int[] Damages { get; private set; } + public double[] Damages { get; private set; } /// /// クリティカルフラグ [12] diff --git a/ElectronicObserver/Data/Battle/Phase/PhaseTorpedo.cs b/ElectronicObserver/Data/Battle/Phase/PhaseTorpedo.cs index 062cc2933..2a61dd652 100644 --- a/ElectronicObserver/Data/Battle/Phase/PhaseTorpedo.cs +++ b/ElectronicObserver/Data/Battle/Phase/PhaseTorpedo.cs @@ -28,10 +28,10 @@ public PhaseTorpedo( BattleData data, string title, int phaseID ) IsShortFormat = ( (int[])TorpedoData.api_fdam ).Length <= 7; - Damages = GetConcatArray( "api_fdam", "api_edam" ); - AttackDamages = GetConcatArray( "api_fydam", "api_eydam" ); - Targets = GetConcatArray( "api_frai", "api_erai" ); - CriticalFlags = GetConcatArray( "api_fcl", "api_ecl" ); + Damages = GetConcatArray( "api_fdam", "api_edam" ); + AttackDamages = GetConcatArray( "api_fydam", "api_eydam" ); + Targets = GetConcatArray( "api_frai", "api_erai" ); + CriticalFlags = GetConcatArray( "api_fcl", "api_ecl" ); } @@ -67,13 +67,14 @@ public override void EmulateBattle( int[] hps, int[] damages ) { if ( PhaseBase.IsIndexEnemy( i ) && IsShortFormat && IsCombined ) target += 12; - BattleDetails.Add( new BattleDayDetail( _battleData, i, target, new int[] { AttackDamages[i] }, new int[] { CriticalFlags[i] }, -1, currentHP[target] ) ); + BattleDetails.Add( new BattleDayDetail( _battleData, i, target, new double[] { AttackDamages[i] + Damages[target] - Math.Floor( Damages[target] ) }, //propagates "guards flagship" flag + new int[] { CriticalFlags[i] }, -1, null, currentHP[target] ) ); currentHP[target] -= Math.Max( AttackDamages[i], 0 ); } } for ( int i = 0; i < hps.Length; i++ ) { - AddDamage( hps, i, Damages[i] ); + AddDamage( hps, i, (int)Damages[i] ); damages[i] += AttackDamages[i]; } @@ -88,7 +89,7 @@ public dynamic TorpedoData { /// /// 各艦の被ダメージ /// - public int[] Damages { get; private set; } + public double[] Damages { get; private set; } /// /// 各艦の与ダメージ @@ -109,9 +110,9 @@ public dynamic TorpedoData { private bool IsShortFormat { get; set; } - private int[] GetConcatArray( string friendName, string enemyName ) { - var friend = ( (int[])TorpedoData[friendName] ).Skip( 1 ); - var enemy = ( (int[])TorpedoData[enemyName] ).Skip( 1 ); + private T[] GetConcatArray( string friendName, string enemyName ) { + var friend = ( (T[])TorpedoData[friendName] ).Skip( 1 ); + var enemy = ( (T[])TorpedoData[enemyName] ).Skip( 1 ); // 敵連合艦隊 if ( friend.Count() == 12 && enemy.Count() == 12 ) { @@ -122,16 +123,16 @@ private int[] GetConcatArray( string friendName, string enemyName ) { } else { if ( IsCombined ) { - return Enumerable.Repeat( 0, 6 ) + return Enumerable.Repeat( default( T ), 6 ) .Concat( enemy ) .Concat( friend ) - .Concat( Enumerable.Repeat( 0, 6 ) ) + .Concat( Enumerable.Repeat( default( T ), 6 ) ) .ToArray(); } else { return friend .Concat( enemy ) - .Concat( Enumerable.Repeat( 0, 12 ) ) + .Concat( Enumerable.Repeat( default( T ), 12 ) ) .ToArray(); } } diff --git a/ElectronicObserver/Utility/Data/Calculator.cs b/ElectronicObserver/Utility/Data/Calculator.cs index b08208813..8dc45e373 100644 --- a/ElectronicObserver/Utility/Data/Calculator.cs +++ b/ElectronicObserver/Utility/Data/Calculator.cs @@ -899,16 +899,17 @@ public static NightAttackKind GetNightAttackKind( int[] slot, int attackerShipID if ( slot == null ) return NightAttackKind.Unknown; - for ( int i = 0; i < slot.Length; i++ ) { - EquipmentDataMaster eq = KCDatabase.Instance.MasterEquipments[slot[i]]; - if ( eq == null ) continue; + var eqs = slot.Select( id => KCDatabase.Instance.MasterEquipments[id] ).ToArray(); + foreach ( var eq in eqs.Where( e => e != null ) ) { + int eqtype = eq.EquipmentType[2]; switch ( eqtype ) { case 1: case 2: - case 3: //主砲 + case 3: + case 38: //主砲 mainguncnt++; break; case 4: //副砲 @@ -989,10 +990,21 @@ public static NightAttackKind GetNightAttackKind( int[] slot, int attackerShipID return NightAttackKind.DepthCharge; else if ( slot.Length > 0 ) { - EquipmentDataMaster eq = KCDatabase.Instance.MasterEquipments[slot[0]]; - if ( eq != null && ( eq.CategoryType == 5 || eq.CategoryType == 32 ) ) { //最初のスロット==魚雷 (本来の判定とは微妙に異なるが無問題) - return NightAttackKind.Torpedo; + + foreach ( var eq in eqs.Where( e => e != null ) ) { + switch ( eq.CategoryType ) { + case 1: + case 2: + case 3: + case 4: + case 38: + return NightAttackKind.Shelling; + case 5: + case 32: + return NightAttackKind.Torpedo; + } } + } } From 39ed683e7a083ca2970901542815d5b66afe0cde Mon Sep 17 00:00:00 2001 From: Andante Date: Wed, 2 Aug 2017 23:13:57 +0900 Subject: [PATCH 09/14] =?UTF-8?q?(=E3=83=87=E3=83=90=E3=83=83=E3=82=B0?= =?UTF-8?q?=E4=B8=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronicObserver/Data/FleetManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ElectronicObserver/Data/FleetManager.cs b/ElectronicObserver/Data/FleetManager.cs index 5ffd7221e..44fa68f4c 100644 --- a/ElectronicObserver/Data/FleetManager.cs +++ b/ElectronicObserver/Data/FleetManager.cs @@ -298,8 +298,9 @@ public void UpdateConditionPrediction() { else if ( startsWithBmin ) ConditionPredictMin = bmin; else { + AddConditionDebugLog( "Cond-Update: empty-start: " + ConditionPredictMin + " -> " + newPredictMin ); + System.Media.SystemSounds.Exclamation.Play(); ConditionPredictMin = newPredictMin; // 空集合; 新しいほうを設定 - AddConditionDebugLog( "Cond-Update: empty-start: " + newPredictMin ); } if ( endsWithBpre ) @@ -309,14 +310,16 @@ public void UpdateConditionPrediction() { else if ( endsWidthBmax ) ConditionPredictMax = bmax; else { + AddConditionDebugLog( "Cond-Update: empty-end: " + ConditionPredictMax + " -> " + newPredictMax ); + System.Media.SystemSounds.Exclamation.Play(); ConditionPredictMax = newPredictMax; // 空集合; 新しいほうを設定 - AddConditionDebugLog( "Cond-Update: empty-end: " + newPredictMax ); } } LabelFinally: + AddConditionDebugLog( "Cond-Update: Bound: " + ConditionPredictMin + " ~ " + ConditionPredictMax ); AddConditionDebugLog( "Cond-Update: Accuracy: " + ConditionBorderAccuracy ); LastConditionUpdated = now; From 0d3b706fd725ccca754abd4b2d5a1814d1fa0ceb Mon Sep 17 00:00:00 2001 From: Andante Date: Sat, 5 Aug 2017 00:36:52 +0900 Subject: [PATCH 10/14] =?UTF-8?q?=E6=96=B0=E8=A6=81=E7=B4=A0=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=83=BB=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 固有対空カットインに艦名を追加 * 文月改二の対空カットインに対応 * 新経験値テーブルに対応 * 図鑑:リソース名が見切れるので長さ調整 * 設定:間違って非表示にしていたものを再表示 * ステータスバーにおいて、改行を含むログが出た時崩れる不具合を修正 --- Browser/FormBrowser.cs | 2 +- ElectronicObserver/Data/Constants.cs | 28 +++-- .../Other/Information/kcmemo.md | 83 +++++++++--- ElectronicObserver/Utility/Data/Calculator.cs | 31 +++-- ElectronicObserver/Utility/Data/ExpTable.cs | 14 ++- .../Window/Dialog/DialogAlbumMasterShip.cs | 2 +- .../Dialog/DialogConfiguration.Designer.cs | 118 +++++++++--------- .../Window/FormMain.Designer.cs | 13 +- ElectronicObserver/Window/FormMain.cs | 2 +- 9 files changed, 173 insertions(+), 120 deletions(-) diff --git a/Browser/FormBrowser.cs b/Browser/FormBrowser.cs index 1b9ad541f..169a8795d 100644 --- a/Browser/FormBrowser.cs +++ b/Browser/FormBrowser.cs @@ -1053,7 +1053,7 @@ private void ToolMenu_Other_LastScreenShot_CopyToClipboard_Click( object sender, } } catch ( Exception ex ) { BrowserHost.AsyncRemoteRun( () => - BrowserHost.Proxy.SendErrorReport( ex.ToString(), "スクリーンショットのクリップボードへのコピーに失敗しました。" ) ); + BrowserHost.Proxy.SendErrorReport( ex.Message, "スクリーンショットのクリップボードへのコピーに失敗しました。" ) ); } } } diff --git a/ElectronicObserver/Data/Constants.cs b/ElectronicObserver/Data/Constants.cs index 142a98b0d..fb8c2dc20 100644 --- a/ElectronicObserver/Data/Constants.cs +++ b/ElectronicObserver/Data/Constants.cs @@ -614,11 +614,11 @@ public static string GetAACutinKind( int id ) { case 0: return "なし"; case 1: - return "高角砲x2/電探"; + return "高角砲x2/電探(秋月)"; case 2: - return "高角砲/電探"; + return "高角砲/電探(秋月)"; case 3: - return "高角砲x2"; + return "高角砲x2(秋月)"; case 4: return "大口径主砲/三式弾/高射装置/電探"; case 5: @@ -632,27 +632,29 @@ public static string GetAACutinKind( int id ) { case 9: return "高角砲/高射装置"; case 10: - return "高角砲/集中機銃/電探"; + return "高角砲/集中機銃/電探(摩耶)"; case 11: - return "高角砲/集中機銃"; + return "高角砲/集中機銃(摩耶)"; case 12: return "集中機銃/機銃/電探"; case 14: - return "高角砲/機銃/電探"; + return "高角砲/機銃/電探(五十鈴)"; case 15: - return "高角砲/機銃"; + return "高角砲/機銃(五十鈴)"; case 16: - return "高角砲/機銃/電探"; + return "高角砲/機銃/電探(霞)"; case 17: - return "高角砲/機銃"; + return "高角砲/機銃(霞)"; case 18: - return "集中機銃"; + return "集中機銃(皐月)"; case 19: - return "高角砲/集中機銃"; + return "高角砲/集中機銃(鬼怒)"; case 20: - return "集中機銃"; + return "集中機銃(鬼怒)"; case 21: - return "高角砲/電探"; + return "高角砲/電探(由良)"; + case 22: + return "集中機銃(文月)"; default: return "不明"; } diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index b89a2ed8c..7e368c7b1 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -58,10 +58,15 @@ value = min + ceil( ( max - min ) * ( 0.4 or 0.8 ) * Lv / 99 ) 2017/04/05 アップデートにより、敵艦IDの先頭が 501 → 1501 に変更された。それに伴ってフィルタ処理が変更されたのか、衣替え艦娘のデータがマスターから消滅した。 引き続き図鑑や `api_start2` の画像位置設定からは参照可能。 -以下に 2017/03/01 時点における ID と対応する艦娘及び衣装を示す。なお、ID: 811~900 以外の名称については(参照できないため)公式のものではない。 +以下に 2017/08/02 時点における ID と対応する艦娘及び衣装を示す。なお、ID: 811~900 以外の名称については(参照できないため)公式のものではない。 |ID|艦名| |--:|:--| +|805|梅雨漣| +|806|梅雨扶桑| +|807|梅雨神威| +|808|梅雨神威改| +|809|梅雨神威改母| |810|買い物榛名| |811|桃節句潮| |812|桃節句潮改二| @@ -575,6 +580,7 @@ int 揚陸攻撃ID判定() { |19|高角砲(非高射装置)/集中機銃|鬼怒改二| |20|集中機銃|鬼怒改二| |21|高角砲/電探|由良改二| +|22|集中機銃|文月改二| 秋月型のみ対空電探でなくても可。 @@ -894,33 +900,31 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |対象艦ID|対象艦|装備可能|装備不可能| |:--|:--|:--|:--| -|178|Bismarck drei|魚雷|| -|136, 148, 275, 276|大和改, 武蔵改, 長門改, 陸奥改|大口径主砲(II), 水上戦闘機|| |131, 143|大和, 武蔵|大口径主砲(II)|| -|445|秋津洲|大型飛行艇, 輸送機材|特殊潜航艇, 上陸用舟艇, 対地装備, 特型内火艇| -|450|秋津洲改|大型飛行艇, ソナー, 航空要員, 輸送機材|特殊潜航艇| +|136, 148, 275, 276|大和改, 武蔵改, 長門改, 陸奥改|大口径主砲(II), 水上戦闘機|| +|147|Верный|上陸用舟艇, 追加装甲(中型)・特型内火艇|| +|178|Bismarck drei|魚雷|| +|199, 418, 468, 487, 490, 548|大潮改二, 皐月改二, 朝潮改二丁, 鬼怒改二, 荒潮改二, 文月改二|上陸用舟艇, 特型内火艇|| |200|阿武隈改二|特殊潜航艇, 上陸用舟艇, 特型内火艇|| -|352|速吸改|艦上攻撃機, 大型電探, ソナー, 上陸用舟艇, 特型内火艇|| |343, 356|香取改, 鹿島改|探照灯|| -|464|霞改二|上陸用舟艇, 司令部施設, 特型内火艇|| -|470|霞改二乙|大型電探, 上陸用舟艇, 特型内火艇|| +|352|速吸改|艦上攻撃機, 大型電探, ソナー, 上陸用舟艇, 特型内火艇|| |358, 361, 446, 447|Zara改, Pola改, Italia, Roma改|水上爆撃機, 水上戦闘機|| -|199, 418, 468|大潮改二, 皐月改二, 朝潮改二丁|上陸用舟艇, 特型内火艇|| -|147|Верный|上陸用舟艇, 追加装甲(中型)・特型内火艇|| -|434, 435, 469|睦月改二, 如月改二, 江風改二|上陸用舟艇|| -|487|鬼怒改二|上陸用舟艇, 特型内火艇|| |372|Commandant Teste改|ソナー, オートジャイロ, 航空要員, 大型探照灯, 輸送機材|爆雷, 特殊潜航艇| -|491|Commandant Teste|ソナー, オートジャイロ, 航空要員, 大型探照灯, 輸送機材|爆雷, 特殊潜航艇, 上陸用舟艇, 特型内火艇| +|380|大鷹改|ソナー, 爆雷|艦上偵察機, オートジャイロ, 大型ソナー| +|434, 435, 469|睦月改二, 如月改二, 江風改二|上陸用舟艇|| +|445|秋津洲|大型飛行艇, 輸送機材|特殊潜航艇, 上陸用舟艇, 対地装備, 特型内火艇| +|450|秋津洲改|大型飛行艇, ソナー, 航空要員, 輸送機材|特殊潜航艇| +|464|霞改二|上陸用舟艇, 司令部施設, 特型内火艇|| |466, 467|翔鶴改二甲, 瑞鶴改二甲|輸送機材, 噴式戦闘機, 噴式戦闘爆撃機, 噴式攻撃機, 噴式偵察機|| -|490|荒潮改二|上陸用舟艇, 特型内火艇|| +|470|霞改二乙|大型電探, 上陸用舟艇, 特型内火艇|| +|488|由良改二|水上爆撃機, 特殊潜航艇, 上陸用舟艇, 航空要員, 水上戦闘機, 特型内火艇|| +|491|Commandant Teste|ソナー, オートジャイロ, 航空要員, 大型探照灯, 輸送機材|爆雷, 特殊潜航艇, 上陸用舟艇, 特型内火艇| |496|Zara due|水上爆撃機, 航空要員, 大型探照灯, 水上戦闘機|| |500|神威改母|副砲, ソナー, 爆雷, 上陸用舟艇, 追加装甲(中型), 探照灯, 照明弾, 司令部施設, 対地装備, 水上艦要員, 大型ソナー, 大型飛行艇, 特型内火艇, 輸送機材|| |521|春日丸||艦上攻撃機, 艦上偵察機, 大型電探, オートジャイロ, 対潜哨戒機, 司令部施設, 大型ソナー| |526|大鷹||艦上偵察機, オートジャイロ, 対潜哨戒機, 大型ソナー| -|380|大鷹改|ソナー, 爆雷|艦上偵察機, オートジャイロ, 大型ソナー| |529|大鷹改二|ソナー, 爆雷|| |541|長門改二|小口径主砲, 上陸用舟艇, 大口径主砲(II), 水上戦闘機, 特型内火艇|| -|488|由良改二|水上爆撃機, 特殊潜航艇, 上陸用舟艇, 航空要員, 水上戦闘機, 特型内火艇|| (艦船IDが特殊装備リストに含まれていた場合は*マスターデータの内容にかかわらず*装備可能・不可能にする、というコードになっている) つまりある意味では不正な装備ともいえる(?) @@ -1025,6 +1029,8 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |266|月|「水上反撃部隊」突入せよ!|2-5ボスS勝利1|要駆逐旗艦、重巡1軽巡1駆逐4 |822|季|沖ノ島海域迎撃戦|2-4ボスS勝利2 |854|季|戦果拡張任務!「Z作戦」前段作戦|2-4・6-1・6-3ボスA勝利各1/6-4ボスS勝利1 +|861|季|強行輸送艦隊、抜錨!|1-6終点到達2|要(航空戦艦or補給艦)2 +|862|季|前線の航空偵察を実施せよ!|6-3ボスA勝利2|要水母1軽巡2 |303|日|「演習」で練度向上!|演習3 |304|日|「演習」で他提督を圧倒せよ!|演習勝利5 |302|週|大規模演習|演習勝利20 @@ -1035,6 +1041,7 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの |410|週|南方への輸送作戦を成功させよ!|「東京急行」「東京急行(弐)」成功1 |411|週|南方への鼠輸送を継続実施せよ!|「東京急行」「東京急行(弐)」成功6|410:『南方への輸送作戦を成功させよ!』の進捗を引き継ぐ(1/7から始まる) |424|月|輸送船団護衛を強化せよ!|「海上護衛任務」成功4|進捗は1/5から始まる(3回成功時点で80%達成になる) +|426|季|海上通商航路の警戒を厳とせよ!|「警備任務」「対潜警戒任務」「海上護衛任務」「強行偵察任務」成功各1 |503|日|艦隊大整備!|入渠5 |504|日|艦隊酒保祭り!|補給15回 |605|日|新装備「開発」指令|開発1(失敗可) @@ -1601,7 +1608,7 @@ elite 級か flagship 級であれば先制雷撃を行う。 #### 鎮守府カウンターバーについて 艦船の読み(一部例外あり)と現在時刻をベースにして内容が決定されている。 -以下に示す情報は 2017/07/01 時点でのもの。 +以下に示す情報は 2017/08/02 時点でのもの。 艦娘カテゴリは、艦名読み (`api_yomi`) をキーとして下表から決定される。 @@ -1609,22 +1616,23 @@ elite 級か flagship 級であれば先制雷撃を行う。 --:|:-- 0|(その他) 1|ちとせ, きそ, やましろ, きりしま, かもい - 2|ほうしょう, ずいほう, やまと, かが, うんりゅう, ひりゅう, みょうこう, はつはる, あかし, しょうほう, あきつまる, きくづき, あまぎ, いせ, ひゅうが, じんつう, たいげい・りゅうほう, はつかぜ, みずほ, おきなみ, かみかぜ + 2|ほうしょう, ずいほう, やまと, かが, うんりゅう, ひりゅう, みょうこう, はつはる, あかし, しょうほう, あきつまる, きくづき, あまぎ, いせ, ひゅうが, はつかぜ, みずほ, かみかぜ 3|なち, あしがら, むつ, はやしも, ガングート 4|ちくま, きさらぎ, おおよど, たいほう, ゆうぐも, ながなみ, もがみ, いそかぜ, やはぎ 5|ビスマルク, かとり, い8, むらさめ, たつた 6|はるな, ひよう, そうりゅう, むらくも 7|じゅんよう, むさし, かこ, あさしも, い19, い14 - 8|むつき, やよい, うづき, ふみづき, あかつき, いかづち, いなづま, あけぼの, おぼろ, あさしお, おおしお, てんりゅう, しらつゆ, はるさめ, あさぐも, やまぐも, まいかぜ, きよしも, まきぐも, ながと, しまかぜ, ゆきかぜ, さかわ, たかなみ, ふぶき, しらゆき, はつゆき, みゆき, いそなみ, あやなみ, しきなみ, リベッチオ, ひびき, みなづき, い26, うらなみ, ふじなみ, しむしゅ, くなしり + 8|むつき, やよい, うづき, ふみづき, あかつき, いかづち, いなづま, あけぼの, おぼろ, あさしお, おおしお, てんりゅう, しらつゆ, はるさめ, あさぐも, やまぐも, まいかぜ, きよしも, まきぐも, ながと, しまかぜ, ゆきかぜ, さかわ, たかなみ, ふぶき, しらゆき, はつゆき, みゆき, いそなみ, あやなみ, しきなみ, リベッチオ, ひびき, みなづき, い26, うらなみ, しむしゅ, くなしり, なか 9|リットリオ・イタリア, ローマ, ザラ, アクィラ 10|あきづき, かすみ, しぐれ, あかぎ, あぶくま, あきつしま, かつらぎ, てるづき, い401, まるゆ, はやすい, かわかぜ, かざぐも, あらし, はつづき, おやしお, やまかぜ -11|い58, い168, あがの, のしろ, ゆうばり, くまの, すずや, あまつかぜ, プリンツ・オイゲン, はぎかぜ, グラーフ・ツェッペリン, ゆー511・ろ500, ずいかく, い13, えとろふ +11|い58, い168, あがの, のしろ, くまの, すずや, あまつかぜ, プリンツ・オイゲン, はぎかぜ, グラーフ・ツェッペリン, ゆー511・ろ500, ずいかく, い13, えとろふ 12|ポーラ 13|アイオワ 14|コマンダン・テスト, たいよう 15|サラトガ 16|はるかぜ, あさかぜ, まつかぜ 17|こんごう, ウォースパイト +18|ゆら, きぬ, じんつう, せんだい, おきなみ, ふじなみ, ゆうばり, みくま, たいげい・りゅうほう, きたかみ, おおい なお、以下に示す艦は例外的に別のカテゴリに所属する。 @@ -1657,4 +1665,39 @@ elite 級か flagship 級であれば先制雷撃を行う。 15|ターキーサンド|ステーキ|ステーキ|ウイスキー|飲みすぎワイン 16|ターキーサンド|ビール|戦闘糧食|ワイン|なし 17|ターキーサンド|ビール|ウイスキー|ウイスキー|なし +18|日本茶1|お茶と日本食|日本茶2|なし|なし + +#### グラフィックの設定ミス + +* ID: 822 「節分風雲」の艦名グラフィックが Commandant Teste になっている。 +* ID: 187 「明石改」の補給画面グラフィックの左上が透過されていない。 + +#### 表示装備メモ + +攻撃時に表示される装備名のカットインは、戦闘APIの `api_si_list` で指定された装備IDをもとに決められる。 + +ここで指定される装備は以下のとおりである。 + +* 連続射撃: 砲1, 砲2 +* 砲撃: 砲 +* 雷撃: 魚雷 +* 昼戦カットイン(主砲/主砲): 偵察機, 砲1, 砲2 +* 対潜攻撃: 爆雷/水上偵察機/艦上攻撃機/オートジャイロ/対潜哨戒機/etc. + +該当する装備がなければ「表示なし」になる。 +なお、実際に表示されるのは「主砲系」「副砲」「魚雷系」のみであり(後述)、ほかの装備はクライアント側の表示処理でスキップされる。 + +なお、それぞれのカテゴリIDは以下のとおりである。 + +* 主砲系: 1, 2, 3, 38 +* 副砲系: 4 +* 魚雷系: 5, 32 + +ここで表示される装備は、上記カテゴリを満たす中で、先頭の装備スロットから順番に選ばれる(スロット[0]>スロット[1]>…>スロット[4]>補強スロット) +。 +例えば、昼戦カットイン(主砲/主砲)の場合、水上偵察機の中で先頭から1番目の装備と、主砲の中で先頭から1番目/2番目の装備が選ばれる。 + +表示装備は、夜戦単発攻撃が 砲撃/雷撃 どちらになるかの判定にも使われている。 +表示装備の最初のIDが 主砲系/副砲系 であれば 砲撃, 魚雷系であれば 雷撃 となる。 +どれも装備していないなら 砲撃 になる。 diff --git a/ElectronicObserver/Utility/Data/Calculator.cs b/ElectronicObserver/Utility/Data/Calculator.cs index b08208813..d63d305a1 100644 --- a/ElectronicObserver/Utility/Data/Calculator.cs +++ b/ElectronicObserver/Utility/Data/Calculator.cs @@ -1130,12 +1130,12 @@ public static int GetAACutinKind( int shipID, int[] slot ) { // 固有カットイン switch ( shipID ) { - case 421: //秋月 - case 330: //秋月改 - case 422: //照月 - case 346: //照月改 - case 423: //初月 - case 357: //初月改 + case 421: // 秋月 + case 330: // 秋月改 + case 422: // 照月 + case 346: // 照月改 + case 423: // 初月 + case 357: // 初月改 if ( highangle >= 2 && radar >= 1 ) { return 1; } @@ -1147,7 +1147,7 @@ public static int GetAACutinKind( int shipID, int[] slot ) { } break; - case 428: //摩耶改二 + case 428: // 摩耶改二 if ( highangle >= 1 && aagun_concentrated >= 1 ) { if ( aaradar >= 1 ) return 10; @@ -1156,7 +1156,7 @@ public static int GetAACutinKind( int shipID, int[] slot ) { } break; - case 141: //五十鈴改二 + case 141: // 五十鈴改二 if ( highangle >= 1 && aagun >= 1 ) { if ( aaradar >= 1 ) return 14; @@ -1165,7 +1165,7 @@ public static int GetAACutinKind( int shipID, int[] slot ) { } break; - case 470: //霞改二乙 + case 470: // 霞改二乙 if ( highangle >= 1 && aagun >= 1 ) { if ( aaradar >= 1 ) return 16; @@ -1174,12 +1174,12 @@ public static int GetAACutinKind( int shipID, int[] slot ) { } break; - case 418: //皐月改二 + case 418: // 皐月改二 if ( aagun_concentrated >= 1 ) return 18; break; - case 487: //鬼怒改二 + case 487: // 鬼怒改二 if ( aagun_concentrated >= 1 ) { if ( highangle - highangle_director >= 1 ) return 19; @@ -1187,10 +1187,15 @@ public static int GetAACutinKind( int shipID, int[] slot ) { } break; - case 488: //由良改二 + case 488: // 由良改二 if ( highangle >= 1 && aaradar >= 1 ) return 21; break; + + case 548: // 文月改二 + if ( aagun_concentrated >= 1 ) + return 22; + break; } @@ -1400,6 +1405,7 @@ public static int GetFixedAirDefense( double adjustedAAValue, double adjustedFle { 19, 5 }, { 20, 3 }, { 21, 5 }, + { 22, 2 }, } ); @@ -1428,6 +1434,7 @@ public static int GetFixedAirDefense( double adjustedAAValue, double adjustedFle { 19, 1.45 }, { 20, 1.25 }, { 21, 1.45 }, + { 22, 1.2 }, } ); diff --git a/ElectronicObserver/Utility/Data/ExpTable.cs b/ElectronicObserver/Utility/Data/ExpTable.cs index dd07ea57b..a9141db62 100644 --- a/ElectronicObserver/Utility/Data/ExpTable.cs +++ b/ElectronicObserver/Utility/Data/ExpTable.cs @@ -54,7 +54,7 @@ internal Experience( int level, int total, int next ) { /// /// 艦娘レベル最大値 /// - public static int ShipMaximumLevel { get { return 155; } } + public static int ShipMaximumLevel { get { return 165; } } /// /// 提督レベル最大値 @@ -288,7 +288,17 @@ static ExpTable() { new Experience( 152, 4777000, 222000 ), new Experience( 153, 4999000, 231000 ), new Experience( 154, 5230000, 240000 ), - new Experience( 155, 5470000, 0 ) + new Experience( 155, 5470000, 250000 ), + new Experience( 156, 5720000, 60000 ), + new Experience( 157, 5780000, 80000 ), + new Experience( 158, 5860000, 110000 ), + new Experience( 159, 5970000, 150000 ), + new Experience( 160, 6120000, 200000 ), + new Experience( 161, 6320000, 260000 ), + new Experience( 162, 6580000, 330000 ), + new Experience( 163, 6910000, 410000 ), + new Experience( 164, 7320000, 500000 ), + new Experience( 165, 7820000, 0 ), }; diff --git a/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs b/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs index 704173327..568009331 100644 --- a/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs +++ b/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs @@ -265,7 +265,7 @@ private void UpdateAlbumPage( int shipID ) { _shipID = shipID; ShipID.Text = ship.ShipID.ToString(); AlbumNo.Text = ship.AlbumNo.ToString(); - ResourceName.Text = string.Format( "{0} ver. {1}/{2}/{3}", + ResourceName.Text = string.Format( "{0} {1}/{2}/{3}", ship.ResourceName, ship.ResourceGraphicVersion, ship.ResourceVoiceVersion, ship.ResourcePortVoiceVersion ); ToolTipInfo.SetToolTip( ResourceName, string.Format( "リソース名: {0}\r\nグラフィック ver. {1}\r\nボイス ver. {2}\r\n母港ボイス ver. {3}\r\n({4})", ship.ResourceName, ship.ResourceGraphicVersion, ship.ResourceVoiceVersion, ship.ResourcePortVoiceVersion, Constants.GetVoiceFlag( ship.VoiceFlag ) ) ); diff --git a/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs b/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs index 6454af48a..f1cd458cf 100644 --- a/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs +++ b/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs @@ -24,8 +24,8 @@ protected override void Dispose( bool disposing ) { /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); ElectronicObserver.Window.Control.StatusBarModule statusBarModule1 = new ElectronicObserver.Window.Control.StatusBarModule(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.Connection_UpstreamProxyAddress = new System.Windows.Forms.TextBox(); @@ -52,6 +52,7 @@ private void InitializeComponent() { this.tabPage2 = new System.Windows.Forms.TabPage(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.UI_RenderingTestChanger = new System.Windows.Forms.TrackBar(); + this.UI_RenderingTest = new ElectronicObserver.Window.Control.ShipStatusHP(); this.UI_IsLayoutFixed = new System.Windows.Forms.CheckBox(); this.UI_BarColorMorphing = new System.Windows.Forms.CheckBox(); this.UI_SubFontSelect = new System.Windows.Forms.Button(); @@ -163,6 +164,7 @@ private void InitializeComponent() { this.FormShipGroup_ShowStatusBar = new System.Windows.Forms.CheckBox(); this.FormShipGroup_AutoUpdate = new System.Windows.Forms.CheckBox(); this.tabPage20 = new System.Windows.Forms.TabPage(); + this.FormBattle_ShowHPBar = new System.Windows.Forms.CheckBox(); this.FormBattle_HideDuringBattle = new System.Windows.Forms.CheckBox(); this.FormBattle_IsScrollable = new System.Windows.Forms.CheckBox(); this.tabPage12 = new System.Windows.Forms.TabPage(); @@ -241,8 +243,6 @@ private void InitializeComponent() { this.APIListBrowser = new System.Windows.Forms.OpenFileDialog(); this.Log_PlayTime = new System.Windows.Forms.Label(); this.PlayTimeTimer = new System.Windows.Forms.Timer(this.components); - this.FormBattle_ShowHPBar = new System.Windows.Forms.CheckBox(); - this.UI_RenderingTest = new ElectronicObserver.Window.Control.ShipStatusHP(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Connection_UpstreamProxyPort)).BeginInit(); @@ -368,7 +368,6 @@ private void InitializeComponent() { // Connection_UseSystemProxy // this.Connection_UseSystemProxy.AutoSize = true; - this.Connection_UseSystemProxy.Enabled = false; this.Connection_UseSystemProxy.Location = new System.Drawing.Point(147, 7); this.Connection_UseSystemProxy.Name = "Connection_UseSystemProxy"; this.Connection_UseSystemProxy.Size = new System.Drawing.Size(135, 19); @@ -376,7 +375,6 @@ private void InitializeComponent() { this.Connection_UseSystemProxy.Text = "システムプロキシを利用"; this.ToolTipInfo.SetToolTip(this.Connection_UseSystemProxy, "システムのプロキシ設定を利用します。"); this.Connection_UseSystemProxy.UseVisualStyleBackColor = true; - this.Connection_UseSystemProxy.Visible = false; // // Connection_UpstreamProxyPort // @@ -584,10 +582,10 @@ private void InitializeComponent() { this.tabPage2.Controls.Add(this.UI_MainFontSelect); this.tabPage2.Controls.Add(this.UI_MainFont); this.tabPage2.Controls.Add(this.label5); - this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Location = new System.Drawing.Point(4, 24); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(576, 294); + this.tabPage2.Size = new System.Drawing.Size(576, 292); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "UI"; this.tabPage2.UseVisualStyleBackColor = true; @@ -622,6 +620,30 @@ private void InitializeComponent() { this.UI_RenderingTestChanger.TickStyle = System.Windows.Forms.TickStyle.None; this.UI_RenderingTestChanger.Scroll += new System.EventHandler(this.UI_RenderingTestChanger_Scroll); // + // UI_RenderingTest + // + this.UI_RenderingTest.AutoSize = true; + this.UI_RenderingTest.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + statusBarModule1.BarColor0Begin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + statusBarModule1.BarColor0End = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + statusBarModule1.MaximumValue = 500; + statusBarModule1.PrevValue = 401; + statusBarModule1.Value = 401; + this.UI_RenderingTest.HPBar = statusBarModule1; + this.UI_RenderingTest.Location = new System.Drawing.Point(16, 3); + this.UI_RenderingTest.MainFontColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.UI_RenderingTest.Margin = new System.Windows.Forms.Padding(16, 3, 16, 3); + this.UI_RenderingTest.MaximumValue = 500; + this.UI_RenderingTest.Name = "UI_RenderingTest"; + this.UI_RenderingTest.PrevValue = 401; + this.UI_RenderingTest.RepairTime = new System.DateTime(2017, 6, 18, 0, 0, 59, 159); + this.UI_RenderingTest.RepairTimeShowMode = ElectronicObserver.Window.Control.ShipStatusHPRepairTimeShowMode.Invisible; + this.UI_RenderingTest.Size = new System.Drawing.Size(136, 20); + this.UI_RenderingTest.TabIndex = 12; + this.UI_RenderingTest.Text = "Rendering Test: "; + this.ToolTipInfo.SetToolTip(this.UI_RenderingTest, "描画プレビューです。\r\n下のバーから値を調整できます。"); + this.UI_RenderingTest.Value = 401; + // // UI_IsLayoutFixed // this.UI_IsLayoutFixed.AutoSize = true; @@ -722,10 +744,10 @@ private void InitializeComponent() { this.tabPage3.Controls.Add(this.Log_SaveLogFlag); this.tabPage3.Controls.Add(this.Log_LogLevel); this.tabPage3.Controls.Add(this.label6); - this.tabPage3.Location = new System.Drawing.Point(4, 22); + this.tabPage3.Location = new System.Drawing.Point(4, 24); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(576, 294); + this.tabPage3.Size = new System.Drawing.Size(576, 292); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "ログ"; this.tabPage3.UseVisualStyleBackColor = true; @@ -852,10 +874,10 @@ private void InitializeComponent() { this.tabPage4.Controls.Add(this.label9); this.tabPage4.Controls.Add(this.Control_ConditionBorder); this.tabPage4.Controls.Add(this.label7); - this.tabPage4.Location = new System.Drawing.Point(4, 22); + this.tabPage4.Location = new System.Drawing.Point(4, 24); this.tabPage4.Name = "tabPage4"; this.tabPage4.Padding = new System.Windows.Forms.Padding(3); - this.tabPage4.Size = new System.Drawing.Size(576, 294); + this.tabPage4.Size = new System.Drawing.Size(576, 292); this.tabPage4.TabIndex = 3; this.tabPage4.Text = "動作"; this.tabPage4.UseVisualStyleBackColor = true; @@ -946,10 +968,10 @@ private void InitializeComponent() { this.tabPage5.Controls.Add(this.Debug_AlertOnError); this.tabPage5.Controls.Add(this.Debug_SealingPanel); this.tabPage5.Controls.Add(this.Debug_EnableDebugMenu); - this.tabPage5.Location = new System.Drawing.Point(4, 22); + this.tabPage5.Location = new System.Drawing.Point(4, 24); this.tabPage5.Name = "tabPage5"; this.tabPage5.Padding = new System.Windows.Forms.Padding(3); - this.tabPage5.Size = new System.Drawing.Size(576, 294); + this.tabPage5.Size = new System.Drawing.Size(576, 292); this.tabPage5.TabIndex = 4; this.tabPage5.Text = "デバッグ"; this.tabPage5.UseVisualStyleBackColor = true; @@ -974,7 +996,7 @@ private void InitializeComponent() { this.Debug_SealingPanel.Controls.Add(this.Debug_APIListPathSearch); this.Debug_SealingPanel.Location = new System.Drawing.Point(0, 56); this.Debug_SealingPanel.Name = "Debug_SealingPanel"; - this.Debug_SealingPanel.Size = new System.Drawing.Size(576, 217); + this.Debug_SealingPanel.Size = new System.Drawing.Size(576, 215); this.Debug_SealingPanel.TabIndex = 1; // // Debug_APIListPath @@ -1035,10 +1057,10 @@ private void InitializeComponent() { this.tabPage6.Controls.Add(this.label14); this.tabPage6.Controls.Add(this.Life_TopMost); this.tabPage6.Controls.Add(this.Life_ConfirmOnClosing); - this.tabPage6.Location = new System.Drawing.Point(4, 22); + this.tabPage6.Location = new System.Drawing.Point(4, 24); this.tabPage6.Name = "tabPage6"; this.tabPage6.Padding = new System.Windows.Forms.Padding(3); - this.tabPage6.Size = new System.Drawing.Size(576, 294); + this.tabPage6.Size = new System.Drawing.Size(576, 292); this.tabPage6.TabIndex = 5; this.tabPage6.Text = "ウィンドウ"; this.tabPage6.UseVisualStyleBackColor = true; @@ -1958,14 +1980,25 @@ private void InitializeComponent() { this.tabPage20.Controls.Add(this.FormBattle_ShowHPBar); this.tabPage20.Controls.Add(this.FormBattle_HideDuringBattle); this.tabPage20.Controls.Add(this.FormBattle_IsScrollable); - this.tabPage20.Location = new System.Drawing.Point(4, 24); + this.tabPage20.Location = new System.Drawing.Point(4, 22); this.tabPage20.Name = "tabPage20"; this.tabPage20.Padding = new System.Windows.Forms.Padding(3); - this.tabPage20.Size = new System.Drawing.Size(562, 258); + this.tabPage20.Size = new System.Drawing.Size(562, 260); this.tabPage20.TabIndex = 10; this.tabPage20.Text = "戦闘"; this.tabPage20.UseVisualStyleBackColor = true; // + // FormBattle_ShowHPBar + // + this.FormBattle_ShowHPBar.AutoSize = true; + this.FormBattle_ShowHPBar.Location = new System.Drawing.Point(6, 56); + this.FormBattle_ShowHPBar.Name = "FormBattle_ShowHPBar"; + this.FormBattle_ShowHPBar.Size = new System.Drawing.Size(114, 19); + this.FormBattle_ShowHPBar.TabIndex = 8; + this.FormBattle_ShowHPBar.Text = "HPバーを表示する"; + this.ToolTipInfo.SetToolTip(this.FormBattle_ShowHPBar, "非表示にするとわずかではありますが縦幅を節約できます。"); + this.FormBattle_ShowHPBar.UseVisualStyleBackColor = true; + // // FormBattle_HideDuringBattle // this.FormBattle_HideDuringBattle.AutoSize = true; @@ -2480,10 +2513,10 @@ private void InitializeComponent() { this.tabPage11.Controls.Add(this.Notification_Repair); this.tabPage11.Controls.Add(this.Notification_Construction); this.tabPage11.Controls.Add(this.Notification_Expedition); - this.tabPage11.Location = new System.Drawing.Point(4, 22); + this.tabPage11.Location = new System.Drawing.Point(4, 24); this.tabPage11.Name = "tabPage11"; this.tabPage11.Padding = new System.Windows.Forms.Padding(3); - this.tabPage11.Size = new System.Drawing.Size(576, 294); + this.tabPage11.Size = new System.Drawing.Size(576, 292); this.tabPage11.TabIndex = 7; this.tabPage11.Text = "通知"; this.tabPage11.UseVisualStyleBackColor = true; @@ -2583,10 +2616,10 @@ private void InitializeComponent() { // tabPage15 // this.tabPage15.Controls.Add(this.groupBox5); - this.tabPage15.Location = new System.Drawing.Point(4, 22); + this.tabPage15.Location = new System.Drawing.Point(4, 24); this.tabPage15.Name = "tabPage15"; this.tabPage15.Padding = new System.Windows.Forms.Padding(3); - this.tabPage15.Size = new System.Drawing.Size(576, 294); + this.tabPage15.Size = new System.Drawing.Size(576, 292); this.tabPage15.TabIndex = 8; this.tabPage15.Text = "データベース"; this.tabPage15.UseVisualStyleBackColor = true; @@ -2662,10 +2695,10 @@ private void InitializeComponent() { this.tabPage17.Controls.Add(this.BGMPlayer_VolumeAll); this.tabPage17.Controls.Add(this.BGMPlayer_Enabled); this.tabPage17.Controls.Add(this.BGMPlayer_ControlGrid); - this.tabPage17.Location = new System.Drawing.Point(4, 22); + this.tabPage17.Location = new System.Drawing.Point(4, 24); this.tabPage17.Name = "tabPage17"; this.tabPage17.Padding = new System.Windows.Forms.Padding(3); - this.tabPage17.Size = new System.Drawing.Size(576, 294); + this.tabPage17.Size = new System.Drawing.Size(576, 292); this.tabPage17.TabIndex = 9; this.tabPage17.Text = "BGM"; this.tabPage17.UseVisualStyleBackColor = true; @@ -2744,7 +2777,7 @@ private void InitializeComponent() { this.BGMPlayer_ControlGrid.RowHeadersVisible = false; this.BGMPlayer_ControlGrid.RowTemplate.Height = 21; this.BGMPlayer_ControlGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.BGMPlayer_ControlGrid.Size = new System.Drawing.Size(564, 237); + this.BGMPlayer_ControlGrid.Size = new System.Drawing.Size(564, 235); this.BGMPlayer_ControlGrid.TabIndex = 0; this.BGMPlayer_ControlGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BGMPlayer_ControlGrid_CellContentClick); this.BGMPlayer_ControlGrid.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BGMPlayer_ControlGrid_CellFormatting); @@ -2841,41 +2874,6 @@ private void InitializeComponent() { this.PlayTimeTimer.Interval = 1000; this.PlayTimeTimer.Tick += new System.EventHandler(this.PlayTimeTimer_Tick); // - // FormBattle_ShowHPBar - // - this.FormBattle_ShowHPBar.AutoSize = true; - this.FormBattle_ShowHPBar.Location = new System.Drawing.Point(6, 56); - this.FormBattle_ShowHPBar.Name = "FormBattle_ShowHPBar"; - this.FormBattle_ShowHPBar.Size = new System.Drawing.Size(114, 19); - this.FormBattle_ShowHPBar.TabIndex = 8; - this.FormBattle_ShowHPBar.Text = "HPバーを表示する"; - this.ToolTipInfo.SetToolTip(this.FormBattle_ShowHPBar, "非表示にするとわずかではありますが縦幅を節約できます。"); - this.FormBattle_ShowHPBar.UseVisualStyleBackColor = true; - // - // UI_RenderingTest - // - this.UI_RenderingTest.AutoSize = true; - this.UI_RenderingTest.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - statusBarModule1.BarColor0Begin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - statusBarModule1.BarColor0End = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - statusBarModule1.MaximumValue = 500; - statusBarModule1.PrevValue = 401; - statusBarModule1.Value = 401; - this.UI_RenderingTest.HPBar = statusBarModule1; - this.UI_RenderingTest.Location = new System.Drawing.Point(16, 3); - this.UI_RenderingTest.MainFontColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.UI_RenderingTest.Margin = new System.Windows.Forms.Padding(16, 3, 16, 3); - this.UI_RenderingTest.MaximumValue = 500; - this.UI_RenderingTest.Name = "UI_RenderingTest"; - this.UI_RenderingTest.PrevValue = 401; - this.UI_RenderingTest.RepairTime = new System.DateTime(2017, 6, 18, 0, 0, 59, 159); - this.UI_RenderingTest.RepairTimeShowMode = ElectronicObserver.Window.Control.ShipStatusHPRepairTimeShowMode.Invisible; - this.UI_RenderingTest.Size = new System.Drawing.Size(136, 20); - this.UI_RenderingTest.TabIndex = 12; - this.UI_RenderingTest.Text = "Rendering Test: "; - this.ToolTipInfo.SetToolTip(this.UI_RenderingTest, "描画プレビューです。\r\n下のバーから値を調整できます。"); - this.UI_RenderingTest.Value = 401; - // // DialogConfiguration // this.AcceptButton = this.ButtonOK; diff --git a/ElectronicObserver/Window/FormMain.Designer.cs b/ElectronicObserver/Window/FormMain.Designer.cs index 5718cbb30..bf3c58a6b 100644 --- a/ElectronicObserver/Window/FormMain.Designer.cs +++ b/ElectronicObserver/Window/FormMain.Designer.cs @@ -96,7 +96,6 @@ private void InitializeComponent() { this.StripMenu_Help_Version = new System.Windows.Forms.ToolStripMenuItem(); this.StripStatus = new System.Windows.Forms.StatusStrip(); this.StripStatus_Information = new System.Windows.Forms.ToolStripStatusLabel(); - this.StripStatus_Padding = new System.Windows.Forms.ToolStripStatusLabel(); this.StripStatus_Clock = new System.Windows.Forms.ToolStripStatusLabel(); this.UIUpdateTimer = new System.Windows.Forms.Timer(this.components); this.MainDockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); @@ -647,7 +646,6 @@ private void InitializeComponent() { this.StripStatus.ImageScalingSize = new System.Drawing.Size(32, 32); this.StripStatus.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.StripStatus_Information, - this.StripStatus_Padding, this.StripStatus_Clock}); this.StripStatus.Location = new System.Drawing.Point(0, 458); this.StripStatus.Name = "StripStatus"; @@ -658,14 +656,10 @@ private void InitializeComponent() { // StripStatus_Information // this.StripStatus_Information.Name = "StripStatus_Information"; - this.StripStatus_Information.Size = new System.Drawing.Size(104, 17); + this.StripStatus_Information.Size = new System.Drawing.Size(556, 17); + this.StripStatus_Information.Spring = true; this.StripStatus_Information.Text = "Now Preparing..."; - // - // StripStatus_Padding - // - this.StripStatus_Padding.Name = "StripStatus_Padding"; - this.StripStatus_Padding.Size = new System.Drawing.Size(483, 17); - this.StripStatus_Padding.Spring = true; + this.StripStatus_Information.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // StripStatus_Clock // @@ -727,7 +721,6 @@ private void InitializeComponent() { private System.Windows.Forms.ToolStripMenuItem StripMenu_Debug_LoadAPIFromFile; private System.Windows.Forms.Timer UIUpdateTimer; private System.Windows.Forms.ToolStripStatusLabel StripStatus_Information; - private System.Windows.Forms.ToolStripStatusLabel StripStatus_Padding; private System.Windows.Forms.ToolStripStatusLabel StripStatus_Clock; private System.Windows.Forms.ToolStripMenuItem StripMenu_View; private System.Windows.Forms.ToolStripMenuItem StripMenu_View_Fleet; diff --git a/ElectronicObserver/Window/FormMain.cs b/ElectronicObserver/Window/FormMain.cs index ca25e35df..05b7092e2 100644 --- a/ElectronicObserver/Window/FormMain.cs +++ b/ElectronicObserver/Window/FormMain.cs @@ -613,7 +613,7 @@ private void CreateParentDirectories( string path ) { void Logger_LogAdded( Utility.Logger.LogData data ) { - StripStatus_Information.Text = data.Message; + StripStatus_Information.Text = data.Message.Replace( "\r", " " ).Replace( "\n", " " ); } From e326bda8a434a5a99d705ce6490fc4d91c4022d8 Mon Sep 17 00:00:00 2001 From: Andante Date: Sat, 5 Aug 2017 23:28:53 +0900 Subject: [PATCH 11/14] =?UTF-8?q?=E6=B3=8A=E5=9C=B0=E4=BF=AE=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E7=9B=B4=E5=89=8D=E3=81=AB=E5=85=A5=E6=B8=A0=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E8=89=A6=E3=81=AF=E5=9B=9E=E5=BE=A9?= =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=81=8B=E3=82=89=E9=99=A4?= =?UTF-8?q?=E5=A4=96=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 水上爆撃機改修時の索敵補正に対応 * 「列の幅を固定する」→「フォントの高さを固定する」 --- ElectronicObserver/Data/FleetManager.cs | 10 +- .../Other/Information/apilist.txt | 158 +++++++++--------- ElectronicObserver/Utility/Data/Calculator.cs | 54 ++++-- .../Dialog/DialogConfiguration.Designer.cs | 10 +- 4 files changed, 127 insertions(+), 105 deletions(-) diff --git a/ElectronicObserver/Data/FleetManager.cs b/ElectronicObserver/Data/FleetManager.cs index 5ffd7221e..fa52fa27a 100644 --- a/ElectronicObserver/Data/FleetManager.cs +++ b/ElectronicObserver/Data/FleetManager.cs @@ -33,6 +33,9 @@ public class FleetManager : APIWrapper { /// 更新直前に泊地修理が可能だったか private Dictionary IsAnchorageRepaired; + /// 更新直前の入渠艦IDリスト + private HashSet PreviousDockingID; + // conditions public static readonly TimeSpan ConditionHealingSpan = TimeSpan.FromSeconds( 180 ); private double ConditionPredictMin; @@ -185,7 +188,7 @@ public void CheckAnchorageRepairingHealing() { if ( IsAnchorageRepaired.ContainsKey( f.FleetID ) && !IsAnchorageRepaired[f.FleetID] ) continue; - var prev = f.Members.Select( id => PreviousShips[id] ).ToArray(); + var prev = f.Members.Select( id => PreviousDockingID.Contains( id ) ? null : PreviousShips[id] ).ToArray(); var now = f.MembersInstance.ToArray(); for ( int i = 0; i < prev.Length; i++ ) { @@ -217,6 +220,7 @@ public void EvacuatePreviousShips() { PreviousShips = new IDDictionary( KCDatabase.Instance.Ships.Values ); IsAnchorageRepaired = Fleets.ToDictionary( f => f.Key, f => f.Value.CanAnchorageRepair ); + PreviousDockingID = new HashSet( KCDatabase.Instance.Docks.Values.Select( d => d.ShipID ) ); } @@ -349,7 +353,7 @@ public DateTime CalculateConditionHealingEstimation( int healAmount ) { var offset = firstHeal + afterHeal; - + AddConditionDebugLog( "Cond-Heal: offset: " + DateTimeHelper.ToTimeElapsedString( offset ) ); return LastConditionUpdated + offset; @@ -362,7 +366,7 @@ private void AddConditionDebugLog( string str ) { Utility.Logger.Add( 1, str ); } } - + } } diff --git a/ElectronicObserver/Other/Information/apilist.txt b/ElectronicObserver/Other/Information/apilist.txt index ef3c0215f..110945b55 100644 --- a/ElectronicObserver/Other/Information/apilist.txt +++ b/ElectronicObserver/Other/Information/apilist.txt @@ -14,84 +14,7 @@ api_start2 :艦娘・装備固有データその他 api_name :艦娘名 api_yomi :艦娘名読み api_stype :艦種ID - api_ctype :艦型ID 以下図鑑より - 1=綾波型, 深海棲艦 - 2=伊勢型 - 3=加賀型 - 4=球磨型 - 5=暁型 - 6=金剛型 - 7=古鷹型 - 8=高雄型 - 9=最上型 - 10=初春型 - 11=祥鳳型 - 12=吹雪型 - 13=青葉型 - 14=赤城型 - 15=千歳型 - 16=川内型 - 17=蒼龍型 - 18=朝潮型 - 19=長門型 - 20=長良型 - 21=天龍型 - 22=島風型 - 23=白露型 - 24=飛鷹型 - 25=飛龍型 - 26=扶桑型 - 27=鳳翔型 - 28=睦月型 - 29=妙高型 - 30=陽炎型 - 31=利根型 - 32=龍驤型 - 33=翔鶴型 - 34=夕張型 - 35=海大VI型 - 36=巡潜乙型改二 - 37=大和型 - 38=夕雲型 - 39=巡潜乙型 - 40=巡潜3型 - 41=阿賀野型 - 42=(霧の艦隊?) - 43=大鳳型 - 44=潜特型(伊400型潜水艦) - 45=特種船丙型 - 46=三式潜航輸送艇 - 47=Bismarck級 - 48=Z1型 - 49=工作艦 - 50=大鯨型 - 51=龍鳳型 - 52=大淀型 - 53=雲龍型 - 54=秋月型 - 55=Admiral Hipper級 - 56=香取型 - 57=UボートIXC型/呂号潜水艦 - 58=V.Veneto級 - 59=秋津洲型 - 60=改風早型 - 61=Maestrale級 - 62=瑞穂型 - 63=Graf Zeppelin級 - 64=Zara級 - 65=Iowa級 - 66=神風型 - 67=Queen Elizabeth級 - 68=Aquila級 - 69=Lexington級 - 70=C.Teste級 - 71=巡潜甲型改二 - 72=神威型 - 73=Гангут級 - 74=占守型 - 75=春日丸級 - 76=大鷹型 - 77=択捉型 + api_ctype :艦型ID picture_book 参照 api_afterlv :改装Lv api_aftershipid :改装後ID 文字列 "0"=なし api_taik :耐久 [0]=初期値, [1]=最大値 @@ -990,7 +913,84 @@ api_get_member/picture_book :艦船図鑑 図鑑登録済みのもののみ api_name :艦船名 api_yomi :艦船名読み api_stype :艦種 - api_ctype :艦型 + api_ctype :艦型ID + 1=綾波型, 深海棲艦 + 2=伊勢型 + 3=加賀型 + 4=球磨型 + 5=暁型 + 6=金剛型 + 7=古鷹型 + 8=高雄型 + 9=最上型 + 10=初春型 + 11=祥鳳型 + 12=吹雪型 + 13=青葉型 + 14=赤城型 + 15=千歳型 + 16=川内型 + 17=蒼龍型 + 18=朝潮型 + 19=長門型 + 20=長良型 + 21=天龍型 + 22=島風型 + 23=白露型 + 24=飛鷹型 + 25=飛龍型 + 26=扶桑型 + 27=鳳翔型 + 28=睦月型 + 29=妙高型 + 30=陽炎型 + 31=利根型 + 32=龍驤型 + 33=翔鶴型 + 34=夕張型 + 35=海大VI型 + 36=巡潜乙型改二 + 37=大和型 + 38=夕雲型 + 39=巡潜乙型 + 40=巡潜3型 + 41=阿賀野型 + 42=(霧の艦隊?) + 43=大鳳型 + 44=潜特型(伊400型潜水艦) + 45=特種船丙型 + 46=三式潜航輸送艇 + 47=Bismarck級 + 48=Z1型 + 49=工作艦 + 50=大鯨型 + 51=龍鳳型 + 52=大淀型 + 53=雲龍型 + 54=秋月型 + 55=Admiral Hipper級 + 56=香取型 + 57=UボートIXC型/呂号潜水艦 + 58=V.Veneto級 + 59=秋津洲型 + 60=改風早型 + 61=Maestrale級 + 62=瑞穂型 + 63=Graf Zeppelin級 + 64=Zara級 + 65=Iowa級 + 66=神風型 + 67=Queen Elizabeth級 + 68=Aquila級 + 69=Lexington級 + 70=C.Teste級 + 71=巡潜甲型改二 + 72=神威型 + 73=Гангут級 + 74=占守型 + 75=春日丸級 + 76=大鷹型 + 77=択捉型 api_cnum :艦番 api_taik :耐久 api_souk :装甲 diff --git a/ElectronicObserver/Utility/Data/Calculator.cs b/ElectronicObserver/Utility/Data/Calculator.cs index d63d305a1..8de7a5ad8 100644 --- a/ElectronicObserver/Utility/Data/Calculator.cs +++ b/ElectronicObserver/Utility/Data/Calculator.cs @@ -520,26 +520,44 @@ public static double GetSearchingAbility_New33( FleetData fleet, int branchWeigh int category = eq.MasterEquipment.CategoryType; double equipmentRate; - if ( category == 8 || category == 58 ) // 艦上攻撃機・噴式攻撃機 - equipmentRate = 0.8; - else if ( category == 9 || category == 59 ) // 艦上偵察機・噴式偵察機 - equipmentRate = 1.0; - else if ( category == 10 ) // 水上偵察機 - equipmentRate = 1.2; - else if ( category == 11 ) // 水上爆撃機 - equipmentRate = 1.1; - else - equipmentRate = 0.6; + switch ( category ) { + case 8: // 艦上攻撃機 + case 58: // 噴式攻撃機 + equipmentRate = 0.8; + break; + case 9: // 艦上偵察機 + case 59: // 噴式偵察機 + equipmentRate = 1.0; + break; + case 10: // 水上偵察機 + equipmentRate = 1.2; + break; + case 11: // 水上爆撃機 + equipmentRate = 1.1; + break; + default: + equipmentRate = 0.6; + break; + } double levelRate; - if ( category == 10 ) // 水上偵察機 - levelRate = 1.2; - else if ( category == 12 ) // 小型電探 - levelRate = 1.25; - else if ( category == 13 ) // 大型電探 - levelRate = 1.4; - else - levelRate = 0.0; + switch ( category ) { + case 10: // 水上偵察機 + levelRate = 1.2; + break; + case 11: // 水上爆撃機 + levelRate = 1.15; + break; + case 12: // 小型電探 + levelRate = 1.25; + break; + case 13: // 大型電探 + levelRate = 1.4; + break; + default: + levelRate = 0; + break; + } equipmentBonus += equipmentRate * ( eq.MasterEquipment.LOS + levelRate * Math.Sqrt( eq.Level ) ); } diff --git a/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs b/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs index f1cd458cf..8cd90cf74 100644 --- a/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs +++ b/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs @@ -649,11 +649,11 @@ private void InitializeComponent() { this.UI_IsLayoutFixed.AutoSize = true; this.UI_IsLayoutFixed.Location = new System.Drawing.Point(8, 89); this.UI_IsLayoutFixed.Name = "UI_IsLayoutFixed"; - this.UI_IsLayoutFixed.Size = new System.Drawing.Size(112, 19); + this.UI_IsLayoutFixed.Size = new System.Drawing.Size(141, 19); this.UI_IsLayoutFixed.TabIndex = 13; - this.UI_IsLayoutFixed.Text = "列の幅を固定する"; + this.UI_IsLayoutFixed.Text = "フォントの高さを固定する"; this.ToolTipInfo.SetToolTip(this.UI_IsLayoutFixed, "有効な時、どんなフォントでも概ね各UIの列の高さが同じになります(ver. 2.6.2 以前と同様)。\r\n無効な時、フォントによって列の高さが変わります(有効な時" + - "より大きくなる場合があります)。"); + "より大きくなる場合があります)。\r\n無効にした場合、動作が若干重くなる可能性があります。"); this.UI_IsLayoutFixed.UseVisualStyleBackColor = true; // // UI_BarColorMorphing @@ -996,7 +996,7 @@ private void InitializeComponent() { this.Debug_SealingPanel.Controls.Add(this.Debug_APIListPathSearch); this.Debug_SealingPanel.Location = new System.Drawing.Point(0, 56); this.Debug_SealingPanel.Name = "Debug_SealingPanel"; - this.Debug_SealingPanel.Size = new System.Drawing.Size(576, 215); + this.Debug_SealingPanel.Size = new System.Drawing.Size(576, 213); this.Debug_SealingPanel.TabIndex = 1; // // Debug_APIListPath @@ -2777,7 +2777,7 @@ private void InitializeComponent() { this.BGMPlayer_ControlGrid.RowHeadersVisible = false; this.BGMPlayer_ControlGrid.RowTemplate.Height = 21; this.BGMPlayer_ControlGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.BGMPlayer_ControlGrid.Size = new System.Drawing.Size(564, 235); + this.BGMPlayer_ControlGrid.Size = new System.Drawing.Size(564, 233); this.BGMPlayer_ControlGrid.TabIndex = 0; this.BGMPlayer_ControlGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BGMPlayer_ControlGrid_CellContentClick); this.BGMPlayer_ControlGrid.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BGMPlayer_ControlGrid_CellFormatting); From 5c9278f5f7338770a39b8ba454cedede9c6d8457 Mon Sep 17 00:00:00 2001 From: Andante Date: Sun, 6 Aug 2017 15:46:38 +0900 Subject: [PATCH 12/14] =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=81=AE=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 領域重複時の処理を変更 --- ElectronicObserver/Data/FleetManager.cs | 31 ++----------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/ElectronicObserver/Data/FleetManager.cs b/ElectronicObserver/Data/FleetManager.cs index 44fa68f4c..848c5441b 100644 --- a/ElectronicObserver/Data/FleetManager.cs +++ b/ElectronicObserver/Data/FleetManager.cs @@ -227,8 +227,6 @@ public void UpdateConditionPrediction() { var now = DateTime.Now; - AddConditionDebugLog( "Cond-Update: Now: " + DateTimeHelper.TimeToCSVString( now ) ); - var conditionDiff = PreviousShips.Where( s => s.Value.Condition < 49 ) .Join( KCDatabase.Instance.Ships.Values, pair => pair.Key, ship => ship.ID, ( pair, ship ) => ship.Condition - pair.Value.Condition ); if ( !conditionDiff.Any() ) { @@ -238,9 +236,6 @@ public void UpdateConditionPrediction() { int healed = (int)Math.Ceiling( conditionDiff.Max() / 3.0 ); int predictedHealLow = (int)Math.Floor( ( now - LastConditionUpdated ).TotalSeconds / ConditionHealingSpan.TotalSeconds ); - AddConditionDebugLog( "Cond-Update: Healed: " + conditionDiff.Max() + " / " + healed ); - AddConditionDebugLog( "Cond-Update: PredictHealLow: " + predictedHealLow ); - if ( healed < predictedHealLow ) { goto LabelFinally; @@ -284,22 +279,14 @@ public void UpdateConditionPrediction() { bool endsWidthBmax = bmax < amax; if ( ( startsWithAmin && startsWithBmin ) || ( endsWithBpre && endsWithAmax ) ) { - // 二重領域; どちらか小さいほう - if ( amax - amin < bmax - bmin ) { - ConditionPredictMin = amin; - ConditionPredictMax = amax; - } else { - ConditionPredictMin = bmin; - ConditionPredictMax = bmax; - } + ConditionPredictMin = newPredictMin; + ConditionPredictMax = newPredictMax; } else { if ( startsWithAmin ) ConditionPredictMin = amin; else if ( startsWithBmin ) ConditionPredictMin = bmin; else { - AddConditionDebugLog( "Cond-Update: empty-start: " + ConditionPredictMin + " -> " + newPredictMin ); - System.Media.SystemSounds.Exclamation.Play(); ConditionPredictMin = newPredictMin; // 空集合; 新しいほうを設定 } @@ -310,17 +297,12 @@ public void UpdateConditionPrediction() { else if ( endsWidthBmax ) ConditionPredictMax = bmax; else { - AddConditionDebugLog( "Cond-Update: empty-end: " + ConditionPredictMax + " -> " + newPredictMax ); - System.Media.SystemSounds.Exclamation.Play(); ConditionPredictMax = newPredictMax; // 空集合; 新しいほうを設定 } } - LabelFinally: - AddConditionDebugLog( "Cond-Update: Bound: " + ConditionPredictMin + " ~ " + ConditionPredictMax ); - AddConditionDebugLog( "Cond-Update: Accuracy: " + ConditionBorderAccuracy ); LastConditionUpdated = now; foreach ( var f in Fleets.Values ) @@ -352,20 +334,11 @@ public DateTime CalculateConditionHealingEstimation( int healAmount ) { var offset = firstHeal + afterHeal; - - AddConditionDebugLog( "Cond-Heal: offset: " + DateTimeHelper.ToTimeElapsedString( offset ) ); return LastConditionUpdated + offset; } - - private void AddConditionDebugLog( string str ) { - if ( Utility.Configuration.Config.Debug.EnableDebugMenu ) { - Utility.Logger.Add( 1, str ); - } - } - } } From 6090cecc04961a412d473e054221cf01dd1aafc8 Mon Sep 17 00:00:00 2001 From: Andante Date: Sun, 6 Aug 2017 18:49:04 +0900 Subject: [PATCH 13/14] =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=83=93=E3=83=A5?= =?UTF-8?q?=E3=83=BC=E3=82=A2=EF=BC=9A=E5=9B=B3=E9=91=91=E3=81=8C=E9=96=89?= =?UTF-8?q?=E3=81=98=E3=81=A6=E3=82=82=E9=96=89=E3=81=98=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 疲労度処理:うまくいかなかったので一旦戻す * グループ:高さ固定時にヘッダが "..." で省略されないように --- ElectronicObserver/Data/FleetManager.cs | 10 ++++++++-- .../Window/Dialog/DialogAlbumMasterShip.cs | 2 +- ElectronicObserver/Window/FormShipGroup.Designer.cs | 8 -------- ElectronicObserver/Window/FormShipGroup.cs | 4 +++- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ElectronicObserver/Data/FleetManager.cs b/ElectronicObserver/Data/FleetManager.cs index 0b8e1c01e..d3eebdce9 100644 --- a/ElectronicObserver/Data/FleetManager.cs +++ b/ElectronicObserver/Data/FleetManager.cs @@ -283,8 +283,14 @@ public void UpdateConditionPrediction() { bool endsWidthBmax = bmax < amax; if ( ( startsWithAmin && startsWithBmin ) || ( endsWithBpre && endsWithAmax ) ) { - ConditionPredictMin = newPredictMin; - ConditionPredictMax = newPredictMax; + // 二重領域; どちらか小さいほう + if ( amax - amin < bmax - bmin ) { + ConditionPredictMin = amin; + ConditionPredictMax = amax; + } else { + ConditionPredictMin = bmin; + ConditionPredictMax = bmax; + } } else { if ( startsWithAmin ) ConditionPredictMin = amin; diff --git a/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs b/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs index 568009331..dca6a2383 100644 --- a/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs +++ b/ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs @@ -1354,7 +1354,7 @@ private void StripMenu_View_ShowShipGraphicViewer_Click( object sender, EventArg var arg = pathlist.Where( p => p != null ).ToArray(); if ( arg.Length > 0 ) { - new DialogShipGraphicViewer( arg ).Show( this ); + new DialogShipGraphicViewer( arg ).Show( Owner ); } else { diff --git a/ElectronicObserver/Window/FormShipGroup.Designer.cs b/ElectronicObserver/Window/FormShipGroup.Designer.cs index 76e2a15ff..9b27e8af8 100644 --- a/ElectronicObserver/Window/FormShipGroup.Designer.cs +++ b/ElectronicObserver/Window/FormShipGroup.Designer.cs @@ -134,14 +134,6 @@ private void InitializeComponent() { this.ShipView.AllowUserToOrderColumns = true; this.ShipView.AllowUserToResizeRows = false; this.ShipView.BackgroundColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Meiryo UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.ShipView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.ShipView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.ShipView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.ShipView_ID, diff --git a/ElectronicObserver/Window/FormShipGroup.cs b/ElectronicObserver/Window/FormShipGroup.cs index 5334e4b9b..d99b1e813 100644 --- a/ElectronicObserver/Window/FormShipGroup.cs +++ b/ElectronicObserver/Window/FormShipGroup.cs @@ -218,10 +218,12 @@ void ConfigurationChanged() { int rowHeight; if ( config.UI.IsLayoutFixed ) { ShipView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + ShipView.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.True; rowHeight = 21; } else { ShipView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - + ShipView.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False; + if ( ShipView.Rows.Count > 0 ) rowHeight = ShipView.Rows[0].GetPreferredHeight( 0, DataGridViewAutoSizeRowMode.AllCellsExceptHeader, false ); else From 90be6137db2737bb44dc107c322c53b6f2a11c9e Mon Sep 17 00:00:00 2001 From: Andante Date: Mon, 7 Aug 2017 22:05:07 +0900 Subject: [PATCH 14/14] Version 2.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 艦隊:遠征艦隊母港存在時の表示を改善 --- .../Utility/SoftwareInformation.cs | 6 +++--- .../Window/Control/FleetState.cs | 18 +++++++++++++++++- README.md | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ElectronicObserver/Utility/SoftwareInformation.cs b/ElectronicObserver/Utility/SoftwareInformation.cs index 6ee9c72f8..788ac21c4 100644 --- a/ElectronicObserver/Utility/SoftwareInformation.cs +++ b/ElectronicObserver/Utility/SoftwareInformation.cs @@ -35,7 +35,7 @@ public static string SoftwareNameEnglish { /// public static string VersionJapanese { get { - return SoftwareNameJapanese + "二七型"; + return SoftwareNameJapanese + "二七型改"; } } @@ -44,7 +44,7 @@ public static string VersionJapanese { /// public static string VersionEnglish { get { - return "2.7.0"; + return "2.7.1"; } } @@ -54,7 +54,7 @@ public static string VersionEnglish { /// public static DateTime UpdateTime { get { - return DateTimeHelper.CSVStringToTime( "2017/06/25 21:00:00" ); + return DateTimeHelper.CSVStringToTime( "2017/08/07 21:00:00" ); } } diff --git a/ElectronicObserver/Window/Control/FleetState.cs b/ElectronicObserver/Window/Control/FleetState.cs index ef2d38003..592e3443d 100644 --- a/ElectronicObserver/Window/Control/FleetState.cs +++ b/ElectronicObserver/Window/Control/FleetState.cs @@ -156,7 +156,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { ( db.Fleet.CombinedFlag > 0 ? fleet.FleetID >= 3 : fleet.FleetID >= 2 ); Color colorDanger = Color.LightCoral; - Color colorInPort = emphasizesSubFleetInPort ? Color.LightGreen : Color.Transparent; + Color colorInPort = Color.Transparent; //所属艦なし @@ -166,6 +166,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { state.SetInformation( FleetStates.NoShip, "所属艦なし", "", (int)ResourceManager.IconContent.FleetNoShip ); tooltip.SetToolTip( state.Label, null ); + emphasizesSubFleetInPort = false; index++; } else { @@ -190,6 +191,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { index++; } + emphasizesSubFleetInPort = false; } //遠征中 @@ -207,6 +209,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { string.Format( "{0} : {1}\r\n完了日時 : {2}", dest.ID, dest.Name, DateTimeHelper.TimeToCSVString( state.Timer ) ) ); + emphasizesSubFleetInPort = false; index++; } @@ -217,6 +220,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { state.SetInformation( FleetStates.Damaged, "大破艦あり!", "大破艦あり!", (int)ResourceManager.IconContent.FleetDamaged, colorDanger ); tooltip.SetToolTip( state.Label, null ); + emphasizesSubFleetInPort = false; index++; } @@ -253,6 +257,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { tooltip.SetToolTip( state.Label, sb.ToString() ); + emphasizesSubFleetInPort = false; index++; } @@ -271,6 +276,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { tooltip.SetToolTip( state.Label, "完了日時 : " + DateTimeHelper.TimeToCSVString( state.Timer ) ); + emphasizesSubFleetInPort = false; index++; } @@ -343,6 +349,15 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { } + + if ( emphasizesSubFleetInPort ) { + for ( int i = 0; i < index; i++ ) { + if ( StateLabels[i].Label.BackColor == Color.Transparent ) + StateLabels[i].Label.BackColor = Color.LightGreen; + } + } + + for ( int i = index; i < StateLabels.Count; i++ ) StateLabels[i].Enabled = false; @@ -354,6 +369,7 @@ public void UpdateFleetState( FleetData fleet, ToolTip tooltip ) { for ( int i = 0; i < index; i++ ) StateLabels[i].AutoShorten = true; } + } diff --git a/README.md b/README.md index b3c580f1e..f90f193e5 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ *このリンクの更新は遅れる可能性があります。最新版は[こちら](http://electronicobserver.blog.fc2.com/)で確認してください。* -[ver. 2.7.0 (2017/06/25)](http://bit.ly/2t5hxgr) +[ver. 2.7.1 (2017/08/07)](http://bit.ly/2hCIp3e) [更新内容・履歴はこちらで確認できます。](https://github.com/andanteyk/ElectronicObserver/wiki/ChangeLog)