Moved the vomit() and the drip() proc to /mob/living/carbon

This commit is contained in:
cib
2012-05-25 18:49:31 +02:00
parent 568f951918
commit 20b0656c35
3 changed files with 22 additions and 16 deletions
+21 -1
View File
@@ -321,4 +321,24 @@
var/datum/organ/external/O = organs[name]
if(O.name == zone)
return O
return null
return null
/mob/living/carbon/human/drip()
/mob/living/carbon/proc/vomit()
// only humanoids and monkeys can vomit
if(!istype(src,/mob/living/carbon/human) && !istype(src,/mob/living/carbon/monkey))
return
// Make the human vomit on the floor
for(var/mob/O in viewers(world.view, src))
O.show_message(text("<b>\red [] throws up!</b>", src), 1)
playsound(src.loc, 'splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 20
adjustToxLoss(-3)
@@ -164,7 +164,7 @@
if(B.id == "blood")
B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null,"virus2"=(virus2 ? virus2.getcopy() : null),"antibodies"=0)
/mob/living/carbon/human/proc/drip(var/amt as num)
/mob/living/carbon/human/drip(var/amt as num)
if(!amt)
return
@@ -431,20 +431,6 @@
if(breath)
loc.assume_air(breath)
vomit()
// Make the human vomit on the floor
for(var/mob/O in viewers(world.view, src))
O.show_message(text("<b>\red [] throws up!</b>", src), 1)
playsound(src.loc, 'splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 20
adjustToxLoss(-3)
get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(internal))