embeds, unarmed and wounds

This commit is contained in:
DeltaFire
2021-11-16 20:26:38 +01:00
parent e0b603f8bb
commit ef9c90d512
4 changed files with 27 additions and 19 deletions
+4 -2
View File
@@ -168,11 +168,13 @@
* If we hit a valid target (carbon or closed turf), we create the shrapnel_type object and immediately call tryEmbed() on it, targeting what we impacted. That will lead
* it to call tryForceEmbed() on its own embed element (it's out of our hands here, our projectile is done), where it will run through all the checks it needs to.
*/
/datum/element/embed/proc/checkEmbedProjectile(obj/item/projectile/P, atom/movable/firer, atom/hit, angle, hit_zone)
/datum/element/embed/proc/checkEmbedProjectile(obj/item/projectile/P, atom/movable/firer, atom/hit, angle, hit_zone, blocked)
if(!iscarbon(hit))
Detach(P)
return // we don't care
if(blocked >= 100)
Detach(P) //fully blocked, no embedding for us.
return
var/obj/item/payload = new payload_type(get_turf(hit))
if(istype(payload, /obj/item/shrapnel/bullet))
payload.name = P.name