Big project cleanup with overhaul of file responsibilities (KISS) and code (DRY, YAGNI)
This commit is contained in:
@@ -12,14 +12,19 @@ public partial class RobotDisplay : PanelContainer
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
string programName = robot.currentProgram ?? "";
|
||||
string status = $"{programName} | Heat {robot.heat:0}% | Maintenance {robot.maintenance:0}%";
|
||||
string status = GetStatusText();
|
||||
if (status != currentScript.Text)
|
||||
{
|
||||
currentScript.Text = status;
|
||||
}
|
||||
}
|
||||
|
||||
private string GetStatusText()
|
||||
{
|
||||
string programName = robot.currentProgram ?? "";
|
||||
return $"{programName} | Heat {robot.heat:0}% | Maintenance {robot.maintenance:0}%";
|
||||
}
|
||||
|
||||
public void OnJumpToClicked()
|
||||
{
|
||||
EmitSignal(SignalName.OnRobotJumpTo, robot);
|
||||
|
||||
Reference in New Issue
Block a user