From 8868ef2a89b0ccea0dc0fec87ab3035edccce1ae Mon Sep 17 00:00:00 2001 From: Putnam Date: Sun, 14 Mar 2021 21:06:53 -0700 Subject: [PATCH] Made slaughter demon have higher weight if there's more blood. --- .../antagonists/slaughter/slaughterevent.dm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/code/modules/antagonists/slaughter/slaughterevent.dm b/code/modules/antagonists/slaughter/slaughterevent.dm index 1c6412dcad..a7e99080c7 100644 --- a/code/modules/antagonists/slaughter/slaughterevent.dm +++ b/code/modules/antagonists/slaughter/slaughterevent.dm @@ -7,7 +7,21 @@ earliest_start = 1 HOURS min_players = 20 - +/datum/round_event_control/slaughter/canSpawnEvent() + var/t = /datum/round_event_control/slaughter + var/list/allowed_turf_typecache = typecacheof(/turf/open) - typecacheof(/turf/open/space) + var/list/allowed_z_cache = list() + for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) + allowed_z_cache[num2text(z)] = TRUE + for(var/obj/effect/decal/cleanable/C in world) + if(!C.loc || QDELETED(C)) + continue + if(!C.can_bloodcrawl_in()) + continue + if(!IsValidDebrisLocation(C.loc, allowed_turf_typecache, allowed_z_cache, C.type, FALSE)) + continue + weight += 0.05 + return ..() /datum/round_event/ghost_role/slaughter minimum_required = 1