Updated SSgarbage (#18173)

* pain

* sadfas

* sdfa

* sdfasf

* sfa

* sdf

* might the lord have mercy on our soul

* i cri everidai

* adeste fideles

* sdf

* where will this lead, what's coming next, from your inventions

* dear lord

* gjvhk

* i cri everidai

* fsgf

* sdfa

* sdaf

* hiuhi
This commit is contained in:
Fluffy
2024-01-15 15:08:27 +01:00
committed by GitHub
parent 0c8bdbdd68
commit ca6b04e1d7
125 changed files with 1574 additions and 805 deletions
@@ -112,7 +112,7 @@
for(var/datum/computer_file/program/P in hard_drive.stored_files)
P.event_unregistered()
QDEL_NULL_LIST(hard_drive.stored_files)
QDEL_LIST(hard_drive.stored_files)
for(var/obj/item/computer_hardware/CH in src.get_all_components())
uninstall_component(null, CH)
@@ -130,8 +130,8 @@
service.service_deactivate()
service.service_state = PROGRAM_STATE_KILLED
QDEL_NULL_LIST(idle_threads)
QDEL_NULL_LIST(enabled_services)
QDEL_LIST(idle_threads)
QDEL_LIST(enabled_services)
if(looping_sound)
soundloop.stop(src)
@@ -237,6 +237,17 @@
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
update_icon()
/**
* Same as `kill_program()` but does not try to reopen the window, also makes the linter happy as it does not sleep
*/
/obj/item/modular_computer/proc/kill_program_shutdown(forced = FALSE)
SHOULD_NOT_SLEEP(TRUE)
if(active_program && active_program.kill_program(forced))
active_program = null
else
return FALSE
// Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on)
/obj/item/modular_computer/proc/get_ntnet_status(var/specific_action = 0)
if(network_card)
@@ -251,7 +262,7 @@
/obj/item/modular_computer/proc/shutdown_computer(var/loud = TRUE)
SStgui.close_uis(active_program)
kill_program(TRUE)
kill_program_shutdown(TRUE)
for(var/datum/computer_file/program/P in idle_threads)
P.kill_program(TRUE)
idle_threads.Remove(P)
@@ -19,6 +19,10 @@
. = ..()
set_icon()
/obj/item/modular_computer/handheld/Destroy()
. = ..()
GC_TEMPORARY_HARDDEL
/obj/item/modular_computer/handheld/proc/set_icon()
icon_state_unpowered = icon_state
icon_state_broken = icon_state
@@ -19,11 +19,16 @@
. = computer_host
/obj/item/modular_computer/silicon/Initialize(mapload)
. = ..()
if(istype(loc, /mob/living/silicon))
computer_host = loc
else
return INITIALIZE_HINT_QDEL
/obj/item/modular_computer/silicon/Destroy()
computer_host = null
. = ..()
GC_TEMPORARY_HARDDEL
/obj/item/modular_computer/silicon/computer_use_power(power_usage)
// If we have host like AI, borg or pAI we handle there power
@@ -38,10 +43,6 @@
// If we don't have host, then we let regular computer code handle power - like batteries and tesla coils.
return ..()
/obj/item/modular_computer/silicon/Destroy()
computer_host = null
return ..()
/obj/item/modular_computer/silicon/Click(location, control, params)
return attack_self(usr)
@@ -3,6 +3,10 @@
screen_on = FALSE
icon_state = "laptop-closed"
/obj/item/modular_computer/laptop/preset/Destroy()
. = ..()
GC_TEMPORARY_HARDDEL
/obj/item/modular_computer/laptop/preset/install_default_hardware()
..()
processor_unit = new /obj/item/computer_hardware/processor_unit(src)
@@ -1,3 +1,7 @@
/obj/item/modular_computer/telescreen/preset/Destroy()
. = ..()
GC_TEMPORARY_HARDDEL
/obj/item/modular_computer/telescreen/preset/install_default_hardware()
..()
processor_unit = new/obj/item/computer_hardware/processor_unit(src)