better suit modding descriptions

This commit is contained in:
yuni 2024-09-22 06:42:56 +02:00
parent 5aa815a803
commit b1b2ed5f34
2 changed files with 5 additions and 7 deletions

View file

@ -25,7 +25,7 @@ pub const POWER_DRAIN_THRUSTER: [f32; 3] = [3e6, 3e6, 0.0];
pub const THRUSTER_BOOST_FACTOR: [f64; 3] = [3.0, 3.0, 0.0];
pub const POWER_DRAIN_FLASHLIGHT: [f32; 4] = [200e3, 1500e3, 2500e3, 10000e3];
pub const FLASHLIGHT_INTENSITY: [f32; 4] = [10e6, 400e6, 2e9, 100e9]; // in lumens
pub const POWER_DRAIN_LIGHTAMP: [f32; 4] = [0.0, 200e3, 400e3, 800e3];
pub const POWER_DRAIN_LIGHTAMP: [f32; 4] = [0.0, 200e3, 400e3, 1400e3];
pub const POWER_DRAIN_AR: f32 = 300e3;
pub const POWER_GAIN_REACTOR: [f32; 3] = [0.0, 2000e3, 10000e3];

View file

@ -493,10 +493,8 @@ pub fn update_menu(
text.sections[i].value = format!("Augmented Reality: {onoff}{kw} [TAB]\n");
}
MenuAction::ModLightAmp => {
let n = prefs.light_amp;
let p = actor::POWER_DRAIN_LIGHTAMP[prefs.light_amp] / 1e3;
let kw = if p > 0.0 { format!(" ({p}kW)") } else { String::from("") };
text.sections[i].value = format!("Light Amplification: {n}/3{kw}\n");
text.sections[i].value = format!("Light Amplification: {p}kW\n");
}
MenuAction::ModFlashlightPower => {
let p = actor::POWER_DRAIN_FLASHLIGHT[prefs.flashlight_power] / 1e3;
@ -504,7 +502,7 @@ pub fn update_menu(
}
MenuAction::ModThrusterBoost => {
let state = match prefs.thruster_boost {
0 => "Only when slowing down",
0 => "For braking",
1 => "Always",
2 => "Off",
_ => "ERROR",
@ -516,8 +514,8 @@ pub fn update_menu(
MenuAction::ModReactor => {
let state = match settings.reactor_state {
0 => "Off",
1 => "Slow burn",
2 => "Overload",
1 => "On",
2 => "OVERLOAD",
_ => "ERROR",
};
let p = actor::POWER_GAIN_REACTOR[settings.reactor_state] / 1e3;