mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 14:15:22 +01:00
Several fixes to germs.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user