Skip to content

Commit

Permalink
[Port] Fixes Embeds from being blocked by shields and adds the abilit…
Browse files Browse the repository at this point in the history
…y to see embeds in health analyzer scans (#10302)

* Fixed shield blocking against embeds

Hooray.

* Health analyzers now list embedded items

TGStation's #75113
  • Loading branch information
XeonMations authored Dec 19, 2023
1 parent a715cde commit 897cec8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/datums/elements/embed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@


/// Checking to see if we're gonna embed into a human
/datum/element/embed/proc/checkEmbed(obj/item/weapon, mob/living/carbon/victim, hit_zone, datum/thrownthing/throwingdatum, forced=FALSE)
/datum/element/embed/proc/checkEmbed(obj/item/weapon, mob/living/carbon/victim, hit_zone, blocked, datum/thrownthing/throwingdatum, forced=FALSE)
SIGNAL_HANDLER

if(!istype(victim) || HAS_TRAIT(victim, TRAIT_PIERCEIMMUNE))
if((!forced && blocked) || !istype(victim) || HAS_TRAIT(victim, TRAIT_PIERCEIMMUNE))
return

var/flying_speed = throwingdatum ? throwingdatum.speed : weapon.throw_speed
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ GENE SCANNER
if(H.has_status_effect(STATUS_EFFECT_LING_TRANSFORMATION))
message += "\t<span class='info'>Subject's DNA appears to be in an unstable state.</span>"

// Embedded Items
for(var/obj/item/bodypart/limb as anything in H.bodyparts)
for(var/obj/item/embed as anything in limb.embedded_objects)
message += "\t<span class='alert'>Foreign object embedded in subject's [limb.name].</span>"

// Species and body temperature
if(ishuman(M))
var/mob/living/carbon/human/H = M
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
var/volume = I.get_volume_by_throwforce_and_or_w_class()
var/nosell_hit = SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, zone, throwingdatum) // TODO: find a better way to handle hitpush and skipcatch for humans
var/nosell_hit = SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, zone, blocked, throwingdatum) // TODO: find a better way to handle hitpush and skipcatch for humans
if(nosell_hit)
skipcatch = TRUE
hitpush = FALSE
Expand Down

0 comments on commit 897cec8

Please sign in to comment.