* Initial draft, most of the stuff is implemented, not really tested or cleaned up yet
* Refactors the handling into a datum-based approach, for more abstraction
* Added migration, properly hooked up the verb to the new system
* Removed some more dead code
* Fixes some missing stuff from the .dme because VSC is stupid sometimes with merge conflicts
* Fixes the schema
* Wow I was really getting tired huh
* A fool, I say, a fool!
* I hate lists of lists I hate lists of lists I hate lists of lists
* I somehow missed this one twice. TWICE!
* This won't actually work if it's defaulting to true, lmao
* Makes it not log stuff if the adding or removing of players is unsuccessful
* Adds a way to update all of the unlock_contents for preferences datums once the donator list is initialized
* Runs update_prefs_unlock_content on mob Login() (hopefully this helps)
* Fixes the bajillion of runtimes caused by my dumb ass trying to make some client calls on ckeys
* Man I was really tired that day
* I had this ready for three hours and forgot to push it
* Fixes an issue with the "recolor from string" option in the greyscale modify menu (#77798)
## About The Pull Request
The number of colors has to match the expected color of the greyscale
configuration, otherwise the whole proc chain behind the generation of
the resulting icon will crash here:
ac446d8bad/code/datums/greyscale/_greyscale_config.dm (L253)
## Why It's Good For The Game
One of the thousands runtimes I've seen in the runtime viewer.
## Changelog
🆑
fix: Fixed an issue with the "recolor from string" option in the
greyscale modify menu that resulted in invisible icons.
/🆑
* Fixes an issue with the "recolor from string" option in the greyscale modify menu
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Fixes greyscale colors not updating when changing their colors via VV, and fixes some issues with accessories (#77806)
## About The Pull Request
Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/23214
This fixes a few bugs and cleans up code a bit:
1) Greyscale colors that were changed via the VV modify greyscale menu
will now update the mob's worn clothing accordingly. It wasn't doing
this before. Accessories in particular needed a bit of extra work to
update in this way because it wasn't coded with this case in mind.
2) Accessories will call `equipped()` and `dropped()` when they get
added/removed. This will fix issues like item flags being incorrectly
set, action bars not being added, etc.
3) Accessories will now be returned by `get_all_gear()`. This will
probably fix a few issues I'm not aware of.
## Why It's Good For The Game
<details><summary>Works</summary>

</details>
<details><summary>get_all_gear()</summary>

</details>
<details><summary>get_equipped_items()</summary>

</details>
<details><summary>item_flags get set now, hopefully preventing future
issues related to that</summary>

</details>
## Changelog
🆑
fix: greyscale colors will now update on the mob when modifying them via
the VV menu
/🆑
---------
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
* Fixes greyscale colors not updating when changing their colors via VV, and fixes some issues with accessories
---------
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
* Fixes a bunch of callbacks that were being qdeleted, and code cleanup (#77904)
## About The Pull Request

Continuing the work of
https://github.com/tgstation/tgstation/pull/77850.
it started with finding one that was being missed and causing a
runtime...then I noticed a whole lot more. While I was doing this I
found callbacks that weren't being nulled in `Destroy()`, so I added
that wherever I found these spots as well as some general code cleanup.
There were a lot more of these than I initially hoped to encounter so
I'm labeling it as a refactor.
## Why It's Good For The Game
Fixes lots of runtimes, improves code resiliency.
## Changelog
🆑
refactor: fixed a bunch of instances of callbacks being qdeleted and
cleaned up related code
/🆑
* Fixes a bunch of callbacks that were being qdeleted, and code cleanup
---------
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* Implements byond_status() for harddel hunting (#77818)
## About The Pull Request
In addition, improves dump_harddel_deets usage to hopefully hit in unit
testing
byond_status() will dump as a part of find_references(). While I'd like
to expand that if we ever get a proper version, this is good for how we
have things setup rn.
* Implements byond_status() for harddel hunting
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* Loads Away Missions for Unit Testing (#76245)
Hey there,
A pretty bad bug (#76226) got through, but it was fixed pretty quickly
in #76241 (cf92862daf). I realized that if
we were testing all the away missions, that this could theoretically get
caught and not happen again. Regardless, unit testing gateway missions
has been on my to-do list for a while now, and I finally got it nailed
down.
Basically, we just have a really small "station" map with the bare bones
(_teeny_ bit of fluff, maploading is going to take 30 seconds tops
anyways let me have my kicks) with a JSON map datum flag that causes it
to load all away missions in the codebase (which are all in one folder).
Just in case some admins were planning on invoking the proc on
`SSmapping`, I also decided to gate a `tgui_alert()` behind it because
you never can be too sure of what people think is funny these days (it
really does lock up your game for a second or so at a time).
I also alphabetized the maps.txt config because that was annoying me.
Things that break on production could(?) be caught in unit testing? I
don't know if the linked issue I mentioned above would have been caught
in retrospect, but it's likely to catch more than a few upcoming bugs
(like the UO45 atmospherics thing at the very top) and ensure that these
gateway missions, which tend to be the most neglected part of mapping,
stay bug-free.
This is also helpful in case someone makes a new away mission and wants
to see if stuff's broken. Helps out maptainers a bit because very, very
technically broken mapping will throw up runtimes. Neato.
Nothing that players should be concerned about.
Let me know if there's a better way to approach this, but I really think
that having a super-duper light map with the bare basics to load up
gateway missions and then all nine-ish gateway missions can sequentially
load during init. I can't think of a better way to do it aside from some
really ugly `#ifdef` shit. Also also, it has the added benefit of being
a map that will always load your away mission without touching a single
shred of config (and it's not likely to break if you follow sane
practices such as making your own areas)
* Update gateway_test.json
* Map Reset
* Gets rid of an area that was in a space turf
* Attempting to fix some runtimes
* Map Reset
* Lets remains spawn in xen water
* and acid, too
* Update remains.dm
* Removes extra airlock helper
* Delete research2.dmm
Surely this was a mistake?
* Merge branch 'master' into pr/22534
* Map Reset
* Update snowdin.dmm
* Revert "Update snowdin.dmm"
This reverts commit c860c6f4fbb463954d5b8da1b494305a2f45b44b.
* Update snowdin.dmm
* Update snowdin.dmm
* Revert "Update snowdin.dmm"
This reverts commit 47e7916056a47e12adfcb8b94b9748b7e56f378d.
* Update snowdin.dmm
* Revert "Update snowdin.dmm"
This reverts commit c82576bee69e09eda649d3cbf63d96dddaeeb380.
* Update immerse.dm
* Revert "Update immerse.dm"
This reverts commit 2ad622f3029a3ed17a05f8269299d0f25e747d11.
* Update immerse.dm
* Update maps.txt
* Fix hard dels in area spawn
* Update gateway_test.json
* Actually we can just get away with keeping a list of types here, no refs needed.
* Update area_spawn_subsystem.dm
* Update automapper.dm
* Let's just test to see if getting rid of black mesa stops the segfaults...
* Let's try deleting astrum too
* Revert "Let's just test to see if getting rid of black mesa stops the segfaults..."
This reverts commit de9a05708d451abbb78a635a3e03b2f460004496.
* Revert "Let's try deleting astrum too"
This reverts commit 2121a6357a54faf5719a42a762ba8b4698c008fb.
* Update waypointstation.dmm
* Update blackmesa.dmm
* Update decaySS.dm
* Update gateway_test.json
* Revert "Update gateway_test.json"
This reverts commit 93adc08819f05aecc8599980385e3fb10d02a1d2.
* Testing
* Revert "Testing"
This reverts commit 1d476d236953daac6adf59b93e56f2fab218085b.
* Testing
* Revert "Testing"
This reverts commit de05a74636c1f43e50fb7ec9f24978d270db4b88.
* Now try and actually fix the stupid thing
* Update clockwork_research.dm
---------
Co-authored-by: san7890 <the@san7890.com>
* MODLink System (+ NWTLMM) (#77639)
## About The Pull Request
A pact made with `@ Kapu1178`
Small changes you should not care about:
RD MODsuit outfit (admin only) no longer has a beret that blocks the
activation of the suit
The beret used by death squad officers no longer is blocked from being
put on a hat stabilizer module
Admins can now Shear matrices of objects in Modify Transform
Multitool buffers have been a little refactored to use a setter proc
that saves them from causing hard dels
Cooler stuff:
A revival and remake of [Nobody Wants To Learn Matrix
Math](https://github.com/tgstation/tgstation/pull/59103), this time with
additional tooling for quick matrix calculations.

The MODLink system, available through every MODsuit and MODLink scryers
(a neck item obtainable from advanced modsuit research or
charliestation)
Let's you make a holographic call with any other MODLink user, where you
can chat in realtime and see what's up with em


## Why It's Good For The Game
Adds a fun way for the crew to communicate with each other that can be
done in real-time with relative privacy compared to radio.
## Changelog
🆑 Fikou, Armhulen, Sheets (+rep for Mothblocks and Potato)
fix: RD MODsuit outfit (admin only) no longer has a beret that blocks
the activation of the suit
fix: The beret used by death squad officers no longer is blocked from
being put on a hat stabilizer module
admin: Admins can now Shear matrices of objects in Modify Transform
admin: Admins now have access to Test Matrices in the VV dropdown, an
all-in-one tool for editing transforms.
add: MODLink system, available through scryers (from RnD and Charlie
Station) and through MODsuits. Lets you call people with holographs!
/🆑
* MODLink System (+ NWTLMM)
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* Few CTF changes. (#77533)
## About The Pull Request
- Fixed that if you chose to press a cross while toggling instagib mode
it will react as `Yes` instead of just canceling
- Added description for assault class (with shotgun and rocket gloves)
so you know that you have faster moving speed and lover armor.
- Fixed that when you already chose a team and try to click on other
teams spawners you'll be asked to consider other teams to make them
equal.
- Decreased time of recharge start delay from 20 seconds to 12, because
when it takes soo much to regen your shield its just faster to die and
respawn with a new one.
- Added 1.7 scope to marksmans rifle.
- Little cleanup.
**Everything is arguable.**
**Ask if something is unclear or confusing.**
## Why It's Good For The Game
Less buggs, less wondering why do you die in 1 hit and others don't, a
little bit of consistency.
## Changelog
🆑
qol: CTF assault class' (with shotgun and rocket gloves) description now
mentions that it has low armor and increased moving speed.
balance: Decreased CTF recharge start delay for shields from 20 seconds
to 12 seconds.
balance: Marksmans rifle now has 1.7 scope.
fix: When toggling instagib mode for CTF and pressing a cross now will
just cancel instead of proceeding.
fix: When clicking on other CTF teams spawners and after you already
chose your team no more will ask you to join some other team to make
them even.
/🆑
* Few CTF changes.
---------
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
* Add Mob Ability menu now displays ability names before typepath (#77682)
## About The Pull Request
Look at this menu:

Isn't this basically useless?
When you try to add a mob ability to a mob, it displays a huge list of
typepaths.
Literally none of the typepaths are short enough that they even fit in
the window, and the data about what the ability actually is usually lies
at the end of the typepath.
This is clearly silly.
I made it look like this instead:

Now you see the name _and_ the typepath (it's still useful information
in cases where there are several similar abilities).
Also I gave the lobster charge ability its own name because it didn't
have one.
## Why It's Good For The Game
Increases usability of this admin feature.
## Changelog
🆑
admin: The Add Mob Ability menu now prefixes the typepath of the ability
with the ability's name, so you can much more quickly see what the
ability is.
/🆑
* Add Mob Ability menu now displays ability names before typepath
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Adds sanity checking to prefs checks, fixing a bug that can cause emotes to stop displaying intermittently
* Update vox_procs.dm
---------
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* More lua harddel fixes (#77556)
## About The Pull Request
Fixes some more lua harddel problems with lingering refs on the gc_guard
variable. This variable has been changed to a list instead and will get
cleared every time the SSlua subsystem fires so that lua instantiated
objects that are not tracked by the subsystem will essentially delete
themselves on the next tick, aka whenever the lua script sleeps.
Also removed the unnecessary and not completely functional
lua_reference_cleanup proc which wasn't even being called reliably
because the signal handler was the datum itself.
## Why It's Good For The Game
Fixes more harddel bugs, increases consistency.
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* More lua harddel fixes
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Polishing the greyscale modify menu's lackluster support for non-atom targets. (#77322)
## About The Pull Request
So, I've been recently told that Skyrat uses the greyscale modify menu
for loadouts, and the new ui state kinda borked it. I honestly haven't
taken the possibility that the target could be anything but a subtype of
`/atom` (and still work) into account because much of the code assumes
the target is an atom. It's kinda crappy. Also I hadn't noticed we've an
`unlocked` variable, which makes `vv_mode` var superflous, so i'm going
to remove the latter.
* Polishing the greyscale modify menu's lackluster support for non-atom targets.
* I hope I won't have to get back and edit out the ability to modify the alpha on clothes for this
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Fixes some lua problems, specifically with qdeling callbacks and adds lua utility functions (#77468)
## About The Pull Request
See title. Callbacks were getting deleted in SS13.lua which is
non-ideal. They should be automatically collected by the garbage
collector.
Also adds some utility lua functions like SS13.is_valid,
SS13.stop_tracking, SS13.new_untracked, SS13.type and SS13.qdel
## Why It's Good For The Game
Fixes some harddel issues, as well as callbacks clogging up the garbage
subsystem.
## Changelog
🆑
admin: Added new lua functions: SS13.is_valid, SS13.stop_tracking,
SS13.new_untracked, SS13.type and SS13.qdel
/🆑
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Fixes some lua problems, specifically with qdeling callbacks and adds lua utility functions
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Fixed lua-created atoms from hard deleting (#77391)
## About The Pull Request
Lua created atoms hard delete because they get added to a references
list without ever being cleared. This fixes that by registering a
qdeleting signal on them and removing them from the list on delete.
## Why It's Good For The Game
Harddel fixes
## Changelog
🆑
fix: Fixed a hard delete that would occur with lua-created atoms.
/🆑
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Fixed lua-created atoms from hard deleting
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Adds a system for logging metadata about hard deletes (#76956)
## About The Pull Request
I'm sick of the progress bar harddel, and I've ran into this problem in
the past, so I'm just gonna do something about it
If you want to provide an individual logged bit of info about a harddel,
you can override `/datum/proc/dump_harddel_info()` and return a string
containing "whatever"
Use of this should be limited, this could potentially clutter del logs,
especially if it's used on something that fails often, like pipes
I do think it's still useful tho. It's output ingame, in the logs, and
in unit test failures. Hopefully all nicely tho I'm only really 100%
sure about in game.
* Adds a system for logging metadata about hard deletes
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Improved Imaginary Friend Smite (#77331)
## About The Pull Request
By admin request:
- The Imaginary Friend smite now allows you to select "Offer to ghosts"
rather than selecting an observer mob manually.
- If you select this option you can also select to bulk-accept multiple
ghosts at a time, if you want to give people twelve imaginary friends
without having to smite them 12 times.
This necessitated changing the order of events a little bit so nwo you
choose whether they have a randomised appearance before picking a
candidate.
## Why It's Good For The Game
Makes it easier to drop the entire end of round deadchat into one guy's
brain with just a couple of clicks
## Changelog
🆑
admin: The imaginary friend smite now allows selecting "offer to ghosts"
instead of having to perform that poll yourself manually. When offering
to ghosts you can also offer for several ghosts to volunteer at the same
time.
/🆑
* Improved Imaginary Friend Smite
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* [NO GBP] Actually fixing the greyscale_modify_menu. (#77208)
## About The Pull Request
EDIT: So, I've to admit and bow my head: #77165 fucked up because I
hadn't properly tested the code. However, this time around, I can assure
you it's been tested.
## Why It's Good For The Game
Fixing my mistakes. This will fix#77246
## Changelog
N/A.
* [NO GBP] Actually fixing the greyscale_modify_menu.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Updates all the icons in under/suits.dmi and related sorting/cleanup (#76865)
Somebody was pointing out how our suits varied WILDLY in quality
Figured I'd go through and tidy them up
* Updates all the icons in under/suits.dmi and related sorting/cleanup
* Rename Amish suit, remove scratch suit (was removed upstream)
* Fixes a rogue path
---------
Co-authored-by: OrionTheFox <76465278+OrionTheFox@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Doubles the time you can get the "Long shift" achievement, makes it not grant on admin restarts (#77195)
## About The Pull Request
- "Long shift" can now be earned from sub 10 minute rounds rather than
sub 5 minute rounds
- Admin restarts no longer give out "Long shift"
## Why It's Good For The Game
I do not think this achievement can *possibly* be earned right now. Like
at all.
Nuke Ops and cult are the only antags that can possibly do it and it's
incredibly infeasible (requiring that they nuke the station or summon
Nar'sie in just 3 minutes!)
So I bumped up the timer to 10 minutes. This means that ops can get it
if they nuke the station in 8 minutes, cult can get it if they REALLY
speedrun, and revs can get it if they beeline the heads.
I checked the DB for stats on this achievement and it's only been earned
in 3 rounds across the last year - `208780` (admin restart due to a bug)
`192892` (admin restart due to a bug?) `186192` (admin restart).
So I also prevented admin forcing the round to end. (I don't know if it
catches admin reboots directly I'll have to check that.)
## Changelog
🆑 Melbert
balance: The "Long Shift" achievement is now feasibly obtainable, and
admins can no longer trigger it unknowingly
/🆑
* Doubles the time you can get the "Long shift" achievement, makes it not grant on admin restarts
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixing the greyscale modify menu not sanitizing inputs. (#77165)
## About The Pull Request
exactly what it reads on the tin. Also the ui is now anchored to the
target and uses their state unless a specific one is set, so that it'll
correctly close or be unusable if the mob user is incapacitated or too
far.
## Why It's Good For The Game
this will fix#70444.
## Changelog
🆑
fix: Fixing some jank with the a greyscale modify menu, like inputs not
being sanitized.
/🆑
* Fixing the greyscale modify menu not sanitizing inputs.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Implements usage of the REVERSE_DIR macro throughout the code. (#77122)
## About The Pull Request
Replaces a ton of `turn(dir, 180)` calls with the aforementioned macro.
## Why It's Good For The Game
Afaik, `REVERSE_DIR` was coded to be faster than the classic `turn(dir,
180)` call, being a simple set of binary operations. To sum it up, micro
optimization.
## Changelog
N/A
* Implements usage of the REVERSE_DIR macro throughout the code.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* [NO-GBP] Changing shuttle events now alerts admins (#76939)
If an admin forces 10 alien queen shuttle events, you'd probably want to
alert the other admins. Previously this just put it in the admin log
without telling anyone, but it's probably more fitting to just pop it in
asay for how infrequent it is and considering forcing other events does
it too
🆑
admin: Changing shuttle events now alerts admins
/🆑
Thanks to @ Rex9001 for calling it out
* [NO-GBP] Changing shuttle events now alerts admins
---------
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
* made the bee a basic insect (#76971)
## About The Pull Request
the bee now a baisc insect he will now go to find his home and he will
go and pollinated the plants and helped the queen make children by
polliniting the plants and he will. the queen will leve the hive more
rarely than the normal bees so she can stay in the hive to make kids
## Why It's Good For The Game
the bee now is a basic insect so it means he have a better ai
## Changelog
🆑
balance: the bee now can fly over the machines so its easy for him to go
to the hydroponics machine
fix: player bees now will not be stuck inside the hive if he entered it,
they can now leave it
fix: fixed a har deleted when the hive is deleted all the bees still
have a refence to the hive now its fixed
fix: now when a player interacted with the bee hive the bees will now
leave the hive to defend the hive (it was glitched)
refactor: the bees now are a basic insect.
/🆑
* made the bee a basic insect
* Merge conflict
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Fix APC related issues (#77005)
## About The Pull Request
Fixes a bunch of stuff broken by #76822, including APC control console,
malf blackout ability, shunted malf pinpointing, Admin APC recharge and
others.
## Why It's Good For The Game
Yes.
## Changelog
:cl:Thebleh
fix: Fixed several APC related issues.
/🆑
* Fix APC related issues
---------
Co-authored-by: thebleh <43266738+rdragan@users.noreply.github.com>
* [MDB IGNORE] Angled Lights & Lighting Prototyping Tool (#74365)
## About The Pull Request
Hello friends, I've been on a bit of a lighting kick recently, and I
decided I clearly do not have enough things to work on as it is.
This pr adds angle support to static lights, and a concepting/debug tool
for playing with lights on a map.
Let's start from first principles yeah?
### Why Angled Lights?
Mappers, since they can't actually see a light's effect in editor, tend
to go off gut.
That gut is based more off what "makes sense" then how things actually
work
This means they'll overplace light sources, and also they tend to treat
lights, particularly light "bars" (the bigger ones) as directional.
So you'll have two lights on either sides of a pillar, lights inside a
room with lights outside pointing out, etc.

This has annoying side effects. A lot of our map is overlit, to the
point that knocking out a light does.... pretty much nothing.
I find this sad, and would like to work to prevent it. I think dark and
dim, while it does not suit the normal game, is amazing for vibes, and I
want it to be easier to see that.
Angled lights bring how lights work more in line with how mappers expect
lights work, and avoids bleedover into rooms that shouldn't be bled
into, working towards that goal of mine.
### How Angled Lights?
This is more complex then you'd first think so we'll go step by step

Oh before we start, some catchup from the last time I touched lighting
code.
Instead of doing a lighting falloff calculation for each lighting corner
(a block that represents the resolution of our lights) in view we
instead generate cached lightsheets. These precalculate and store all
possible falloffs for x and y distances from a source.
This is very useful for angle work, since it makes it almost totally
free.
Atoms get 2 new values. light_angle and light_dir
Light angle is the angle the light uses, and light_dir is a cardinal
direction it displays in
We take these values, and inside sheetbuilding do some optional angle
work. getting the center angle, the angle of a pair of coords, and then
the delta between them.
This is then multiplied against the standard falloff formula, and job
done.
We do need some extra fenangling to make this all work nicely tho.
We currently use a pixel turf var stored on the light source to do
distance calculations.
This is the turf we pretend the light source is on for visuals, most
often used to make wall lights work nice.
The trouble is it's not very granular, and doesn't always have the
effect you might want.
So, instead of generating and storing a pixel turf to do our distance
calculations against, we store x and y offset variables.
We use them to expand our working range and sheet size to ensure things
visually make sense, and then offset any positions by them.
I've added a way for sources to have opinions on their offsets too, and
am using them for wall lights.
This ensures the angle calculations don't make the wall behind a light
fulldark, which would be silly.
### Debug Tool?
In the interest of helping with that core problem, lights being complex
to display, I've added a prototyping tool to the game.
It's locked behind mapping verbs, and works about like this.
Once the verb is activated, it iterates over all the sources in the
world (except turfs because those are kinda silly), outlining and
"freezing" them, preventing any future changes.
Then, it adds 3 buttons to the owners of a light source.

The first button toggles the light on and off, as desired.
The third allows you to move the source around, with a little targeting
icon replacing your mouse
The second tho, that's more interesting.
The second button opens a debug menu for that light

There's a lot here, let's go through it.
Bit on the left is a list of templates, which allow you to sample
existing light types (No I have no idea why the background is fullwhite,
need to work on that pre merge)
You can choose one by clicking it, and hitting the upload button.
This replaces your existing lighting values with the template's,
alongside replacing its icon and icon state so it looks right.
There are three types as of now, mostly for categorization. Bar, which
are the larger typically stronger lights, Bulb, which are well, bulbs,
and Misc which could be expanded, but currently just contains floor
lights.
Alongside that you can manually edit the power, range, color and angle
of the focused light.
I also have support for changing the direction of the light source,
since anything that uses directional lighting would also tie light dir
to it.
This isn't *always* done tho, so I should maybe find a way to edit light
dir too.
My hope is this tool will allow for better concepting of a room's
lights, and easier changing of individual object's light values to suit
the right visuals.
### Lemon No Why What
Ok so I applied angle lights to bars and bulbs, which means I am
changing the lighting of pretty much every map in the codebase.
I'm gonna uh, go check my work.
Alongside this I intend to give lighting some depth. So if there's room
to make a space warmer, or highlight light colors from other sources, I
will do that.
(Images as examples)

I also want to work on that other goal of mine, making breaking lights
matter. So I'll be doing what I can to ensure you only need to break one
light to make a meaningful change in the scene.
This is semi complicated by one light source not ever actually reaching
fullbright on its own, but we do what we must because we can.

I'm as I hope you know biased towards darker spaces, I think contrast
has vibes.
In particular I do not think strong lights really suit maintenance.
Most of what is used there are bulbs, so I'm planning on replacing most
uses with low power bulbs, to keep light impacts to rooms, alongside
reducing the amount of lights placed in the main tunnels

**If you take issue with this methodology please do so NOW**, I don't
want to have to do another pass over things.
Oh also I'm saving station maps for last since ruins are less likely to
get touched in mapping march and all.
### Misc + Finishing Thoughts
Light templates support mirroring vars off typepaths using a subtype,
which means all the templates added here do not require updating if the
source type changes somehow. I'd like to expand the template list at
some point, perhaps in future.
I've opened this as a draft to make my intentions to make my changes to
lights known, and to serve as motivation for all the map changes I need
to do.
### Farish Future
I'm unhappy with how we currently configure lights. I would like a
system that more directly matches the idea of drawing falloff curves,
along with allowing for different falloffs for different colors,
alongside extending the idea to angle falloff.
This would make out of engine lighting easier, allow for nicer looking
lights (red to pink, blue to purple, etc), and improve accessibility by
artists.
This is slightly far off, because I have other obligations and it's
kinda complicated, but I'd like to mention it cause it's one of my many
pipedreams.
## Changelog
🆑
add: Added angle lighting, applies it to most wall lights!
add: Adds a lighting prototyping tool, mappers go try it out (it's
locked behind the mapping verb)
/🆑
---------
Co-authored-by: MMMiracles <lolaccount1@ hotmail.com>
* [MDB IGNORE] Angled Lights & Lighting Prototyping Tool
* Update north_star.dmm
* Revert "Update north_star.dmm"
This reverts commit bb5b8b5a549f7edc3e23a369a147ed96bab41991.
* Updatepaths
* Update nukie_base.dmm
* Newer version of northstar with the penguins
* Update northstar_cryo.dmm
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: MMMiracles <lolaccount1@ hotmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types
* Resolve merge conflicts
* Modular adjustments
* destroy this double return on destroy
---------
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
* Refactors mind language holders into non-existent, fixes new languages being deleted on species swap + tests
* Fixing merge conflicts
* don't forget to ctrl+s!
* Another forgotten file
* urgh
* gets rid of vestiges of update_atom_languages()
and mind language holders
* No longer needed
* Fixes some modular grant_language calls
* Deprecated code
* This was up here before..
* Fixes failing unit tests, refactors silverscale lizards language a bit removing the need for skyrat edits
Removes some no longer needed code
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
* Refactors bardrone area based godmode into an element (#76619)
Let's this be used for more than just bardrones and for more than just
the exit shuttle in the future
* Refactors bardrone area based godmode into an element
---------
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
* [NO GBP] Music Request Credits changed to CKEY (#76751)
## About The Pull Request
I was requested by one of the game admins over in the TG discord to
change the credit from character name to ckey.
## Why It's Good For The Game
It's mostly a OOC thing, personally I don't know of a good enough reason
to put here other than its a PR someone requested of me.
## Changelog
🆑
fix: Music Request Credit shows CKEY instead of character name
/🆑
* [NO GBP] Music Request Credits changed to CKEY
---------
Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com>
* Fixes organ/implant manipulator creating implants in the void when failing to insert (#76602)
## About The Pull Request
When using the organ manipulator, implants that fail implant() would
still be created and be left out of the implantee.
Now, implants that fail insertion will self-delete and notify the menu
operator. This functionality has been extended to organs as well,
although I don't know of any cases where they could fail insertion.
I also touched up on the variable names while I was here, because they
needed a face-lift.
## Why It's Good For The Game
Prevents edge cases that could lead to orphaned implants or organs.
More readable code is neat too.
## Changelog
🆑 Rhials
fix: The organ manipulator menu will now delete implants or organs that
fail to properly insert.
code: The organ manipulator menu code now looks nicer :)
/🆑
* Fixes organ/implant manipulator creating implants in the void when failing to insert
---------
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
* Don't do eligibility checks for debug spawn crew (#76374)
## About The Pull Request
Fixes#76372
Just Don't do eligibility checks for assigning the roles to the debug
crew.
## Changelog
🆑 Melbert
fix: Fix Debug verb "Spawn full crew"
/🆑
* Don't do eligibility checks for debug spawn crew
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
* service borg cookin fixin update (#76590)
## About The Pull Request
PR done for bounty:
https://tgstation13.org/phpBB/viewtopic.php?f=5&t=33988
borgs can now turn on stoves and griddles
borg click code has been reworked a bit to be closer to base mob, you
are now able to click on stuff within reach rather than just Adjacent
(might be buggy to introduce this? hopefully not. if anything we can
testmerge this), which lets us make the apparatus work to pick up stoves
on the range and such
Adds the Codex Cibus Mechanicus as an upgrade you can research in RnD
with the other service borg ones. When you use it it shows you the
cooking menu!

## Why It's Good For The Game
The service borg has the tools to prepare ingredients, but it can't
actually do anything with them, which severely limits it, only being
able to do slapcrafted foods.
The apparatus not working on items that are on top of stoves/griddles
seems to be just a bug with how cyborg click code is handled.
## Changelog
🆑 Fikou
fix: service borg apparatus now works on stoves and griddles and ovens
qol: borgs can now activate stoves and griddles
add: rnd can research a cookbook for service borgs
/🆑
* service borg cookin fixin update
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* Request Internet Sound Optional Credit User (#76453)
## About The Pull Request
What this PR does is it adds a small additional feature to the Request
Internet Sound verb to give users who request music an option to credit
themselves for the song request. It will use character name of the
person who submits the request, with the option to be anonymous. The
default will make users anonymous.
## Why It's Good For The Game
This differentiates songs that where requested by users and songs that
admins themselves played. And allows users to give themselves credit for
their 'Good' (or bad) music preferences.
<details>
<summary>Screenshot</summary>

</details>
## Changelog
🆑
qol: Request Internet Sound now has the option to credit the person who
requested the Sound. Defaults to anonymous.
/🆑
* Request Internet Sound Optional Credit User
---------
Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Petrify Smite (#75538)
## About The Pull Request
adds a smite to petrify someone forever, works like the wizard spell.
Adds support to make petrification brainless.
Creates a var to remove those annoying "you can not move while buckled
to X" messages for abstract items like statues.
## Why It's Good For The Game
Smite good. Message spam bad.
## Changelog
🆑 itseasytosee
spellcheck: You should see a lot less "you can not move while bucked too
X" messages where they don't make sense.
admin: Added a petrify smite. Try it out on your least favorite player!
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Petrify Smite
---------
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* [s] Require affirmative input from the admin to run sdql2 verbs (#76276)
Powerful or dangerous admin verbs should have some prompt or forced
runtime input to lower the attack surface once somebody finds a href
exploit since topics can trigger commands and verbs.
* [s] Require affirmative input from the admin to run sdql2 verbs
---------
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Always contracts lists when VVing GLOB (#76091)
## About The Pull Request
This takes render times from like 20 seconds to maybe 2 Most of the time
appears to be clientside rn, so the best we could do further would be
reducing the amount of shit that actually needs to render
So like, removing the E C M buttons (or at least adding a toggle to
render them), that sort of thing
## Why It's Good For The Game
A glob vv you can actually use

## Changelog
🆑
admin: VV for global vars will now load MUCH faster, in exchange lists
are now perma contracted in that particular pane
/🆑
* Always contracts lists when VVing GLOB
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>