Skip to content

Commit

Permalink
Update suicide.dm
Browse files Browse the repository at this point in the history
Remove unneeded updatehealth() calls
Cleanup logic in an if statement
  • Loading branch information
octareenroon91 committed Feb 11, 2016
1 parent 6179647 commit f1c225c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions code/game/verbs/suicide.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
if(damagetype)
if(damagetype & SHAME)
adjustStaminaLoss(200)
updatehealth()
suiciding = 0
return
var/damage_mod = 0
Expand All @@ -37,10 +36,9 @@
adjustOxyLoss(200/damage_mod)

//If something went wrong, just do normal oxyloss
if(!(damagetype | BRUTELOSS) && !(damagetype | FIRELOSS) && !(damagetype | TOXLOSS) && !(damagetype | OXYLOSS))
if(!(damagetype & (BRUTELOSS | FIRELOSS | TOXLOSS | OXYLOSS) ))
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))

updatehealth()
death(0)
return

Expand All @@ -52,7 +50,6 @@
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")

adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
death(0)

/mob/living/carbon/brain/verb/suicide()
Expand Down Expand Up @@ -83,7 +80,6 @@
visible_message("<span class='danger'>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</span>", \
"<span class='userdanger'>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</span>")
adjustOxyLoss(max(200- getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
death(0)

/mob/living/silicon/ai/verb/suicide()
Expand All @@ -99,7 +95,6 @@
"<span class='userdanger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>")
//put em at -175
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
death(0)

/mob/living/silicon/robot/verb/suicide()
Expand All @@ -115,7 +110,6 @@
"<span class='userdanger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>")
//put em at -175
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
death(0)

/mob/living/silicon/pai/verb/suicide()
Expand Down Expand Up @@ -145,7 +139,6 @@
"<span class='italics'>You hear thrashing.</span>")
//put em at -175
adjustOxyLoss(max(200 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
death(0)

/mob/living/simple_animal/verb/suicide()
Expand Down

0 comments on commit f1c225c

Please sign in to comment.