mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
The message when firing a gun is removed. To keep things balanced melee attacks (punches, alien attacks, animal attacks, etc...) now show a visual effect (similar to what we current have with item attacks. Fixes muzzle flash effect not appearing for mech guns. Fixes muzzle flash effect not appearing for certain ranged animal. Fixes the item attack effect not being visible to camera viewers and mech occupants. Fixes toy guns foam dart not dropping on the ground when shooting a mob on the same tile as us. Fixes toy smg magazine sprite being invisible sometimes. Fixes foam dart not facing the correct direction when fired. Changes the bullet projectile sprite to have a slight tracer effect so as to be more visible.
65 lines
2.4 KiB
Plaintext
65 lines
2.4 KiB
Plaintext
|
|
/mob/living/carbon/alien/humanoid/grabbedby(mob/living/carbon/user, supress_message = 0)
|
|
if(user == src && pulling && grab_state >= GRAB_AGGRESSIVE && !pulling.anchored && iscarbon(pulling))
|
|
devour_mob(pulling, devour_time = 60)
|
|
else
|
|
..()
|
|
|
|
/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
|
if(user.a_intent == "harm")
|
|
..(user, 1)
|
|
adjustBruteLoss(15)
|
|
var/hitverb = "punched"
|
|
if(mob_size < MOB_SIZE_LARGE)
|
|
step_away(src,user,15)
|
|
sleep(1)
|
|
step_away(src,user,15)
|
|
hitverb = "slammed"
|
|
playsound(loc, "punch", 25, 1, -1)
|
|
visible_message("<span class='danger'>[user] has [hitverb] [src]!</span>", \
|
|
"<span class='userdanger'>[user] has [hitverb] [src]!</span>")
|
|
return 1
|
|
|
|
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
|
|
if(..())
|
|
switch(M.a_intent)
|
|
if ("harm")
|
|
var/damage = rand(1, 9)
|
|
if (prob(90))
|
|
playsound(loc, "punch", 25, 1, -1)
|
|
src << "<span class='userdanger'>[M] has punched [src]!</span>"
|
|
if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of weakening an alien.
|
|
Paralyse(2)
|
|
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
|
|
"<span class='userdanger'>[M] has weakened [src]!</span>")
|
|
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
|
apply_damage(damage, BRUTE, affecting)
|
|
add_logs(M, src, "attacked")
|
|
else
|
|
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
|
src << "<span class='userdanger'>[M] has attempted to punch [src]!</span>"
|
|
|
|
if ("disarm")
|
|
if (!lying)
|
|
if (prob(5))
|
|
Paralyse(2)
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
add_logs(M, src, "pushed")
|
|
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
|
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
|
else
|
|
if (prob(50))
|
|
drop_item()
|
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
src << "<span class='userdanger'>[M] has disarmed [src]!</span>"
|
|
else
|
|
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
|
src << "<span class='userdanger'>[M] has attempted to disarm [src]!</span>"
|
|
|
|
|
|
|
|
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
|
if(!no_effect && !visual_effect_icon)
|
|
visual_effect_icon = ATTACK_EFFECT_CLAW
|
|
..()
|