Frag grenades now explode into proper projectiles (#24581)

* holy fuck

* oops

* IPA

* no badmins

* wow

* yeah

* no funny
This commit is contained in:
Contrabang
2024-04-07 09:40:16 +00:00
committed by GitHub
parent 05e484e794
commit b75bfd0e52
7 changed files with 153 additions and 42 deletions
@@ -596,17 +596,23 @@ emp_act
else if(I)
if(((throwingdatum ? throwingdatum.speed : I.throw_speed) >= EMBED_THROWSPEED_THRESHOLD) || I.embedded_ignore_throwspeed_threshold)
if(can_embed(I))
if(prob(I.embed_chance) && !HAS_TRAIT(src, TRAIT_PIERCEIMMUNE))
var/obj/item/organ/external/L = pick(bodyparts)
L.add_embedded_object(I)
I.add_mob_blood(src)//it embedded itself in you, of course it's bloody!
L.receive_damage(I.w_class*I.embedded_impact_pain_multiplier)
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
hitpush = FALSE
skipcatch = TRUE //can't catch the now embedded item
if(try_embed_object(I))
hitpush = FALSE
skipcatch = TRUE //can't catch the now embedded item
return ..()
/mob/living/carbon/human/proc/try_embed_object(obj/item/I)
if(!can_embed(I))
return FALSE
if(!prob(I.embed_chance) || HAS_TRAIT(src, TRAIT_PIERCEIMMUNE))
return FALSE
var/obj/item/organ/external/L = pick(bodyparts)
L.add_embedded_object(I)
I.add_mob_blood(src)//it embedded itself in you, of course it's bloody!
L.receive_damage(I.w_class * I.embedded_impact_pain_multiplier)
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
return TRUE
/mob/living/carbon/human/proc/bloody_hands(mob/living/source, amount = 2)
if(gloves)
@@ -140,7 +140,8 @@
msg += "<b>[p_their(TRUE)] [ignore_limb_branding(E.limb_name)] has an open incision!</b>\n"
for(var/obj/item/I in E.embedded_objects)
msg += "<b>[p_they(TRUE)] [p_have()] \a [bicon(I)] [I] embedded in [p_their()] [E.name]!</b>\n"
// we cant just use \a here, as we want it to appear before the bicon
msg += "<b>[p_they(TRUE)] [p_have()] [I.p_a()] [bicon(I)] [I.name] embedded in [p_their()] [E.name]!</b>\n"
//Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.