mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 22:43:46 +00:00
* 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
/🆑
* A comprehensive refactor / cleanup of `bullet_hit` and `on_hit` to cut out a single bad species / mob proc
* Modular changes
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
/obj/projectile/plasma
|
|
name = "plasma blast"
|
|
icon_state = "plasmacutter"
|
|
damage_type = BURN
|
|
damage = 5
|
|
range = 4
|
|
dismemberment = 20
|
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
|
var/mine_range = 3 //mines this many additional tiles of rock
|
|
tracer_type = /obj/effect/projectile/tracer/plasma_cutter
|
|
muzzle_type = /obj/effect/projectile/muzzle/plasma_cutter
|
|
impact_type = /obj/effect/projectile/impact/plasma_cutter
|
|
|
|
/obj/projectile/plasma/on_hit(atom/target, blocked = 0, pierce_hit)
|
|
. = ..()
|
|
if(ismineralturf(target))
|
|
var/turf/closed/mineral/M = target
|
|
M.gets_drilled(firer, FALSE)
|
|
if(mine_range)
|
|
mine_range--
|
|
range++
|
|
if(range > 0)
|
|
return BULLET_ACT_FORCE_PIERCE
|
|
|
|
/obj/projectile/plasma/adv
|
|
damage = 7
|
|
range = 5
|
|
mine_range = 5
|
|
|
|
/obj/projectile/plasma/adv/mech
|
|
damage = 10
|
|
range = 9
|
|
mine_range = 3
|
|
|
|
/obj/projectile/plasma/turret
|
|
//Between normal and advanced for damage, made a beam so not the turret does not destroy glass
|
|
name = "plasma beam"
|
|
damage = 24
|
|
range = 7
|
|
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|