-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathChange.cs
44 lines (42 loc) · 912 Bytes
/
Change.cs
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
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KerbalChangelog
{
public class Change
{
string change = "";
List<string> subchanges = new List<string>();
public Change(string c)
{
change = c;
subchanges = new List<string>();
}
public Change(string c, List<string> sc)
{
change = c;
subchanges = sc;
}
public Change(ConfigNode chn, string cfgDirName)
{
if (!chn.TryGetValue("change", ref change))
{
Debug.Log("[KCL] Could not find a needed change field in directory " + cfgDirName);
}
foreach (string sc in chn.GetValues("subchange"))
{
subchanges.Add(sc);
}
}
public override string ToString()
{
string ret = "";
ret += " * " + change + "\n";
foreach(string sc in subchanges)
{
ret += " " + " " + "- " + sc + "\n"; //6 spaces ought to look good (or it does to me)
}
return ret;
}
}
}