Broken heart fix

Code was using a switch with variables in it. This doesn't work.
Replaced it with an if..else sequence.

Thanks to the guys from Paradise for finding this.

Note: this only fixes literal heart problems, it won't do anything for relationship issues.

Conflicts:
	code/modules/organs/blood.dm
This commit is contained in:
Loganbacca
2014-02-03 00:28:15 +13:00
committed by ZomgPonies
parent 69208a7082
commit 1c38b32ee4
2 changed files with 11 additions and 70 deletions
+7 -8
View File
@@ -73,14 +73,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
// Damaged heart virtually reduces the blood volume, as the blood isn't
// being pumped properly anymore.
var/datum/organ/internal/heart/heart = internal_organs["heart"]
if(heart)
switch(heart.damage)
if(1 to heart.min_bruised_damage)
blood_volume *= 0.8
if(heart.min_bruised_damage to heart.min_broken_damage)
blood_volume *= 0.6
if(heart.min_broken_damage to INFINITY)
blood_volume *= 0.3
if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
blood_volume *= 0.8
else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage)
blood_volume *= 0.6
else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY)
blood_volume *= 0.3
//Effects of bloodloss
switch(blood_volume)
if(BLOOD_VOLUME_SAFE to 10000)