mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 09:03:23 +01:00
First iteration of corpse decay
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
createCorpse()
|
||||
|
||||
/obj/effect/landmark/corpse/proc/createCorpse() //Creates a mob and checks for gear in each slot before attempting to equip it.
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
|
||||
var/mob/living/carbon/human/human/M = new /mob/living/carbon/human/human (src.loc)
|
||||
M.dna.mutantrace = mutantrace
|
||||
M.real_name = src.name
|
||||
M.death(1) //Kills the new mob
|
||||
|
||||
@@ -393,7 +393,14 @@
|
||||
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of their flesh!</span>\n"
|
||||
if(digitalcamo)
|
||||
msg += "[t_He] [t_is] repulsively uncanny!\n"
|
||||
|
||||
if(decaylevel == 1)
|
||||
msg += "[t_He] [t_is] starting to smell.\n"
|
||||
if(decaylevel == 2)
|
||||
msg += "[t_He] [t_is] bloated and smells disgusting.\n"
|
||||
if(decaylevel == 3)
|
||||
msg += "[t_He] [t_is] rotting and blackened, the skin sloughing off. The smell is indescribably foul.\n"
|
||||
if(decaylevel == 4)
|
||||
msg += "[t_He] [t_is] mostly dessicated now, with only bones remaining of what used to be a person.\n"
|
||||
|
||||
if(hasHUD(usr,"security"))
|
||||
var/perpname = "wot"
|
||||
|
||||
@@ -55,5 +55,5 @@
|
||||
|
||||
var/mob/remoteview_target = null
|
||||
var/meatleft = 3 //For chef item
|
||||
|
||||
var/decaylevel = 0 // For rotting bodies
|
||||
var/slime_color = "blue" //For slime people this defines their color, it's blue by default to pay tribute to the old icons
|
||||
@@ -102,6 +102,9 @@
|
||||
|
||||
handle_medical_side_effects()
|
||||
|
||||
if(stat == DEAD)
|
||||
handle_decay()
|
||||
|
||||
handle_stasis_bag()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
@@ -1556,6 +1559,29 @@
|
||||
|
||||
return temp
|
||||
|
||||
proc/handle_decay()
|
||||
var/decaytime = world.time - timeofdeath
|
||||
|
||||
if(decaytime <= 6000) //10 minutes for decaylevel1 -- stinky
|
||||
return
|
||||
|
||||
if(decaytime > 6000 <= 12000)//20 minutes for decaylevel2 -- bloated and very stinky
|
||||
decaylevel = 1
|
||||
|
||||
if(decaytime > 12000 <= 18000)//30 minutes for decaylevel3 -- rotting and gross
|
||||
decaylevel = 2
|
||||
|
||||
if(decaytime > 18000 <= 27000)//45 minutes for decaylevel4 -- skeleton
|
||||
decaylevel = 3
|
||||
if(decaytime > 27000)
|
||||
decaylevel = 4
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/human/H in range(decaylevel, src))
|
||||
if(prob(5))
|
||||
if(airborne_can_reach(get_turf(src), get_turf(H)))
|
||||
H << "<spawn class='warning'>You smell something foul..."
|
||||
H.vomit()
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
Reference in New Issue
Block a user