[MIRROR] Fixes a bunch of harddels that are sourced from player action (#6252)

* Fixes a bunch of harddels that are sourced from player action

* Mirror!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
SkyratBot
2021-06-11 04:13:33 +02:00
committed by GitHub
parent cc5595fddf
commit 6f3b151bb8
165 changed files with 1076 additions and 546 deletions
@@ -19,10 +19,18 @@
var/list/channel_history = list()
var/operator_mode = FALSE // Channel operator mode
var/netadmin_mode = FALSE // Administrator mode (invisible to other users + bypasses passwords)
//A list of all the converstations we're a part of
var/list/datum/ntnet_conversation/conversations = list()
/datum/computer_file/program/chatclient/New()
username = "DefaultUser[rand(100, 999)]"
/datum/computer_file/program/chatclient/Destroy()
for(var/datum/ntnet_conversation/discussion as anything in conversations)
discussion.purge_client(src)
conversations.Cut()
return ..()
/datum/computer_file/program/chatclient/ui_act(action, params)
. = ..()
if(.)
@@ -37,11 +37,15 @@
refresh()
/datum/computer_file/program/supermatter_monitor/kill_program(forced = FALSE)
for(var/supermatter in supermatters)
clear_supermatter(supermatter)
supermatters = null
..()
// Refreshes list of active supermatter crystals
/datum/computer_file/program/supermatter_monitor/proc/refresh()
for(var/supermatter in supermatters)
clear_supermatter(supermatter)
supermatters = list()
var/turf/T = get_turf(ui_host())
if(!T)
@@ -51,9 +55,7 @@
if (!isturf(S.loc) || !(is_station_level(S.z) || is_mining_level(S.z) || S.z == T.z))
continue
supermatters.Add(S)
if(!(active in supermatters))
active = null
RegisterSignal(S, COMSIG_PARENT_QDELETING, .proc/react_to_del)
/datum/computer_file/program/supermatter_monitor/proc/get_status()
. = SUPERMATTER_INACTIVE
@@ -167,3 +169,13 @@
active = S
set_signals()
return TRUE
/datum/computer_file/program/supermatter_monitor/proc/react_to_del(datum/source)
SIGNAL_HANDLER
clear_supermatter(source)
/datum/computer_file/program/supermatter_monitor/proc/clear_supermatter(matter)
supermatters -= matter
if(matter == active)
active = null
UnregisterSignal(matter, COMSIG_PARENT_QDELETING)