mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #5102 from Fox-McCloud/reagent-refactors-continued
More Reagent Refactoring and Cleanup
This commit is contained in:
@@ -1036,9 +1036,11 @@
|
||||
|
||||
/mob/living/carbon/human/proc/handle_pulse()
|
||||
|
||||
if(mob_master.current_cycle % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
if(mob_master.current_cycle % 5)
|
||||
return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(species && species.flags & NO_BLOOD) return PULSE_NONE //No blood, no pulse.
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
return PULSE_NONE //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
@@ -1056,25 +1058,21 @@
|
||||
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id in bradycardics)
|
||||
if(R.heart_rate_decrease)
|
||||
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)
|
||||
break
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list)//handles different chems' influence on pulse
|
||||
if(R.heart_rate_increase)
|
||||
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.heart_rate_stop)
|
||||
temp = PULSE_NONE
|
||||
break
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //Conditional heart-stoppage
|
||||
if(R.id in cheartstopper)
|
||||
if(R.volume >= R.overdose_threshold)
|
||||
temp = PULSE_NONE
|
||||
break
|
||||
|
||||
return temp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user