mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +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>
76 lines
2.2 KiB
Plaintext
76 lines
2.2 KiB
Plaintext
/// Turf type that appears to be a world border, completely impassable and non-interactable to all physical (alive) entities.
|
|
/turf/cordon
|
|
name = "cordon"
|
|
icon = 'icons/turf/walls.dmi'
|
|
icon_state = "cordon"
|
|
invisibility = INVISIBILITY_ABSTRACT
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
explosive_resistance = INFINITY
|
|
rad_insulation = RAD_FULL_INSULATION
|
|
opacity = TRUE
|
|
density = TRUE
|
|
blocks_air = TRUE
|
|
init_air = FALSE
|
|
space_lit = TRUE
|
|
bullet_bounce_sound = null
|
|
turf_flags = NOJAUNT
|
|
baseturfs = /turf/cordon
|
|
|
|
/turf/cordon/AfterChange()
|
|
. = ..()
|
|
SSair.high_pressure_delta -= src
|
|
|
|
/turf/cordon/rust_heretic_act()
|
|
return FALSE
|
|
|
|
/turf/cordon/acid_act(acidpwr, acid_volume, acid_id)
|
|
return FALSE
|
|
|
|
/turf/cordon/Melt()
|
|
to_be_destroyed = FALSE
|
|
return src
|
|
|
|
/turf/cordon/singularity_act()
|
|
return FALSE
|
|
|
|
/turf/cordon/ScrapeAway(amount, flags)
|
|
return src // :devilcat:
|
|
|
|
/turf/cordon/TerraformTurf(path, list/new_baseturfs, flags)
|
|
return
|
|
|
|
/turf/cordon/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
|
|
SHOULD_CALL_PARENT(FALSE) // Fuck you
|
|
return BULLET_ACT_BLOCK
|
|
|
|
/turf/cordon/Adjacent(atom/neighbor, atom/target, atom/movable/mover)
|
|
return FALSE
|
|
|
|
/turf/cordon/Bumped(atom/movable/bumped_atom)
|
|
. = ..()
|
|
|
|
if(HAS_TRAIT(bumped_atom, TRAIT_FREE_HYPERSPACE_SOFTCORDON_MOVEMENT)) //we could feasibly reach the border, so just dont
|
|
dump_in_space(bumped_atom)
|
|
|
|
/// Area used in conjuction with the cordon turf to create a fully functioning world border.
|
|
/area/misc/cordon
|
|
name = "CORDON"
|
|
icon_state = "cordon"
|
|
static_lighting = FALSE
|
|
base_lighting_alpha = 255
|
|
area_flags = UNIQUE_AREA|NOTELEPORT|HIDDEN_AREA
|
|
requires_power = FALSE
|
|
|
|
/area/misc/cordon/Entered(atom/movable/arrived, area/old_area)
|
|
. = ..()
|
|
for(var/mob/living/enterer as anything in arrived.get_all_contents_type(/mob/living))
|
|
to_chat(enterer, span_userdanger("This was a bad idea..."))
|
|
enterer.dust(TRUE, FALSE, TRUE)
|
|
|
|
/// This type of cordon will block ghosts from passing through it. Useful for stuff like Away Missions, where you feasibly want to block ghosts from entering to keep a certain map section a secret.
|
|
/turf/cordon/secret
|
|
name = "secret cordon (ghost blocking)"
|
|
|
|
/turf/cordon/secret/attack_ghost(mob/dead/observer/user)
|
|
return FALSE
|