Projectile impact effects, sounds and blood splatters. (#8444)

Based.
This commit is contained in:
Matt Atlas
2020-03-20 21:28:28 +01:00
committed by GitHub
parent f6aebb669a
commit 9ab1f2cfb1
29 changed files with 144 additions and 82 deletions
+8
View File
@@ -269,10 +269,14 @@ proc/blood_splatter(var/target, var/datum/reagent/blood/source, var/large, var/s
var/obj/effect/decal/cleanable/blood/B
var/decal_type = /obj/effect/decal/cleanable/blood/splatter
var/turf/T = get_turf(target)
if(istype(source,/mob/living/carbon/human))
var/mob/living/carbon/human/M = source
source = M.get_blood(M.vessel)
if(!istype(source))
source = null
// Are we dripping or splattering?
var/list/drips = list()
// Only a certain number of drips (or one large splatter) can be on a given turf.
@@ -284,6 +288,10 @@ proc/blood_splatter(var/target, var/datum/reagent/blood/source, var/large, var/s
// Find a blood decal or create a new one.
B = locate(decal_type) in T
if(T)
var/list/existing = filter_list(T.contents, decal_type)
if(length(existing) > 3)
B = pick(existing)
if(!B)
B = new decal_type(T)