mob
New()
..()
proc/Heal()
if(vitality<=0) healing()//call the hospital proc here
vitality=min(vitality+1,max_vitality)
spawn(healtime-recovery) Heal()
//These are the hospital turfs
turf/medic
icon = 'hospital.dmi'
var/healrate = 1
Free
Normal
healrate = 3
Advanced
healrate = 4
Minimal
healrate = 2
How can I make it so that if the person is healing in a hospital bed, they gain more "vitality" in the heal loop. Like if I am in a advanced bed, I get 4 more "vitality" per healing loop, but not have it go over the max_vitality var?
Because you're already sensibly using min() to restrict vitality to max_vitality, just replace vitality+1 with vitalith+theturf.healrate. You've already ensured it won't go over the limit with the min() call.
Lummox JR