mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01: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. https://github.com/tgstation/tgstation/blob/1863eb2cd82e7cee4fdfff37b42d3fd0c7edd797/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 /🆑
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
line = firer.Beam(src, "line", 'icons/obj/clothing/modsuit/mod_modules.dmi', emissive = FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/projectile/tether/on_hit(atom/target)
|
||||
/obj/projectile/tether/on_hit(atom/target, blocked = 0, pierce_hit)
|
||||
. = ..()
|
||||
if(firer)
|
||||
firer.throw_at(target, 10, 1, firer, FALSE, FALSE, null, MOVE_FORCE_NORMAL, TRUE)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
organ = null
|
||||
return ..()
|
||||
|
||||
/obj/projectile/organ/on_hit(atom/target)
|
||||
/obj/projectile/organ/on_hit(atom/target, blocked = 0, pierce_hit)
|
||||
. = ..()
|
||||
if(!ishuman(target))
|
||||
organ.forceMove(drop_location())
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
line = firer.Beam(src, "net_beam", 'icons/obj/clothing/modsuit/mod_modules.dmi')
|
||||
return ..()
|
||||
|
||||
/obj/projectile/energy_net/on_hit(mob/living/target)
|
||||
/obj/projectile/energy_net/on_hit(mob/living/target, blocked = 0, pierce_hit)
|
||||
. = ..()
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
@@ -297,11 +297,14 @@
|
||||
///Reference to the tem... given by the tem! weakref because back in the day we didn't know about harddels- or maybe we didn't care.
|
||||
var/datum/weakref/tem_weakref
|
||||
|
||||
/obj/projectile/energy/chrono_beam/on_hit(atom/target)
|
||||
/obj/projectile/energy/chrono_beam/on_hit(atom/target, blocked = 0, pierce_hit)
|
||||
var/obj/item/mod/module/tem/tem = tem_weakref.resolve()
|
||||
if(target && tem && isliving(target))
|
||||
var/obj/structure/chrono_field/field = new(target.loc, target, tem)
|
||||
tem.field_connect(field)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/chrono_field
|
||||
name = "eradication field"
|
||||
@@ -403,9 +406,10 @@
|
||||
var/obj/item/mod/module/tem/linked_tem = beam.tem_weakref.resolve()
|
||||
if(linked_tem && istype(linked_tem))
|
||||
linked_tem.field_connect(src)
|
||||
else
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/chrono_field/assume_air()
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user