mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-20 10:37:45 +01:00
* Initial wiki system * wiki organization and spoilers * hide belly chems * move ads to tgui * add search * . * load screen * error screen * 8 * center * . * . * make this more realistic * tgui errro col * move search to top * . * non NT theme * logo to common * base custom theme * . * wip refactor * almost halfway * reworked wiki data * easy fix * get data fix * Material Page in tgui * catch null supply points * . * forward crash * reset pages * . * canvas prep * fix icon stacking * . * colored outlined images * fix sm datum * fix material names * subType prep * only on crash * fix null crash * . * fix solgov * clean hiding * . * implement catalog page * . * particle smasher page * I'm lazy * unfuck some sins * ore page * botany page * allergen list * allergen returns null too * slime injection var * slime core data * fixed warning * wip * proper data list for chems * pass is_slime as null * chems * split that * . * . * . * . * donation for bingle, some cleanup * return types * partially colord icons for chemistry * . * more sillies * donation page * thaler * needs some variation * . * this will crash until implemented * handle it * fix that * dismiss donation banner button * . * fix that * donating procs * donation stuff for comp * - * drink glass for drinks * illegal iconstate pass * fixes * . * nuke drink fix * . * . * . * Drink reagent fix * more cleanup * adjust * . * simple food * . * food list * sending nulls, removed flavor from recipes * . * . * get_donation_current added * . * missing key * . * duped recipes fixed * . * . * wiki food reagent recipes * double list add * properly forbid remaining bad reagent * hide this too * stacky * enable eslint const * fix typing * update that * use proper donation proc * printing fixes * grinding * . * beaker fill volume * plant ore and mat grinding results * duped recipes fixed, unit test tweak * yes this is terrible * . * . * . * chem analyzer tgui mode, some subsystem changes to support it * redoce * . * , * . * small fixes, missing reagent volume * push * sort * catalog entries unlocked by explo * new chem stuff * . * fix byond code * fix scroll tracking * comment * alphabetical * also this * . * fallback icon * . * ... * rel path * that too * to defines * organ to define * . * . * . --------- Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
71 lines
2.3 KiB
Plaintext
71 lines
2.3 KiB
Plaintext
/obj/item/organ/internal/liver
|
|
name = "liver"
|
|
icon_state = "liver"
|
|
organ_tag = O_LIVER
|
|
parent_organ = BP_GROIN
|
|
|
|
/obj/item/organ/internal/liver/process()
|
|
..()
|
|
if(!iscarbon(owner)) return
|
|
|
|
if(owner.life_tick % PROCESS_ACCURACY == 0)
|
|
|
|
//High toxins levels are dangerous
|
|
if(owner.getToxLoss() >= 50 && !owner.reagents.has_reagent(REAGENT_ID_ANTITOXIN))
|
|
//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/internal/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(REAGENT_ID_ANTITOXIN))
|
|
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
|
|
|
|
// Do some reagent processing.
|
|
if(owner.chem_effects[CE_ALCOHOL_TOXIC])
|
|
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them
|
|
if(filter_effect < 2) //Liver is badly damaged, you're drinking yourself to death
|
|
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.2 * PROCESS_ACCURACY)
|
|
if(filter_effect < 3)
|
|
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY)
|
|
|
|
/obj/item/organ/internal/liver/handle_germ_effects()
|
|
. = ..() //Up should return an infection level as an integer
|
|
if(!.) return
|
|
|
|
//Pyogenic Abscess
|
|
if (. >= 1)
|
|
if(prob(1))
|
|
owner.custom_pain("There's a sharp pain in your upper-right abdomen!",1)
|
|
if (. >= 2)
|
|
if(prob(1) && owner.getToxLoss() < owner.getMaxHealth()*0.3)
|
|
//to_chat(owner, "") //Toxins provide their own messages for pain
|
|
owner.adjustToxLoss(5) //Not realistic to PA but there are basically no 'real' liver infections
|
|
|
|
/obj/item/organ/internal/liver/grey
|
|
icon_state = "liver_grey"
|
|
|
|
/obj/item/organ/internal/liver/grey/colormatch/Initialize(mapload, internal)
|
|
..()
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
/obj/item/organ/internal/liver/grey/colormatch/LateInitialize()
|
|
. = ..()
|
|
if(ishuman(loc))
|
|
var/mob/living/carbon/human/H = loc
|
|
color = H.species.blood_color
|