mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-01 21:13:07 +00:00
Improves shard-stepping
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user