From 55294bfb2a5cad61b3b0f81032f27a62cb45c515 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 17 Sep 2017 22:15:45 -0500 Subject: [PATCH] [MIRROR] Fixes blackbox artifact exploits (#2845) * Fixes blackbox artifact exploits * Update colossus.dm * Update colossus.dm --- .../living/simple_animal/hostile/megafauna/colossus.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 480408eab4..1c7c5331d0 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -258,7 +258,8 @@ Difficulty: Very Hard /obj/machinery/smartfridge/black_box/accept_check(obj/item/O) if(!istype(O)) return FALSE - if(is_type_in_typecache(O, blacklist)) + if(blacklist[O]) + visible_message("[src] ripples as it rejects [O]. The device will not accept items that have been removed from it.") return FALSE return TRUE @@ -304,7 +305,8 @@ Difficulty: Very Hard //in it's own proc to avoid issues with items that nolonger exist in the code base. //try catch doesn't always prevent byond runtimes from halting a proc, /obj/machinery/smartfridge/black_box/proc/create_item(item_type) - new item_type(src) + var/obj/O = new item_type(src) + blacklist[O] = TRUE /obj/machinery/smartfridge/black_box/Destroy(force = FALSE) if(force) @@ -787,4 +789,4 @@ Difficulty: Very Hard #undef ACTIVATE_WEAPON #undef ACTIVATE_MAGIC -#undef MEDAL_PREFIX \ No newline at end of file +#undef MEDAL_PREFIX