Added embedded weapons and adjusted implant removal surgery to work with non-implants in organs.

This commit is contained in:
Zuhayr
2013-06-12 00:28:12 -07:00
parent d0e15b3608
commit 0a220db976
6 changed files with 36 additions and 13 deletions
@@ -190,7 +190,9 @@
zone = "head"
return organs_by_name[zone]
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/obj/used_weapon = null)
//visible_message("Hit debug. [damage] | [damagetype] | [def_zone] | [blocked] | [sharp] | [used_weapon]")
if((damagetype != BRUTE) && (damagetype != BURN))
..(damage, damagetype, def_zone, blocked)
return 1
@@ -219,6 +221,15 @@
UpdateDamageIcon()
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
if(!organ) return
if(!istype(used_weapon,/obj/item/weapon)) return
var/obj/item/weapon/W = used_weapon
if(damage > 20 && (prob(damage/W.w_class) || sharp))
W.loc = organ
organ.implants += W
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
W.add_blood(src)
return 1
@@ -170,7 +170,7 @@ emp_act
if(armor >= 2) return 0
if(!I.force) return 0
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I.name)
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I)
var/bloody = 0
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
+1 -1
View File
@@ -72,7 +72,7 @@
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
if(armor < 2)
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O)
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O.sharp, O)
if(!O.fingerprintslast)
return
var/client/assailant = directory[ckey(O.fingerprintslast)]