Files
Bubberstation/code/modules/projectiles/projectile/special/meteor.dm
MrMelbert 93ec5a72f7 A comprehensive refactor / cleanup of bullet_hit and on_hit to cut out a single bad species / mob proc (#79024)
## About The Pull Request

- Refactored `bullet_act`. Adds `should_call_parent` and refactors
associated children to support that.
   - Fixes silicons sparking off when hit by disabler fire. 
- Desnowflakes firing range target integrity and cleans up its
bullet-hole code a bit.
- Cleans up changeling tentacle code a fair bit and fixes it not taking
off throw mode if you fail to catch something.
   - The Sleeping Carp deflection is now signalized 
- Nightmare projectile dodging is now signalized and sourced from the
Nightmare's brain rather than species
- Refactored how cardboard cutouts get knocked over to be less
snowflaked / use integrity
- Also adds projectile `on_hit` `should_call_parent` and cleans up a bit
of that, particularly their arguments.
- On hit arguments were passed wrong this entire time, it's a good thing
nothing relied on that.

## Why It's Good For The Game

This is cringe. 


1863eb2cd8/code/modules/mob/living/carbon/human/_species.dm (L1430-L1442)

Bullets should overall act more consistent across mob types and objects.

## Changelog

🆑 Melbert
fix: Silicons don't spark when shot by disablers
fix: Changelings who fail to catch something with a tencacle will have
throw mode disabled automatically
fix: Fixes occasions where you can reflect with Sleeping Carp when you
shouldn't be able to
fix: Fixes some projectiles causing like 20x less eye blur than they
should be
refactor: Refactored bullet-mob interactions
refactor: Nightmare "shadow dodge" projectile ability is now sourced
from their brain
/🆑
2023-10-18 23:08:13 -06:00

31 lines
957 B
Plaintext

/obj/projectile/meteor
name = "meteor"
icon = 'icons/obj/meteor.dmi'
icon_state = "small1"
damage = 90
paralyze = 100
dismemberment = 90
armour_penetration = 100
damage_type = BRUTE
armor_flag = BULLET
/obj/projectile/meteor/on_hit(atom/target, blocked = 0, pierce_hit)
. = ..()
if(. == BULLET_ACT_HIT && isliving(target))
explosion(target, devastation_range = -1, light_impact_range = 2, flame_range = 0, flash_range = 1, adminlog = FALSE)
playsound(target.loc, 'sound/effects/meteorimpact.ogg', 40, TRUE)
/obj/projectile/meteor/Bump(atom/hit_target)
if(hit_target == firer)
forceMove(hit_target.loc)
return
if(isobj(hit_target))
SSexplosions.med_mov_atom += hit_target
if(isturf(hit_target))
SSexplosions.medturf += hit_target
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, TRUE)
for(var/mob/onlookers_in_range in urange(10, src))
if(!onlookers_in_range.stat)
shake_camera(onlookers_in_range, 3, 1)
qdel(src)