mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user