Removes the bugged wanted poster from metasec. (#57733)

Fixes #56915
Adds a worse case senario to prevent the same sort of bug happening in the future. Fixes poster harddels
DON'T HOLD REFS WHEN THE THING YOU'RE REFFING DIES!!!
This commit is contained in:
LemonInTheDark
2021-03-17 16:38:24 -04:00
committed by GitHub
parent 160c89903d
commit e069f96dc6
2 changed files with 984 additions and 976 deletions
File diff suppressed because it is too large Load Diff
+9
View File
@@ -21,16 +21,25 @@
// posters store what name and description they would like their
// rolled up form to take.
if(poster_structure)
if(QDELETED(poster_structure))
stack_trace("A poster was initialized with a qdeleted poster_structure, something's gone wrong")
return INITIALIZE_HINT_QDEL
name = poster_structure.poster_item_name
desc = poster_structure.poster_item_desc
icon_state = poster_structure.poster_item_icon_state
name = "[name] - [poster_structure.original_name]"
//If the poster structure is being deleted something has gone wrong, kill yourself off too
RegisterSignal(poster_structure, COMSIG_PARENT_QDELETING, .proc/react_to_deletion)
/obj/item/poster/Destroy()
poster_structure = null
. = ..()
/obj/item/poster/proc/react_to_deletion()
SIGNAL_HANDLER
qdel(src)
// These icon_states may be overridden, but are for mapper's convinence
/obj/item/poster/random_contraband
name = "random contraband poster"