Separates the sharp flag into edge and sharp

Now weapons can properly cause cuts without necessarily having a greater
chance to remove limbs.

Also separates is_sharp, has_edge, and can_puncture.

Conflicts:
	code/__HELPERS/unsorted.dm
	code/modules/mob/living/living_defense.dm
	code/modules/mob/living/silicon/robot/component.dm
	code/modules/mob/living/simple_animal/bees.dm
	code/modules/projectiles/gun.dm
	code/modules/reagents/reagent_containers/syringes.dm
	code/modules/surgery/eye.dm
This commit is contained in:
mwerezak
2014-06-17 06:51:51 -04:00
committed by ZomgPonies
parent cfb05dd741
commit 4a2993b20b
39 changed files with 105 additions and 81 deletions
+6 -6
View File
@@ -70,9 +70,9 @@
if(prob(probability))
droplimb(1)
else
take_damage(damage, 0, 1, used_weapon = "EMP")
take_damage(damage, 0, 1, 1, used_weapon = "EMP")
/datum/organ/external/proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
/datum/organ/external/proc/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
if((brute <= 0) && (burn <= 0))
return 0
@@ -95,7 +95,7 @@
//If limb took enough damage, try to cut or tear it off
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you.
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
if( (sharp && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) )
if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) )
droplimb(1)
return
@@ -159,7 +159,7 @@
if(possible_points.len)
//And pass the pain around
var/datum/organ/external/target = pick(possible_points)
target.take_damage(brute, burn, sharp, used_weapon, forbidden_limbs + src)
target.take_damage(brute, burn, sharp, edge, used_weapon, forbidden_limbs + src)
// sync the organ's damage with its wounds
src.update_damages()
@@ -840,8 +840,8 @@ This function completely restores a damaged organ to perfect condition.
else
. = new /icon(owner.race_icon, "[icon_name]_[g]")
/datum/organ/external/head/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
/datum/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, edge, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))