mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-06-07 07:06:57 +01:00
578bae6f6f
* the voices win in the end * cleanup * changelog * secure.dm hates me * make_exact_fit() in initialize instead of whatever was happening before
55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
/proc/gibs(atom/location, var/list/viruses, var/datum/dna/MobDNA, gibber_type = /obj/effect/gibspawner/generic, var/fleshcolor, var/bloodcolor)
|
|
new gibber_type(location,viruses,MobDNA,fleshcolor,bloodcolor)
|
|
|
|
/obj/effect/gibspawner
|
|
var/sparks = 0 //whether sparks spread on Gib()
|
|
var/virusProb = 20 //the chance for viruses to spread on the gibs
|
|
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, list/viruses, datum/dna/MobDNA, fleshcolor, bloodcolor)
|
|
. = ..()
|
|
|
|
if(fleshcolor) src.fleshcolor = fleshcolor
|
|
if(bloodcolor) src.bloodcolor = bloodcolor
|
|
Gib(loc,viruses,MobDNA)
|
|
|
|
/obj/effect/gibspawner/proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
|
|
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
|
to_world("<span class='warning'>Gib list length mismatch!</span>")
|
|
return
|
|
|
|
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
|
|
|
if(sparks)
|
|
spark(location, 2, 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)
|