-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabletModGroup.cs
More file actions
30 lines (26 loc) · 863 Bytes
/
Copy pathTabletModGroup.cs
File metadata and controls
30 lines (26 loc) · 863 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TabletHighlight {
public class TabletModGroup {
public string name = "New Mod Group";
public int minCount = 1;
public List<TabletMod> Mods { get; set; }
public TabletModGroup() {
Mods = new List<TabletMod>();
}
internal static TabletModGroup CreateNew(TabletGroup group)
{
var tabletModGroup = new TabletModGroup();
string name = "New Mod Group";
var count = 1;
while (group.TabletModGroups.Count(g => g.name == tabletModGroup.name) > 0) {
tabletModGroup.name = $"{name} {count + 1}";
count++;
}
return tabletModGroup;
}
}
}