* Saves some free lag by removing some in area (in world) loops (#80644)
## About The Pull Request
Goes through and changes some `in area` / `in a` loops to use
`get_contained_turfs` to cut down on `in_world` loops. Saves some free
lag.
## Changelog
🆑 Melbert
fix: Some things which affect everything in an area are less laggy, the
"all lights are broken" station trait especially
/🆑
* Saves some free lag by removing some in area (in world) loops
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Map export admin verb/buildmode (#80326)
## About The Pull Request
The base for the PR was taken from
https://github.com/shiptest-ss13/Shiptest/pull/206 and thank them for
that.
The point of this verb is to save pieces of the map to your computer for
further use. It's not that necessary, but rarely, it can be useful.
[Video](https://i.imgur.com/M6mdDTC.mp4)
## Why It's Good For The Game
Transferring buildings from one round to another, preserving the decor
made in the game.
## Changelog
🆑 Vishenka0704
admin: The ability to export a part(or z-level) of the map has been
added.
/🆑
* Map export admin verb/buildmode
---------
Co-authored-by: Yaroslav Nurkov <78199449+AnywayFarus@users.noreply.github.com>
* PDA update (Messenger works while dead, Microwave works, etc). (#80069)
This is an update that touches many more things all at once (compared to
my other PRs) meant to make PDAs in general feel more consistent and not
take away from one of the experiences we want to encourage: interaction
between players.
1. Replaced all checks of a 'pda' with a 'modular pc'. This means
technically (though not done in-game currently) other modpcs can hold an
uplink, and microwaves can charge laptops.
2. Speaking of microwave, they now don't break and require
deconstruction if the cell is removed mid-charge.
3. When a Mod PC is out of power, it will now allow the Messenger to
work (which now also doesn't consume any additional power), if the app
exists on the PC. Here's a video demonstration
https://github.com/tgstation/tgstation/assets/53777086/7ae12f81-a271-49b8-95fa-2ba54d2e2d1f
4. Flashlights can't be turned on while the cell is dead
5. I replaced a bunch of program vars with ``program_flags`` and renamed
``usage_flags`` to ``can_run_on_flags``.
6. Added a debug modPC that has every app installed by default. Mafia
had some issues in the past that were unknown because Mafia wasn't
preinstalled with any tablet so was never in create & destroy nor in any
other unit test. This was just an easy solution I had, but PDAs should
get more in-depth unit tests in the future for running apps n stuff- I
just wanted to make sure no other apps were broken/harddeling.
Currently when a PDA dies, its only use is to reply to PDA messages sent
to you, since you can still reply to them. Instead of just fixing it and
telling players to cope, I thought it would be nice to allow PDA
Messenger to still work, as it is a vital app.
You can call it some emergency power mode or whatever, I don't really
mind the reason behind why it is this way.
When I made cells used more on PDAs, my main goal was to encourage
upgrading your PDA and/or limiting how many apps you use at once, I did
not want this to hit on players who use it as a form of interaction.
This is the best of both worlds, I think.
The rest of the changes is just for modularity, if some downstream wants
to add tablets, phone computers, or whatever the hell else, they can
still get just as far as PDAs should be able to get to, hopefully.
🆑
add: PDAs with a dead power cell are now limited to using their
Messenger app.
fix: Microwaves now stop charging PDAs if the cell was removed
mid-charge.
fix: Microwaves can now charge laptops.
fix: PDA Flashlights can't be turned on while the PDA is dead.
fix: You can now hold a laptop up to a camera (if it has a notekeeper
app installed) like PDAs already could.
/🆑
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* ok
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Color matrix defines for filters and identity (#80320)
This PR converts the procs `color_matrix_identity`,
`color_matrix_lightness` and `color_matrix_contrast` into
defines/macros. Also adds in defines for common color matrix filters.
I don't like how `color_matrix_identity` is a one-line proc with no arg.
Also these help people identify the sort of color matrix filter is being
used.
* Color matrix defines for filters and identity
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Admin server announcement uses new announcement span (#80403)
## About The Pull Request
The current admin announce is just notice span text, which is easily
missed mixed in with all the other white noise of the chat box.
Currently admins have to fill it with linebreaks or manually add their
own spans to increase visibility.
This updates the admin announcement proc to use the new alert box divs,
similar to other announcements, making it more visible.
## Why It's Good For The Game
Admin server-wide announcements are generally things you want the
players to notice

## Changelog
🆑 LT3
admin: Server wide admin announcements now use an alert box like other
announcements
/🆑
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
* Admin server announcement uses new announcement span
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
* SDQL2 Query doesn't automatically bake in `span_admin()` (#80221)
## About The Pull Request

this shit is UGLY to see in Discord, let's not automatically bake in
`span_admin()` every time we send this stuff out and only use it in the
context where it matters (sending the message results `to_chat()` to an
admin who is actually in the game)
## Changelog
irrelevant
* SDQL2 Query doesn't automatically bake in `span_admin()`
---------
Co-authored-by: san7890 <the@san7890.com>
* Refactors Object Possession into a Component (moar modular, less `/mob` vars) (#80160)
## About The Pull Request
We have two verbs that allow any given mob to take control of an object
and move it ephemerally, `/proc/possess()` and `/proc/release()`. These
ones leveraged two vars present on every `/mob`: `name_archive` and
`control_object`. I don't like having vars clog up my VV and this just
injected snowflake behavior in a lot of spots - let's just make it a
component that'll clean everything else up.
This also opens up the ability to have more objects be under mob control
without giving someone verbs that spit out to the blackbox as an admin
verb + logs + message admins but that's a later thing. This just subs in
the behavior in a nice way.
Also, since it's a component, I added a small QoL that we can support
now: A screen alert that allows you to get out of the possession early
without navigating the stat panel for the specific verb. I think it's
neat. You can also trigger the aghost keybind if that's something you
want as well.
Also also, nothing actually ever cleaned up `control_object` by setting
it to null. This means that in the old framework, if a mob got qdelled
during a possession, that would have triggered a hung ref harddel. That
won't happen anymore.
## Why It's Good For The Game
Two less variables taking up crud space in the VSC debugger + view
variables panel. Better behavior injection that is far more reusable.
Component handling this behavior allows for better extensibility of this
function in the future.

## Changelog
🆑
admin: Object Possession has been reworked, please report any potential
bugs.
qol: Object Possession should now throw a screen alert for you to
unpossess the object instead of you having to search the stat-panel for
the "release obj" verb. You can still use the verb but it's a lot nicer
now. Aghosting will also work now.
/🆑
* Refactors Object Possession into a Component (moar modular, less `/mob` vars)
* Refactor hydra quirk
The name_archive var is gone, let's store it in the quirk instead
---------
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Turns the "Admin Permission Elevation Notification" into a macro (#80149)
## About The Pull Request
Turns this boilerplate message into a centralized macro because this
code is important, but not so important that every coder know the nitty
gritty details of it. In case someone wants to add more logging/handling
(or update the message), there's now a central macro to update for all
nine events in which we check.
This shouldn't break anything because it's the exact same thing we were
doing previously and the early return checks are still all there, but it
does work on my machine regardless ✔️

* Turns the "Admin Permission Elevation Notification" into a macro
---------
Co-authored-by: san7890 <the@san7890.com>
* Reworks `invisimin` variable to a trait (#80121)
## About The Pull Request
This was a variable that existed on the `/mob` level despite only ever
being altered in one place. Perfect to just make a trait since it's all
managed in one spot anyways (and no other code is really reliant on this
flag being flipped, it's just for the code to know to add/remove
invisimin status).
I also tweaked some messages so they could be more consistent, lmk if
that should be changed
## Why It's Good For The Game
Less not-useful stuff to scroll through in View Variables, better
scoping of a variable to an intended location.
## Changelog
Not necessary
* Reworks `invisimin` variable to a trait
---------
Co-authored-by: san7890 <the@san7890.com>
* Moves the new "Turn Target into MMI" verb into a VV dropdown option and rewrites the code around it. (#80097)
## About The Pull Request
Removes the Turn Target into MMI verb and re-adds it as a VV dropdown
option.
Rewrites the code around this to support what is effectively an
admin-forced action, which MMI code previously didn't support cleanly.
## Why It's Good For The Game
#79896 added a new debug verb, unfortunately because of how that debug
verb was defined (it has args for a target mob in the proc params) it
automatically gets added to the right click context menu instead...

Which is not ideal for admins as they're one misclick away from just
deleting a mob.
This moves it to the VV dropdown menu for humans and rewrites the code
behind it, which previously relied on the MMI attackby proc which
expects a user and thus has side effects as a result.
This new code is more suited to an admin force-insertion than the old
code which removed the brain and forced the now brainless mob to insert
its former brain into the MMI (with the potential to fail on user input
for the now brainless mob).

## Changelog
🆑
admin: Removed the "Turn Target into MMI" right click context menu verb
entirely, and instead added the same command as a VV dropdown on human
mobs.
/🆑
* Moves the new "Turn Target into MMI" verb into a VV dropdown option and rewrites the code around it.
---------
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Bumps compile to 515 (#79134)
## About The Pull Request
LSP supports it, let's GOOOOOO
I've removed the 515 tests since they're stable, alongside the libcall
wrapper. left the rustgcall wrapper cause yaknow memes
Just removed all the 515 and 514 particular define wrappers. gaming
## Changelog
🆑
server: Minimum compile version has been bumped to 515. clients still
support 514 but we're gonna start using 515 restricted features for
serverside now.
/🆑
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
* Bumps compile to 515
* Fixes a TGS regression in its API
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Fix bug where MMI's cannot open doors (#79896)
## About The Pull Request
While #69556 did fix it for posi brains. it did not account for MMI's
meaning only posi brains got fixed
as a bonus, im throwing in a shitty debug command because MMI's put all
there logic in attackby
## Why It's Good For The Game
bugs bad
## Changelog
🆑
admin: A new debug verb to turn yourself into an MMI(almost the funniest
thing)
fix: MMI's inside mechs can now properly open doors like there posibrain
counterparts
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Fix bug where MMI's cannot open doors
---------
Co-authored-by: Autisem <36102060+Autisem@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* turns triple ai mode into a station trait (#79995)
## About The Pull Request
removes the triple ai mode secret and makes it into a station trait
## Why It's Good For The Game
it seems to be an interesting way to spice up the gameplay of a given
round
## Changelog
🆑
add: turns triple ai mode into a station trait
/🆑
* turns triple ai mode into a station trait
* Set the weight to 0
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com>
* Fixes secrets panel disease outbreak button (#79946)
## About The Pull Request
Fixes https://github.com/tgstation/tgstation/issues/79866
Hadn't been updated to the new system where candidates are found during
round event setup. Changes the failure message for clarity on why it
fails, and sends a message to admins same as a successful outbreak.
## Changelog
🆑 LT3
fix: Disease outbreak: classic spawned from the admin secrets panel no
longer fails to start
fix: Disease outbreak provides a message about why it fails to start
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Fixes secrets panel disease outbreak button
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Removes some code soul (`IF YOU ARE COPY PASTING THIS...`), replaces it with a macro (#79935)
## About The Pull Request
Replaces all instances of `SSblackbox.record_feedback\("tally",
"admin_verb", 1, (.+)\)` with `BLACKBOX_LOG_ADMIN_VERB($1)`
This makes so the funny comment isn't necessary.
It also reveals one location which someone did not heed the comment, the
`debug_controller` proc copy+pasted the line but did not change the
fourth argument. PEOPLE DON'T READ!
* Removes some code soul (`IF YOU ARE COPY PASTING THIS...`), replaces it with a macro
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Reworks transformation sting to be temporarily in living mobs, forever in dead mobs
* Modular updates
* Recaches the icons generated in the `changeling` unit test
* Pain
* More tweaks
* Disable unit test
* Let's see if we can pass test temporarily
* Makes transformation sting unobtainable more cleanly
* Unit test
* Cursed proc
* Kill the unholy copy pasta
Seriously this stuff is just awful. This is not maintainable.
* test this
* Update comments
* Fixing the screenshot test, maybe?
* grrr
* Update changeling.dm
* Attempt to fix this nonsense
* Update changeling.dm
* Update changeling.dm
* Update changeling.dm
* Update dna.dm
* Fixes it?
* Screenshot test
* Update _traits.dm
* Update _traits.dm
* Fix this
* Update dna.dm
* Update dna.dm
* Hmm
* This proc needs a new name
* I want to scream but I have no mutant parts
* Fix
* Update species.dm
* Update species.dm
* Update species.dm
* Update species.dm
* Some touch ups
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Jolly <70232195+Jolly-66@users.noreply.github.com>
* Puts all traits in the globalvars file + CI Testing (#79642)
Fixes#76349
I didn't know that people needed to add any new traits to a global list
so they can be easily read in View Variables, and was pretty shocked to
find out many other people didn't know it was a thing. Let's make it a
thing by testing it using a new CI Python Linter to check this. But oh
no-

There were about 200+ missing traits. Alright, so let's do the
following:
* Move trait defines to their own dedicated folder in the `_DEFINES`
folder.
* Split up the traits mega-file into different files, for better
organization. One for the macros, one for the sources, and a few for the
"trait declarations"
* Run the linter a load of times and add everything to the globalvars
file, removing anything that's no longer used and figuring out where the
best categorization of it is. also minor code improvements. also rename
all of the ones that look weird. also fix list indentations
* Also alphabetize the lists because it's easy
* Move everything to a new `traits_by_type` list, while keeping the
admin one the way it is for the time being while we figure out a better
way to show that list to admins.
* Profit
Mapping trait injectors will now work for any type of trait. You
shouldn't add any trait via this injector though, but you're no longer
limited to coders remembering to add it to that critical list you
needed.
Lays the framework for a better view variables experience. This work is
too lengthy to presently do, but hopefully we can get this done sooner
rather than later. we will need a code-accessible way to view these
traits for such a framework to be implemented, so let's just do that.
Future steps are to break down the mega-declarations file into a folder
full of separate files by typepath, but that requires a lot of auditing.
Does need to happen one day though, there's a lot of mob traits mingled
with datum traits and auuugh we gotta do this later this PR is already
massive.
there's probably ways to game this but this catches _my_ mistakes so
good luck to everyone else (it should work for 99% of everyone)
Nothing applicable to players. However, to mappers, the mapping trait
injector should always be able to add any kind of trait (which is rather
good for the times when you need it).
* Update tgstation.dme
* Update _traits.dm
* Comment these out for now
---------
Co-authored-by: san7890 <the@san7890.com>
* Adds an admin button to send nuke ops reinforcements (#79695)
## About The Pull Request
Often times I want to send a second wave of nukies if the first wave
completely flukes, but sending reinforcements is hard (I don't want to
trigger a whole new nuke team, the Infiltrator is deployed to NT space,
etc).
So I add a button to check-antagonists that allow admins to one-click
send more nuke ops.

I also took the opportunity to polish up the other admin button,
particularly giving a reminder if it's being forced under the pop limit.
## Changelog
🆑 Melbert
admin: Adds a button to check-antagonists that allows admins to send
Nuke Op reinforcements with a single button
admin: Nuke Ops check antagonists now show you full war status (declared
/ not declared)
fix: Fixes multiple nuke teams (or an admin) being able to declare war
at once
/🆑
* Adds an admin button to send nuke ops reinforcements
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fix admins without `R_POLL` getting (an unusable) poll verb (#79461)
## About The Pull Request
Copy paste error, I assume.
`admin_verbs_poll` only contains `/client/proc/poll_panel` which
requires `R_POLL` to use.
## Changelog
🆑 Melbert
admin: Admins without `R_POLL` no longer have access to "Server Poll
Management", not that they could have used it anyways.
/🆑
* Fix admins without `R_POLL` getting (an unusable) poll verb
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes vv of things in lists (#79282)
I forgot name could be a number for list indexes, so this switches to
using `in` instead.
Also improves the error message a little bit so reported issues can at
least say *something* about the value throwing an error.
fixes#79280fixes#79264
* Fixes vv of things in lists
---------
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* Precalculates special list var names and avoids incorrect vv targets (#79154)
## About The Pull Request
This adds a global list to precalculate lists that need to be handled
special by vv instead of manually updating such a list. @ LemonInTheDark
brought up a potential issue with handling all lists in the way special
lists are handled, that modifying a list in vv can in some cases result
in the wrong list being opened for editing. This makes only special
lists have the issue instead of blindly accessing all lists the same
way.
* Precalculates special list var names and avoids incorrect vv targets
---------
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* Updates signaler investigate code | Adds some nice QOL changes for signalers | Enforces cooldown on signaler circuitry (#78974)
## About The Pull Request
See title.
If someone was abusing signalers previously to cause server lag, going
into list signalers would actually cause even worse lag as byond sat
there and processed thousands of items into a string over and over,
which would cause string format operations on longer and longer strings,
resulting in more and more overhead. This is bad.
So instead there is now a limit to the size of the list, currently I
have that set to 500 although I am open to increasing and even reducing
the number.
I have also made signalers slightly more intuitive by having the
cooldown actually displayed in the ui as a tooltip instead of just being
a secret feature you didnt know about unless you code dived. Also made
the cooldown actually respected by things such as circuitry where it
didnt even implement the cooldown and would happily send as many signals
as you had items connected to your proximity circuit.
## Why It's Good For The Game
Admins won't accidentally kill the server by trying to parse a lag
machines signal list. Players lagging the server? No, how about the
admins trying to fix it!
## Changelog
🆑
qol: signalers now tell you their cooldown and also use balloon alerts
/🆑
* Updates signaler investigate code | Adds some nice QOL changes for signalers | Enforces cooldown on signaler circuitry
---------
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
* Expands the SS13.lua module by adding loop helpers and functions to get the script runner. (#79081)
## About The Pull Request
`SS13.get_runner_client()` and `SS13.get_runner_ckey` will return the
client and the ckey respectively of the user who ran the lua script. Can
be unreliable after the first sleep or yield.
The SS13 module can now be made local as the tables that need to be
accessed globally have been moved to their own global variables.
Added `SS13.start_loop(time, amount, func)`, `SS13.end_loop(id)`,
`SS13.stop_all_loops()` that allow lua scripts to more easily make
loops. Removed the `timer` parameter from these functions, which
specified the timer subsystem to use.
Documentation on all new added functions have been added in the
lua/README.md
## Why It's Good For The Game
Getting the client who ran the script and the ckey that ran the script
is useful for self contained scripts that are looking for an entrypoint
(e.g. location to spawn some item/mob/structure). `dm.usr` is a special
variable used for other purposes and can be unreliable when used this
way even if there haven't been any sleeps or yields yet, so having a
dedicated variable and function to handle it makes things easier.
Being able to make the SS13 module local allows for more self-contained
scripts. Although this isn't super helpful because `require` will still
load the same object for all lua scripts loaded on the same state.
Basic looping helpers allow for lua scripts to more easily create loops
without needing to recursively do a `set_timeout` or to do a
`while(true) do SS13.wait(1) end` loop.
## Changelog
🆑
admin: Added SS13.get_runner_ckey() and SS13.get_runner_client() which
stores the ckey and returns the client of the user who ran the lua
script. Can be unreliable if accessed after sleeping.
admin: Added timer loop helpers to the SS13.lua module, check the docs
admin: The SS13.lua module can now be made local without causing any
errors.
/🆑
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Expands the SS13.lua module by adding loop helpers and functions to get the script runner.
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Invisibility refactor (#78908)
This adds a tracker for sources of invisibility and a priority system. I
needed this for another thing so I'm doing this first since it touches a
lot of code. As for the bugs fixed in the changelog, it's only what I
noticed while going through everything and there's likely a few more
things fixed with this. This should be testmerged for a while, I'll
bring this out of draft when it feels safe.
🆑
admin: Invisimin can now be used on mobs that are already invisible,
whether through temporary or permanent effects.
fix: Monkeyize/Humanize mob transformations no longer permanently reveal
invisible mobs if they had effects making them invisible otherwise.
fix: Objects with the undertile element that have been made invisible
through other means are no longer revealed by being uncovered.
/🆑
* Invisibility refactor
---------
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* VV Upgrades (#78948)
## About The Pull Request
* Makes special byond lists display properly
* Makes images get a preview in the header
* Makes filters display properly
* Make variable value display a bit more robust to errors
* Kills single char vars
## Changelog
🆑
admin: VV can now display the contents of special byond lists like
filters, or client.images
admin: VV on images now displays the image in the header
admin: VV can now display filters and includes their type
/🆑
* VV Upgrades
---------
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* Fixes passing in list arguments in callproc (#78924)
Right now it unrolls positional list arguments.
* Fixes passing in list arguments in callproc
---------
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
* count station food verb counts station food (#78864)
## About The Pull Request
it checked for food not on the station
## Why It's Good For The Game
bug bad
## Changelog
🆑
fix: count station food verb now counts food only onstation
/🆑
* count station food verb counts station food
---------
Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>