Files
Bubberstation/code/__HELPERS/~skyrat_helpers/unsorted.dm
SkyratBot b9f559776e [MIRROR] Replaces Upgraded Cybernetic Ears with two new variants [MDB IGNORE] (#22854)
* Replaces Upgraded Cybernetic Ears with two new variants  (#75931)

## About The Pull Request
Adjusts the placement of basic and upgraded cybernetic ears in the
research tree and adds two new variants: Whisper-sensitive Cybernetic
Ears, which make it slightly easier to hear whispers from a tile away,
at the cost of higher vulnerability to flashbangs and other loud noises;
and Wall-penetrating Cybernetic Ears, which allow you to 'hear through
walls' so to speak, also at the cost of higher vulnerability to loud
noises.

Basic cybernetic ears are now in basic medical tech node, meaning that
medbay can print them roundstart the same as other basic cybernetics.
The upgraded cybernetic ears are now unlocked with the other tier 2
cybernetics. The two new ear variants are unlocked with the other tier 3
cybernetic organs, and the luminiscent and welding shield eyes have also
been moved there from the cybernetic implants node for consistency
reasons.

The whisper ears allow you to clearly hear whispers from up to seven
tiles away, the same range where you can hear normal speech. The
wall-penetrating ears allow you to hear normal speech within seven tiles
even through walls. Due to technical limitations, runechat popups do not
show up for people you can't see, but the messages will still show up in
chat.
## Why It's Good For The Game
Currently, upgraded cybernetic ears are very underwhelming compared to
other high-tier cybernetic organs. All other high tier organs provide
some sort of benefit; even if the benefit is minor like a built-in
flashlight, a slightly higher tolerance to alcohol and toxins, or higher
tolerance to disgusting food. This change is intended to grant similarly
minor but useful benefits to the cybernetic ears.
## Changelog
🆑
add: Added whisper-sensitive cybernetic ears, which make it much easier
for the user to hear whispers at the cost of being more vulnerable to
loud noises
add: Added wall-penetrating cybernetic ears, which allow you to hear
speech through walls
balance: Basic cybernetic ears and upgraded cybernetic ears are now
unlocked with the other basic/normal cybernetics
balance: The welding shield and luminiscent cybernetic eyes are now
unlocked with the other upgraded cybernetics
/🆑

* Replaces Upgraded Cybernetic Ears with two new variants

* Modular adjustments

* Linters

* Linters

---------

Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-08-03 06:51:26 -04:00

56 lines
2.3 KiB
Plaintext

/atom/proc/do_jiggle(targetangle = 45, timer = 20)
var/matrix/OM = matrix(transform)
var/matrix/M = matrix(transform)
var/halftime = timer * 0.5
M.Turn(pick(-targetangle, targetangle))
animate(src, transform = M, time = halftime, easing = ELASTIC_EASING)
animate(src, transform = OM, time = halftime, easing = ELASTIC_EASING)
/atom/proc/do_squish(squishx = 1.2, squishy = 0.6, timer = 20)
var/matrix/OM = matrix(transform)
var/matrix/M = matrix(transform)
var/halftime = timer * 0.5
M.Scale(squishx, squishy)
animate(src, transform = M, time = halftime, easing = BOUNCE_EASING)
animate(src, transform = OM, time = halftime, easing = BOUNCE_EASING)
/** Get all hearers in range, ignores walls and such. Code stolen from `/proc/get_hearers_in_view()`
* Much faster and less expensive than range()
*/
/proc/get_hearers_in_looc_range(atom/source, range_radius = LOOC_RANGE)
var/turf/center_turf = get_turf(source)
if(!center_turf)
return
. = list()
var/old_luminosity = center_turf.luminosity
if(range_radius <= 0) //special case for if only source cares
for(var/atom/movable/target as anything in center_turf)
var/list/recursive_contents = target.important_recursive_contents?[RECURSIVE_CONTENTS_HEARING_SENSITIVE]
if(recursive_contents)
. += recursive_contents
return .
var/list/hearables_from_grid = SSspatial_grid.orthogonal_range_search(source, RECURSIVE_CONTENTS_HEARING_SENSITIVE, range_radius)
if(!length(hearables_from_grid))//we know that something is returned by the grid, but we dont know if we need to actually filter down the output
return .
var/list/assigned_oranges_ears = SSspatial_grid.assign_oranges_ears(hearables_from_grid)
for(var/mob/oranges_ear/ear in range(range_radius, center_turf))
. += ear.references
for(var/mob/oranges_ear/remaining_ear as anything in assigned_oranges_ears) //we need to clean up our mess
remaining_ear.unassign()
center_turf.luminosity = old_luminosity
return .
///This will check if GLOB.sprite_accessories[mutant_part]?[part_name] is associated with sprite accessory with factual TRUE.
/proc/is_factual_sprite_accessory(mutant_part, part_name)
if(!mutant_part || !part_name)
return FALSE
var/datum/sprite_accessory/accessory = GLOB.sprite_accessories[mutant_part]?[part_name]
return accessory?.factual