Cockpit display not working on DS

VMSBigot shared this bug 5 years ago
Outdated

With the 1.190 release attempting to write to a display via a script doesn't work. Reading the text back from the surface gets an incorrect result, and the text never shows up on the display.

Below code is an example:

public void Main(string argument, UpdateType updateSource)

{

var cockpit = this.GridTerminalSystem.GetBlockWithName("Cockpit") as IMyCockpit;

if (argument == string.Empty)

{

for (var i = 0; i < cockpit.SurfaceCount; i++)

{

var surface = cockpit.GetSurface(i);

var buffer = new StringBuilder();

surface.ReadText(buffer);

Echo($"Screen{i}:{surface.DisplayName}: {buffer}");

}

}

else

{

var surface = cockpit.GetSurface(0);

var strbld = new StringBuilder(argument);

surface.WriteText(strbld);

}

}


Create a grid with a cockpit, power and a PB. Add the above script to the PB, and set all displays to text/content and edit the text to be unique per display. Run the PB with no parameters and on a DS, the results will be random. Adding an argument will also not update the top display as expected.


It also seemed to hold on to values even though I edited the text manually via the UI from previous runs, For example, I put in "why doesn't this work" via the argument, then manually edited it to "TopCenter". When I re-ran it later it returned "Why doesn't this work" for screen #2 and #3 which I had not set to this value.


On a standalone game this works as I would expect. On DS its completely broken from what I can tell.

Replies (1)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

Leave a Comment
 
Attach a file