Fixes Mk1 !

This commit is contained in:
Fermi
2019-09-27 11:12:53 +01:00
parent 1bdb66d5de
commit 888906b4e7
4 changed files with 31 additions and 28 deletions
@@ -72,7 +72,7 @@
on_death() //Kinda hate doing it like this, but I really don't want to call process directly.
/obj/item/organ/proc/on_death() //runs decay when outside of a person
if(organ_flags & (ORGAN_SYNTHETIC | ORGAN_FROZEN))
if(organ_flags & (ORGAN_SYNTHETIC | ORGAN_FROZEN | ORGAN_NO_SPOIL))
return
applyOrganDamage(maxHealth * decay_factor)
+19 -18
View File
@@ -17,31 +17,32 @@
low_threshold_cleared = "<span class='info'>The last bouts of pain in your stomach have died out.</span>"
/obj/item/organ/stomach/on_life()
var/mob/living/carbon/human/H = owner
var/datum/reagent/consumable/nutriment/Nutri = locate(/datum/reagent/consumable/nutriment) in H.reagents.reagent_list
if(istype(H))
var/datum/reagent/consumable/nutriment/Nutri
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(!(organ_flags & ORGAN_FAILING))
H.dna.species.handle_digestion(H)
handle_disgust(H)
Nutri = locate(/datum/reagent/consumable/nutriment) in H.reagents.reagent_list
if(Nutri)
if(prob((damage/40) * Nutri.volume * Nutri.volume))
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
else if(Nutri && damage > high_threshold)
if(prob((damage/10) * Nutri.volume * Nutri.volume))
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
else if(iscarbon(owner))
var/mob/living/carbon/C = owner
Nutri = locate(/datum/reagent/consumable/nutriment) in C.reagents.reagent_list
if(damage < low_threshold)
return
Nutri = locate(/datum/reagent/consumable/nutriment) in H.reagents.reagent_list
if(Nutri)
if(prob((damage/40) * Nutri.volume * Nutri.volume))
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
else if(Nutri && damage > high_threshold)
if(prob((damage/10) * Nutri.volume * Nutri.volume))
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
/obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H)
if(H.disgust)
+9 -8
View File
@@ -31,13 +31,6 @@
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
/obj/item/organ/tongue/applyOrganDamage(var/d, var/maximum = maxHealth)
if (maxHealth == "bone")
if(owner)
return
var/target = owner.get_bodypart(BODY_ZONE_HEAD)
owner.apply_damage(d, BURN, target)
to_chat(owner, "<span class='userdanger'>You feel your skull burning! Oof, your bones!</span>")
return
if(!d) //Micro-optimization.
return
@@ -196,7 +189,7 @@
say_mod = "rattles"
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
taste_sensitivity = 101 // skeletons cannot taste anything
maxHealth = "bone" //Take brute damage instead
maxHealth = 75 //Take brute damage instead
modifies_speech = TRUE
var/chattering = FALSE
var/phomeme_type = "sans"
@@ -206,6 +199,14 @@
. = ..()
phomeme_type = pick(phomeme_types)
/obj/item/organ/tongue/bone/applyOrganDamage(var/d, var/maximum = maxHealth)
if(!owner)
return
var/target = owner.get_bodypart(BODY_ZONE_HEAD)
owner.apply_damage(d, BURN, target)
to_chat(owner, "<span class='userdanger'>You feel your skull burning! Oof, your bones!</span>")
return
/obj/item/organ/tongue/bone/handle_speech(datum/source, list/speech_args)
if (chattering)
chatter(speech_args[SPEECH_MESSAGE], phomeme_type, source)