mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user