public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                // Laser range
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_LaserRange), nameFormat);
                builder.Add(": ", nameFormat);

                var buf = block.textBuffer;

                buf.Clear();

                if (Range < 1E8)
                {
                    TerminalUtilities.GetDistanceDisplay(Range, buf);
                }
                else
                {
                    buf.Append(MyTexts.GetString(MySpaceTexts.ScreenTerminal_Infinite));
                }

                buf.Append('\n');
                builder.Add(buf, valueFormat);

                // Antenna status
                builder.Add(MyTexts.GetString(MySpaceTexts.TerminalStatus), nameFormat);
                builder.Add(": ", nameFormat);

                builder.Add(GetLocalizedAntennaStatus(), valueFormat);
                builder.Add("\n", valueFormat);
            }
示例#2
0
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                // Broadcast name
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertiesTitle_HudText), nameFormat);
                builder.Add(": ", nameFormat);

                builder.Add(HudText, valueFormat);
                builder.Add("\n", valueFormat);

                // Broadcast Radius
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_BroadcastRadius), nameFormat);
                builder.Add(": ", nameFormat);

                block.textBuffer.Clear();
                TerminalUtilities.GetDistanceDisplay(Range, block.textBuffer);
                block.textBuffer.Append('\n');
                builder.Add(block.textBuffer, valueFormat);

                // Broadcasting enabled/disabled
                builder.Add(MyTexts.GetString(MySpaceTexts.HudInfoBroadcasting), nameFormat);
                builder.Add(": ", nameFormat);

                builder.Add(IsBroadcasting ? MyTexts.GetString(MySpaceTexts.HudInfoOn) : MyTexts.GetString(MySpaceTexts.HudInfoOff), valueFormat);
                builder.Add("\n", valueFormat);
            }
示例#3
0
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                var buf = block.textBuffer;

                // Acceleration due to gravity
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_GravityAcceleration), nameFormat);
                builder.Add(": ", nameFormat);

                buf.Clear();
                buf.AppendFormat("{0:G4}", Acceleration);
                buf.Append(" m/s²\n");
                builder.Add(buf, valueFormat);

                if (IsSpherical)
                {
                    // Field radius
                    builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_GravityFieldRadius), nameFormat);
                    builder.Add(": ", nameFormat);

                    buf.Clear();
                    TerminalUtilities.GetDistanceDisplay(Radius, buf);
                    buf.Append('\n');
                    builder.Add(buf, valueFormat);
                }
                else
                {
                    // Field width
                    builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_GravityFieldWidth), nameFormat);
                    builder.Add(": ", nameFormat);

                    buf.Clear();
                    TerminalUtilities.GetDistanceDisplay(FieldSize.X, buf);
                    buf.Append('\n');
                    builder.Add(buf, valueFormat);

                    // Field height
                    builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_GravityFieldHeight), nameFormat);
                    builder.Add(": ", nameFormat);

                    buf.Clear();
                    TerminalUtilities.GetDistanceDisplay(FieldSize.Y, buf);
                    buf.Append('\n');
                    builder.Add(buf, valueFormat);

                    // Field depth
                    builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_GravityFieldDepth), nameFormat);
                    builder.Add(": ", nameFormat);

                    buf.Clear();
                    TerminalUtilities.GetDistanceDisplay(FieldSize.Z, buf);
                    buf.Append('\n');
                    builder.Add(buf, valueFormat);
                }
            }
示例#4
0
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                // Targeting radius
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_LargeTurretRadius), nameFormat);
                builder.Add(": ", nameFormat);

                block.textBuffer.Clear();
                TerminalUtilities.GetDistanceDisplay(Range, block.textBuffer);
                block.textBuffer.Append('\n');

                builder.Add(block.textBuffer, valueFormat);
            }
示例#5
0
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                // Detector range
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_OreDetectorRange), nameFormat);
                builder.Add(": ", nameFormat);

                block.textBuffer.Clear();
                TerminalUtilities.GetDistanceDisplay(Range, block.textBuffer);
                block.textBuffer.Append('\n');

                builder.Add(block.textBuffer, valueFormat);
            }
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                if (subtype.IsAttached)
                {
                    // Piston extension dist
                    builder.Add(MyTexts.GetString(MySpaceTexts.TerminalDistance), nameFormat);
                    builder.Add(": ", nameFormat);

                    block.textBuffer.Clear();
                    TerminalUtilities.GetDistanceDisplay(ExtensionDist, block.textBuffer);
                    block.textBuffer.Append('\n');

                    builder.Add(block.textBuffer, valueFormat);
                }
            }
示例#7
0
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                // Color packed into one line
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_LightColor), nameFormat);
                builder.Add(": ", nameFormat);

                builder.Add("R: ", nameFormat);

                block.textBuffer.Clear();
                block.textBuffer.Append(Color.R);
                block.textBuffer.Append(" ");
                builder.Add(block.textBuffer, valueFormat);

                builder.Add("G: ", nameFormat);

                block.textBuffer.Clear();
                block.textBuffer.Append(Color.G);
                block.textBuffer.Append(" ");
                builder.Add(block.textBuffer, valueFormat);

                builder.Add("B: ", nameFormat);

                block.textBuffer.Clear();
                block.textBuffer.Append(Color.B);
                block.textBuffer.Append("\n");
                builder.Add(block.textBuffer, valueFormat);

                // Light radius
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_LightRadius), nameFormat);
                builder.Add(": ", nameFormat);

                block.textBuffer.Clear();
                TerminalUtilities.GetDistanceDisplay(Radius, block.textBuffer);
                block.textBuffer.Append('\n');

                builder.Add(block.textBuffer, valueFormat);

                // Light intensity
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_LightIntensity), nameFormat);
                builder.Add(": ", nameFormat);

                block.textBuffer.Clear();
                block.textBuffer.Append(Math.Round(Intensity, 2));
                block.textBuffer.Append('\n');

                builder.Add(block.textBuffer, valueFormat);
            }
            public override void GetSummary(RichText builder, GlyphFormat nameFormat, GlyphFormat valueFormat)
            {
                var buf = block.textBuffer;

                // Broadcast text
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertiesTitle_HudText), nameFormat);
                builder.Add(": ", nameFormat);

                builder.Add(HudText, valueFormat);
                builder.Add('\n', valueFormat);

                // Broadcast radius
                builder.Add(MyTexts.GetString(MySpaceTexts.BlockPropertyTitle_BroadcastRadius), nameFormat);
                builder.Add(": ", nameFormat);

                buf.Clear();
                TerminalUtilities.GetDistanceDisplay(Radius, buf);
                buf.Append('\n');
                builder.Add(buf, valueFormat);
            }