Fixes Shrapnel Pinning (#16822)

* yangechog

* always a smart one, that gem

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* where would i be without better coders

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* cangeyhog

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

---------

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
juniper
2023-07-23 12:43:54 +00:00
committed by GitHub
co-authored by SleepyGemmy
parent f75fdaaefd
commit 1bdcceabb8
2 changed files with 52 additions and 7 deletions
@@ -418,14 +418,18 @@ emp_act
if(!O || !src) return
if(O.loc == src && O.sharp) //Projectile is embedded and suitable for pinning.
var/turf/T = near_wall(dir,2)
if(O != ITEMSIZE_TINY)
if(O.loc == src && O.sharp) //Projectile is embedded and suitable for pinning.
var/turf/T = near_wall(dir,2)
if(T)
src.forceMove(T)
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
if(T)
src.forceMove(T)
visible_message(
SPAN_WARNING("\The [src] is pinned to the wall by \the [O]!"),
SPAN_WARNING("You are pinned to the wall by \the [O]!")
)
src.anchored = TRUE
src.pinned += O
else if(ishuman(AM))
var/mob/living/carbon/human/H = AM
H.Weaken(3)