obj/Medikit
icon='stuff.dmi'
icon_state="mk"
verb
Get()
set src in oview(1)
usr.contents += src
Drop()
if(suffix == null)
src.loc = usr.loc
Heal(mob/M)
if(M.hp==8)
usr<<"You have full health"
return
if(M.hp==7)
usr<<"You have healed 1 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 1 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 1
return
if(M.hp==6)
usr<<"You have healed 2 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 2 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 2
return
if(M.hp==5)
usr<<"You have healed 3 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 3 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 3
return
if(M.hp==4)
usr<<"You have healed 4 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 4 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 4
return
if(M.hp==3)
usr<<"You have healed 4 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 5 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 5
return
if(M.hp==2)
usr<<"You have healed 4 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 6 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 6
return
if(M.hp==1)
usr<<"You have healed 4 hp"
for(var/obj/healthbar/H in M.client.screen)
var/is = 0
is = text2num(H.icon_state) //make the var "is" the number equivilant to H's icon state
is += 7 //add one to "is"
H.icon_state = num2text(is) //make H's icon state the text equivilant of is
M.hp += 7
return
Basically this is a medikit...DUH...But when i heal myself the bar dissapears....Is there a resaon why?