mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Several fixes to germs.
This commit is contained in:
@@ -134,7 +134,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.bandage()
|
||||
affected.clamp()
|
||||
affected.status &= ~ORGAN_BLEEDING
|
||||
spread_germs_to_organ(affected, user)
|
||||
|
||||
|
||||
@@ -203,6 +203,10 @@
|
||||
if(W.germ_level > 1000)
|
||||
owner.adjustToxLoss(1 * wound_update_accuracy)
|
||||
|
||||
// Salving also helps against infection
|
||||
if(W.germ_level > 0 && W.salved && prob(2))
|
||||
W.germ_level = 0
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
@@ -214,6 +218,14 @@
|
||||
W.bandaged = 1
|
||||
return rval
|
||||
|
||||
proc/clamp()
|
||||
var/rval = 0
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.internal) continue
|
||||
rval |= !W.clamped
|
||||
W.clamped = 1
|
||||
return rval
|
||||
|
||||
proc/salve()
|
||||
var/rval = 0
|
||||
for(var/datum/wound/W in wounds)
|
||||
@@ -254,7 +266,7 @@
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
src.fracture()
|
||||
if(germ_level > 0)
|
||||
for(var/datum/wound/W in wounds) if(!W.bandaged)
|
||||
for(var/datum/wound/W in wounds) if(!W.bandaged && !W.salved)
|
||||
W.germ_level = max(W.germ_level, germ_level)
|
||||
return
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
// is the wound bandaged?
|
||||
var/tmp/bandaged = 0
|
||||
// Similar to bandaged, but works differently
|
||||
var/tmp/clamped = 0
|
||||
// is the wound salved?
|
||||
var/tmp/salved = 0
|
||||
// is the wound disinfected?
|
||||
@@ -127,7 +129,7 @@
|
||||
|
||||
proc/bleeding()
|
||||
// internal wounds don't bleed in the sense of this function
|
||||
return (!bandaged && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
|
||||
return (!(bandaged||clamped) && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
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]"
|
||||
else if(W.germ_level > 100) this_wound_desc = "lightly infected [this_wound_desc]"
|
||||
if(this_wound_desc in wound_descriptors)
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
continue
|
||||
|
||||
@@ -1167,10 +1167,11 @@
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
|
||||
// Increase germ_level by 1 on each life tick
|
||||
germ_level += 1
|
||||
// Increase germ_level regularly
|
||||
if(prob(40))
|
||||
germ_level += 1
|
||||
// If you're dirty, your gloves will become dirty, too.
|
||||
if(gloves && germ_level > gloves.germ_level && prob(30))
|
||||
if(gloves && germ_level > gloves.germ_level && prob(10))
|
||||
gloves.germ_level += 1
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user