public override string GetInspectString() { var inspectBuilder = new StringBuilder(); inspectBuilder.AppendLine(base.GetInspectString()); // Display unique shells inspectBuilder.AppendLine($"{"TabShells".Translate()}:"); var shellCounts = ArtilleryStrikes.GroupBy(s => s.shellDef).ToList(); for (int i = 0; i < shellCounts.Count; i++) { var shellCount = shellCounts[i]; inspectBuilder.AppendLine($" - {shellCount.Key.LabelCap} x{shellCount.Select(s => s.shellCount).Aggregate((s1, s2) => s1 + s2)}"); } return(inspectBuilder.ToString().TrimEndNewlines()); }
private void Arrived() { if (arrivalAction != null) { try { arrivalAction.Arrived(ArtilleryStrikes.ToList(), destinationTile); } catch (Exception ex) { Log.Error($"Exception in artillery strike arrival action: {ex}"); } } else { innerContainer.ClearAndDestroyContents(); } Find.WorldObjects.Remove(this); }