Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/controllers/Processes/garbage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ var/list/delayed_garbage = list()
/datum/controller/process/garbage_collector/getStatName()
return ..()+"([garbage_collector.destroyed.len]/[garbage_collector.dels]/[garbage_collector.hard_dels])"

// Tests if an atom has been deleted.
/proc/deleted(atom/A)
return !A || !isnull(A.gcDestroyed)

// Should be treated as a replacement for the 'del' keyword.
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
/proc/qdel(var/datum/A)
Expand Down
18 changes: 9 additions & 9 deletions code/game/machinery/pipe/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext
return 1
P.build_network()
Expand All @@ -482,7 +482,7 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext
return 1
P.build_network()
Expand All @@ -501,7 +501,7 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext
return 1
P.build_network()
Expand All @@ -520,7 +520,7 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext
return 1
P.build_network()
Expand All @@ -539,7 +539,7 @@ Buildable meters
//var/turf/T = P.loc
//P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext
return 1
P.build_network()
Expand Down Expand Up @@ -574,7 +574,7 @@ Buildable meters
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
if (deleted(M))
usr << pipefailtext
return 1
M.build_network()
Expand Down Expand Up @@ -643,7 +643,7 @@ Buildable meters
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
if (deleted(M))
usr << pipefailtext
return 1
M.build_network()
Expand Down Expand Up @@ -722,7 +722,7 @@ Buildable meters
//var/turf/T = P.loc
//P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
P.build_network()
Expand Down Expand Up @@ -905,7 +905,7 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
if (deleted(P))
usr << pipefailtext
return 1
P.build_network()
Expand Down
5 changes: 3 additions & 2 deletions code/modules/admin/verbs/freeze.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/client/proc/freeze(mob/M as mob in mob_list)
set category = "Admin"
set name = "FREEZE!"
set name = "Freeze Mob"
if(!holder)
src << "Only mentors and above may use this command."
return
Expand All @@ -16,7 +16,7 @@
return
if (!M.paralysis)
alert("\red You have frozen [key_name(M)] for suspicious activity.")
M << "\red FREEZE! DON'T MOVE! You have been frozen."
M << "\red You have been frozen by [key_name(usr)]."
M.Paralyse(5000000000)
log_admin("\red [key_name_admin(usr)] has frozen [key_name(M)] for suspicious activity!", 1)
message_admins("\blue [key_name_admin(usr)] froze [key_name_admin(M)] on suspicious conduct.", 1)
Expand All @@ -27,6 +27,7 @@
log_admin("\blue [key_name(usr)] has unfrozen [key_name(M)] and returned them to play.")
message_admins("\blue [key_name_admin(usr)] has unfrozen [key_name_admin(M)] and returned them to play.")
M.Paralyse(0)
M.AdjustParalysis(-5000000000)
M.blinded = 0
M.lying = 0
M.stat = 0
Expand Down