Optimized pulse reagent checking a little.

This commit is contained in:
Chinsky
2014-08-21 13:40:59 +04:00
parent 264aee843f
commit e803c90aec

View File

@@ -1702,26 +1702,19 @@
if(status_flags & FAKEDEATH)
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
//handles different chems' influence on pulse
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id in bradycardics)
if(temp <= PULSE_THREADY && temp >= PULSE_NORM)
temp--
break //one reagent is enough
//comment out the breaks to make med effects stack
for(var/datum/reagent/R in reagents.reagent_list) //handles different chems' influence on pulse
if(R.id in tachycardics)
if(temp <= PULSE_FAST && temp >= PULSE_NONE)
temp++
break
for(var/datum/reagent/R in reagents.reagent_list) //To avoid using fakedeath
if(R.id in heartstopper)
if(R.id in heartstopper) //To avoid using fakedeath
temp = PULSE_NONE
break
for(var/datum/reagent/R in reagents.reagent_list) //Conditional heart-stoppage
if(R.id in cheartstopper)
if(R.id in cheartstopper) //Conditional heart-stoppage
if(R.volume >= R.overdose)
temp = PULSE_NONE
break
return temp