Added basic germ code.

This will only trigger in surgery for now - That is when you cut someone open in surgery, you'd better wash your hands before, or otherwise you'll get infected wounds.
This commit is contained in:
cib
2012-11-12 12:51:28 +01:00
parent 2d6e97848b
commit e92cecdefe
10 changed files with 72 additions and 12 deletions
+2
View File
@@ -353,10 +353,12 @@
if(H.gloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0)
H.gloves.germ_level = 0
else
if(H.bloody_hands)
H.bloody_hands = 0
H.update_inv_gloves(0)
H.germ_level = 0
update_icons() //apply the now updated overlays to the mob
@@ -280,6 +280,8 @@
var/this_wound_desc = W.desc
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 1000) this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 100) this_wound_desc = "infected [this_wound_desc]"
if(this_wound_desc in wound_descriptors)
wound_descriptors[this_wound_desc] += W.amount
continue
@@ -943,3 +943,10 @@
if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
return NEUTER
return gender
/mob/living/carbon/human/proc/increase_germ_level(n)
if(gloves)
gloves.germ_level += n
else
germ_level += n
+7 -1
View File
@@ -1166,6 +1166,12 @@
if(druggy)
druggy = max(druggy-1, 0)
// Increase germ_level by 1 on each life tick
germ_level += 1
// If you're dirty, your gloves will become dirty, too.
if(gloves && germ_level > gloves.germ_level && prob(30))
gloves.germ_level += 1
return 1
proc/handle_regular_hud_updates()
@@ -1535,4 +1541,4 @@
Paralyse(rand(15,28))
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS