* Experiment with replacing weakrefs in AI blackboard with deleting signals, ideally making it easier to work with and harder to cause hard deletes (#74791)
## About The Pull Request
Replaces weakref usage in AI blackboards with deleting signals
All blackboard var setting must go through setters rather than directly
## Why It's Good For The Game
This both makes it a ton easier to develop AI for, and also makes it
harder for hard deletes to sneak in, as has been seen with recent 515
prs showing hard deletes in AI blackboards
(To quantify "making it easier to develop AI", I found multiple bugs in
existing AI code due to the usage of weakrefs.)
I'm looking for `@ Jacquerel` `@ tralezab` 's opinions on the matter, also
maybe `@ LemonInTheDark` if they're interested
## Changelog
🆑 Melbert
refactor: Mob ai refactored once again
/🆑
* Experiment with replacing weakrefs in AI blackboard with deleting signals, ideally making it easier to work with and harder to cause hard deletes
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* skeletons healing off milk works like it used to 3 years ago (#74470)
## About The Pull Request
skeletons healing off milk was changed in the pr that made stomachs be
what handles chems
this doesnt acutally work and its been broken for 3 years
so we just revert back to the old way of doing it
## Why It's Good For The Game
its over
## Changelog
🆑
fix: skeletons get boosted heals from milk again
/🆑
* skeletons healing off milk works like it used to 3 years ago
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* Implanted foreign bodyparts will resist being removed on species change (#74701)
## About The Pull Request
Title.
Also, to make bodypart code slightly nicer, I retooled some variables to
be part of a new bitfield called bodypart_flags.
## Why It's Good For The Game
We've been trying to move away from the species datum for limb stuff
precisely because of funny shenanigans like this, no?
## Changelog
🆑
refactor: Implanted foreign limbs will no longer be wiped by species
change.
/🆑
* Implanted foreign bodyparts will resist being removed on species change
* fex
---------
Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Sleep immune will make you immune to N2O (#74647)
## About The Pull Request
Currently sleep immunity makes you immune to the sleeping status effect.
I was originally gonna do the same for Unconscious, but I don't think we
want sleep immunity to block all instances of that

## Why It's Good For The Game
If you're immune to sleep, you shouldn't be falling asleep from the
sleepy gas. N2O setting you unconscious is meant as a way to give
players a chance at getting away/putting internals on, before being put
to sleep, however if you're immune to sleep, you'll endlessly fall
unconscious.
## Changelog
🆑
fix: People immune to sleep will not fall asleep from N2O
/🆑
* Sleep immune will make you immune to N2O
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* android bodyparts no longer immune to species change (#74580)
## About The Pull Request
fixes https://github.com/tgstation/tgstation/issues/72771
## Why It's Good For The Game
more consistent species changing behavior
admittedly this is a bitch of a patchwork fix and surgically implanted
limbs should be flagged as such to prevent being boofed by species
changes, but ah well this is good enough for now
## Changelog
🆑
fix: Transforming into an android and then back into another species
will no longer leave you with permanent robotic limbs
/🆑
* android bodyparts no longer immune to species change
---------
Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
* Activating arm implant items in hand now automatically retracts and opens the radial menu (#74300)
## About The Pull Request
Activating arm implant items in hand now automatically retracts and
opens the radial menu. Only if there's more than one item in the list
### Mapping March
Ckey to receive rewards: N/A
## Why It's Good For The Game
Makes these neat implants less unbelievably clunky to use, making 'em
actually worthwhile. Welders don't work so well but you can still right
click in your hand.
## Changelog
🆑
qol: Activating arm implant items in hand now automatically retracts and
opens the radial menu, unless it's a welding tool.
/🆑
* Activating arm implant items in hand now automatically retracts and opens the radial menu
---------
Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
* Fixes the emissive blockers from the body parts layering over everything (#74362)
## About The Pull Request
As it says, this PR will stop bodypart emissive blockers from layering
over all the things.
This will fix any emissives that were not displaying on clothing, such
as the safety vest.
Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/19531https://github.com/tgstation/tgstation/issues/62442 and
https://github.com/tgstation/tgstation/issues/64098 are not fixed by
this, these are separate issues.
## Why It's Good For The Game
The pretty lights return to dazzle us once more.
<details>
<summary>Safety vest emissives</summary>

</details>
## Changelog
🆑
fix: fixes emissives blocker layering issue that was causing emissives
on clothing to not display at all
/🆑
Lemon: I am curious about when this became an issue, since it seems inconsistent with what I'd expect
I know this was working last year, around early fall, from screenshots. But beyond that, no clue. It happened sometime between now and then.
FLOAT_LAYER is very untrustworthy, I wish Lummox would add some debugging var that shows the last layer it was rendered on or something because there is really no way to see what it's doing reliably. But for now explicitly setting the layer might be a good idea for stuff like this.
* Fixes the emissive blockers from the body parts layering over everything
---------
Co-authored-by: Bloop <vinylspiders@gmail.com>
* Replaces internal_organs with organs
* Makes all of the necessary internal_organs -> organs in our files to compile
And it seems to work too!
---------
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Prosthesis organ manipulation no longer makes you harm target when you use incorrect tool (#74184)
## About The Pull Request
currently if someone is in surgery you can only harm them with a
surgical tool if you are in combat mode
the way the check works is that it only applies to tools that have the
SURGICAL_TOOL item flag
prosthesis organ manipulation is the only surgery that uses normal
engineering tools, and because it involves steps with normal tools, it
means that if you forget or misclick you can easily hurt someone with
the wrong tool
this makes that not happen anymore
## Why It's Good For The Game
i feel like it makes sense for the surgery that uses engineering tools
as surgery tools to treat engineering tools as them, with the same
considerations with regards to only having you bludgeon the patient if
you wanted to
## Changelog
🆑
qol: Prosthesis organ manipulation now warns you if you are using the
incorrect engineering tool
/🆑
* Prosthesis organ manipulation no longer makes you harm target when you use incorrect tool
---------
Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
* Medical Borg Surgical Processor is now used to start surgeries (#73993)
## About The Pull Request
Makes it so that the surgical processor is now used to start surgeries
instead of the surgical drapes.
This makes it less confusing for new players who download surgeries and
then cannot figure out how to actually use them.
Previously you had to have the module and the drapes active at the same
time, now just the module.
## Why It's Good For The Game
Quality of life for medical borgs, and also not a noob trap anymore.
## Changelog
🆑
add: Surgical Processor upgrade for medical cyborgs can now be used to
start surgeries.
balance: You no longer need to use two module slots for starting
surgeries with the surgical processor.
/🆑
* Medical Borg Surgical Processor is now used to start surgeries
---------
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
* Gives the chainsaw start/stop/loop SFX, makes the arm-mounted chainsaw a subtype of a regular chainsaw (#73996)
## About The Pull Request
The chainsaw now has an audio loop, as well as SFX for starting and
stopping. I'm pretty confident that I did the attribution stuff
correctly.
https://user-images.githubusercontent.com/28870487/225054900-4bf87ee7-9245-4004-b414-77d0e6e83a7c.mp4
I think this came out well. It may be a bit loud, but I wanted the
volume to be about the same as how the chainsaw slash sound comes out.
Audio stuff isn't really my forte, so let me know if anything sounds
off, or if any adjustments should be made.
To make this work for the mounted chainsaw (more specifically, the
abstract object that enters your hand), it has been made into a chainsaw
subtype. An updatepaths script has been included in the event that
someone has a map where the former path was included (why??).
## Why It's Good For The Game
Makes the chainsaw more menacing. It's one of the most powerful and
beloved pieces of crew weaponry, in addition to being a fucking
chainsaw. If you aren't keen on walking around the hallways with the
chainsaw loop playing like the badass you are, you can always just keep
it off until you get into a fight.
Gives an extra bit of immersion for those special moments where you get
to chainsaw someone to death.
## Changelog
🆑
soundadd: The chainsaw now has SFX for starting, stopping, and idling.
/🆑
* Gives the chainsaw start/stop/loop SFX, makes the arm-mounted chainsaw a subtype of a regular chainsaw
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Cleans up `..()` usage in organs' `Insert()` and `Remove()` (#74055)
## About The Pull Request
fumbled around while investigating #74047 and turns out there's other
organs that have the same issue as the reported alien organs in that
issue. went around and replaced parent calls where applicable
(cursed/demonic hearts, flashlight eyes, alien organs, abductor glands)
## Why It's Good For The Game
Fixes#74047
Considerably less ghost internal organs, hopefully less unreported jank
on removing organs
## Changelog
🆑
fix: fixed a few internal organs acting wonky on inserting/removing
(some xenomorph organs, abductor glands, flashlight eyes, demon/cursed
hearts)
/🆑
* Cleans up `..()` usage in organs' `Insert()` and `Remove()`
---------
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
* Fix: DNA Infuser & Unit Tests, Organs Bugfixes (#73003)
>_"I don't remember buying tickets to Mutants on Ice."_
>-Duke Nukem
This PR is (hopefully the final) part of a series of my continuing
refactors of the DNA Infuser. This PR represents a "quality pass" which
should also iron-out the rest of the most impactful bugs.
Granular list of changes:
- This PR adds unit tests for the DNA Infuser organs and
`/datum/status_effect/organ_set_bonus` as recommended by @AnturK
- I noticed that the base `/datum/infuser_entry` was being used in the
machine for the Fly and "rejected" infusions, whereas usually we would
expect it to be a base type used only as a development template. I
corrected this issue and created `/datum/infuser_entry/fly` to be used
for that use-case instead.
- Added `/mob/proc/can_mutate()` and `/mob/living/carbon/can_mutate()`
to replace a few copied lines across several files. The proc is normally
used in the context of mutating a Human via their DNA.
- I fixed a ton of typos in organ-related code, specifically where
"receiver" was typo'd as "reciever". There are far more of those typos,
but I limited the scope of my changes to organs.
- I noticed a bug in `/datum/species/proc/regenerate_organs` wherein a
race condition caused an organ to remove itself before it's done
inserting itself. This happens because the Fly organ set bonus runs
`regenerate_organs` which calls `Remove` on the organ while `Insert` is
still in the call-stack. I added `INVOKE_ASYNC` as a workaround, and
also changed the order the signals are emitted to prevent future bugs.
This bug primarily only impacted the flyperson species transformation,
which was part of the DNA Infuser's flyperson infusion organ set bonus.
- In my last refactor PR #72745 I also introduced a bug in
`/obj/machinery/dna_infuser/proc/infuse_organ` wherein I forgot to add
the usage of `new` when attempting to implant new organs, and this PR
fixes the erroneous code.
- Fxed a bug which causes the organ set bonus to activate when mixing
organs from different sources, which is caused by a developer oversight
wherein all `/datum/status_effect/organ_set_bonus` had identical IDs.
- Added a cleaner `replacetext`-based way of handling pronouns in
`/datum/element/noticable_organ/proc/on_receiver_examine`, using custom
macros `%PRONOUN_S` and `%PRONOUN_ES` as advised by @MrMelbert
- This PR also fixes#72767
With the changes in this PR the machine will finally work as we expect
it to. By adding unit tests we will also be able to ensure that it works
as expected from now on. I feel confident saying that the completeness,
algorithmic correctness, and code health of the DNA Infuser is much
better than it was before.
🆑 A.C.M.O.
fix: Fully fixed the DNA Infuser, which will now infuse organs as
expected.
fix: Fixed flyperson species transformation and organ set bonus, which
was throwing a runtime.
fix: Fixed many typos in organ-related source code.
/🆑
---------
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* *shrug
* Uncommented the line Gandalf wanted uncommented
* Properly fixes CI on this one, hopefully.
---------
Co-authored-by: Dani Glore <fantasticdragons@gmail.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Splits mutant_bodyparts.dmi into several subfiles. (#71408)
Splits the `mutant_bodyparts.dmi` file up, as was suggested, but not
implemented, in #69302.
The following new files were created in the `icons\mob\species` folder,
containing the listed sprites:
- `lizard\lizard_misc.dmi`: Snouts, horns, frills, and body markings.
Anything I didn't feel needed an entire file to itself.
- `lizard\lizard_spines.dmi`: Lizard spines, both animated and not.
- `lizard\lizard_tails.dmi`: Lizard tails, both animated and not.
- `human\cat_features.dmi`: Felinid ears and tails.
- `monkey\monkey_tail.dmi`: The monkey tail.
- `mush_cap.dmi`: The lone mushperson cap, so easily forgotten.
Additionally, I moved `wings.dmi` from `mob\clothing` to `mob\species`.
I'm not sure what it was doing there.
`mutant_bodyparts.dmi` was something of a mess, with parts from four
different species thrown together haphazardly. It probably made sense in
earlier days when "mutant humans" were few and far between, but
splitting it up makes it more intuitive to find these sprites, and
brings it in line with other species - namely, moths. It also means that
any future sprites of these types added will not bloat an oversized file
even more.
Moving the wings file to the species folder just makes sense, because
wings are not a type of clothing.
🆑
refactor: Removed mutant_bodyparts.dmi and distributed its sprites in a
more sensible and granular manner.
/🆑
* External Organ Rework: new bodypart_overlay system (#72734)
Bodypart overlays are now drawn by the new /datum/bodypart_overlay
datum.
External organs no longer draw anything and instead add a special
/datum/bodypart_overlay/mutant to the bodypart, which draws everything
Makes it way easier to add custom overlays to limbs, since the whole
system is now modularized and external organs are just one
implementation of it
I haven't moved anything but external organs to this new system, I'll
move eyes, bodymarkings, hair, lipstick etc to this later
New pipeline is as follows:
- External organ added to limb
- External organ adds /datum/bodypart_overlay/mutant to limb to
bodypart_overlays
- Limb updates its icon, looks for all /datum/bodypart_overlay in
bodypart_overlays
- Very cool new overlay on your limb!
closes#71820🆑
refactor: External organs have been near-completely refactored.
admin: Admin-spawned external organs will load with a random icon and
color
fix: fixes angel wings not working for non-humans (it was so fucking
broken)
fix: fixes external organs being invisible if they werent initialized
with a human
/🆑
External organs are cool but are pretty limited in some ways. Making
stuff like synthetic organs is kinda fucked. I tried and it was dogshit.
Now you can just give an icon state and icon and you're good (using
/datum/bodypart_accessory/simple)
Stuff like eyes, cat ears and hair seem like good choices for extorgans,
but don't quite work for it because their icons work a lot differently.
This solves for it completely since any organ (or object or whatever)
can add it's own icon to a bodypart.
Want to add an iron plate to someones head? Go ahead. Want a heart to
stick out of someones chest? No problem.
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Makes the whole thing compile, although it most likely doesn't work
* Whoopsie daisy
* Now it's starting to work
* ok monkey
* Fixes tails some more
* Moth wings should be wings not moth wings
* Podpeople hair, yeah.
* Okay no more handle_mutant_bodyparts()
* Removed an useless variable from is_hidden()
* Fixes some more can_draw_on_bodypart (I'm gonna have to fix it upstream too)
* Removes the second useless argument of is_hidden()
* No, cat tails are no longer allowed to be snowflake
* Removes some useless variables from humans
* Whoops I forgot to commit this one
* How did I miss this one?
* Okay, yeah, tails and some other stuff show up now. Pod people hair too. Just many of them don't. Good enough for today.
* Okay so after a lot of pain and suffering, many mutant_bodyparts are now functional
* Everything works, except for ears, some of the taur layering, and moth markings (which never worked it seems)
* Alright skintones seem to work rather well now(?)
* Okay, my bad, now they do
* Moth markings can't be selected and won't be added anymore (since they're broken and integrated into the regular markings system anyway)
* Spines are no longer just matching the color of the limb they're attached to
* Moves taur organ and bodypart_overlay out of the sprite_accessory file for taurs, and fixes the taur rendering
* Linters moment
* Alright, spines are working and overlaying properly now
They just need to have a FRONT overlay for the /tg/ ones if we want them to display above the lizard tails, we already have that for vox spines thankfully.
* Disables moth_markings for good
* Fixes some rendering bugs
* Makes ears work (almost, rest of the code has MODsuit stuff in it too :( )
* Made the MODsuit overlays work :)
* Fixed horns and spines
* Fixes all of the screenshot tests
* Removes the Body Markings option from Appearances, use Augments+ instead (because that one works and is just better)
* Bye bye handle_mutant_bodyparts(), I won't miss you :)
* Forgot to take this out, whoops
* Fixes the moth antennae being unticked
* Removes some commented code in a modular file
* Fixes part of the create_and_destroy unit test
* Fixes a pretty big issue that caused some sprite_accessories to be removed from the global list because of the alter_form action (deep copies ftw)
* Fixes the runtimes related to pod_hair
* Gives the vox a better look in the prefs menu
* Fixes the appearance of functional wings
* Makes synths able to access their robotic wings
* Podpeople don't cause runtimes during CI anymore
* Fixes the random appearance of locked functional wings
* Fixed cat and lizard tails using the /tg/ sprites (we have slightly modified ones)
* Fixes the coloring on multi-colored sprites
* Fixes the code for the screenshot of the mammal screenshots and preview, so it has a tail
* Fixes the screenshot tests for a few species
* Fixes tails going invisible when wagging
* Fixes a runtime with horns
* Fixes showing/hiding mutant bodyparts not working at all
* (Hopefully) fully fixes all the issues related to extra and extra2-related icon_states.
* Fixes synth stuff and starts working on pod hair again
* I DID IT PODPEOPLE HAVE HAIR AGAIN
* Fixes the podpeople hair showing up on more than just podpeople
* Fixes the IPC screens showing up on species outside of synthetics
* Fixes a runtime in the pod_hair and the synth_screen's apply_to_human
* Updates the screenshots for podpeople and synths
* Fixes an issue with a certain type of organs
* Fixes another runtime, whoops
* Fixes the markings from /tg/'s Body Markings not being available in our markings system
* Re-adds support for taur-variants of certain mutant bodyparts
* Hopefully fixes a few more runtimes
* Adds some debug variable in the code for now, likely to be removed later if really necessary. This will make my life easier.
* Whoops, that needed to be backwards. :clown:
* Fixes the top snouts not rendering at all
* Fixes the issues where bodytypes weren't handled properly, and thus snouts were getting squished
* Fixes the weird placement of the Xeno Head Emissives in the prefs menu
* Removes a no-longer-necessary override of post_set_preference() in the limbs_and_markings middleware
* Reverts an unnecessary SKYRAT EDIT inside of commented out code
* No longer creates a new body every time we change prefs in the prefs menu, we reusing now lads
I know there's commented out code but I'm going to remove that in another commit
* Removed some more dead code.
* Fixes jellyfish ears being all white
* Fixes plasmaman limbs not displaying because I accidentally hardcoded the limb_id for all augments to "robotic"
---------
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Cyborg surgery processor shows downloaded surgeries & equip requirement on examine (#73992)
Surgery processor can download surgeries to be accessed without a
surgical computer. However, it does not tell the player that it needs to
be actually in one of the three equipped modules to let the cyborg
actually use those surgeries without relying on a surgical computer.
This PR addresses that + makes it show downloaded surgeries.
Players should be able to use the processor without any complications or
misinterpretations of its intended function. Being able to check
downloaded surgeries for something specific on the go can be handy.
* Cyborg surgery processor shows downloaded surgeries & equip requirement on examine
---------
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
* Ethereal involuntary discharge fix (#73919)
## About The Pull Request
fixes#73911
## Why It's Good For The Game
Double text = bad
## Changelog
🆑
fix: Ethereal discharge no longer alerts you twice that you did it.
/🆑
* Ethereal involuntary discharge fix
---------
Co-authored-by: vect0r <71346830+Vect0r2@users.noreply.github.com>
* Brings the monkey back down (body horror edition/addition.) (#73325)
## About The Pull Request
Let me paint you a story.
A long time ago monkeys once rested their feet on the floor, this was a
time of bliss and peace. But sometime around the horrors of making
monkeys subtypes of humans did an atrocity occur.

**The monkeys were moved up.**
I thought this was bad, and alot of people on the forum tended to agree
with me

This was do to some purpose of adjusting them so it could be easier to
fit item sprites onto them instead of preforming the hours of work
refractoring to make the heights of the items dynamic and adjustable. A
simple pixel shift may have sufficed, but you see, such a change would
NEVER allow the frankensteining of monkey and human features together.
This is that refractor.
In essence, the following is now true.
A top_offset can now be generated for a human based on a varible on
their chest and legs. By default, and as is true with human legs and
chests, this variable is ZERO by default. Monkey legs and chest have
NEGATIVE values proportionate and onto how much smaller their sprite is
compared to humans. Other bodyparts, as well as any other accociated
overlays, or clothing will automatically be offset to this axis. THIS
MEANS THAT MONKEYS ARE ON THE FLOOR. But is means something else too.
Something more freakish,

**What abominable monsters**, unreachable by players as long as we can't
stitch monkeys and humans together (oh but just wait until the feature
freeze ends)
Oh but you might be thinking, if legs can make a mob go down.
can it make a mob
**go**
**up??**
**OH NO**



These lads are stepping, and have been implemented solely for proof of
concept as a way to flex the system I have created and remain
inaccessible without admin intervention.
But really, when all is said and done, all this PR does in terms of
player facing changes is move the monkey back down.

Oh and fixed monkey husked which have been broken for who knows how
long.

## Why It's Good For The Game
The monkey is restored to its original position. Tools now exist to have
legs and torsos of varying heights. Monkey Husking is fixed.
## Changelog
🆑 itseasytosee
fix: Monkeys ues the proper husk sprites.
imageadd: The monkey has been moved back down to its lower, more
submissive position.
refactor: Your bodyparts are now dynamically rendered at a height
relevant to the length of your legs and torso, what does this mean for
you? Not much to be honest, but you might see a monkey pop up a bit if
you cut its legs off.
admin: The Tallboy is here
/🆑
---------
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Brings the monkey back down (body horror edition/addition.)
* Update species.dm
* Delete infuser_entries.dm
---------
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Nightvision Rework (In the name of color) (#73094)
Relies on #72886 for some render relay expansion I use for light_mask
stuff.
Hello bestie! Night vision pissed me off, so I've come to burn this
place to the ground.
Two sections to discuss here. First we'll talk about see_in_dark and why
I hate it, second we'll discuss the lighting plane and how we brighten
it, plus introducing color to the party.
https://www.byond.com/docs/ref/#/mob/var/see_in_dark
See in dark lets us control how far away from us a turf can be before we
hide it/its contents if it's dark (not got luminosity set)
We currently set it semi inconsistently to provide nightvision to mobs.
The trouble is stuff that produces light != stuff that sets luminosity.
The worst case of this can be seen by walking out of escape on icebox,
where you'll see this

Snow draws above the lighting plane, so the snow will intermittently
draw, depending on see_in_dark and the luminosity from tracking lights.
This would in theory be solvable by modifying the area, but the same
problem applies across many things in the codebase.
As things currently stand, to be emissive you NEED to have a light on
your tile. People are bad at this, and honestly it's a bit much to
expect of them. An emissive overlay on a canister shouldn't need an
element or something and a list on turfs to manage it.
This gets worse when you factor in the patterns I'm using to avoid
drawing lights above nothing, which leads to lights that should show,
but are misoffset because their parent pixel offsets.
It's silly. We do it so we can have things like mesons without just
handing out night vision, but even there the effect of just hiding
objects and mobs looks baddddddd when moving. It's always bothered me.
I'll complain about mesons more later, but really just like, they're too
bright as it is.
I'm proposing here that rather then manually hiding stuff based off
distance from the player, we can instead show/hide using just the
lighting plane. This means things like mesons are gonna get dimmer, but
that's fine because they suck.
It does have some side effects, things like view() on mobs won't hide
stuff in darkness, but that's fine because none actually thinks about
view like that, I think.
Oh and I added a case to prevent examining stuff that's in darkness, and
not right next to you when you don't have enough nightvision, to match
the old behavior `see_in_dark` gave us.
Now I'd like to go on a mild tangent about color, please bare with me
You ever walk around with mesons on when there's a fire going, or an
ethereal or firelocks down.
You notice how there isn't really much color to our lights? Doesn't that
suck?
It's because the way we go about brighting lighting is by making
everything on the lighting plane transparent.
This is fine for brightening things, but it ends up looking kinda crummy
in the end and leads to really washed out colors that should be bright.
Playing engineer or miner gets fucking depressing.
The central idea of this pr, that everything else falls out of, is
instead of making the plane more transparent, we can use color matrixes
to make things AT LEAST x bright.
https://www.byond.com/docs/ref/#/{notes}/color-matrix
Brief recap for color matrixes, fully expanded they're a set of 20
different values in a list
Units generally scale 0-1 as multipliers, though since it's
multiplication in order to make an rgb(1,1,1) pixel fullbright you would
need to use 255s.
A "unit matrix" for color looks like this:
```
list(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1,
0, 0, 0, 0
)
```
The first four rows are how much each r, g, b and a impact r, g, b and
well a.
So a first row of `(1, 0, 0, 0)` means 1 unit of r results in 1 unit of
r. and 0 units of green, blue and alpha, and so on.
A first row of `(0, 1, 0, 0)` would make 1 red component into 1 green
component, and leave red, blue and alpha alone, shifting any red of
whatever it's applied to a green.
Using these we can essentially color transform our world. It's a fun
tool. But there's more.
That last row there doesn't take a variable input like the others.
Instead, it ADDS some fraction of 255 to red, green, blue and alpha.
So a fifth row of `(1, 0, 0, 0)` would make every pixel as red as it
could possibly be.
This is what we're going to exploit here. You see all these values
accept negative multipliers, so we can lower colors down instead of
raising them up!
The key idea is using color matrix filters
https://www.byond.com/docs/ref/#/{notes}/filters/color to chain these
operations together.
Pulling alllll the way back, we want to brighten darkness without
affecting brighter colors.
Lower rgb values are darker, higher ones are brighter. This relationship
isn't really linear because of suffering reasons, but it's good enough
for this.
Let's try chaining some matrixes on the lighting plane, which is bright
where fullbright, and dark where dark.
Take a list like this
```
list(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1,
-0.2, -0.2, -0.2, 0
)
```
That would darken the lighting a bit, but negative values will get
rounded to 0
A subsequent raising by the same amount
```
list(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1,
0.2, 0.2, 0.2, 0
)
```
Will essentially threshold our brightness at that value.
This ensures we aren't washing out colors when we make things brighter,
while leaving higher values unaffected since they basically just had a
constant subtracted and then readded.
You may have noticed, we gain access to individual color components
here.
This means not only can we darken and lighten by thresholds, we can
COLOR those thresholds.
```
list(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1,
0.1, 0.2, 0.1, 0
)
```
Something like the above, if applied with its inverse, would tint the
darkness green.
The delta between the different scalars will determine how vivid the
color is, and the actual value will impact the brightness.
Something that's always bothered me about nightvision is it's just
greyscale for the most part, there isn't any color to it.
There was an old idea of coloring the game plane to match their lenses,
but if you've ever played with the colorblind quirk you know that gets
headachey really fast.
So instead of that, lets color just the darkness that these glasses
produce.
It provides some reminder that you're wearing them, instead of just
being something you forget about while playing, and provides a reason to
use flashlights and such since they can give you a clearer, less tinted
view of things while retaining the ability to look around things.
I've so far applied this pattern to JUST headwear for humans (also those
mining wisps)
I'm planning on furthering it to mobs that use nightvision, but I wanted
to get this up cause I don't wanna pr it the day before the freeze.
Mesons are green, sec night vision is red, thermals orange, etc.
I think the effect this gives is really really nice.
I've tuned most things to work for the station, though mesons works for
lavaland for obvious reasons.
I've tuned things significantly darker then we have them set currently,
since I really hate flat lighting and this system suffers when
interacting with it.
My goal with these is to give you a rough idea of what's around you,
without a good eye for detail.
That's the difference between say, mesons, and night vision. One helps
you see outlines, the other gives you detail and prevents missing
someone in the darkness.
It's hard to balance this precisely because of different colored
backgrounds (looking at you icebox)
More can be done on this front in future but I'm quite happy with things
as of now
I have since expanded to all uses of nightvision, coloring most all of
them.
Along the way I turned some toggleable nightvision into just one level.
Fullbright sucks, and I'd rather just have one "good" value.
I've kept it for a few cases, mostly eyes you rip out of mobs.
Impacted mobs are nightmares, aliens, zombies, revenants, states and
sort of stands.
I've done a pass on all mobs and items that impact nightvision and added
what I thought was the right level of color to them. This includes stuff
like blobs and shuttle control consoles
As with glasses much of this was around reducing vision, though I kept
it stronger here, since many of these mobs rely on it for engaging with
the game
<details>
<summary>
Technical Changes
</summary>
filter transitions.
Found this when testing this pr, seemed silly.
This avoids dumbass overlay lighting lighting up wallmounts.
We switch modes if some turfflags are set, to accomplish the same thing
with more overhead, and support showing things through the darkness.
Also fixes a bug where you'd only get one fullscreen object per mob, so
opening and closing a submap would take it away
Also also fixes the lighting backdrop not actually spanning the screen.
It doesn't actually do anything anymore because of the fullscreen light
we have, but just in case that's unsued.
Needs cleanup in future.
color with a sprite
This is to support the above
We relay this plane to lighting mask so openspace can like, have
lighting
vision goggles and such
Side affect of removing see_in_dark. This logic is a bit weak atm, needs
some work.
It's a dupe of the nightvision action button, and newly redundant since
I've removed all uses of it
trasnparent won't render
These sucked
Also transparent stuff should never render, if it does you'll get white
blobs which suck
</details>
Videos! (Github doesn't like using a summary here I'm sorry)
<details>
Demonstration of ghost lighting, and color
https://user-images.githubusercontent.com/58055496/215693983-99e00f9e-7214-4cf4-a76a-6e669a8a1103.mp4
Engi-glass mesons and walking in maint (Potentially overtuned, yellow is
hard)
https://user-images.githubusercontent.com/58055496/215695978-26e7dc45-28aa-4285-ae95-62ea3d79860f.mp4
Diagnostic nightvision goggles and see_in_dark not hiding emissives
https://user-images.githubusercontent.com/58055496/215692233-115b4094-1099-4393-9e94-db2088d834f3.mp4
Sec nightvision (I just think it looks neat)
https://user-images.githubusercontent.com/58055496/215692269-bc08335e-0223-49c3-9faf-d2d7b22fe2d2.mp4
Medical nightvision goggles and other colors
https://user-images.githubusercontent.com/58055496/215692286-0ba3de6a-b1d5-4aed-a6eb-c32794ea45da.mp4
Miner mesons and mobs hiding in lavaland (This is basically the darkest
possible environment)
https://user-images.githubusercontent.com/58055496/215696327-26958b69-0e1c-4412-9298-4e9e68b3df68.mp4
Thermal goggles and coloring displayed mobs
https://user-images.githubusercontent.com/58055496/215692710-d2b101f3-7922-498c-918c-9b528d181430.mp4
</details>
I think it's pretty, and see_in_dark sucks butt.
<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->
🆑
add: The darkness that glasses and hud goggles that impact your
nightvision (think mesons, nightvision goggles, etc) lighten is now
tinted to match the glasses. S pretty IMO, and hopefully it helps with
forgetting you're wearing X.
balance: Nightvision is darker. I think bright looks bad, and things
like mesons do way too much
balance: Mesons (and mobs in general) no longer have a static distance
you can see stuff in the dark. If a tile is lit, you can now see it.
fix: Nightvision no longer dims colored lights, instead simply
thresholding off bits of darkness that are dimmer then some level.
/🆑
* modular edits
* see_in_dark
* [MIRROR] Adds a unit test to detect double stacked lights [MDB IGNORE] (#19564)
* Adds a unit test to detect double stacked lights
* we really need to get that night vision pr done
* lints fixes
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
* Update augments_eyes.dm
* Update augments_eyes.dm
* eeee
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Fixes some invisible inhands from the transforming component (#73807)
## About The Pull Request
The original issue caused by #70037
Esword issue caused by #73716
Originally the transforming component did not override the inhand icon
state of the the item on its own (instead putting the onus on the item
itself if they wanted unique behavior). It was changed to always update
inhand icon state, most of which don't have one
I don't really like this fix, it should be explicit "I want inhand to
change" and not default, but this will work for now
Also the PR that fixed the Jaws issue didn't actually set the var they
created
Fixes#73805Fixes#73711 (Actually)
## Why It's Good For The Game
Invisible sword bad
## Changelog
🆑 Melbert
fix: Fixed a eswords, some tools, and some other misc. items from being
invisible while extended / active
fix: Teleshields and other misc items not extending in hand when active
fix: Switchblades click on extend again
fix: Pendrivers click on extend
/🆑
* Fixes some invisible inhands from the transforming component
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes an issue with nightmare revival, Unit tests some fully heal stuff (#73612)
## About The Pull Request
- Same issue as Ethereals. Owner was `null`ed because the heart was
recreated. I opted for a more permanent solution, that being introducing
a new flag to avoid recreating organs.
- Adds some unit tests for fully heal stuff to make sure it works.
## Why It's Good For The Game
More cases of revival working as expected
## Changelog
🆑 Melbert
fix: Nightmare revival acts less funky - stops it from re-creating the
Light Eater.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Fixes an issue with nightmare revival, Unit tests some fully heal stuff
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Fixes strong arm implant bugs (#73605)
## About The Pull Request
Fixes strong arm implant introduced in
https://github.com/tgstation/tgstation/pull/73043 stunlocking people and
stacking with hulk attacks
## Why It's Good For The Game
Stunlocking or any other negative effects from throwing were not an
intended thing, this PR fixes it.
Stacking with hulk attacks also wasn't an intended feature.
## Changelog
🆑
fix: Fixes strong arm implant attacks stunlocking people
fix: Strong arm implant attacks no longer stack with hulk attacks
/🆑
---------
Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
* Fixes strong arm implant bugs
---------
Co-authored-by: SuperSlayer <91609255+SuperSlayer0@users.noreply.github.com>
Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
* Adds new combat cybernetic implant (#73043)
## About The Pull Request
Adds arm empower implant to the game - a cybernetic implant that will
make your punches deal 13 damage(normal human attacks deal between 1 and
10 damage), and throw your target away(doesn't work if you are lying
down) like a baseball bat does. It is inserted into your arm, and it
works only for the arm it is inserted into.
As an EMP effect it would cause you to fall under your target, or get
paralyzed due to muscle spasms.
## Why It's Good For The Game
Expands the implant system and adds more things to stuff into yourself
if you want to roleplay as a cool robo man.
## Changelog
🆑
add: Added a new cybernetic implant that increases punch damage of a
human
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Adds new combat cybernetic implant
---------
Co-authored-by: SuperSlayer <91609255+SuperSlayer0@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Moth Wing Reconstruction surgery works (#73486)
## About The Pull Request
Moth wings only allow themselves to be healed if the proc is called with
HEAL_ORGAN or HEAL_LIMB
So we just make the surgery force healing
## Why It's Good For The Game
Resolves https://github.com/tgstation/tgstation/issues/73485
## Changelog
🆑
fix: Moth wings can now correctly be healed
/🆑
* Moth Wing Reconstruction surgery works
---------
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>