[MIRROR] Flashlights wont cause your pda to drain faster endlessly [MDB IGNORE] (#24019)

Flashlights wont cause your pda to drain faster endlessly

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-10-07 07:28:03 +02:00
committed by GitHub
parent 2846fbc692
commit 0ae24c79b0
@@ -1,5 +1,5 @@
///The multiplier given to the base overtime charge drain value if its flashlight is on.
#define FLASHLIGHT_DRAIN_MULTIPLIER 1.25
#define FLASHLIGHT_DRAIN_MULTIPLIER 1.1
// Tries to draw power from charger or, if no operational charger is present, from power cell.
/obj/item/modular_computer/proc/use_power(amount = 0)
@@ -41,8 +41,9 @@
///Charge depends on whether the PC is on, and what programs are running/idle on it.
/obj/item/modular_computer/proc/handle_power(seconds_per_tick)
var/power_usage = screen_on ? base_active_power_usage : base_idle_power_usage
if(light_on)
base_active_power_usage *= FLASHLIGHT_DRAIN_MULTIPLIER
power_usage *= FLASHLIGHT_DRAIN_MULTIPLIER
if(active_program)
power_usage += active_program.power_cell_use
for(var/datum/computer_file/program/open_programs as anything in idle_threads)