ID:195123
 
//Title: Healing Center Sample
//Credit to: Gughunter
//Contributed by: Jtgibson


//This sample code demonstrates a place
// where players can enter to have their
// characters heal themselves.
//You can obviously adapt it as you wish.


world/mob = /mob/player

mob/player
var/hitPoints = 12
var/maxHitPoints = 14


area/healing_center
var/healDelay = 100 //10 seconds

New()
. = ..()
spawn() HealContents()

proc/HealContents()
while(src)
for(var/mob/player/P in contents)
if(P.hitPoints < P.maxHitPoints)
P.hitPoints++
P << "You regain 1 hit point."
sleep(healDelay)