mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
[MIRROR] update_appearance (#3508)
* update_appearance * a * a Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
Gandalf2k15
parent
3f106caf48
commit
18eca27569
@@ -59,10 +59,8 @@
|
||||
|
||||
|
||||
/obj/machinery/ntnet_relay/update_icon_state()
|
||||
if(is_operational)
|
||||
icon_state = "bus"
|
||||
else
|
||||
icon_state = "bus_off"
|
||||
icon_state = "bus[is_operational ? null : "_off"]"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/ntnet_relay/process(delta_time)
|
||||
if(is_operational)
|
||||
@@ -70,7 +68,7 @@
|
||||
else
|
||||
use_power = IDLE_POWER_USE
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
if(dos_overload > 0)
|
||||
dos_overload = max(0, dos_overload - dos_dissipate * delta_time)
|
||||
@@ -78,12 +76,12 @@
|
||||
// If DoS traffic exceeded capacity, crash.
|
||||
if((dos_overload > dos_capacity) && !dos_failure)
|
||||
set_dos_failure(TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
SSnetworks.add_log("Quantum relay switched from normal operation mode to overload recovery mode.")
|
||||
// If the DoS buffer reaches 0 again, restart.
|
||||
if((dos_overload == 0) && dos_failure)
|
||||
set_dos_failure(FALSE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
SSnetworks.add_log("Quantum relay switched from overload recovery mode to normal operation mode.")
|
||||
..()
|
||||
|
||||
@@ -109,13 +107,13 @@
|
||||
if("restart")
|
||||
dos_overload = 0
|
||||
set_dos_failure(FALSE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
SSnetworks.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
|
||||
return TRUE
|
||||
if("toggle")
|
||||
set_relay_enabled(!relay_enabled)
|
||||
SSnetworks.add_log("Quantum relay manually [relay_enabled ? "enabled" : "disabled"].")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/ntnet_relay/Initialize()
|
||||
|
||||
Reference in New Issue
Block a user