Welding helmet flags are updating correctly now.

Diseases will not go below 0 now.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5228 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-11-29 21:12:10 +00:00
parent 727bad70e4
commit 81d3b64d9d
2 changed files with 10 additions and 12 deletions

View File

@@ -64,15 +64,13 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
if(stage > max_stages)
stage = max_stages
if(stage < max_stages && prob(stage_prob) && !cure_present) //now the disease shouldn't get back up to stage 4 in no time
stage++
//world << "up"
if(stage > 0 && (cure_present && prob(cure_chance)))
stage--
//world << "down"
if(!cure_present && prob(stage_prob)) //now the disease shouldn't get back up to stage 4 in no time
stage = min(stage + 1, max_stages)
else if(cure_present && prob(cure_chance))
stage = max(stage - 1, 1)
if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
// world << "Cured as stage act"
cure()
return
return

View File

@@ -15,13 +15,13 @@
name = "welding helmet"
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
icon_state = "welding"
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH
flags = (FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH)
item_state = "welding"
m_amt = 3000
g_amt = 1000
var/up = 0
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_action_button = "action_welding"
/obj/item/clothing/head/welding/attack_self()
@@ -36,13 +36,13 @@
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
src.flags |= HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
src.flags |= (HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = initial(icon_state)
usr << "You flip the [src] down to protect your eyes."
else
src.up = !src.up
src.flags &= ~HEADCOVERSEYES | HEADCOVERSMOUTH
src.flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face."