Files
Aurora.3/code/game/objects/effects/gibs.dm
T
VMSolidus 238096d2bb Some Mob Define Cleanup (#22536)
Just removing a few ancient 2008-era vars that were on every mob
globally, but were completely unused in the modern code. I thought about
removing the Mutations too, but since the Hulk mutation is actually used
by a tiny handful of things, I would probably have to do that in a
separate PR by turning the Hulk code into an Element instead.
2026-06-01 10:36:04 +00:00

56 lines
1.7 KiB
Plaintext

/proc/gibs(atom/location, var/datum/dna/MobDNA, gibber_type = /obj/effect/gibspawner/generic, var/fleshcolor, var/bloodcolor)
new gibber_type(location,MobDNA,fleshcolor,bloodcolor)
/obj/effect/gibspawner
icon = 'icons/effects/map_effects.dmi'
icon_state = "gibspawner"
var/sparks = 0 //whether sparks spread on Gib()
var/list/gibtypes = list()
var/list/gibamounts = list()
var/list/gibdirections = list() //of lists
var/fleshcolor //Used for gibbed humans.
var/bloodcolor //Used for gibbed humans.
/obj/effect/gibspawner/Initialize(mapload, datum/dna/MobDNA, fleshcolor, bloodcolor)
. = ..()
if(fleshcolor) src.fleshcolor = fleshcolor
if(bloodcolor) src.bloodcolor = bloodcolor
Gib(loc,MobDNA)
/obj/effect/gibspawner/proc/Gib(atom/location, var/datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
to_world(SPAN_WARNING("Gib list length mismatch!"))
return
var/obj/effect/decal/cleanable/blood/gibs/gib = null
if(sparks)
spark(location, 2, GLOB.alldirs)
for(var/i = 1, i<= gibtypes.len, i++)
if(gibamounts[i])
for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i]
gib = new gibType(location)
// Apply human species colouration to masks.
if(fleshcolor)
gib.fleshcolor = fleshcolor
if(bloodcolor)
gib.basecolor = bloodcolor
gib.update_icon()
gib.blood_DNA = list()
if(MobDNA)
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
gib.blood_DNA["Non-human DNA"] = "A+"
if(istype(location,/turf/))
var/list/directions = gibdirections[i]
if(directions.len)
gib.streak(directions)
qdel(src)