Add weight limit to scale

This commit is contained in:
2023-04-26 19:17:35 +02:00
parent 0621716636
commit ee5bda2fe3
4 changed files with 15 additions and 3 deletions

View File

@ -48,7 +48,8 @@ namespace Elwig.Helpers {
if (ini != null) {
foreach (var s in ini.Sections.Where(s => s.SectionName.StartsWith("scale."))) {
ScaleList.AddLast(new string[] {
s.SectionName[6..], s.Keys["type"], s.Keys["model"], s.Keys["connection"], s.Keys["empty"], s.Keys["filling"]
s.SectionName[6..], s.Keys["type"], s.Keys["model"], s.Keys["connection"],
s.Keys["empty"], s.Keys["filling"], s.Keys["limit"]
});
}
}
@ -62,6 +63,7 @@ namespace Elwig.Helpers {
file.Write($"\r\n[scale.{s[0]}]\r\ntype = {s[1]}\r\nmodel = {s[2]}\r\nconnection = {s[3]}\r\n");
if (s[4] != null) file.Write($"empty = {s[4]}\r\n");
if (s[5] != null) file.Write($"filling = {s[5]}\r\n");
if (s[6] != null) file.Write($"limit = {s[6]}\r\n");
}
}
}