Example #1
0
        public static void log(ShipModel[] ships)
        {
            string text = string.Empty;

            for (int i = 0; i < ships.Length; i++)
            {
                ShipModel shipModel = ships[i];
                if (shipModel == null)
                {
                    text += string.Format("[{0}] - \n", i);
                }
                else
                {
                    text += string.Format("[{0}]{1} {2} Lv:{3}", new object[]
                    {
                        i,
                        shipModel.ShipTypeName,
                        shipModel.ShortName,
                        shipModel.Level
                    });
                    text += string.Format(" {0}/{1}({2:F}% - {3})", new object[]
                    {
                        shipModel.NowHp,
                        shipModel.MaxHp,
                        shipModel.TaikyuRate,
                        shipModel.DamageStatus
                    });
                    text += string.Format(" 疲労度:{0}", shipModel.Condition);
                    DeckModelBase deck = shipModel.getDeck();
                    if (deck != null && deck is DeckModel)
                    {
                        text += string.Format(" [艦隊ID:{0}{1}に編成中]", ((DeckModel)deck).Id, (!shipModel.IsInActionEndDeck()) ? string.Empty : "(行動終了済)");
                    }
                    else if (deck != null && deck is EscortDeckModel)
                    {
                        text += string.Format(" [護衛艦隊{0}に編成中]", ((EscortDeckModel)deck).Id);
                    }
                    text += string.Format(" {0}", (!shipModel.IsLocked()) ? string.Empty : "[ロック]");
                    text += string.Format(" {0}", (!shipModel.IsInRepair()) ? string.Empty : "[入渠中]");
                    text += string.Format(" {0}", (!shipModel.IsInMission()) ? string.Empty : "[遠征中]");
                    text += string.Format(" {0}", (!shipModel.IsBling()) ? string.Empty : "[回航中]");
                    if (shipModel.IsBlingWait())
                    {
                        text += string.Format("[回航待ち中(Area:{0})]", shipModel.AreaIdBeforeBlingWait);
                    }
                    text += string.Format(" {0}", (!shipModel.IsTettaiBling()) ? string.Empty : "[撤退中]");
                    text += string.Format(" mstID:{0} memID:{1}", shipModel.MstId, shipModel.MemId);
                    text += string.Format("\n", new object[0]);
                }
            }
            Logging.log(new object[]
            {
                text
            });
        }
Example #2
0
        public static void log(ShipModel[] ships)
        {
            string text = string.Empty;

            for (int i = 0; i < ships.Length; i++)
            {
                ShipModel shipModel = ships[i];
                if (shipModel == null)
                {
                    text += $"[{i}] - \n";
                    continue;
                }
                text += $"[{i}]{shipModel.ShipTypeName} {shipModel.ShortName} Lv:{shipModel.Level}";
                text += $" {shipModel.NowHp}/{shipModel.MaxHp}({shipModel.TaikyuRate:F}% - {shipModel.DamageStatus})";
                text += $" 疲労度:{shipModel.Condition}";
                DeckModelBase deck = shipModel.getDeck();
                if (deck != null && deck is DeckModel)
                {
                    text += string.Format(" [艦隊ID:{0}{1}に編成中]", ((DeckModel)deck).Id, (!shipModel.IsInActionEndDeck()) ? string.Empty : "(行動終了済)");
                }
                else if (deck != null && deck is EscortDeckModel)
                {
                    text += $" [護衛艦隊{((EscortDeckModel)deck).Id}に編成中]";
                }
                text += string.Format(" {0}", (!shipModel.IsLocked()) ? string.Empty : "[ロック]");
                text += string.Format(" {0}", (!shipModel.IsInRepair()) ? string.Empty : "[入渠中]");
                text += string.Format(" {0}", (!shipModel.IsInMission()) ? string.Empty : "[遠征中]");
                text += string.Format(" {0}", (!shipModel.IsBling()) ? string.Empty : "[回航中]");
                if (shipModel.IsBlingWait())
                {
                    text += $"[回航待ち中(Area:{shipModel.AreaIdBeforeBlingWait})]";
                }
                text += string.Format(" {0}", (!shipModel.IsTettaiBling()) ? string.Empty : "[撤退中]");
                text += $" mstID:{shipModel.MstId} memID:{shipModel.MemId}";
                text += $"\n";
            }
            log(text);
        }