* 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>
* 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>
* Mafia chaplain seance can no longer be used on living people (#77070)
## About The Pull Request
Small oversight in how the use flag was checked. Also there was a
misleading code comment that I removed.
## Why It's Good For The Game
Fixes#77042
## Changelog
🆑
fix: Mafia chaplains can now only use their seances on dead people now.
/🆑
* Mafia chaplain seance can no longer be used on living people
---------
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.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>
* Maptext 2023 tweaks [NO GBP] (#76397)
## About The Pull Request
- In PR https://github.com/tgstation/tgstation/pull/76356 missed a few
bits of maptext around, such as shuttle signs and the supermatter. Small
text adjustments/fixes here.
- Large amount of feedback about the context tooltips. Increases size,
lightens default color as to not be too imposing.
🆑 LT3
qol: Context tooltip size increased
fix: Fixed remnants of old maptext code on various things
/🆑
* Maptext 2023 tweaks [NO GBP]
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Optimizes timer insertion by 80% (W QDEL_IN micro) (#76214)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->
## About The Pull Request
[Reduces timer insertion cost by
80%](https://github.com/tgstation/tgstation/commit/c9e5b285ed74e60108fddd3f6b45d6d3995c92a8)
Timer name generation involved a LOT of string shit, some in ways where
the string only existed for a moment.
This costs a good bit of time, and can be reduced with only minimal
impacts on the end product, so let's do that. Includes a compile flag to
flip it back if we ever have trouble in future.
This is about 0.1s off init, since we do a lot of timer stuff then too
[Removes STOPPABLE flag from QDEL_IN, moves it to a bespoke
macro](https://github.com/tgstation/tgstation/commit/e7a5d7f2a78fcf0dce4742ced258c9505411b202)
Its a waste most of the time, tho I would LOVE to analyze at compile
time to work out if we care
## Why It's Good For The Game
I like it when we don't spend all of our cpu time just setting the name
var on timers. that's good and not bad.
This saves time fucking everywhere. 15% off explosions, 0.1 seconds off
init, bunch of time off foam. it's just good.
Cherry picked out of #76104 since that was too cluttered (sannnnnn)
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->
<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
* Optimizes timer insertion by 80% (W QDEL_IN micro)
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Mafia update: Return to body when the game ends (#75258)
## About The Pull Request
Mafia players are now sent to their last body when the Mafia game ends,
and in the meantime they have text saying why they are dead.
They can still be revived during this period, and when the game is up
they'll be forced back into their body if alive, if they are dead then
they'll just be able to re-enter their corpse as normal.
Also since I was poking around in Mafia stuff:
- I removed mafia observing because it was unused (this previously was
used to allow ghosts to see Changeling chat).
- I fixed it being a Draw when there was one Town or Changeling left.
- I fixed the role list showing some roles multiple times
- I fixed the Chaplain not being able to use their night ability (and
therefore being completely useless)
- I added prevention to prevent Admins from causing runtimes or straight
up crashing the server, with a very real chance it can happen purely by
accident, through the Admin UI.
I'm hoping to change how this actually does the job because I find it to
be very bad coding practices, but my problem is that everyone who signs
up for Mafia is a ghost, and they are added into the game through their
CLIENTS, so we don't have access on the mafia controller or the role, to
the player's previous body or mind, without this shit.
Also adds a new mafia board icon
Made by tatax and I find it fits more the theme of Mafia than the
current one.
New UI
* Mafia update: Return to body when the game ends
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* Mafia victory and QOL Update (#74974)
## About The Pull Request
HoP is now a killing role as they theoretically can solo-kill through
voting.
Changelings also have can kill flag, even if it's useless for them, just
in-case.
Removes check_total_victory and block_team_victory from Neutrals, since
it was just snowflake code.
I instead reworked all of how victory is calculated.
Ghosts can no longer see Mafia chat, because I'd like to integrate dead
players into the round in the future, and ghosts knowing who the evils
are is lame. It's a deduction minigame, you're supposed to deduct who
the bad guys are.
### QoL stuff
- Adds maptext for voting periods so people know who you are voting for.
https://cdn.discordapp.com/attachments/326831214667235328/1097781395369246740/2023-04-18_03-09-12.mp4
- Adds a popup when someone is voted up, instead of being a big box of
text in your chat. This will help clog the chat less and make it easier
for players to understand what to do when the time comes.
https://cdn.discordapp.com/attachments/326831214667235328/1097770854005350481/2023-04-18_02-28-31.mp4
Lastly, converts Mafia panel to typescript
## Why It's Good For The Game
This should be the last of my Mafia reworks, hopefully.
This makes the game's victory calculated to ensure there's always a
chance anytime possible, while letting kingmaker scenarios exist.
Additionally, we shouldn't expect players to know how Mafia works
because we don't expect them to already have some background in Mafia
games, or have played Mafia before.
## Changelog
🆑
qol: [Mafia] Players get a popup when a player is voted to the stand.
qol: [Mafia] Players now have the name of who they voted for displayed
over their heads during voting period.
balance: [Mafia] Deadchat can no longer see Mafia chat.
balance: [Mafia] HoP can now solo-win.
/🆑
* Mafia victory and QOL Update
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* Mafia notes are no longer automatically written for you & new UI (#74819)
## About The Pull Request
Notes in Mafia are no longer written for you, you instead write it
yourself and save.
Also adds a button to automatically say out your notes for other
players.
Hides the judgment buttons when it's not time to judge
Makes the UI autoupdate and makes use of ui_data / ui_static_data
Video of it in action: https://www.youtube.com/watch?v=NDUSuIUqQv8
## Why It's Good For The Game
A downside to notes currently is that it's very easy to confirm yourself
as a role against players who don't code-dive to know exactly how notes
should be formatted for any role, this makes it easier, as everyone will
type out their own notes, and can send it directly to chat when needed.
## Changelog
🆑
balance: [Mafia] Notes are no longer written out for you.
qol: [Mafia] You can now send your notes to chat whenever.
qol: [Mafia] Roundend has changed. Solos will win over others in a 1v1,
but a HoP can keep a round going in case they can solo lynch.
/🆑
* Mafia notes are no longer automatically written for you & new UI
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* [NO GBP] Mafia fixes for some of my mafia mistakes (#74930)
## About The Pull Request
This fixes two issues with previous changes I've made to mafia workings.
The first makes the early start vote counter list properly. I
misunderstood what the FLOOR() macro did so the result would just put
out 0.
The early start vote counter now displays the higher value of either
(players signed up / 2) or (minimum players / 2). Since the minimum
playercount is 6, the it will display X/3 unless there are more than 6
players signed up.
The second change makes sure that check_start_votes() checks the mafia
signup list (as opposed to the early signup votes) to see if there are
enough players to start a game.
## Why It's Good For The Game
Fixes stupid things that I let slip in under the door.
## Changelog
🆑
fix: The mafia early vote counter will now properly display.
/🆑
* [NO GBP] Mafia fixes for some of my mafia mistakes
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Mafia rebalance and backend refactor (#74640)
## About The Pull Request
Turns all Mafia abilities into datums, instead of being a bunch of
shitcode on every single job.
This means it's easier to add new roles
Gives new names to some defines (such as the signal order, to make it
easier to tell when something is fired)
Adds support for modular Mafia jobs with their abilities being in a
certain order (Escort is now properly first).
De-snowflakes Changeling killing abilities and day voting, they're now
actions that are tallied when necessary.
Turns time vars into defines
Generalizes a lot of behavior for abilities, now all abilities can
properly undo their action at night
Fixes problems with the UI (Thoughtfeeder had 2 buttons during night and
they overlapped with names, that's been fixed).
### Behavior changes
- Doctor/Officer can now protect themselves 1 night, because it gives
them a way to protect themselves.
- Lawyer/Warden/Ect now choose their abilities at night, rather than the
day before. The suspense building up towards the end of the night is
part of the game, telling you that it happened at the very start is
quite lame (in the case of Lawyer, anyway).
- Admin setup now uses TGUI instead of html inputs.
- Cut night time by like, 5 seconds, because I found it a little long
lol.
- HoP doesn't count as votes to win until they reveal, because it makes
no sense an unrevealed HoP has their unrevealed votes tallied. I also
like those 1v1 Mayor V. Evil scenarios where dead chat goes crazy, and
hope to replicate that here.
- Mafia now needs 6 people to start instead of 4, because 4 players is
just not enough to play a Mafia round that will do anything but annoy
people.
- The game no longer ends if it's in a standoff with 1 Town, 1 Mafia,
and 1 Neutral, as you've got a kingmaker and they should decide who
wins.
### Things I want to change in the future
Every time night starts/ends, it checks the entire ``GLOB.airlocks`` for
doors with the "mafia" ID. This is stupid.
Rework ``check_victory()`` to make it make more sense, and be more fun
for players.
A visible death animation?
I want to use something similar to admin popup for messages about people
being on stand, and decluttering the UI in general
Also more use of balloon alerts instead of to chat messages for
everything.
Also also, making the UI more responsive to players. Button should be
red when a player is selected, so they know that's who they've selected,
if they want to unselect.
Are votes public when you first cast them? They shouldn't be wtf.
Can we also make the description for roles not be a to chat message? It
can just say when you hover over the '?' come on.
User-written wills instead of auto-generated, and able to send them in
chat
Add support for roleblock-immune roles
## Why It's Good For The Game
Updates a lot of old code to modern standards
Makes it considerably easier to work with Mafia and add new roles
Makes things less prone to breaking as easily.
Code also looks a lot cleaner now.
## Changelog
🆑
refactor: [Mafia] All Mafia abilities have been overhauled in the
backend, it's now much easier to understand what each role's ability can
do and how it works.
admin: [Mafia] Admin setup of Mafia is now in TGUI
balance: [Mafia] Doctors/Officers can protect themselves once per game.
Be careful around them!
fix: [Mafia] Thoughtfeeder's UI buttons at night won't overlap with
eachother.
fix: [Mafia] HoP's votes now actually matter, instead of being purely
visual.
qol: [Mafia] Lawyers, Wardens, etc. now perform their night ability at
night, instead of the day prior.
qol: [Mafia] Night time now lasts 40 seconds instead of 45.
/🆑
* Mafia rebalance and backend refactor
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* [NO GBP] Fix minigames UI not removing inactive clients (#74391)
## About The Pull Request
Fixes#74260
The UI for the basketball menu was not properly updating when clients
would disconnect. This would allow someone to signup twice leading to
silly situations as detailed in the issue report. This issue also
affected the mafia minigame due to both UIs having similar code.
The fix is simple, just check the signups when the tgui menu has
interactions and also check to make sure the signups use a boolean
instead of a client for the value part of the key/value list. Why? After
a client would disconnect, the list would change and remove the client
object since it no longer exists. The solution is to keep the ckey as a
key, but use a boolean for the value.
## Why It's Good For The Game
Less bugs, more stability.
## Changelog
🆑
fix: Fix basketball and mafia minigame UI not removing inactive clients
/🆑
---------
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
* [NO GBP] Fix minigames UI not removing inactive clients
---------
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
* Fixes the basketball and thunderdome baseturf issue. (#74461)
## About The Pull Request
Simply modifies the should_place_on_top value on these maps templates so
that they overwrite their baseturfs rather that creating an evergrowing
stack. I've also done the same for Mafia and CTF which should also not
be creating stacked baseturfs.
Fixes#69711
Should fix#74443 too since its the same issue.
## Why It's Good For The Game
Bugfix good.
## Changelog
🆑
fix: Basketball and Thunderdome maps should not load with broken turfs
are several resets of their maps.
/🆑
* Fixes the basketball and thunderdome baseturf issue.
---------
Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
* Mafia games can now be voted on to start early, forced to start early by admins (#74256)
## About The Pull Request
**DISCLAIMER:** Mafia, being a 12-player game, is very very difficult to
debug. I've tested everything here to the extent that I can as one
person, but this might need some really careful inspection.
This PR adds a new option to the mafia minigame menu, which lets
signed-up players vote to start the game early. If there are more than
three players signed up, and at least half of them are voting to start,
the round will start. Admins also have the option to force a mafia round
to start in the admin options panel.
When a round is forcibly started, a random non-standard role setup is
created. Unlike the normal setup parameters, which assume you have
twelve players and attempts to fill out certain role types as a result,
this one uses pools based on role alignment. If you start with eight
players, you just might end up with four wardens, two thoughtfeeders,
and double clowns.
Every 3rd player is chosen as a random mafia member. The 5th and 6th
roles are neutral disruptive and a random neutral role respectively.
Everyone else is a random townie.
I believe this formula is sufficient to create a playable experience
with 5+ players. It can't start at any less than three, as the game
would auto-resolve instantly. The setup won't be pretty, but it's better
than no mafia game at all.
## Why It's Good For The Game
Now you can play mafia without the strict 12-player requirement! Gives
some opportunity for players to get acquainted with roles, the gameplay,
and the mafia panel in a lower-seriousness environment than a standard
12-man game.
If the ratio of early start voters required to start needs adjusting,
that can be done.
## Changelog
🆑 Rhials
add: You can now vote to start a Mafia game early. If over half of the
current signups vote (And you have three or more players) you will
immediately start a game with a slightly adjusted set of roles.
admin: You can now force a mafia game to start in the admin options
panel.
/🆑
* Mafia games can now be voted on to start early, forced to start early by admins
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* adds atmospheric gloves, small resprite of firefighter gear, repaths stupid glove paths (#72736)
repaths a lot of gloves off /color because they were incredibly stupid
firefighter gear has gotten an update (it doesnt cover hands anymore
though, you need something else)
firefighter helmets no longer hide your mask or glasses

fixed engine goggles starting with darkness vision
to the atmos lockers adds atmospheric gloves, a pair of thick (chunky
fingers) gloves that are fireproof and fire protective, slightly shock
resistant and let you fireman carry people faster.
atmospheric firefighter helmets now are a subtype of welding hardhats,
you can enable a welding visor.
welding hardhats change mode with right click instead of altclick
im not a good spriter but i think this resprite makes them fit nicer
with other engi equipment
lets me firefighter rp
🆑
add: Atmospheric Gloves, thick gloves that are fully fireproof and fire
protective and let you fireman carry people faster.
fix: fixes engine goggles starting with darkness vision
qol: firefighter helmets can now enable a welding visor
qol: welding hardhats change mode with right click instead of altclick
balance: firesuits no longer protect your hands
/🆑
* Makes shit compile
* Updates the digi and snouted stuff to match the new sprites (thanks Halcyon!)
* Fixes a whole ton more issues that popped up
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Strays away from GLOB.machines when possible (#71100)
## About The Pull Request
This replaces needless GLOB.machines with more precise lists whenever
one existed, plus adding a new one for CTF machines.
## Why It's Good For The Game
GLOB.machines holds every single /obj/machinery in the game, so checking
the whole list for stuff is pretty big. This aims to cut that down by
using smaller lists whenever possible. I also gave CTF a new list
because it checked machines very often.
## Changelog
Nothing player facing.
* Strays away from GLOB.machines when possible
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* Fixes runtime preventing mafia from starting if a player disconnects during signup. (#70513)
* Fixes runtime preventing mafia from starting if a player disconnects during signup.
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
* [MDB IGNORE] More /area/ typepath organization and cleanup (#67107)
This further continues what I did in b4fb8f3ed1 (but instead of just stations, its now every (most) applicable area in the game
* [MDB IGNORE] More /area/ typepath organization and cleanup
* wew
* e
* Update CentCom_skyrat.dmm
* wew
* ews
Co-authored-by: Jolly <70232195+Jolly-66@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* OpenDream Cleanup Pass (#67036)
OpenDream can detect BYONDisms that BYOND or SpacemanDMM miss. This PR fixes all of the issues it found in TG. Each change is explained in code comments below.
* OpenDream Cleanup Pass
Co-authored-by: ike709 <ike709@users.noreply.github.com>
* [MDB IGNORE] You can have your cake and eat it too. Remake of #66406 (Splitting up areas.dmi + code related stuff) (#66726)
Areas.dmi right now houses all of our mapped turfs icons (which is roughly 400 icons). Not an issue, but it's incredibly large and clunky to navigate right now. This isn't an issue for the average coder and/or player code diving, but it is for mappers wanting to add new turfs. Currently, the file has some organization, but its still an overall mess. This PR aims to slice the behemoth with multiple .dmi files corresponding to specific areas.
I also plan to repath /area/* -> /area/station/* for station turf only. This is to clean it up, as most other turfs follow this format (that being /area/turf_zone/*).
I'm also writing an update paths file as I go along.
* fixbatch 1
* fug
Co-authored-by: Jolly <70232195+Jolly-66@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Medical Revamp: Resprites and Jumpsuit/Under Changes (#65236)
New sprites for the CMO's turtleneck/skirtleneck, paramedic jumpsuit/jumpskirt, virologist jumpsuit/jumpskirt, and chemist jumpsuit/jumpskirt
* Medical Revamp: Resprites and Jumpsuit/Under Changes
* fix
Co-authored-by: axietheaxolotl <86872535+axietheaxolotl@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
* Fixes the HoS in Mafia Not Being Able to Cancel Their Ability (#63926)
IDK I haven't tested it as I'm committing it so if you see this commit in the PR then it works but if you don't then it didn't work. Funny how that is.
* Fixes the HoS in Mafia Not Being Able to Cancel Their Ability
Co-authored-by: Jackraxxus <60418544+Jackraxxus@users.noreply.github.com>
* Revert "Revert "[MIRROR] Refactor area and turf lighting (#7775)" (#7902)"
This reverts commit 64c4c52d12.
* This should probably fix it
* I love linters
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Makes mafia roleblocks actually end (#59673)
Fixes a bug where if you were roleblocked one night by a lawyer in mafia you would be roleblocked FOREVER by adding a single missed character ~
* Makes mafia roleblocks actually end
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>