mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Fixes not getting the hit message and sound (and logging) when the item embeds itself in a human.
Throwing a big item at an alien no longer pushes it. If the item embeds itself in you, it doesn't push you. Fixes an old argument in item/throw_impact() that I forgot to remove. Rename the skip argument of hitby() to skipcatch (more explicit).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/alien/hitby(atom/movable/AM)
|
||||
..(AM, skip = 1)
|
||||
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush)
|
||||
..(AM, skipcatch = 1, hitpush = 0)
|
||||
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/hitby(atom/movable/AM, skip)
|
||||
if(!skip) //ugly, but easy
|
||||
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = 1)
|
||||
if(!skipcatch) //ugly, but easy
|
||||
if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode
|
||||
if(canmove && !restrained())
|
||||
if(istype(AM, /obj/item))
|
||||
@@ -9,7 +9,7 @@
|
||||
visible_message("<span class='warning'>[src] catches [I]!</span>")
|
||||
throw_mode_off()
|
||||
return 1
|
||||
return ..()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/throw_impact(atom/hit_atom)
|
||||
. = ..()
|
||||
|
||||
@@ -455,6 +455,8 @@ emp_act
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/hitby(atom/movable/AM)
|
||||
var/hitpush = 1
|
||||
var/skipcatch = 0
|
||||
if(AM.throw_speed >= EMBED_THROWSPEED_THRESHOLD)
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
@@ -467,5 +469,6 @@ emp_act
|
||||
I.loc = src
|
||||
L.take_damage(I.w_class*I.embedded_impact_pain_multiplier)
|
||||
visible_message("<span class='danger'>\the [I.name] embeds itself in [src]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [I.name] embeds itself in your [L.getDisplayName()]!</span>")
|
||||
return
|
||||
return ..()
|
||||
hitpush = 0
|
||||
skipcatch = 1 //can't catch the now embedded item
|
||||
return ..(AM, skipcatch, hitpush)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/living/hitby(atom/movable/AM)
|
||||
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = 1)
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
|
||||
@@ -75,7 +75,7 @@
|
||||
add_logs(I.thrownby, src, "hit", I)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
..()
|
||||
|
||||
/mob/living/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == "harm")
|
||||
|
||||
Reference in New Issue
Block a user