mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
FBP Internal Components
This commit is contained in:
@@ -114,6 +114,10 @@
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
if(current.id == id)
|
||||
if(current.id == "blood")
|
||||
if(!isnull(data["species"]) && !isnull(current.data["species"]) && data["species"] != current.data["species"]) // Species bloodtypes are already incompatible, this just stops it from mixing into the one already in a container.
|
||||
continue
|
||||
|
||||
current.volume += amount
|
||||
if(!isnull(data)) // For all we know, it could be zero or empty string and meaningful
|
||||
current.mix_data(data, amount)
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
var/overdose_mod = 1 //Modifier to overdose damage
|
||||
var/can_overdose_touch = FALSE // Can the chemical OD when processing on touch?
|
||||
var/scannable = 0 // Shows up on health analyzers.
|
||||
var/affects_dead = 0
|
||||
|
||||
var/affects_dead = 0 // Does this chem process inside a corpse?
|
||||
var/affects_robots = 0 // Does this chem process inside a Synth?
|
||||
|
||||
var/cup_icon_state = null
|
||||
var/cup_name = null
|
||||
var/cup_desc = null
|
||||
@@ -55,6 +58,8 @@
|
||||
return
|
||||
if(!affects_dead && M.stat == DEAD)
|
||||
return
|
||||
if(!affects_robots && M.isSynthetic())
|
||||
return
|
||||
if(!istype(location))
|
||||
return
|
||||
|
||||
@@ -79,28 +84,55 @@
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.has_organ[O_HEART] && (active_metab.metabolism_class == CHEM_BLOOD))
|
||||
var/obj/item/organ/internal/heart/Pump = H.internal_organs_by_name[O_HEART]
|
||||
if(!Pump)
|
||||
removed *= 0.1
|
||||
else if(Pump.standard_pulse_level == PULSE_NONE) // No pulse normally means chemicals process a little bit slower than normal.
|
||||
removed *= 0.8
|
||||
else // Otherwise, chemicals process as per percentage of your current pulse, or, if you have no pulse but are alive, by a miniscule amount.
|
||||
removed *= max(0.1, H.pulse / Pump.standard_pulse_level)
|
||||
if(!H.isSynthetic())
|
||||
if(H.species.has_organ[O_HEART] && (active_metab.metabolism_class == CHEM_BLOOD))
|
||||
var/obj/item/organ/internal/heart/Pump = H.internal_organs_by_name[O_HEART]
|
||||
if(!Pump)
|
||||
removed *= 0.1
|
||||
else if(Pump.standard_pulse_level == PULSE_NONE) // No pulse normally means chemicals process a little bit slower than normal.
|
||||
removed *= 0.8
|
||||
else // Otherwise, chemicals process as per percentage of your current pulse, or, if you have no pulse but are alive, by a miniscule amount.
|
||||
removed *= max(0.1, H.pulse / Pump.standard_pulse_level)
|
||||
|
||||
if(H.species.has_organ[O_STOMACH] && (active_metab.metabolism_class == CHEM_INGEST))
|
||||
var/obj/item/organ/internal/stomach/Chamber = H.internal_organs_by_name[O_STOMACH]
|
||||
if(Chamber)
|
||||
ingest_rem_mult *= max(0.1, 1 - (Chamber.damage / Chamber.max_damage))
|
||||
else
|
||||
ingest_rem_mult = 0.1
|
||||
if(H.species.has_organ[O_STOMACH] && (active_metab.metabolism_class == CHEM_INGEST))
|
||||
var/obj/item/organ/internal/stomach/Chamber = H.internal_organs_by_name[O_STOMACH]
|
||||
if(Chamber)
|
||||
ingest_rem_mult *= max(0.1, 1 - (Chamber.damage / Chamber.max_damage))
|
||||
else
|
||||
ingest_rem_mult = 0.1
|
||||
|
||||
if(H.species.has_organ[O_INTESTINE] && (active_metab.metabolism_class == CHEM_INGEST))
|
||||
var/obj/item/organ/internal/intestine/Tube = H.internal_organs_by_name[O_INTESTINE]
|
||||
if(Tube)
|
||||
ingest_abs_mult *= max(0.1, 1 - (Tube.damage / Tube.max_damage))
|
||||
else
|
||||
ingest_abs_mult = 0.1
|
||||
if(H.species.has_organ[O_INTESTINE] && (active_metab.metabolism_class == CHEM_INGEST))
|
||||
var/obj/item/organ/internal/intestine/Tube = H.internal_organs_by_name[O_INTESTINE]
|
||||
if(Tube)
|
||||
ingest_abs_mult *= max(0.1, 1 - (Tube.damage / Tube.max_damage))
|
||||
else
|
||||
ingest_abs_mult = 0.1
|
||||
|
||||
else
|
||||
var/obj/item/organ/internal/heart/machine/Pump = H.internal_organs_by_name[O_PUMP]
|
||||
var/obj/item/organ/internal/stomach/machine/Cycler = H.internal_organs_by_name[O_CYCLER]
|
||||
|
||||
if(active_metab.metabolism_class == CHEM_BLOOD)
|
||||
if(Pump)
|
||||
removed *= 1.1 - Pump.damage / Pump.max_damage
|
||||
else
|
||||
removed *= 0.1
|
||||
|
||||
else if(active_metab.metabolism_class == CHEM_INGEST) // If the pump is damaged, we waste chems from the tank.
|
||||
if(Pump)
|
||||
ingest_abs_mult *= max(0.25, 1 - Pump.damage / Pump.max_damage)
|
||||
|
||||
else
|
||||
ingest_abs_mult *= 0.2
|
||||
|
||||
if(Cycler) // If we're damaged, we empty our tank slower.
|
||||
ingest_rem_mult = max(0.1, 1 - (Cycler.damage / Cycler.max_damage))
|
||||
|
||||
else
|
||||
ingest_rem_mult = 0.1
|
||||
|
||||
else if(active_metab.metabolism_class == CHEM_TOUCH) // Machines don't exactly absorb chemicals.
|
||||
removed *= 0.5
|
||||
|
||||
if(filtered_organs && filtered_organs.len)
|
||||
for(var/organ_tag in filtered_organs)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
..()
|
||||
if(data && data["blood_colour"])
|
||||
color = data["blood_colour"]
|
||||
|
||||
return
|
||||
|
||||
/datum/reagent/blood/get_data() // Just in case you have a reagent that handles data differently.
|
||||
@@ -49,6 +50,11 @@
|
||||
H.adjust_nutrition(removed)
|
||||
is_vampire = 1 //VOREStation Edit END
|
||||
if(alien == IS_SLIME) // Treat it like nutriment for the jello, but not equivalent.
|
||||
if(data["species"] == M.species.name) // Unless it's Promethean goo, then refill this one's goo.
|
||||
M.inject_blood(src, volume * volume_mod)
|
||||
remove_self(volume)
|
||||
return
|
||||
|
||||
M.heal_organ_damage(0.2 * removed * volume_mod, 0) // More 'effective' blood means more usable material.
|
||||
M.adjust_nutrition(20 * removed * volume_mod)
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
@@ -91,6 +97,23 @@
|
||||
if(alien == IS_SLIME) //They don't have blood, so it seems weird that they would instantly 'process' the chemical like another species does.
|
||||
affect_ingest(M, alien, removed)
|
||||
return
|
||||
|
||||
if(M.isSynthetic())
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
var/datum/reagent/blood/recipient = H.get_blood(H.vessel)
|
||||
|
||||
if(recipient && blood_incompatible(data["blood_type"], recipient.data["blood_type"], data["species"], recipient.data["species"]))
|
||||
H.inject_blood(src, removed * volume_mod)
|
||||
|
||||
if(!H.isSynthetic() && data["species"] == "synthetic") // Remember not to inject oil into your veins, it's bad for you.
|
||||
H.reagents.add_reagent("toxin", removed * 1.5)
|
||||
|
||||
return
|
||||
|
||||
M.inject_blood(src, volume * volume_mod)
|
||||
remove_self(volume)
|
||||
|
||||
|
||||
@@ -1481,6 +1481,7 @@
|
||||
color = "#555555"
|
||||
metabolism = REM * 4 // Nanomachines gotta go fast.
|
||||
scannable = 1
|
||||
affects_robots = TRUE
|
||||
|
||||
/datum/reagent/healing_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.heal_organ_damage(2 * removed, 2 * removed)
|
||||
|
||||
@@ -487,6 +487,24 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC"
|
||||
|
||||
affects_robots = TRUE
|
||||
|
||||
/datum/reagent/coolant/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(M.isSynthetic() && ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
var/datum/reagent/blood/coolant = H.get_blood(H.vessel)
|
||||
|
||||
if(coolant)
|
||||
H.vessel.add_reagent("blood", removed, coolant.data)
|
||||
|
||||
else
|
||||
H.vessel.add_reagent("blood", removed)
|
||||
H.fixblood()
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/datum/reagent/ultraglue
|
||||
name = "Ultra Glue"
|
||||
id = "glue"
|
||||
|
||||
@@ -1013,6 +1013,7 @@ datum/reagent/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/re
|
||||
reagent_state = SOLID
|
||||
color = "#555555"
|
||||
metabolism = REM * 4 // Nanomachines. Fast.
|
||||
affects_robots = TRUE
|
||||
|
||||
/datum/reagent/shredding_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustBruteLoss(4 * removed)
|
||||
@@ -1026,6 +1027,7 @@ datum/reagent/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/re
|
||||
reagent_state = SOLID
|
||||
color = "#555555"
|
||||
metabolism = REM * 4
|
||||
affects_robots = TRUE
|
||||
|
||||
/datum/reagent/irradiated_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
SSradiation.radiate(get_turf(M), 20) // Irradiate people around you.
|
||||
@@ -1040,6 +1042,7 @@ datum/reagent/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/re
|
||||
color = "#555555"
|
||||
metabolism = REM * 4
|
||||
filtered_organs = list(O_SPLEEN)
|
||||
affects_robots = TRUE
|
||||
|
||||
/datum/reagent/neurophage_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustBrainLoss(2 * removed) // Their job is to give you a bad time.
|
||||
|
||||
Reference in New Issue
Block a user