mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-24 08:31:54 +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>
118 lines
3.5 KiB
Plaintext
118 lines
3.5 KiB
Plaintext
// .50 BMG (Sniper)
|
|
|
|
/obj/projectile/bullet/p50
|
|
name =".50 BMG bullet"
|
|
speed = 0.4
|
|
range = 400 // Enough to travel from one corner of the Z to the opposite corner and then some.
|
|
damage = 70
|
|
paralyze = 100
|
|
dismemberment = 50
|
|
catastropic_dismemberment = TRUE
|
|
armour_penetration = 50
|
|
///Determines object damage.
|
|
var/object_damage = 80
|
|
///Determines how much additional damage the round does to mechs.
|
|
var/mecha_damage = 10
|
|
|
|
/obj/projectile/bullet/p50/on_hit(atom/target, blocked = 0, pierce_hit)
|
|
if(isobj(target) && (blocked != 100))
|
|
var/obj/thing_to_break = target
|
|
var/damage_to_deal = object_damage
|
|
if(ismecha(thing_to_break) && mecha_damage)
|
|
damage_to_deal += mecha_damage
|
|
if(damage_to_deal)
|
|
thing_to_break.take_damage(damage_to_deal, BRUTE, BULLET, FALSE)
|
|
return ..()
|
|
|
|
/obj/projectile/bullet/p50/surplus
|
|
name =".50 BMG surplus bullet"
|
|
armour_penetration = 0
|
|
paralyze = 0
|
|
dismemberment = 0
|
|
catastropic_dismemberment = FALSE
|
|
|
|
/obj/projectile/bullet/p50/disruptor
|
|
name =".50 BMG disruptor bullet"
|
|
damage_type = STAMINA
|
|
paralyze = 0
|
|
dismemberment = 0
|
|
catastropic_dismemberment = FALSE
|
|
object_damage = 0
|
|
mecha_damage = 100
|
|
var/emp_radius = 2
|
|
|
|
/obj/projectile/bullet/p50/disruptor/on_hit(atom/target, blocked = 0, pierce_hit)
|
|
. = ..()
|
|
if((blocked != 100) && isliving(target))
|
|
var/mob/living/living_guy = target
|
|
living_guy.Sleeping(40 SECONDS) //Yes, its really 40 seconds of sleep, I hope you had your morning coffee.
|
|
if(issilicon(target)) //also especially good against borgs
|
|
var/mob/living/silicon/borg_boy = target
|
|
borg_boy.apply_damage(damage, BRUTE)
|
|
empulse(target, emp_radius, emp_radius)
|
|
|
|
/obj/projectile/bullet/p50/incendiary
|
|
name =".50 BMG incendiary bullet"
|
|
damage_type = BURN
|
|
paralyze = 0
|
|
dismemberment = 0
|
|
catastropic_dismemberment = FALSE
|
|
object_damage = 30
|
|
mecha_damage = 0
|
|
|
|
/obj/projectile/bullet/p50/incendiary/on_hit(atom/target, blocked = 0, pierce_hit)
|
|
. = ..()
|
|
if(iscarbon(target))
|
|
var/mob/living/carbon/poor_burning_dork = target
|
|
poor_burning_dork.adjust_fire_stacks(20)
|
|
poor_burning_dork.ignite_mob()
|
|
for(var/turf/nearby_turf as anything in RANGE_TURFS(2, target))
|
|
new /obj/effect/hotspot(nearby_turf)
|
|
|
|
/obj/projectile/bullet/p50/penetrator
|
|
name = ".50 BMG penetrator round"
|
|
icon_state = "gauss"
|
|
damage = 60
|
|
range = 50
|
|
projectile_piercing = PASSMOB|PASSVEHICLE
|
|
projectile_phasing = ~(PASSMOB|PASSVEHICLE)
|
|
phasing_ignore_direct_target = TRUE
|
|
dismemberment = 0 //It goes through you cleanly.
|
|
catastropic_dismemberment = FALSE
|
|
paralyze = 0
|
|
object_damage = 0
|
|
|
|
/obj/projectile/bullet/p50/penetrator/shuttle //Nukeop Shuttle Variety
|
|
name = ".50 BMG aggression dissuasion round"
|
|
icon_state = "gaussstrong"
|
|
damage = 25
|
|
speed = 0.3
|
|
range = 16
|
|
|
|
/obj/projectile/bullet/p50/marksman
|
|
name = ".50 BMG marksman round"
|
|
damage = 50
|
|
range = 50
|
|
paralyze = 0
|
|
tracer_type = /obj/effect/projectile/tracer/sniper
|
|
impact_type = /obj/effect/projectile/impact/sniper
|
|
muzzle_type = /obj/effect/projectile/muzzle/sniper
|
|
hitscan = TRUE
|
|
impact_effect_type = null
|
|
hitscan_light_intensity = 3
|
|
hitscan_light_range = 0.75
|
|
hitscan_light_color_override = LIGHT_COLOR_DIM_YELLOW
|
|
muzzle_flash_intensity = 5
|
|
muzzle_flash_range = 1
|
|
muzzle_flash_color_override = LIGHT_COLOR_DIM_YELLOW
|
|
impact_light_intensity = 5
|
|
impact_light_range = 1
|
|
impact_light_color_override = LIGHT_COLOR_DIM_YELLOW
|
|
ricochets_max = 1
|
|
ricochet_chance = 100
|
|
ricochet_auto_aim_angle = 45
|
|
ricochet_auto_aim_range = 15
|
|
ricochet_incidence_leeway = 90
|
|
ricochet_decay_damage = 1
|
|
ricochet_shoots_firer = FALSE
|