mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Singletons + refactor of /datum/observ (#15487)
This commit is contained in:
@@ -116,12 +116,12 @@
|
||||
return
|
||||
|
||||
if(pulse != PULSE_NONE || BP_IS_ROBOTIC(src))
|
||||
var/blood_volume = round(REAGENT_VOLUME(owner.vessel, /decl/reagent/blood))
|
||||
var/blood_volume = round(REAGENT_VOLUME(owner.vessel, /singleton/reagent/blood))
|
||||
|
||||
//Blood regeneration if there is some space
|
||||
if(blood_volume < species.blood_volume && blood_volume)
|
||||
if(REAGENT_DATA(owner.vessel, /decl/reagent/blood)) // Make sure there's blood at all
|
||||
owner.vessel.add_reagent(/decl/reagent/blood, BLOOD_REGEN_RATE + LAZYACCESS(owner.chem_effects, CE_BLOODRESTORE), temperature = species?.body_temperature)
|
||||
if(REAGENT_DATA(owner.vessel, /singleton/reagent/blood)) // Make sure there's blood at all
|
||||
owner.vessel.add_reagent(/singleton/reagent/blood, BLOOD_REGEN_RATE + LAZYACCESS(owner.chem_effects, CE_BLOODRESTORE), temperature = species?.body_temperature)
|
||||
if(blood_volume <= BLOOD_VOLUME_SAFE) //We lose nutrition and hydration very slowly if our blood is too low
|
||||
owner.adjustNutritionLoss(2)
|
||||
owner.adjustHydrationLoss(1)
|
||||
@@ -153,7 +153,7 @@
|
||||
blood_max += bleed_amount
|
||||
do_spray += "[temp.name]"
|
||||
else
|
||||
owner.vessel.remove_reagent(/decl/reagent/blood, bleed_amount)
|
||||
owner.vessel.remove_reagent(/singleton/reagent/blood, bleed_amount)
|
||||
|
||||
switch(pulse)
|
||||
if(PULSE_SLOW)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// 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/decl/reagent/drink/coffee = REAGENT_VOLUME(owner.reagents, /decl/reagent/drink/coffee)
|
||||
var/singleton/reagent/drink/coffee = REAGENT_VOLUME(owner.reagents, /singleton/reagent/drink/coffee)
|
||||
if(coffee)
|
||||
if(is_bruised())
|
||||
owner.adjustToxLoss(0.1)
|
||||
@@ -29,11 +29,11 @@
|
||||
owner.adjustToxLoss(0.3)
|
||||
|
||||
if(is_bruised())
|
||||
if(prob(5) && REAGENT_VOLUME(reagents, /decl/reagent/potassium) < 5)
|
||||
reagents.add_reagent(/decl/reagent/potassium, REM*5)
|
||||
if(prob(5) && REAGENT_VOLUME(reagents, /singleton/reagent/potassium) < 5)
|
||||
reagents.add_reagent(/singleton/reagent/potassium, REM*5)
|
||||
if(is_broken())
|
||||
if(REAGENT_VOLUME(owner.reagents, /decl/reagent/potassium) < 15)
|
||||
owner.reagents.add_reagent(/decl/reagent/potassium, REM*2)
|
||||
if(REAGENT_VOLUME(owner.reagents, /singleton/reagent/potassium) < 15)
|
||||
owner.reagents.add_reagent(/singleton/reagent/potassium, REM*2)
|
||||
|
||||
//If your kidneys aren't working, your body's going to have a hard time cleaning your blood.
|
||||
if(!owner.chem_effects[CE_ANTITOXIN])
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
if(toxins_pp > safe_toxins_max)
|
||||
var/ratio = (poison/safe_toxins_max) * 10
|
||||
if(reagents)
|
||||
reagents.add_reagent(/decl/reagent/toxin, Clamp(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE))
|
||||
reagents.add_reagent(/singleton/reagent/toxin, Clamp(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE))
|
||||
breath.adjust_gas(poison_type, -poison/6, update = 0) //update after
|
||||
owner.phoron_alert = max(owner.phoron_alert, 1)
|
||||
else
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
if(should_process_alcohol)
|
||||
|
||||
var/alcohol_volume = REAGENT_VOLUME(ingested, /decl/reagent/alcohol)
|
||||
var/alcohol_volume = REAGENT_VOLUME(ingested, /singleton/reagent/alcohol)
|
||||
|
||||
// Alcohol counts as double volume for the purposes of vomit probability
|
||||
var/effective_volume = ingested.total_volume + alcohol_volume
|
||||
|
||||
Reference in New Issue
Block a user