From c41461c7e42a7439718caaa1f335033ecfdffec5 Mon Sep 17 00:00:00 2001 From: Verkister Date: Tue, 11 Jan 2022 23:23:18 +0200 Subject: [PATCH] Fixes runtime spam caused by altclicking tiles Fixes every unarmed altclick on turfs runtiming because nothing bothered to check whether the person was actually holding anything to engrave with. --- code/game/turfs/turf.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index bcd53322b86..9a4039cb1ce 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -310,7 +310,7 @@ /turf/proc/try_graffiti(var/mob/vandal, var/obj/item/tool) - if(!tool.sharp || !can_engrave()) + if(!tool || !tool.sharp || !can_engrave()) return FALSE if(jobban_isbanned(vandal, "Graffiti")) @@ -407,4 +407,4 @@ return // We were the the B-side in a turf translation /turf/proc/post_translate_B(var/turf/A) - return \ No newline at end of file + return