mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Replaces lag with lag(lite) (#17319)
* a couple files * another quarter basically * awooga * so many changes * comma moment * oop and a zero * guggugugug * Update magic.dm * e * Update dcs.dm * e * finally * Update watertank.dm Fixwatertank Co-authored-by: Molti <gamingjoelouis@gmail.com>
This commit is contained in:
@@ -344,7 +344,7 @@
|
||||
to_chat(user, span_warning("You press the power button but \the [src] does not respond."))
|
||||
|
||||
// Process currently calls handle_power(), may be expanded in future if more things are added.
|
||||
/obj/item/modular_computer/process()
|
||||
/obj/item/modular_computer/process(delta_time)
|
||||
if(!enabled) // The computer is turned off
|
||||
last_power_usage = 0
|
||||
return FALSE
|
||||
@@ -363,7 +363,7 @@
|
||||
|
||||
if(active_program)
|
||||
if(active_program.program_state != PROGRAM_STATE_KILLED)
|
||||
active_program.process_tick()
|
||||
active_program.process_tick(delta_time)
|
||||
active_program.ntnet_status = get_ntnet_status()
|
||||
else
|
||||
active_program = null
|
||||
@@ -371,12 +371,12 @@
|
||||
for(var/I in idle_threads)
|
||||
var/datum/computer_file/program/P = I
|
||||
if(P.program_state != PROGRAM_STATE_KILLED)
|
||||
P.process_tick()
|
||||
P.process_tick(delta_time)
|
||||
P.ntnet_status = get_ntnet_status()
|
||||
else
|
||||
idle_threads.Remove(P)
|
||||
|
||||
handle_power() // Handles all computer power interaction
|
||||
handle_power(delta_time) // Handles all computer power interaction
|
||||
//check_update_ui_need()
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
shutdown_computer(0)
|
||||
|
||||
// Handles power-related things, such as battery interaction, recharging, shutdown when it's discharged
|
||||
/obj/item/modular_computer/proc/handle_power()
|
||||
/obj/item/modular_computer/proc/handle_power(delta_time)
|
||||
var/obj/item/computer_hardware/recharger/recharger = all_components[MC_CHARGE]
|
||||
if(recharger)
|
||||
recharger.process()
|
||||
recharger.process(delta_time)
|
||||
|
||||
var/power_usage = screen_on ? base_active_power_usage : base_idle_power_usage
|
||||
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
return ..()
|
||||
|
||||
// Process currently calls handle_power(), may be expanded in future if more things are added.
|
||||
/obj/machinery/modular_computer/process()
|
||||
/obj/machinery/modular_computer/process(delta_time)
|
||||
if(cpu)
|
||||
// Keep names in sync.
|
||||
cpu.name = name
|
||||
cpu.process()
|
||||
cpu.process(delta_time)
|
||||
|
||||
// Used in following function to reduce copypaste
|
||||
/obj/machinery/modular_computer/proc/power_failure(malfunction = 0)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
return FALSE
|
||||
|
||||
// Called by Process() on device that runs us, once every tick.
|
||||
/datum/computer_file/program/proc/process_tick()
|
||||
/datum/computer_file/program/proc/process_tick(delta_time)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user