* Solar control panel UI tweaks (#75670)

## About The Pull Request
Added a chart that shows generated power and potential power.
## Why It's Good For The Game
You can now see how well the panels perform throughout the solar cycle.
## Changelog
🆑
qol: Solar control console now shows power generation history
/🆑
* Solar control panel UI tweaks
---------
Co-authored-by: Andrew <mt.forspam@gmail.com>
* SM now processes only when there is more than 0.01 moles of gas present (#75300)
* SM now processes only when there is more than 0.01 moles of gas present
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
* Massive Spraycan and Crayon Powercreep: smaller graffiti cost less to draw. (#75588)
## About The Pull Request
Currently, drawing a small circle on the floor consumes as much charge
as any other drawable but the larger horizontal ones that cost five
times as much, which is a bit dull for non-cyborg players, having to
burn through a ton of spraycans just to cover the floor in several small
dots if ever attempting to do some floor art.
This PR aims to reduce the cost of some of the smaller drawables, like
"shortline", "smallbrush", "pawprints" etc., in virtue of the smaller
area they cover. The balances changes may seem bit of an arbitrary and
not include ones that are a bit on the edge between "small" and not
"small", but I'd rather keep it simple than have other values such like
"semi-small" integrated and snowball this balance PR into a more
finnicky, disputable or not agreeable with version of itself.
This also covers re-coloring and existent graffiti. Currently it always
costs 2 charges to change its color regardless if it costed 1 or 5 to
spray in the first place. With this PR, the costs should match that of
when they were drawn. To boot, It also takes into account the tagger
quirk now.
Code had to be cleaned up and improved a bit for a smoother
implementation of these changes.
A fairly unrelated but small change: Trying to suicide with an empty
spraycan will now fail, because it's empty. It's that simple.
## Why It's Good For The Game
Enables non-cyborg players to engage in jolly floor-vandalizing-art in a
more consistent, slightly more enjoyable way.
## Changelog
🆑
balance: Drawing small graffiti like paw/foot/claw prints, small brush
dots and short lines should cost half as many charges off your spraycan
or crayon.
balance: The cost of recoloring graffiti decals is now consistent with
that of drawing them.
balance: Trying to suicide with an empty spraycan will now fail, because
it's empty. It's just that simple.
/🆑
* Massive Spraycan and Crayon Powercreep: smaller graffiti cost less to draw.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Apc covers can now be repaired and replaced (#75129)
You can now weld an unbroken but damaged Apc cover in order to repair
its integrity.
If an Apc cover is broken you can crowbar it off and replace it with a
new one using an Apc frame (but you'll need to weld its integrity back
up to reinforce the haphazard connections you've made)
I also went ahead and added comments to some of the code because Apc
code is a little daunting.
* Apc covers can now be repaired and replaced
---------
Co-authored-by: moocowswag <62126254+moocowswag@users.noreply.github.com>
* Makes update_icon_updates_onmob more robust (#75324)
Safeguards against #74965 happening in the future.
Noticed a bunch of these were using ITEM_SLOT_HANDS. This is incorrect,
as the element already automatically updates held items. grep'd it to
catch future instances.
Likewise, a number of objects weren't passing slot_flags to the element,
meaning it wasn't actually updating those things properly when they were
being worn. I've simplified this so now the element will automatically
update all slot_flags, and passing an additional slot to the element
when being added is only needed for additional slots that might need to
be updated. This also means if slot_flags change, the element will now
update correctly as well.
🆑 ShizCalev
code: The update_icon_updates_onmob element will now automatically
update all slots in an item's slot_flags var. This does fix multiple
things that weren't updating properly. Passing a slot to the element is
now only necessary if you want to add additional slots to be updated.
/🆑
* Makes update_icon_updates_onmob more robust
---------
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
* Deadchat Announcement Variety Pack 1 (#75140)
## About The Pull Request
Adds announce_to_ghosts()/notify_ghosts() calls to a bunch of different
things.
**THIS INCLUDES:**
- Powersink being activated/reaching critical (explosion) heat capacity.
- His Grace being awoken.
- Hot Potatoes being armed.
- Ascension Rituals being completed.
- Eyesnatcher victims.
- Ovens exploding as a result of the Aurora Caelus event.
- Wizard Imposter spawns.
- Rock-Paper-Scissors with death as the result of Helbital consumption.
- BSA impact sites.
- Spontaneous Appendicitis.
- The purchasing of a badass syndie balloon.
- The Supermatter beginning to delaminate.
This was everything that I could think of that would be worth announcing
to deadchat. These were all chosen with consideration to questions like
"how easy would it be to spam deadchat with this?" and "will observers
actually see the interesting thing happen, or just the aftermath?".
Not gonna lie, I've really become an observer main as of recently. Maybe
that's being reflected in my recent PRs. Who's to say? Deadchat
Announcement Variety Pack 2 will probably never come out. Sorry.
## Why It's Good For The Game
Gives deadchat a better indiciation of when/where something **REALLY
FUNNY** is about to happen. Draws attention to certain things that are
likely to gather an audience anyways, but sooner (for your viewing
pleasure). In simple terms, it helps the observers observe things
better.
Some cases, such as the aurora caelus or helbitaljanken, are occurrences
so rare that they deserve the audience.
## Changelog
🆑 Rhials
qol: Observers now recieve an alert when a powersink is activated/about
to explode.
qol: His Grace being awoken now alerts observers, to give you a
headstart on your murderbone ghost ring.
qol: Ascension Rituals being completed will also alert observers, for
basically the same reason.
qol: Arming a hot potato will now alert observers. Catch!
qol: Eyesnatcher victims will now notify observers, and invite them to
laugh at their state of misery and impotence.
qol: Observers will be notified of any acute references to The Simpsons
or other 20th Television America copyright properties.
qol: Wizard Imposter spawns alert observers, much like any other ghost
role event should.
qol: Playing Rock-Paper-Scissors with death will now alert the observers
and invite them to watch. Better not choke!
qol: Observers now get an orbit link for BSA impact sites. Why does it
keep teleporting me to the AI upload??
qol: Spontaneous Appendicitis now alerts deadchat.
qol: The purchasing of a badass syndie balloon now alerts deadchat. You
might not be any more powerful, but at least you have an audience.
qol: When beginning to delaminate, the Supermatter will alert observers
and invite them to watch the fireworks.
/🆑
* Deadchat Announcement Variety Pack 1
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
APC assigns itself the correct name based on its area (#73054)
## About The Pull Request
APC was assigned a name before it was assigned an area causing null
names.
Another bug i noticed was that newly built apcs were also not assigned
names. Thats fixed now too
Fixes#73052
## Changelog
🆑
fix: apc not assigning itself a name based on its area
fix: newly built apc's not getting assigned area names
/🆑
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
* Fire/Air alarms properly dismantle when they are destroyed & fixes balloon alert runtimes when cutting terminals (#74918)
Firealarms & Airalarms `deconstruct()` procs are wrong, they spew out
electronics & cable regardless of what build stage their on
Fire alarms providing free electronics & cable without even installing
them
https://user-images.githubusercontent.com/110812394/233784785-650fbd64-3c6c-44c8-b377-c3a8244d28ac.mp4
Air alarms providing free electronics & cable without even installing
them
https://user-images.githubusercontent.com/110812394/233784799-cdd38967-8a59-454d-8da4-1360d03ff12c.mp4
Bug exploits now come to an end
Also fixes balloon alerts run timing when cutting terminals connected to
apc's/smes etc. because the atom gets deleted, by the time the balloon
alert gets executed it adds a timer on the deleted object causing
runtimes.
## Changelog
🆑
fix: air alarms correctly spew out cable & electronics depending on
their build stage when their integrity reaches 0 i.e. destroyed
fix: fire alarms correctly spew out cable & electronics depending on
their build stage when their integrity reaches 0 i.e. destroyed
fix: balloon alerts runtiming when cutting terminals
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Fire/Air alarms properly dismantle when they are destroyed & fixes balloon alert runtimes when cutting terminals
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Audio File Cleanup (#74863)
## About The Pull Request
Removes a bunch of sound files that we don't use and moves some sound
files into better locations. I'm hoping to get an archive repo for
sounds going, much like the
[map_depot](https://github.com/tgstation/map_depot) and
[SS13-sprites](https://github.com/tgstation/SS13-sprites).
EDIT: The old sound files are being moved here:
https://github.com/tgstation/SS13-sounds
Also increased the volume of the clownana rustle sound and clipped off
some dead air from shockwave_explosion
## Why It's Good For The Game
Removes a total of 1.95MB worth of unused sound files from the codebase.
## Changelog
🆑 Tattle
soundadd: increased the volume of the clownana rustle
/🆑
---------
Co-authored-by: tattle <article.disaster@ gmail.com>
* Audio File Cleanup
* Fixes the missing sound files ;)
---------
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: tattle <article.disaster@ gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Adds helpers for apc. (#74651)
## About The Pull Request
I asked someone in discord if it was worth it, they said it was, from
what i remember at least.
## Why It's Good For The Game
More comfort with apc's for mappers.
---------
Co-authored-by: san7890 <the@ san7890.com>
* Adds helpers for apc.
* wew
* wew
---------
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Expands conversion unit test coverage (#74563)
## About The Pull Request
Requires #74562 and #74556 be merged first.
Unit tests cult conversion and throws in a case for rev AOE flashes
## Changelog
Not necessary
---------
Co-authored-by: san7890 <the@ san7890.com>
* Expands conversion unit test coverage
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Code clean-up & refactor for all RCD related & like devices. (#74527)
## About The Pull Request
1. Debloats the RCD.dm file i.e. renames it to RHD[Rapid handheld device
the base for all rcd like devices] and moves its subtypes into their
respective files
`/obj/item/construction/rcd` moved to RCD.dm
`/obj/item/construction/rld` moved to RLD.dm
`/obj/item/construction/plumbing` moved to RPLD.dm
`/obj/item/construction/rtd` stays in RTD.dm
Other rcd like device i.e. RPD, RFC, RWD, along with the above mentioned
files are now all moved into 1 folder called "rcd"
majority of the `to_chat()` are now replaced with `balloon_alert()` to
reduce spam
2. Adds early returns, optimizes & adds extra resource sanity checks
before and after the `do_after()` proc for the RLD. RLD silo links now
works again.
- RLD now uses an ammo bar just like the RCD for updating only its
overlays & not its entire icon state, it also has a blinking yellow icon
state when low on ammo
- Remove unused empty blinking yellow icon state for plumbing RCD.
nobody designed the ammo bars for them so having`has_ammobar = TRUE`
caused the unit tests to fail
4. Adds extra structure placement & resource sanity checks for RCD, RTD
& Plumbing RCD before & after the `do_after()` proc
RCD Patches
- removes unused vars window_type & window_glass, these can be infered
from window_type directly
- removes furnish type & cost and let the rcd_vals() proc decide those
for consistency
- copies the rcd stuff from turf/floor to turf/open/misc with some
exceptions, It wasen't updated in a long time
- rcd vals i.e. cost & delay for window types are set for each
directional, full-tile, reinforced types. These all used constant values
& now they are adjusted accordingly
RTD patches
- Fixes#74526 RTD can lay floor tiles on all types of plating's
- The cost of deconstructing tiles was not calculated correctly i.e. it
always used the cost of the selected design & not the cost of the actual
floor type we are trying to deconstruct
- The construction & deconstruction time was constant & very fast for
all tile types, now the delay is adjusted based on the cost of the type
of tile in question
- RTD now has a blinking yellow empty icon state just like the RCD when
low on ammo
6. Fixes#73479 RCL now updates its pipe cleaning coil appearance when
changing colours & selecting white colour no longer yields a random coil
colour
7. makes sure `useResource() ` actually succeeds before doing any
action. The return value of this proc was not previously checked for
some devices
## Why It's Good For The Game
1. rcd like devices all moved into 1 folder for better organization
2. splits the original RCD.dm file into more logical & manageable files
for better maintainability
3. removes unused code & adds some extra sanity checks for everything
4. adds missing sprites for RLD & RTD
## Changelog
🆑
code: RCD & all its subtypes and other devices like it[RTD, RLD,
Plumbing RCD, RWD, RFC, RPD] now moved into 1 folder, removes unused
vars
refactor: RCD window type cost & delay are set based on the window type
selected.
refactor: RLD, RCD & plumbing RCD now has extra resource & target
placement sanity checks, optimizes RLD and code readability.
refactor: RTD now sets the correct delay with the cost of the tile type
currently being constructed/deconstructed taken into account
refactor: large majority of to_chat() replaced with balloon alerts
fix: RLD silo link now works again
fix: RTD can place tiles on any subtype of plating
fix: RCL now lays the correct colour of pipe cleaner when its colour is
changed
imageadd: empty blinking yellow icon states for RTD & RLD & an ammo bar
for RLD
/🆑
* Code clean-up & refactor for all RCD related & like devices.
* Update RHD.dm
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* New inhand icons for light tubes, makes latex balloons craftable, and various other fixes/improvements
* resolve conflict
* Update VoidRaptor.dmm
---------
Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
* Significantly speed up create & destroy by reducing the amount of time to wait for GC (#74604)
The check queue is 5 minutes long because that's the longest a client
can hold onto a reference. Without clients, we can drastically decrease
the time we have to wait. This lowers the time down to 10 seconds
(though everything right now deletes in 5).
This will represent a 5 minute decrease in CI across the board, freeing
up runners.
Makes a few changes to stuff that was being held for more than 10
seconds.
- `VARSET_CALLBACK` now works through weakrefs, to allow for pAIs to
have their holochassis init timers.
- Nar'Sie cleans herself up in GLOB.cult_narsie if she's deleted.
- "Spooky portals" no longer hold onto a reference for 2 minutes.
- `poll_candidates` short circuits to an empty list if there are no
candidates, to avoid several 30 second+ long timers
Originally this was going to be a more clever hack from @ MrStonedOne
about short circuiting if everything deletes before the wait, but we
realized that basically nothing actually holds onto references for that
long without clients, and that nothing really should anyway
* Significantly speed up create & destroy by reducing the amount of time to wait for GC
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* timestop the SM (#74302)
## About The Pull Request
Allows the timestop effects to freeze the Supermatter processing so that
engineers might be able to save it this time
## Why It's Good For The Game
Both wizards and science nerds are able to stop the SM seconds from
meltdown so that engies can figure out what's the right pipe to place to
prevent a destruction of property.
## Changelog
🆑
add: Timestop blocks the SM from processing (can't be healed, doesn't
output gases but can still take damage)
/🆑
* timestop the SM
---------
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
* lights
* colors go insane if you go over 255
* warmer, less pink
* move file, lower power/delay
* low power lighting
* emergency brightness
* metastation/void raptor
* Adds the Dark Matt-eor when you emag a stupid amount of meteor shields + lots of meteor file sorting + qol + dark matter singularity + dark matt-eor summoning final traitor objective
* singularity
* Update singularity_s1.dmi
---------
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
* Minor Gravity Fixes (#74285)
## About The Pull Request
Fixes forced gravity not updating a mob (trait was added too early,
before hook signals are registered)
Fixes spawning a mob in space not causing floats (default grav was 0, so
== null was wrong)
Runs shake_everyone() (Our gravity gen reaction hook) AFTER gravity
changes, ensuring mobs hook into it
## Why It's Good For The Game
Closes#74271Closes#74272 (Caused by being in nograv but not floating)
Closes#74274
## Changelog
🆑
fix: Fixes a bunch of minor gravity bugs, report em if you see more
yeah?
/🆑
* Minor Gravity Fixes
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Fixes atmos machinery breaking when the area is edited/renamed via station blueprints & Deletes empty areas, ARCD upgrades
* areas
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
* 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>
* Lightbulb removal code adjustments and message change (#74166)
## About The Pull Request
This makes two changes to the lightbulb removal process code that I
found while looking at a different issue:
'user' is passed as a carbon, which is then typecasted to 'electrician'
as a carbon (again). electrician/user were used interchangeably, and
were functionally identical, meaning the electrician var was
unnecessary. Now, 'electrician' has been removed and replaced with user.
The 'protection_amount' var is now 'protected' and uses TRUE/FALSE,
since it was only ever a value of 0 or 1 anyways. The order in which it
is determined has been shifted slightly.
This also changes the message you get partway through ripping out a
lightbulb with the lightbulb remover skillchip:
`to_chat(user, span_notice("You feel like you're burning, but you can
push through."))`
`to_chat(user, span_notice("You feel your [the limb being burned]
burning, and the light beginning to budge."))`
## Why It's Good For The Game
Makes the code a bit easier to read.
The "you feel like you're burning" message has ever so slightly bothered
me for too long. I feel like I'm burning? It's a fucking light tube
dude, I'm fine.
## Changelog
🆑
code: Lightbulb removal code is a little bit easier to read
spellcheck: The lightbulb remover skillchip implant (which I know you
guys LOVE to use) has a slightly different message now.
/🆑
* Lightbulb removal code adjustments and message change
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* More stuff to construct & destroy (#73942)
## About The Pull Request
**1. Suit Storage Units**
- What about them?
1. You can print "suit storage unit" circuit boards from engineering &
science circuit printer's after research to make more suit storage
units, now since they behave like regular constructable machines you can
deconstruct them via screwdriver & crowbar.
2. You can upgrade its capacitor to get faster charging speeds
- Why its good for the game?
1. You can rebuild these in the event they get destroyed
2. Better tier capacitors = faster charging speeds
3. More storage units = More places to decontaminate your equipment +
Recharge more mod suits made in robotics
4. If you decide to leave the game or your done using a mod suit e.g. a
mining mod suit rather than keeping it to yourself or throwing it away,
just build a suit storage unit and hang it there so other players can
use it i.e., sharing is caring.
**2. Freezer Cabinet**
- What about them?
1. They are now craftable

3. You can deconstruct them with a welding tool.
- Why its good for the game?
1. You can now make more of them if they get stolen/destroyed
2. More places to store food, dead bodies, whatever
**3. Flood Lights**
- What about them?
They can now be fully deconstructed in the exact opposite sequence you
constructed them.
- First use screwdriver to open its panel
- Then use empty hand to remove light
- Then use screwdriver to unscrew the wiring from frame
- Use wire cutter to remove wiring completely
- Finally use wrench to completely deconstruct frame
- Why it's good for the game?
Reclaim used material to build flood light else where . Also much more
clean than what the wiki is suggesting.

## Changelog
🆑
add: suit storage unit circuit boards to engineering & science
department circuit printers.
add: freezer cabinet as a craftable & destructible item.
qol: flood light can now be deconstructed rather than destroyed/thrown
away.
/🆑
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* More stuff to construct & destroy
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Some more RCD Designs & Patches (#72757)
Adds some more stuff you can build with the RCD
1. Under structures you can now build/deconstruct catwalks & construct
Reflector Frames. Destorying a catwalk will cut any cable on it leaving
pieces of it behind

2. If you have the frames upgrade you can construct APC, Air Alarm &
Fire Alarm frames on walls & Flood light fixtures[fully wired]. It only
creates the wall mount and sticks it on the wall. Wiring, Circuits and
finishing the frame is still your job

3. If you have the furnishing upgrade you can create racks & beds &
additional bar stool

**Important Code Refractors**
1. `/turf/closed/wall/proc/try_wallmount()` will return true only after
you have successfully mounted the wallframe or stuck an poster on it &
not simply check if you are trying to mount a valid thing on it
2. `apc_tool_act/rcd_act()` was incorrectly checking passed_mode for the
simple circuit upgrade and not the `the_rcd.upgrade `flag. Thats fixed
now to
3. newly created APC's weren't assigning themselves to their areas
allowing multiple to be created in one area. Thats fixed now
4. Walls, Airlocks & other stuff could be built on tiles having
something dense that would block it. For example a wall could be build
on top of a machine frame!!. Thats also fixed now
More stuff you can build rapidly with the RCD
🆑
add: more designs for the rcd
refactor:` try_wallmount()` to return true only after successful mount
fix: `apc_tool_act/rcd_act()` incorrecly checking for simple circuits
upgrade in the wrong variable
fix: newly created APC's not assigning themselves to their areas.
fix: rcd building structures [walls, airlocks etc] on turf's that
already have structures on them
/🆑
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
* Thermomachines no longer self-destruct when built on blocked ports (#73580)
## About The Pull Request
Ever felt the utter pain when you make a new thermomachine, hook it up
perfectly and then screwdriver it only for it to immediately become a
pile of iron and components without warning? This PR fixes that.
Instead of doing what it did previously, it unanchors itself and opens
its panel.
Right, almost forgot to mention, failing to wrench down a thermomachine
no longer bonks it with the wrench.
Due to not being allowed to use visual messages for when the port is
blocked, I've added a mob/user variable to all on_construction() procs.
(This allowed me to use balloon messages instead.)
## Why It's Good For The Game
Saves a lot of unnecessary headaches when working with thermomachines.
## Changelog
🆑
fix: Atmosians have finally convinced the thermomachines to not
self-destruct when built on blocked ports.
fix: Failing to wrench down a thermomachine no longer hits it with the
wrench.
/🆑
* Thermomachines no longer self-destruct when built on blocked ports
---------
Co-authored-by: RikuTheKiller <88713943+RikuTheKiller@users.noreply.github.com>
* Recenters gravity gens (#73357)
## About The Pull Request
Due to a change in how a gravity generator figured out the turfs it
would be using to create itself, gravity generators were visually
shifted to the right, but the interaction still remained where the main
piece was placed. This just changes `CORNER_BLOCK` to
`CORNER_BLOCK_OFFSET` and offsets the block one tile to the left.
## Why It's Good For The Game
No more wonky gravity generators
Fixes#73083
## Changelog
🆑
fix: Gravity generators have been re-centered.
/🆑
* Recenters gravity gens
---------
Co-authored-by: Shadow-Quill <44811257+Shadow-Quill@users.noreply.github.com>