26 lines
899 B
C#
26 lines
899 B
C#
using System.Text.Json.Serialization;
|
|
|
|
public class ResearchEffect
|
|
{
|
|
[JsonPropertyName("stat")]
|
|
public string Stat { get; set; }
|
|
|
|
[JsonPropertyName("value")]
|
|
public float Value { get; set; }
|
|
|
|
public string GetDisplayText()
|
|
{
|
|
return Stat switch
|
|
{
|
|
"robot_speed_bonus" => $"Robot speed +{Value * 100f:0}%",
|
|
"robot_energy_use_reduction" => $"Robot energy use -{Value * 100f:0}%",
|
|
"robot_heat_gain_reduction" => $"Robot heat gain -{Value * 100f:0}%",
|
|
"robot_cooling_bonus" => $"Robot cooling +{Value * 100f:0}%",
|
|
"robot_maintenance_loss_reduction" => $"Robot maintenance loss -{Value * 100f:0}%",
|
|
"robot_minimum_efficiency_bonus" => $"Damaged robot efficiency +{Value * 100f:0}%",
|
|
"robot_count_increase" => $"Allows more robots +{Value}",
|
|
_ => Stat
|
|
};
|
|
}
|
|
}
|