mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Merge pull request #933 from Zuhayr/tesharifixes
Small mob reagent changes.
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
/var/list/economic_species_modifier = list(
|
||||
/datum/species/human = 10,
|
||||
/datum/species/skrell = 12,
|
||||
/datum/species/teshari = 9, // Skrell sponsored!
|
||||
/datum/species/tajaran = 7,
|
||||
/datum/species/unathi = 7,
|
||||
/datum/species/vox = 1
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
ingested = new/datum/reagents/metabolism(1000, src, CHEM_INGEST)
|
||||
touching = new/datum/reagents/metabolism(1000, src, CHEM_TOUCH)
|
||||
reagents = bloodstr
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
@@ -36,9 +35,9 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(src.nutrition && src.stat != 2)
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
|
||||
@@ -895,7 +895,7 @@
|
||||
/mob/living/carbon/human/revive()
|
||||
|
||||
if(should_have_organ(O_HEART))
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
vessel.add_reagent("blood",species.blood_volume-vessel.total_volume)
|
||||
fixblood()
|
||||
|
||||
species.create_organs(src) // Reset our organs/limbs.
|
||||
@@ -1113,7 +1113,10 @@
|
||||
|
||||
spawn(0)
|
||||
regenerate_icons()
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
if(vessel.total_volume < species.blood_volume)
|
||||
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
|
||||
else if(vessel.total_volume > species.blood_volume)
|
||||
vessel.remove_reagent("blood", vessel.total_volume - species.blood_volume)
|
||||
fixblood()
|
||||
|
||||
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
||||
|
||||
@@ -318,10 +318,10 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
|
||||
This function restores the subjects blood to max.
|
||||
*/
|
||||
/mob/living/carbon/human/proc/restore_blood()
|
||||
if(should_have_organ(O_HEART))
|
||||
var/blood_volume = vessel.get_reagent_amount("blood")
|
||||
vessel.add_reagent("blood",560.0-blood_volume)
|
||||
|
||||
if(!should_have_organ(O_HEART))
|
||||
return
|
||||
if(vessel.total_volume < species.blood_volume)
|
||||
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
|
||||
|
||||
/*
|
||||
This function restores all organs.
|
||||
|
||||
@@ -893,7 +893,7 @@
|
||||
|
||||
// nutrition decrease
|
||||
if (nutrition > 0 && stat != 2)
|
||||
nutrition = max (0, nutrition - HUNGER_FACTOR)
|
||||
nutrition = max (0, nutrition - species.hunger_factor)
|
||||
|
||||
if (nutrition > 450)
|
||||
if(overeatduration < 600) //capped so people don't take forever to unfat
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
var/mob_size = MOB_MEDIUM
|
||||
var/show_ssd = "fast asleep"
|
||||
var/virus_immune
|
||||
var/short_sighted
|
||||
var/short_sighted // Permanent weldervision.
|
||||
var/blood_volume = 560 // Initial blood volume.
|
||||
var/hunger_factor = 0.05 // Multiplier for hunger.
|
||||
|
||||
var/min_age = 17
|
||||
var/max_age = 70
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
base_color = "#001144"
|
||||
tail = "seromitail"
|
||||
tail_hair = "feathers"
|
||||
reagent_tag = IS_TESHARI
|
||||
|
||||
icobase = 'icons/mob/human_races/r_seromi.dmi'
|
||||
deform = 'icons/mob/human_races/r_seromi.dmi'
|
||||
@@ -32,6 +33,8 @@
|
||||
holder_type = /obj/item/weapon/holder/human
|
||||
short_sighted = 1
|
||||
gluttonous = 1
|
||||
blood_volume = 400
|
||||
hunger_factor = 1.2
|
||||
|
||||
spawn_flags = CAN_JOIN | IS_WHITELISTED
|
||||
appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_EYE_COLOR
|
||||
|
||||
@@ -385,4 +385,4 @@
|
||||
/mob/living/carbon/slime/cannot_use_vents()
|
||||
if(Victim)
|
||||
return "You cannot ventcrawl while feeding."
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -350,6 +350,6 @@
|
||||
visible_message("<span class='warning'>With a hideous, rattling moan, [src] shudders back to life!</span>")
|
||||
|
||||
rejuvenate()
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
restore_blood()
|
||||
fixblood()
|
||||
update_canmove()
|
||||
@@ -1,14 +1,14 @@
|
||||
/****************************************************
|
||||
BLOOD SYSTEM
|
||||
****************************************************/
|
||||
//Blood levels
|
||||
var/const/BLOOD_VOLUME_SAFE = 501
|
||||
var/const/BLOOD_VOLUME_OKAY = 336
|
||||
var/const/BLOOD_VOLUME_BAD = 224
|
||||
var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
//Blood levels. These are percentages based on the species blood_volume far.
|
||||
var/const/BLOOD_VOLUME_SAFE = 85
|
||||
var/const/BLOOD_VOLUME_OKAY = 75
|
||||
var/const/BLOOD_VOLUME_BAD = 60
|
||||
var/const/BLOOD_VOLUME_SURVIVE = 40
|
||||
|
||||
/mob/living/carbon/human/var/datum/reagents/vessel //Container for blood and BLOOD ONLY. Do not transfer other chems here.
|
||||
/mob/living/carbon/human/var/var/pale = 0 //Should affect how mob sprite is drawn, but currently doesn't.
|
||||
/mob/living/carbon/human/var/datum/reagents/vessel // Container for blood and BLOOD ONLY. Do not transfer other chems here.
|
||||
/mob/living/carbon/human/var/var/pale = 0 // Should affect how mob sprite is drawn, but currently doesn't.
|
||||
|
||||
//Initializes blood vessels
|
||||
/mob/living/carbon/human/proc/make_blood()
|
||||
@@ -16,13 +16,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if(vessel)
|
||||
return
|
||||
|
||||
vessel = new/datum/reagents(600)
|
||||
vessel = new/datum/reagents(species.blood_volume)
|
||||
vessel.my_atom = src
|
||||
|
||||
if(!should_have_organ(O_HEART)) //We want the var for safety but we can do without the actual blood.
|
||||
return
|
||||
|
||||
vessel.add_reagent("blood",560)
|
||||
vessel.add_reagent("blood",species.blood_volume)
|
||||
spawn(1)
|
||||
fixblood()
|
||||
|
||||
@@ -44,10 +44,11 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
if(stat != DEAD && bodytemperature >= 170) //Dead or cryosleep people do not pump the blood.
|
||||
|
||||
var/blood_volume = round(vessel.get_reagent_amount("blood"))
|
||||
var/blood_volume_raw = vessel.get_reagent_amount("blood")
|
||||
var/blood_volume = round((blood_volume_raw/species.blood_volume)*100) // Percentage.
|
||||
|
||||
//Blood regeneration if there is some space
|
||||
if(blood_volume < 560 && blood_volume)
|
||||
if(blood_volume_raw < species.blood_volume)
|
||||
var/datum/reagent/blood/B = locate() in vessel.reagent_list //Grab some blood
|
||||
if(B) // Make sure there's some blood at all
|
||||
if(B.data["donor"] != src) //If it's not theirs, then we look for theirs
|
||||
@@ -75,46 +76,45 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
blood_volume *= 0.3
|
||||
|
||||
//Effects of bloodloss
|
||||
switch(blood_volume)
|
||||
if(BLOOD_VOLUME_SAFE to 10000)
|
||||
if(pale)
|
||||
pale = 0
|
||||
update_body()
|
||||
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel [word]"
|
||||
if(prob(1))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel [word]"
|
||||
if(oxyloss < 20)
|
||||
oxyloss += 3
|
||||
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
eye_blurry = max(eye_blurry,6)
|
||||
if(oxyloss < 50)
|
||||
oxyloss += 10
|
||||
oxyloss += 1
|
||||
if(prob(15))
|
||||
Paralyse(rand(1,3))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel extremely [word]"
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
|
||||
oxyloss += 5
|
||||
toxloss += 3
|
||||
if(prob(15))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel extremely [word]"
|
||||
if(0 to BLOOD_VOLUME_SURVIVE)
|
||||
// There currently is a strange bug here. If the mob is not below -100 health
|
||||
// when death() is called, apparently they will be just fine, and this way it'll
|
||||
// spam deathgasp. Adjusting toxloss ensures the mob will stay dead.
|
||||
toxloss += 300 // just to be safe!
|
||||
death()
|
||||
if(blood_volume >= BLOOD_VOLUME_SAFE)
|
||||
if(pale)
|
||||
pale = 0
|
||||
update_body()
|
||||
else if(blood_volume >= BLOOD_VOLUME_OKAY)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel [word]"
|
||||
if(prob(1))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel [word]"
|
||||
if(oxyloss < 20)
|
||||
oxyloss += 3
|
||||
else if(blood_volume >= BLOOD_VOLUME_BAD)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
eye_blurry = max(eye_blurry,6)
|
||||
if(oxyloss < 50)
|
||||
oxyloss += 10
|
||||
oxyloss += 1
|
||||
if(prob(15))
|
||||
Paralyse(rand(1,3))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel extremely [word]"
|
||||
else if(blood_volume >= BLOOD_VOLUME_SURVIVE)
|
||||
oxyloss += 5
|
||||
toxloss += 3
|
||||
if(prob(15))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel extremely [word]"
|
||||
else
|
||||
// There currently is a strange bug here. If the mob is not below -100 health
|
||||
// when death() is called, apparently they will be just fine, and this way it'll
|
||||
// spam deathgasp. Adjusting toxloss ensures the mob will stay dead.
|
||||
toxloss += 300 // just to be safe!
|
||||
death()
|
||||
|
||||
// Without enough blood you slowly go hungry.
|
||||
if(blood_volume < BLOOD_VOLUME_SAFE)
|
||||
@@ -205,7 +205,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
var/list/chems = list()
|
||||
chems = params2list(injected.data["trace_chem"])
|
||||
for(var/C in chems)
|
||||
src.reagents.add_reagent(C, (text2num(chems[C]) / 560) * amount)//adds trace chemicals to owner's blood
|
||||
src.reagents.add_reagent(C, (text2num(chems[C]) / species.blood_volume) * amount)//adds trace chemicals to owner's blood
|
||||
reagents.update_total()
|
||||
|
||||
//Transfers blood from reagents to vessel, respecting blood types compatability.
|
||||
|
||||
@@ -117,7 +117,7 @@ var/list/organ_cache = list()
|
||||
if(germ_level >= INFECTION_LEVEL_THREE)
|
||||
die()
|
||||
|
||||
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
else if(owner && owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
handle_rejection()
|
||||
|
||||
@@ -34,9 +34,13 @@
|
||||
B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*"
|
||||
|
||||
/datum/reagent/blood/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(dose > 5)
|
||||
|
||||
var/effective_dose = dose
|
||||
if(issmall(M)) effective_dose *= 2
|
||||
|
||||
if(effective_dose > 5)
|
||||
M.adjustToxLoss(removed)
|
||||
if(dose > 15)
|
||||
if(effective_dose > 15)
|
||||
M.adjustToxLoss(removed)
|
||||
if(data && data["virus2"])
|
||||
var/list/vlist = data["virus2"]
|
||||
@@ -160,6 +164,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.adjustToxLoss(2 * removed)
|
||||
|
||||
/datum/reagent/fuel/touch_mob(var/mob/living/L, var/amount)
|
||||
|
||||
@@ -75,12 +75,13 @@
|
||||
L.adjust_fire_stacks(amount / 15)
|
||||
|
||||
/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.adjustToxLoss(removed * 2 * toxicity)
|
||||
return
|
||||
|
||||
/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.nutrition += nutriment_factor * removed
|
||||
|
||||
var/strength_mod = 1
|
||||
if(alien == IS_SKRELL)
|
||||
strength_mod *= 5
|
||||
@@ -237,6 +238,7 @@
|
||||
color = "#C7C7C7"
|
||||
|
||||
/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease
|
||||
if(M.virus2.len)
|
||||
for(var/ID in M.virus2)
|
||||
@@ -272,6 +274,7 @@
|
||||
var/meltdose = 10 // How much is needed to melt
|
||||
|
||||
/datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.take_organ_damage(0, removed * power * 2)
|
||||
|
||||
/datum/reagent/acid/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) // This is the most interesting
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
affect_ingest(M, alien, removed)
|
||||
|
||||
/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
|
||||
M.heal_organ_damage(0.5 * removed, 0)
|
||||
M.nutrition += nutriment_factor * removed // For hunger and fatness
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
@@ -27,9 +28,13 @@
|
||||
color = "#440000"
|
||||
|
||||
/datum/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien && alien == IS_SKRELL)
|
||||
M.adjustToxLoss(0.5 * removed)
|
||||
return
|
||||
switch(alien)
|
||||
if(IS_SKRELL)
|
||||
M.adjustToxLoss(0.5 * removed)
|
||||
return
|
||||
if(IS_TESHARI)
|
||||
..(M, alien, removed*1.2) // Teshari get a bit more nutrition from meat.
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/reagent/nutriment/protein/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(strength && alien != IS_DIONA)
|
||||
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
|
||||
M.adjustToxLoss(strength * removed)
|
||||
|
||||
/datum/reagent/toxin/plasticide
|
||||
@@ -281,12 +282,17 @@
|
||||
/datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_DIONA)
|
||||
return
|
||||
if(dose < 1)
|
||||
if(dose == metabolism * 2 || prob(5))
|
||||
|
||||
var/effective_dose = dose
|
||||
if(issmall(M))
|
||||
effective_dose *= 2
|
||||
|
||||
if(effective_dose < 1)
|
||||
if(effective_dose == metabolism * 2 || prob(5))
|
||||
M.emote("yawn")
|
||||
else if(dose < 1.5)
|
||||
else if(effective_dose < 1.5)
|
||||
M.eye_blurry = max(M.eye_blurry, 10)
|
||||
else if(dose < 5)
|
||||
else if(effective_dose < 5)
|
||||
if(prob(50))
|
||||
M.Weaken(2)
|
||||
M.drowsyness = max(M.drowsyness, 20)
|
||||
@@ -306,16 +312,21 @@
|
||||
/datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_DIONA)
|
||||
return
|
||||
if(dose == metabolism)
|
||||
|
||||
var/effective_dose = dose
|
||||
if(issmall(M))
|
||||
effective_dose *= 2
|
||||
|
||||
if(effective_dose == metabolism)
|
||||
M.confused += 2
|
||||
M.drowsyness += 2
|
||||
else if(dose < 2)
|
||||
else if(effective_dose < 2)
|
||||
M.Weaken(30)
|
||||
M.eye_blurry = max(M.eye_blurry, 10)
|
||||
else
|
||||
M.sleeping = max(M.sleeping, 30)
|
||||
|
||||
if(dose > 1)
|
||||
if(effective_dose > 1)
|
||||
M.adjustToxLoss(removed)
|
||||
|
||||
/datum/reagent/chloralhydrate/beer2 //disguised as normal beer for use by emagged brobots
|
||||
@@ -426,12 +437,15 @@
|
||||
if(alien == IS_DIONA)
|
||||
return
|
||||
M.druggy = max(M.druggy, 30)
|
||||
if(dose < 1)
|
||||
|
||||
var/effective_dose = dose
|
||||
if(issmall(M)) effective_dose *= 2
|
||||
if(effective_dose < 1)
|
||||
M.apply_effect(3, STUTTER)
|
||||
M.make_dizzy(5)
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch", "giggle"))
|
||||
else if(dose < 2)
|
||||
else if(effective_dose < 2)
|
||||
M.apply_effect(3, STUTTER)
|
||||
M.make_jittery(5)
|
||||
M.make_dizzy(5)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
return
|
||||
|
||||
self_feed_message(user)
|
||||
reagents.trans_to_mob(user, amount_per_transfer_from_this, CHEM_INGEST)
|
||||
reagents.trans_to_mob(user, issmall(user) ? ceil(amount_per_transfer_from_this/2) : amount_per_transfer_from_this, CHEM_INGEST)
|
||||
feed_sound(user)
|
||||
return 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user