Space Engineers

Space Engineers

Orbital Drop Position Calculator
DrCuddles 5 Jun, 2019 @ 1:54pm
Fix for Script writing to every LCD
For anyone suffering from the Script writing to every LCD I have fixed it myself until the author gets round to it, he specifies a variable for the name of the screen to look for when adding the data but then never uses it and loops over every screen in the grid anyway.

Please replace your method WriteToLCD() with this one:

private void WriteToLCD() { GridTerminalSystem.GetBlocksOfType<IMyTextPanel>(lcdList); string text = "---Result---\nPayload dropping position :\n" + dropPos + "\nShip jump position :\n" + jumpPos; if(showPlanetDataToLCD){ text += "\n\n---Recorded Planet Data---\n"; foreach(PlanetData p in planetsList){ text += "Planet Name : " + p.Name + "\n" + ConvertVector3DToGPS(p.Name,p.Position) + "\nGravity at planet surface : " + p.DefaultGravity + "G" + "\nNatural gravity decreasing altitude(Sea level) : " + p.MaxHillRadius + "m" + "\nNatural gravity radius : " + p.GravityRadius + "m\n\n"; } for(int i = 0; i < lcdList.Count; i++) { if(lcdList.CustomName == lcdName) {
(lcdList).WritePublicText(text, false);
(lcdList).ShowPublicTextOnScreen();
}
}

}
}
Last edited by DrCuddles; 5 Jun, 2019 @ 1:55pm
< >
Showing 1-1 of 1 comments
hey when i try to build your part in it spits out tons of errors could you send me a full version of your script please
< >
Showing 1-1 of 1 comments
Per page: 1530 50