has_reagent crackdown Deux

Nothing fancy, I assume that get_amount is as bad as has_reagent, so might as well cut it.
This commit is contained in:
Chinsky
2014-04-18 03:55:32 +04:00
parent 96a40af9d1
commit 35bf44cce5

View File

@@ -359,20 +359,21 @@ This function completely restores a damaged organ to perfect condition.
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
if(W.internal && !W.is_treated() && owner.bodytemperature >= 170)
if(!owner.reagents.has_reagent("bicaridine")) //bicard stops internal wounds from growing bigger with time, and also stop bleeding
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
if(bicardose > 0) //bicard stops internal wounds from growing bigger with time, and also stop bleeding
W.open_wound(0.1 * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.05 * W.damage * wound_update_accuracy)
if(bicardose >= 30) //overdose of bicaridine begins healing IB
W.damage = max(0, W.damage - 0.2)
if(!owner.reagents.has_reagent("inaprovaline")) //This little copypaste will allow inaprovaline to work too, giving it a much needed buff to help medical.
W.open_wound(0.1 * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.05 * W.damage * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.02 * W.damage * wound_update_accuracy)//Bicaridine slows Internal Bleeding
owner.vessel.remove_reagent("blood",0.02 * W.damage * wound_update_accuracy)
if(prob(1 * wound_update_accuracy))
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)
//overdose of bicaridine begins healing IB
if(owner.reagents.get_reagent_amount("bicaridine") >= 30)
W.damage = max(0, W.damage - 0.2)
// slow healing
var/heal_amt = 0