-
Notifications
You must be signed in to change notification settings - Fork 0
/
LCDGroup.class.cs
60 lines (55 loc) · 1.68 KB
/
LCDGroup.class.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using Sandbox.Game.EntityComponents;
using Sandbox.ModAPI.Ingame;
using Sandbox.ModAPI.Interfaces;
using SpaceEngineers.Game.ModAPI.Ingame;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System;
using VRage.Collections;
using VRage.Game.Components;
using VRage.Game.ModAPI.Ingame;
using VRage.Game.ObjectBuilders.Definitions;
using VRage.Game;
using VRageMath;
namespace IngameScript
{
partial class Program
{
public class LCDGroup
{
Program _program;
public string group_name = "";
public List<IMyTextPanel> group { get; } = new List<IMyTextPanel>();
public LCDGroup(string groupName, Program p)
{
group_name = groupName;
_program = p;
}
public bool Add(IMyTextPanel txt)
{
int groupCount = group.Count;
group.Add(txt);
return group.Count == (groupCount + 1);
}
public void writeToLCD(string output)
{
foreach (IMyTextPanel lcd in group)
{
((IMyTextPanel)lcd).WritePublicText(output, false);
((IMyTextPanel)lcd).ShowPublicTextOnScreen();
}
}
public void writeToLine(string output)
{
foreach (IMyTextPanel lcd in group)
{
string txtOut = output + "\n";
((IMyTextPanel)lcd).WritePublicText(output, true);
((IMyTextPanel)lcd).ShowPublicTextOnScreen();
}
}
}
}
}