Files
Paradise/code/game/objects/effects/gibs.dm
johnsonmt88@gmail.com 28aabc9810 More file structure stuff!
Cleaned up the files themselves.
Everything in code/game/objects should now be in proper files or places with the exception of the files in the /weapons/ sub-folder.

There's two instances of me not following the exact file structure.
- /obj/item/brain has been moved to a file in mob/living/carbon/brain
- /obj/item/clothing/mask/facehugger has been moved into mob/living/carbon/alien/special
Both of these may not make sense according to the object structure, but they do make sense logically. If it's a problem just move them.

Next up: Finish the files in the weapon folder, then start moving defines down.


My god I hope I havent broken everything.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4547 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-26 03:32:58 +00:00

65 lines
2.2 KiB
Plaintext

/proc/gibs(atom/location, var/list/viruses, var/datum/dna/MobDNA) //CARN MARKER
new /obj/effect/gibspawner/generic(get_turf(location),viruses,MobDNA)
/proc/hgibs(atom/location, var/list/viruses, var/datum/dna/MobDNA)
new /obj/effect/gibspawner/human(get_turf(location),viruses,MobDNA)
/proc/xgibs(atom/location, var/list/viruses)
new /obj/effect/gibspawner/xeno(get_turf(location),viruses)
/proc/robogibs(atom/location, var/list/viruses)
new /obj/effect/gibspawner/robot(get_turf(location),viruses)
/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
New(location, var/list/viruses, var/datum/dna/MobDNA)
..()
if(istype(loc,/turf)) //basically if a badmin spawns it
Gib(loc,viruses,MobDNA)
proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
world << "\red Gib list length mismatch!"
return
var/obj/effect/decal/cleanable/blood/gibs/gib = null
for(var/datum/disease/D in viruses)
if(D.spread_type == SPECIAL)
del(D)
if(sparks)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, location)
s.start()
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)
if(viruses.len > 0)
for(var/datum/disease/D in viruses)
if(prob(virusProb))
var/datum/disease/viruus = new D.type
gib.viruses += viruus
viruus.holder = gib
viruus.spread_type = CONTACT_FEET
gib.blood_DNA = list()
if(MobDNA)
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
else if(istype(src, /obj/effect/gibspawner/xeno))
gib.blood_DNA["UNKNOWN DNA"] = "X*"
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
gib.blood_DNA["Non-human DNA"] = "A+"
var/list/directions = gibdirections[i]
if(directions.len)
gib.streak(directions)
del(src)