/// <summary> /// Build the menu for displaying sensor information /// Dependent on if sensor is attacked /// </summary> /// <param name="builder"></param> /// <returns></returns> public override MenuToDisplay GetInformation(MenuBuilder builder) { builder = base.GetInformation(builder).GetBuilder(); if (this.SensorBroken) { builder.AddStringItem(Strings.HasFlow, Strings.Hacked); builder.AddStringItem(Strings.IsPurityAsExpected, Strings.Hacked); } else { builder.AddBoolItem(Strings.HasFlow, this.HasFlow); builder.AddBoolItem(Strings.IsPurityAsExpected, this.IsPurityAsExpected); } return(builder.Build()); }
/// <summary> /// Gets what to display for the expected values popup /// </summary> /// <param name="builder"></param> /// <returns></returns> public MenuToDisplay GetExpectedValuesPopup(MenuBuilder builder) { builder.SetTitle(this.GetType().Name.ToString() + " Expected"); builder.AddBoolItem(Strings.HasFlow, this.ExpectedValues.HasFlow); builder.AddBoolItem(Strings.IsPurityAsExpected, this.ExpectedValues.IsPurityAsExpected); if (this.GetType() == typeof(Pump)) { builder.AddBoolItem(Strings.IsPumping, this.ExpectedValues.IsPumping); } if (this.GetType() == typeof(Reservoir)) { builder.AddBoolItem(Strings.IsFull, this.ExpectedValues.IsFull); builder.AddBoolItem(Strings.IsEmpty, this.ExpectedValues.IsEmpty); } return(builder.Build()); }