diff --git a/code/datums/elements/embed.dm b/code/datums/elements/embed.dm index 2d3e5faff2..8a7acde9cb 100644 --- a/code/datums/elements/embed.dm +++ b/code/datums/elements/embed.dm @@ -72,8 +72,8 @@ /// Checking to see if we're gonna embed into a human -/datum/element/embed/proc/checkEmbedMob(obj/item/weapon, mob/living/carbon/victim, hit_zone, datum/thrownthing/throwingdatum, forced=FALSE) - if(!istype(victim) || HAS_TRAIT(victim, TRAIT_PIERCEIMMUNE)) +/datum/element/embed/proc/checkEmbedMob(obj/item/weapon, mob/living/carbon/victim, hit_zone, datum/thrownthing/throwingdatum, blocked = FALSE, forced = FALSE) + if(blocked || !istype(victim) || HAS_TRAIT(victim, TRAIT_PIERCEIMMUNE)) return var/actual_chance = embed_chance diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index 042451b7dd..5b92bf3dea 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -8,9 +8,6 @@ /mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) return ..(AM, skipcatch = TRUE, hitpush = FALSE) -/mob/living/carbon/alien/can_embed(obj/item/I) - return FALSE - /*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other. As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble. In all, this is a lot like the monkey code. /N diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 41a034ecd8..7ce0fd38da 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -65,17 +65,6 @@ throw_mode_off() return TRUE -/mob/living/carbon/embed_item(obj/item/I) - throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) - var/obj/item/bodypart/L = pick(bodyparts) - L.embedded_objects |= I - I.add_mob_blood(src)//it embedded itself in you, of course it's bloody! - I.forceMove(src) - I.embedded() - L.receive_damage(I.w_class*I.embedding["impact_pain_mult"]) - visible_message("[I] embeds itself in [src]'s [L.name]!","[I] embeds itself in your [L.name]!") - SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "embedded", /datum/mood_event/embedded) - /mob/living/carbon/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) var/totitemdamage = pre_attacked_by(I, user) * damage_multiplier var/impacting_zone = (user == src)? check_zone(user.zone_selected) : ran_zone(user.zone_selected) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 29753d11c0..07252b4c45 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -108,12 +108,6 @@ /mob/living/proc/catch_item(obj/item/I, skip_throw_mode_check = FALSE) return FALSE -/mob/living/proc/embed_item(obj/item/I) - return - -/mob/living/proc/can_embed(obj/item/I) - return FALSE - /mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) // Throwingdatum can be null if someone had an accident() while slipping with an item in hand. var/obj/item/I @@ -129,12 +123,8 @@ skipcatch = TRUE blocked = TRUE total_damage = block_calculate_resultant_damage(total_damage, block_return) - else if(I && I.throw_speed >= EMBED_THROWSPEED_THRESHOLD && can_embed(I, src) && prob(I.embedding["embed_chance"]) && !HAS_TRAIT(src, TRAIT_PIERCEIMMUNE) && (!HAS_TRAIT(src, TRAIT_AUTO_CATCH_ITEM) || incapacitated() || get_active_held_item())) - embed_item(I) - hitpush = FALSE - skipcatch = TRUE //can't catch the now embedded item if(I) - var/nosell_hit = SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, impacting_zone, throwingdatum) + var/nosell_hit = SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, impacting_zone, throwingdatum, FALSE, blocked) if(nosell_hit) skipcatch = TRUE hitpush = FALSE