Merge pull request #6365 from Citadel-Station-13/upstream-merge-37032
[MIRROR] Forcing the human liver to actually do its job v2
This commit is contained in:
@@ -28,13 +28,16 @@
|
|||||||
if(filterToxins)
|
if(filterToxins)
|
||||||
//handle liver toxin filtration
|
//handle liver toxin filtration
|
||||||
var/toxamount
|
var/toxamount
|
||||||
var/static/list/listOfToxinsInThisBitch = typesof(/datum/reagent/toxin)
|
var/static/list/toxinstypecache = typecacheof(/datum/reagent/toxin)
|
||||||
for(var/datum/reagent/toxin/toxin in listOfToxinsInThisBitch)
|
for(var/I in C.reagents.reagent_list)
|
||||||
toxamount += C.reagents.get_reagent_amount(initial(toxin.id))
|
var/datum/reagent/pickedreagent = I
|
||||||
|
if(is_type_in_typecache(pickedreagent, toxinstypecache))
|
||||||
|
toxamount += C.reagents.get_reagent_amount(initial(pickedreagent.id))
|
||||||
if(toxamount <= toxTolerance && toxamount > 0)
|
if(toxamount <= toxTolerance && toxamount > 0)
|
||||||
for(var/datum/reagent/toxin/toxin in listOfToxinsInThisBitch)
|
for(var/I in C.reagents.reagent_list)
|
||||||
C.reagents.remove_reagent(initial(toxin.id), 1)
|
var/datum/reagent/pickedreagent = I
|
||||||
|
if(is_type_in_typecache(pickedreagent, toxinstypecache))
|
||||||
|
C.reagents.remove_reagent(initial(pickedreagent.id), 1)
|
||||||
else if(toxamount > toxTolerance)
|
else if(toxamount > toxTolerance)
|
||||||
damage += toxamount*toxLethality
|
damage += toxamount*toxLethality
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user