unlimited energy in god mode
This commit is contained in:
parent
5da66a5b15
commit
108efd0e55
|
@ -287,6 +287,7 @@ pub fn update_power(
|
||||||
let mut power_down = false;
|
let mut power_down = false;
|
||||||
let d = time.delta_seconds();
|
let d = time.delta_seconds();
|
||||||
for (mut battery, mut engine) in &mut q_battery {
|
for (mut battery, mut engine) in &mut q_battery {
|
||||||
|
if !settings.god_mode {
|
||||||
if settings.flashlight_active {
|
if settings.flashlight_active {
|
||||||
battery.power -= POWER_DRAIN_FLASHLIGHT[prefs.flashlight_power] * d; // 2.4MW
|
battery.power -= POWER_DRAIN_FLASHLIGHT[prefs.flashlight_power] * d; // 2.4MW
|
||||||
if battery.power <= 0.0 {
|
if battery.power <= 0.0 {
|
||||||
|
@ -330,6 +331,7 @@ pub fn update_power(
|
||||||
if power_down {
|
if power_down {
|
||||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::PowerDown));
|
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::PowerDown));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let reactor = POWER_GAIN_REACTOR[settings.reactor_state];
|
let reactor = POWER_GAIN_REACTOR[settings.reactor_state];
|
||||||
battery.power = (battery.power + reactor * d).clamp(0.0, battery.capacity);
|
battery.power = (battery.power + reactor * d).clamp(0.0, battery.capacity);
|
||||||
if battery.overloaded_recovering && battery.power > battery.capacity * 0.5 {
|
if battery.overloaded_recovering && battery.power > battery.capacity * 0.5 {
|
||||||
|
|
Loading…
Reference in a new issue