mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-09 02:55:21 -05:00
Cumulative changes from the team. Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com> Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com> Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Text;
|
|
using pkNX.Structures.FlatBuffers.ZA;
|
|
|
|
namespace pkNX.WinForms;
|
|
|
|
public static class ActivationConditionUtil9a
|
|
{
|
|
public static string GetSummary(this IList<ActivationCondition>? list)
|
|
{
|
|
if (list == null)
|
|
return "";
|
|
var sb = new StringBuilder();
|
|
foreach (var cond in list)
|
|
{
|
|
if (cond.Element is null)
|
|
continue;
|
|
sb.Append(GetSummary(cond.Element));
|
|
}
|
|
return sb.ToString();
|
|
}
|
|
|
|
private static string GetSummary(this IList<ActivationConditionElement> list)
|
|
{
|
|
var sb = new StringBuilder();
|
|
foreach (var cond in list)
|
|
sb.AppendJoin("&&", cond.Summarize());
|
|
return sb.ToString();
|
|
}
|
|
|
|
public static string GetSummary(this IEnumerable<IList<ActivationConditionElement>?> list)
|
|
{
|
|
var sb = new StringBuilder();
|
|
foreach (var element in list)
|
|
{
|
|
if (element == null)
|
|
continue;
|
|
sb.Append(GetSummary(element));
|
|
}
|
|
return sb.ToString();
|
|
}
|
|
}
|