Improves shard-stepping

This commit is contained in:
HarpyEagle
2015-07-10 16:51:52 -04:00
parent 0d9ef708d5
commit c136bd47cc

View File

@@ -61,8 +61,14 @@
return ..()
/obj/item/weapon/material/shard/Crossed(AM as mob|obj)
..()
if(ismob(AM))
var/mob/M = AM
if(M.buckled) //wheelchairs, office chairs, rollerbeds
return
M << "<span class='danger'>You step on \the [src]!</span>"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
@@ -71,18 +77,24 @@
if(H.species.siemens_coefficient<0.5) //Thick skin.
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(!affecting)
if( H.shoes || ( H.wear_suit && (H.wear_suit.body_parts_covered & FEET) ) )
return
var/list/check = list("l_foot", "r_foot")
while(check.len)
var/picked = pick(check)
var/obj/item/organ/external/affecting = H.get_organ(picked)
if(affecting)
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species.flags & NO_PAIN))
H.Weaken(3)
return
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()
check -= picked
return
// Preset types - left here for the code that uses them
/obj/item/weapon/material/shard/shrapnel/New(loc)