mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
- bugfix: "Fixed dizziness effects on alcohol, psilocybin, and cryptobiolin taking a long to start up and sometimes never starting for low doses" - tweak: "Sip size from alcohol bottles is now the same as for glasses, which is half what it was" - tweak: "Rebalanced all alcoholic drinks with more believable alcohol values, and adjusted alcohol metabolism. Generally drinks are stronger but metabolise more slowly, pace yourself!" - rscadd: "Different species now have varying susceptibility to alcohol. Tajarans get drunk slightly faster, skrell are twice as fast as humans, unathi can drink more, and vaurca get drunk very slowly, but alcohol poisons them" - bugfix: "Dousing people in alcohol and setting them on fire, now only works with spirits and liqeurs stronger than 40% ABV, and the heat of the resulting fire is based on the strength"
230 lines
5.9 KiB
Plaintext
230 lines
5.9 KiB
Plaintext
#define PROCESS_ACCURACY 10
|
|
|
|
/****************************************************
|
|
INTERNAL ORGANS DEFINES
|
|
****************************************************/
|
|
|
|
|
|
// Brain is defined in brain_item.dm.
|
|
/obj/item/organ/heart
|
|
name = "heart"
|
|
icon_state = "heart-on"
|
|
organ_tag = "heart"
|
|
parent_organ = "chest"
|
|
dead_icon = "heart-off"
|
|
|
|
/obj/item/organ/lungs
|
|
name = "lungs"
|
|
icon_state = "lungs"
|
|
gender = PLURAL
|
|
organ_tag = "lungs"
|
|
parent_organ = "chest"
|
|
|
|
/obj/item/organ/lungs/process()
|
|
..()
|
|
|
|
if(!owner)
|
|
return
|
|
|
|
if (germ_level > INFECTION_LEVEL_ONE)
|
|
if(prob(5))
|
|
owner.emote("cough") //respitory tract infection
|
|
|
|
if(is_bruised())
|
|
if(prob(2))
|
|
spawn owner.emote("me", 1, "coughs up blood!")
|
|
owner.drip(10)
|
|
if(prob(4))
|
|
spawn owner.emote("me", 1, "gasps for air!")
|
|
owner.losebreath += 15
|
|
|
|
/obj/item/organ/kidneys
|
|
name = "kidneys"
|
|
icon_state = "kidneys"
|
|
gender = PLURAL
|
|
organ_tag = "kidneys"
|
|
parent_organ = "groin"
|
|
|
|
/obj/item/organ/kidneys/process()
|
|
|
|
..()
|
|
|
|
if(!owner)
|
|
return
|
|
|
|
// Coffee is really bad for you with busted kidneys.
|
|
// This should probably be expanded in some way, but fucked if I know
|
|
// what else kidneys can process in our reagent list.
|
|
var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list
|
|
if(coffee)
|
|
if(is_bruised())
|
|
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
|
|
else if(is_broken())
|
|
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
|
|
|
/obj/item/organ/eyes
|
|
name = "eyeballs"
|
|
icon_state = "eyes"
|
|
gender = PLURAL
|
|
organ_tag = "eyes"
|
|
parent_organ = "head"
|
|
var/list/eye_colour = list(0,0,0)
|
|
|
|
/obj/item/organ/eyes/proc/update_colour()
|
|
if(!owner)
|
|
return
|
|
eye_colour = list(
|
|
owner.r_eyes ? owner.r_eyes : 0,
|
|
owner.g_eyes ? owner.g_eyes : 0,
|
|
owner.b_eyes ? owner.b_eyes : 0
|
|
)
|
|
|
|
/obj/item/organ/eyes/take_damage(amount, var/silent=0)
|
|
var/oldbroken = is_broken()
|
|
..()
|
|
if(is_broken() && !oldbroken && owner && !owner.stat)
|
|
owner << "<span class='danger'>You go blind!</span>"
|
|
|
|
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
|
|
..()
|
|
if(!owner)
|
|
return
|
|
if(is_bruised())
|
|
owner.eye_blurry = 20
|
|
if(is_broken())
|
|
owner.eye_blind = 20
|
|
|
|
/obj/item/organ/liver
|
|
name = "liver"
|
|
icon_state = "liver"
|
|
organ_tag = "liver"
|
|
parent_organ = "groin"
|
|
|
|
/obj/item/organ/liver/process()
|
|
|
|
..()
|
|
|
|
if(!owner)
|
|
return
|
|
|
|
if (germ_level > INFECTION_LEVEL_ONE)
|
|
if(prob(1))
|
|
owner << "\red Your skin itches."
|
|
if (germ_level > INFECTION_LEVEL_TWO)
|
|
if(prob(1))
|
|
spawn owner.delayed_vomit()
|
|
|
|
if(owner.life_tick % PROCESS_ACCURACY == 0)
|
|
|
|
//High toxins levels are dangerous
|
|
if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin"))
|
|
//Healthy liver suffers on its own
|
|
if (src.damage < min_broken_damage)
|
|
src.damage += 0.2 * PROCESS_ACCURACY
|
|
//Damaged one shares the fun
|
|
else
|
|
var/obj/item/organ/O = pick(owner.internal_organs)
|
|
if(O)
|
|
O.damage += 0.2 * PROCESS_ACCURACY
|
|
|
|
//Detox can heal small amounts of damage
|
|
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin"))
|
|
src.damage -= 0.2 * PROCESS_ACCURACY
|
|
|
|
if(src.damage < 0)
|
|
src.damage = 0
|
|
|
|
// Get the effectiveness of the liver.
|
|
var/filter_effect = 3
|
|
if(is_bruised())
|
|
filter_effect -= 1
|
|
if(is_broken())
|
|
filter_effect -= 2
|
|
|
|
if (owner.intoxication)
|
|
//ALCOHOL_FILTRATION_RATE is defined in intoxication.dm
|
|
owner.intoxication -= ALCOHOL_FILTRATION_RATE*filter_effect*PROCESS_ACCURACY//A weakened liver filters out alcohol more slowly
|
|
owner.intoxication = max(owner.intoxication, 0)
|
|
|
|
// Do some reagent processing.
|
|
if(owner.chem_effects[CE_ALCOHOL_TOXIC])
|
|
if(filter_effect < 3)
|
|
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY)
|
|
else
|
|
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them
|
|
|
|
/obj/item/organ/appendix
|
|
name = "appendix"
|
|
icon_state = "appendix"
|
|
parent_organ = "groin"
|
|
organ_tag = "appendix"
|
|
|
|
/obj/item/organ/appendix/removed()
|
|
if(owner)
|
|
var/inflamed = 0
|
|
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
|
inflamed = 1
|
|
appendicitis.cure()
|
|
owner.resistances += appendicitis
|
|
if(inflamed)
|
|
icon_state = "appendixinflamed"
|
|
name = "inflamed appendix"
|
|
..()
|
|
|
|
//VAURCA ORGANS
|
|
|
|
/obj/item/organ/internal/vaurca/process()
|
|
return
|
|
|
|
/obj/item/organ/vaurca/neuralsocket
|
|
name = "neural socket"
|
|
organ_tag = "neural socket"
|
|
icon = 'icons/mob/alien.dmi'
|
|
icon_state = "neural_socket"
|
|
parent_organ = "head"
|
|
robotic = 2
|
|
|
|
obj/item/organ/vaurca/neuralsocket/process()
|
|
if (is_broken())
|
|
if (all_languages["Hivenet"] in owner.languages)
|
|
owner.remove_language("Hivenet")
|
|
owner << "\red Your mind suddenly grows dark as the unity of the Hive is torn from you."
|
|
else
|
|
if (!(all_languages["Hivenet"] in owner.languages))
|
|
owner.add_language("Hivenet")
|
|
owner << "\blue Your mind expands, and your thoughts join the unity of the Hivenet."
|
|
..()
|
|
|
|
/obj/item/organ/vaurca/neuralsocket/replaced(var/mob/living/carbon/human/target)
|
|
if (!(all_languages["Hivenet"] in owner.languages))
|
|
owner.add_language("Hivenet")
|
|
owner << "\blue Your mind expands, and your thoughts join the unity of the Hivenet."
|
|
..()
|
|
|
|
/obj/item/organ/vaurca/neuralsocket/removed(var/mob/living/carbon/human/target)
|
|
if(all_languages["Hivenet"] in target.languages)
|
|
target.remove_language("Hivenet")
|
|
target << "\red Your mind suddenly grows dark as the unity of the Hive is torn from you."
|
|
..()
|
|
|
|
/obj/item/organ/vaurca/breathingapparatus
|
|
name = "breathing apparatus"
|
|
organ_tag = "breathing apparatus"
|
|
parent_organ = "chest"
|
|
icon = 'icons/mob/alien.dmi'
|
|
icon_state = "breathing_app"
|
|
robotic = 0
|
|
|
|
obj/item/organ/vaurca/breathingapparatus/process()
|
|
return
|
|
|
|
/obj/item/organ/vaurca/breathingapparatus/removed()
|
|
return
|
|
|
|
/obj/item/organ/vaurca/filtrationbit
|
|
name = "filtration bit"
|
|
organ_tag = "filtration bit"
|
|
parent_organ = "head"
|
|
icon = 'icons/mob/alien.dmi'
|
|
icon_state = "filter"
|
|
robotic = 2 |