* 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>
* Makes transparent curtains not block emissives (#77151)
## About The Pull Request
What is says on the tin. The base curtain type is partially transparent
and should let light through. It's a small detail but I think it makes a
difference.
## Why It's Good For The Game
What it looks like (seen with a character wearing a safety vest behind
the curtains):

## Changelog
🆑
fix: non-opaque curtains will no longer block emissives
/🆑
* Makes transparent curtains not block emissives
---------
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* makes puzzle doors not open if you just walk into them while fireman carrying someone (#77131)
## About The Pull Request
i dont know how this happens but this fixes it so
## Why It's Good For The Game
fixes#77112
## Changelog
🆑
fix: you can no longer fireman carry to bypass puzzle doors
/🆑
* makes puzzle doors not open if you just walk into them while fireman carrying someone
---------
Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
* Adds a unit test to stop elements from using identical lists for their arguments. (#76322)
## About The Pull Request
Ok, so a few days ago I made an issue report about multiple instances of
identical elements being generated because of uncached lists.
ninjanomnom (the mind being the element datums) cleared it up and said
an implementation of GetIdFromArguments() that also checks the list
contents wouldn't be worth the performance cost, while adding that a
unit test should be written to check that it doesn't happen at least
during init, which should catch a good chunk of cases.
Also, i'm stopping RemoveElement() from initializing new elements
whenever a cached element is not found. Ideally, there should be a focus
only unit test for that too, but that's something we should tackle on a
different PR.
Some of the code comments may be a tad inaccurate, as much as I'd like
to blame drowsiness for it. Regardless, the unit test takes less than
0.2 seconds to complete on my potato so it's fairly lite.
## Why It's Good For The Game
This will close#76279.
## Changelog
No player-facing change to be logged.
* Adds a unit test to stop elements from using identical lists for their arguments.
* Fixes unit test
* seeing double
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* fixes a guillotine logging runtime (#77130)
## About The Pull Request
passes user
## Why It's Good For The Game
fixes#77082
## Changelog
🆑
fix: guillotines no longer runtime when logging after decapping someone
if they buckle AFTER the blade starts to drop
/🆑
* fixes a guillotine logging runtime
---------
Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
* [no gbp] Goliaths make less mess (#77141)
## About The Pull Request
In an earlier PR I made Goliaths dig when they are bored. I still like
this behaviour as an ambient thing for them to do, but the consequence
is that after 30 minutes there were huge piles of sand all over
lavaland.
While convenient for actually having miners bring glass back to the
station, it was an eyesore and too much.
To resolve this I have made two changes:
- Goliaths dig 1/3 as often as they did before.
- Sand (and snow) which are left outside during a storm gets blown away
if it's not inside someone's inventory.
Together these prevent the accumulation of hundreds of piles of sand.
## Why It's Good For The Game
Fixes an unintended consequence of my actions.
## Changelog
🆑
add: Uncollected sand and snow will be blown away by the wind when
storms happen (but don't worry, storms also allow those turfs to be
freshly dug up again).
/🆑
* [no gbp] Goliaths make less mess
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Sets a saner length limit to ID assignments and paintings' titles. (#76723)
* Sets a saner length limit to ID assignments and paintings' titles.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* A small pile of borg combat changes (#75819)
## About The Pull Request
This PR rebalances borg combat. It is first part of broader set of
changes that I talked about with armhullen, which was then discussed in
discord player project channel. Ultimately arm decided to rewrite the
complete rebalance and grab combat, but to help with testing, and to
measure reaction to that changes, I wrote this much smaller change, that
should be usable as a TMd test.
Main points that changed:
- Flashing cyborgs for the first time blinds them, and scrambles their
movement. Flashing them while they are blinded immobilizes them as it
used to, but still allows them to talk, and use radio.
- Emping cyborgs still turns them completely off, but the code behind is
_slightly_ changed, because of how utterly incomprehensible cyborg code
is
- Borg stunarm deals 60 stamina damage, costs 200 energy (SUBJECT TO
CHANGE AS SOON AS I DECIDE ON HOW TO), and applies confusion,
stuttering, and jittering.
- Robot consoles used by humans can now lock down only one borg at a
time, they exhibit increased power draw while doing so. The borg is also
informed of the location of the console. If left alone, the borg will
unlock itself in 10 minutes, to avoid leaving it permanently locked down
in some faraway place. If the console gets destroyed (or depowered), the
borg will get unlocked
- laser pointer only blinds borgs, without the paralyze component. If
you flash a borg blinded this way it will paralyze it, so comboing it is
possible.
- Throwing things at borgs slows them down
Not planned, but possible if testing shows its required:
- Changing borg health to malfunctions
- Whatever people convince me to add
- Portable lockdown solution for sec, or a way for them to do basic
check on borg.
- Usage of bucket/something else to restrict radio usage of cyborg
If you have ideas what would make this change better please use [discord
channel](https://discord.com/channels/326822144233439242/1113145741788065924),
or comments. Almost everything that I wrote here is subject to change,
as requested or suggested.
### DISCLAIMER
I had to change few functions in background of how borgs work. This WILL
have changes I couldn't predict, since some of them aren't linked in any
obvious way in code. I am aware of that, and will try fixing what needs
fixing when pointed out.
PS: Borg code is a nightmare
## Why It's Good For The Game
Borg combat sucks. It is absolutely binary, there is 0 capacity for
talking, because both sides fear losing in one click. Sec can't really
feasibly ask the borg to state laws while flashed, so their only
solution is to kill it and revive it.
- Turning most instastun solutions into less lethal versions should
lessen the pressure, since it reduces the chance that person that reacts
first survives.
- It causes minor reduction in traitor's capacity to emag borgs with
only a flash, but EMPs still hardstun, and they are plentiful both in
uplink, and in ghetto form, so that shouldn't be a problem.
- Since it allows borgs to scream for help while being flashed, it also
increases the potential of AI helping it, or at least noticing its
death.
- Lockdown console changes reduce its capability in completely turning
off malf ai, and leave it still highly capable of being an useful tool
in stopping emagged cyborgs.
## Changelog
🆑
balance: Flashing borgs requires two consecutive flashes to fully
immobilize
balance: Flashed borgs can speak
balance: Remote lockdown on cyborgs lasts 180 seconds
balance: Cyborg stun arm works like normal baton, and costs less energy
/🆑
---------
Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* A small pile of borg combat changes
---------
Co-authored-by: Kubisopplay <38842052+Kubisopplay@users.noreply.github.com>
Co-authored-by: ATH1909 <42606352+ATH1909@ users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* Expands storage of tactical medkits. Also puts premium medkit in nukie med bundle as should. (#77018)
## About The Pull Request
Premium medkits weren't able to hold stuff they were spawning with so i
expanded it.
Also @ necromanceranne seemed to forgot to put premium medkit to surgical
bundle, so i fixed it.
## Why It's Good For The Game
Less bluespace magic.
## Changelog
🆑
qol: Tactical medkits now can hold stuff it spawns with.
fix: Nukie Medical Bundle now spawns with premium tactical medkit as it
should.
/🆑
---------
Co-authored-by: Time-Green <7501474+Time-Green@ users.noreply.github.com>
* Expands storage of tactical medkits. Also puts premium medkit in nukie med bundle as should.
---------
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@ users.noreply.github.com>
* Fixes bluespace bodybag duping (#77067)
## About The Pull Request
Folded bluespace bodybags had no prior checks to see if the person
picking the item up was the one inside of the bag. This naturally broke
things, because BYOND doesn't like it when you have an infinite cycle of
locs, so it refuses to move the folded bluespace item onto your mob.
This then leads to the bluespace bodybag duping bug, as the item is
still in your hand even though it really isn't.
## Why It's Good For The Game
Fixes#44902
## Changelog
🆑
fix: Fixed a rare bug that let you spam bluespace bodybags everywhere.
/🆑
* Fixes bluespace bodybag duping
---------
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
* Splits ballistic firearms "mag_type" into "accepted_magazine_type" and "spawn_magazine_type", fixing a few funny magazine bugs (#76973)
## About The Pull Request
As the title says, mag type has been split into two variable that do
different things:
Accepted magazine type handles what magazines that gun will accept, type
and any subtypes. If spawn magazine type isnt defined, then it will be
made equal to accepted magazine type to prevent having to double define
magazines on every gun ever.
Spawn magazine type is separate from accepted magazine type, spawn
magazine type is what magazine the gun will actually spawn with. This
exists because there are a few weapons which are made to spawn with
special magazines, that can't use normal magazines anymore. For example,
the riot dart pre-loaded donk soft pistol can only ever be reloaded with
the riot subtype of donk soft magazines at the moment. This isn't
typically something people notice because new magazines are usually not
a thing people come by with these specific weapons, but its a problem I
noticed while coding some weapons.
## Why It's Good For The Game
In short, certain weapons (mostly donksoft weapons, but there's a single
traitor pistol subtype that spawns with fire ammo) will no longer be
limited to the exact subtype of magazine they spawned with, allowing
them to use the normal versions of those magazines as well.
## Changelog
🆑
refactor: The mag_type variable on guns has been split between
accepted_magazine_type and spawn_magazine_type, allowing weapons to
safely spawn with subtypes of their normal magazines without breaking
the weapon
fix: Several weapons that spawned with special magazines, the riot dart
pre-loaded donk pistol for example, will now be able to accept normal
donksoft magazines that don't spawn loaded with riot darts.
/🆑
* Splits ballistic firearms "mag_type" into "accepted_magazine_type" and "spawn_magazine_type", fixing a few funny magazine bugs
* merge conflict
* merge conflict continued
---------
Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Hologram banners no longer give inspiration effects (#77079)
## About The Pull Request
Banners spawned via the holodeck are no longer eligible to give healing
effects
## Why It's Good For The Game
This makes it too easy to source the banners and gives you another
healing option that isn't technically supposed to be possible.
## Changelog
🆑 oranges
balance: holodeck spawned banners no longer give the inspiration effects
/🆑
* Hologram banners no longer give inspiration effects
---------
Co-authored-by: oranges <email@oranges.net.nz>
* Fixes typo with cardboard ID examine text (#77054)
## About The Pull Request
I replaced a c with a d.
## Why It's Good For The Game
Typos bad, fixes typo.
## Changelog
🆑
grammar: Fixed a minor typo with cardboard IDs
/🆑
* Fixes typo with cardboard ID examine text
---------
Co-authored-by: Alexis <catmc8565@gmail.com>
* American touristbots will now order butter on a stick. (#77036)
## About The Pull Request
My good friendmin mrr.fiish was so delighted about me making his
favourite country faire staplein game, that I decided to make it fairly
commonly ordered by the American Touristbots.
## Why It's Good For The Game
It makes my good friend mrr.fiish happy, and hopefully other Americans
too.
## Changelog
🆑
balance: Mmmh, butter on a stick. Now for americanbots.
/🆑
* American touristbots will now order butter on a stick.
---------
Co-authored-by: carshalash <carshalash@gmail.com>
* Material container & related stuff ui refactors & clean-up (#76220)
## About The Pull Request
**1. Material container clean-up & refactor**
- Replaced `total_amount` var with `total_amount()` proc, this var can
be easily computed by summing up all material amounts rather than
storing it as a var which is tedious to update & keep track of when
materials are added/removed
- Removed unused procs `transer_amt_to()`, `can_insert_amount_mat()`,
and `get_categories()`. These procs are not used anywhere in the
codebase so let's remove them & make some space.
- Callbacks are replaced with signals, the callbacks don't need to be
explicitly garbage collected & having macros & procs marked with
`SIGNAL_HANDLER` makes your intentions more readable & explicit.
- Fixes#76151
All material adding, removal, checking operations are "Integer"
operations, i.e. the final value is rounded & them made 1 if the final
value is 0 using the macro `OPTIMIZE_COST`[coudn't come up with a better
name]. No more dealing with decimal value materials
The problem was after the protolathe was upgraded with better parts all
the design costs were multiplied with a decimal `efficiency_coeff`
value, this means even though in the UI the cost was displayed as 60
bluespace crystals its actual cost was `60.0001` something in the
backend causing this check for materials to fail & print the error
message.
- Replaced `GetComponent(/datum/component_material_container)` with just
a simple ref to the material container when adding the component, so we
can save some overhead from calling this proc
- Gave all procs a ton of documentation with documentation having
documentation
- Fixes#76506 RCD and other devices that uses the silo link upgrade now
have the correct material usages
- Fixes#72096. It wasn't just a problem with ancient protolathe but
with all machines that used `datum/component/remote_materials` the
problem was remote materials would add an instance of
`datum/remote/material_container` if it wanted to use local storage but
this component would get added before `datum/component/remote_materials`
could be registered i.e. it comes before remote_materials in the
component list. So when the machine is destroyed it will first destroy
`material_container` & then `remote_materials` therefore destroying the
materials before they could get ejected
- Silo link is established when parent is registered with remote
materials raher than adding an external timer which is faster
- Everything that uses a material container will auto eject their sheets
when destroyed
- Moved this & remote materials into its own folder for better
organization
**2. Material UI Changes**
- Removed the x25 & x50 print buttons from the autolathe, now they just
have x5 & x10 buttons like the protolathe, These buttons were of no use
since you could just type the exact amount you want to print in the
`[Max: <some amount>]` side bar. The code to compute these buttons was
just plain right nasty & some of it unused in the UI.
- The material eject button in the material bar does not gray out when
you can eject exactly one sheet
- All material cost are integer values rounded
- Fixes#76253 Exosuit Fabricator sends the material container static
data to the UI so its material bar is not greyed out when there are
sufficient materials to eject
- Component printer material bar sends the material container static
data to the UI so its material bar is not greyed out when there are
sufficient materials to eject
- Autolathe Material bars now display number of sheets available
- Max printable amount of items are now computed & updated correctly in
the UI. They were displaying wrong values & now get updated when items
are printed, materials are removed
- Silo hold actually works now. When a machine is put on hold it calls
this proc
https://github.com/tgstation/tgstation/blob/e929cf39cded5207d63df1fa8521f41f2816b383/code/datums/components/remote_materials.dm#L78-L87
Notice how the key is `src` so we should be consistent during checking
if a machine is on hold using the same `src` var. But for some reason we
did dumb shit like this
https://github.com/tgstation/tgstation/blob/e929cf39cded5207d63df1fa8521f41f2816b383/code/datums/components/remote_materials.dm#L150-L153
What is category? Why do we care for the area the machine is in? None of
it made sense so i removed all that junk and just made it check for
`src` like it should
- Removed redundant `removable` & `sheets` var from the material
container ui_data. These vars are unused in the UI
- If an item does not have the required materials then upon clicking
that item you will not get any error message but instead nothing happens
## Changelog
🆑
fix: items can be printed from autolathe & protolathe when the exact
material amounts are present in them after upgrading
fix: max printable amount now shows the correct value & updates when
items are printed, materials are removed in the autolathe & protolathe
fix: component printer material bar is not greyed out when there are
sufficient materials to eject
fix: rcd and other devices that uses the silo link upgrade now have the
correct material usages
fix: silo hold actually works
fix: machines using local storage to hold materials will eject it's
materials as sheets when deconstructed/destroyed
refactor: Autolathe Material bars now display number of sheets available
refactor: printing an item that does not have enough materials will fail
silently with no error messages
refactor: Drone dispenser will eject sheets upon deconstruction
refactor: all things that store materials will auto ejects its sheets(if
there is sufficient material) when destroyed
refactor: inserting an item into the material container will display the
units consumed as sheets not absolute units
refactor: removed x25 & x50 print buttons from the autolathe
* Material container & related stuff ui refactors & clean-up
* Update ammo_workbench.dm
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* A collection of food tweaks (#77037)
## About The Pull Request
- Chicken nuggets had no description in the recipe book, due to gaining
their real description on initialize. I have placed a default
description for them, so they will not appear as "You eat this".
- Fiesta Skewer lacked description, so I have added one for the same
reason.
- Yaki Imo had an incorrect duplicate recipe, asking you to process
sweet potatoes to make them.
- The onion order in the produce console was called beet in its
typepath, now its properly onion
- Ælosterrmæsch now requires dough slices. This prevents dough from
popping out of the pot if you add these ingredients while its not on the
oven, and also prevents most of the soup's ingredients turning into
gravy, when the nutriment is released from the ingredients. Amount of
water unchanged, as there is plenty of it.
## Why It's Good For The Game
- It's good for items to have descriptions in recipe books
- It's good for items to have descriptions in general!
- It's good to not have incorrect recipes
- The produce order thing is just a minor nitpick I finally got around
to do. Not player facing.
- Adding dough slices instead of pouring flour into soup (as one would
normally do to make it thicker) might break immersion, but I think, if
you want to make a delicious cheese soup, it shouldn't transform into
90% gravy, and this is a small sacrifice i am willing to make.
## Changelog
🆑
fix: Removed duplicate and incorrect Yaki Imo recipe
qol: Swapped out the flour in Ælosterrmæsch with two dough slices, to
avoid competing reactions while preparing or cooking
spellcheck: Chicken nugget will have a description in the craft menu,
and fiesta skewers will have a description in general
/🆑
* A collection of food tweaks
---------
Co-authored-by: Profakos <profakos@gmail.com>
* ID card screentips now show you how to assign an account to an ID. (#76998)
## About The Pull Request
Based on discussion regarding player bank accounts and prisoners, I was
sure that Id cards had screentips, and it turns out I was right.
However, the screentips are inaccurate. Alt Click serves a dual purpose.
In an ID card with only a default storage account, alt-click will ask
you to assign a new account to it. After, you can remove credits from it
after it's been assigned. Apparently players have been confused about
assigning their account to an ID card, due to not having a proper
screentip telling them how.
This updates the screentip to show both functions.
## Why It's Good For The Game

Improves visual clarity and better teaches the mechanics related to
economy.
## Changelog
🆑
qol: ID cards tooltips now show how to assign a new account.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* ID card screentips now show you how to assign an account to an ID.
---------
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.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>
* Fixes the South Bronx Paradise bar (#77027)
## About The Pull Request
Makes the South Bronx Paradise bar actually give you your special
present.
## Why It's Good For The Game
Bug fix
## Changelog
:cl:Thebleh
fix: South Bronx Paradise Bars are once again the best weight loss aid
on station
/🆑
* Fixes the South Bronx Paradise bar
---------
Co-authored-by: thebleh <43266738+rdragan@users.noreply.github.com>
* Genetic Sequencers now can scan genetic makeup, not just mutations (#76567)
## About The Pull Request
Adds a feature to the genetic sequencer geneticists has, you can now
right click someone to copy their genetic makeup and export it to the
DNA scanner console.
## Why It's Good For The Game
QOL but mostly more ammo for antagonist geneticists, the enzyme feature
of genetics is seldom used since you need someone to willingly (if they
are alive) step inside the machine which is close to impossible. Not to
mention the esoteric way you can change them.
I feel like the art disguising and deception has been dying and tried to
make it easier in #76508 which got closed for stealing genetics neesh.
this fixes that problem while still serving the same end goal in an
albeit less soulful way
## Changelog
🆑
add: You can now use the genetic sequencer secondary click (RMB) to scan
someone
/🆑
* Genetic Sequencers now can scan genetic makeup, not just mutations
---------
Co-authored-by: Singul0 <127663818+Singul0@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
* Adds a wizard Right and Wrong that lets the caster give one spell (or relic) to everyone on the station (#76974)
## About The Pull Request
This PR adds a new wizard ritual (the kind that require 100 threat on
dynamic)
This ritual allows the wizard to select one spellbook entry (item or
spell), to which everyone on the station will be given or taught said
spell or item. If the spell requires a robe, the spell becomes robeless,
and if the item requires wizard to use, it makes it usable. Mostly.
- Want an epic sword fight? Give everyone a high-frequency blade
- One mindswap not enough shenanigans for you? Give out mindswap
- Fourth of July? Fireball would be pretty hilarious...
The wizard ritual costs 3 points plus the cost of whatever entry you are
giving out. So giving everyone fireball is 5 points.
It can only be cast once by a wizard, because I didn't want to go
through the effort to allow multiple in existence
## Why It's Good For The Game
Someone gave me the idea and I thought it sounded pretty funny as an
alternative to Summon Magic
Maybe I make this a Grand Finale ritual instead / in tandem? That's also
an idea.
## Changelog
🆑 Melbert
add: Wizards have a new Right and Wrong: Mass Teaching, allowing them to
grant everyone on the station one spell or relic of their choice!
/🆑
* Adds a wizard Right and Wrong that lets the caster give one spell (or relic) to everyone on the station
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Deletes a rogue dmi file from the `scanners` code folder (#77000)
## About The Pull Request
It's self explainatory. We've an unused dmi file which wasn't properly
cleaned out during the first aid analyzer rework.
## Why It's Good For The Game
Cleaning out.
## Changelog
Nothing changes for players.
* Deletes a rogue dmi file from the `scanners` code folder
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Weight Machines - Silicon messages and removes screentips (#76993)
## About The Pull Request
Removes the hand screentips for weight machines, as it requires you to
buckle yourself now, making it misinformation. There's no click+drag
tooltip and I dunno if I should add one to something that is obviously a
chair.
Adds messages for Silicons using the weight machine, because I
accidentally added this and thought it was funny enough to keep around.
## Why It's Good For The Game
Less misinformation to players.
Closes https://github.com/tgstation/tgstation/issues/76980
## Changelog
🆑
spellcheck: Silicons using weight machines are now told how pointless
the task was.
spellcheck: Weight machine tooltips no longer lie about using LMB to use
the machine.
/🆑
---------
Co-authored-by: BlueMemesauce <47338680+BlueMemesauce@ users.noreply.github.com>
* Weight Machines - Silicon messages and removes screentips
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: BlueMemesauce <47338680+BlueMemesauce@ users.noreply.github.com>
* Removes two redundant components (#76866)
## About The Pull Request
We're starting to get to have enough components that people don't
realise that what they want already exists but doesn't have the name
they expect 🙃
I recently added `track_hierarchical_movement` which is similar enough
to `connect_containers` that it shouldn't independently exist, even if I
like sending a new signal more than the ugly setup pattern for
`connect_loc`.
`trait_loc` is actually older than `give_turf_traits` but
`give_turf_traits` covers more edge cases than `turf_loc` so seems like
the better one to maintain.
HOWEVER `give_turf_traits` held a list of references to atoms in it,
which isn't great in an element. I couldn't think of a way to completely
eliminate the list, but it isn't a list of references any more so it
shouldn't cause any hard deletions.
## Why It's Good For The Game
Having two components which do the same thing but marginally differently
is confusing and going to cause us trouble down the line.
## Changelog
Not player facing
* Removes two redundant components
---------
Co-authored-by: Jacquerel <hnevard@gmail.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>
* Stabilizes code that flicks overlays to view/all clients (#76937)
## About The Pull Request
Rather then using images and displaying them with client.images, we can
instead simply make an object, give it the passed in image/MA's
appearance, and then vis_contents it where we want.
If you want to animate things, you can just use the atom we return from
the proc call.
This ends up costing about 25% of the best case scenario (one guy
online)
It will save more time with more users, but it also allows us to avoid
the hypersuffering that is passing GLOB.clients into the flick proc. So
I think I'm happy enough with this.
For context, here's average per call cost for flick_overlay_view() right
now.
It winds between 5e-5 and 1e-4. With these changes we should pretty
consistently hit the low end of this, because none of our work really
varies all that much.

(I was using sswardrobe for this, but it ends up being a lot slower so
like, why yaknow)
```
/atom/movable/flick_visual
New: 3.65625ms
Provide: 7.4375ms
Qdel: 9.4375ms
Stash: 9.46875ms
```
## Why It's Good For The Game
Using our tools should not make your code eat cpu time for no reason.
Hearers is expensive, iterating clients is expensive, let's not be
expensive.
* Stabilizes code that flicks overlays to view/all clients
* Not every client needs to see this
* and these could be using SECONDS
* grr DM
* Convert these modular files to seconds too
* Update dance_machine.dm
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Adds in the smoothbore disablers.
* Resolve merge conflicts + ammo HUD stuff
* No better way to do this than a skyrat edit since the proc sleeps
* Fixes a changed path
---------
Co-authored-by: CRITAWAKETS <sebastienracicot@hotmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
* Removes side effects in Destroy from cyborgs, misc related code cleanup (#76867)
## About The Pull Request
- Removes side effects from cyborg `Destroy`
- Right result in more cyborgs getting dusted... Will have to check this
out.
- General AI / cyborg code cleanup
Fixes#76855
## Why It's Good For The Game
Some more consistent, clean code
## Changelog
🆑 Melbert
fix: Cyborgs no longer drop their radio key when deleted, only when
deconstructed first
fix: Cyborgs no longer drop their MMI on deletion, only prior to
deletion. This may result in bad code rearing its ugly head, open an
issue report on the github if you're a cyborg and get ghosted when you
feel like you shouldn't
fix: Runtime from syndie cyborgs spawning
fix: AI deaths are reported to black box
/🆑
---------
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* Removes side effects in Destroy from cyborgs, misc related code cleanup
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* Fixes birdshots cannonballs not spawning by replacing the cannonballs with a stack (#76839)
## About The Pull Request
pretty much just as the Title says, birdshot used the
obj/projectile/bullet/cannonball path instead of having its own stack of
4 cannonballs, this made it so that it couldn't load the cannonballs as
bullet types don't load as actual items to use.
i have added a 4 stack of cannonballs to the obj/item/stack/cannonball
tree so that way they can get slotted in birdshot to replace 'em, also
for use later by whomever else wants a smaller amount of cannonballs as
the only other amount for regular cannonballs is 14 as used by the
skeletal pirate ship.
## Why It's Good For The Game
with birdshots intention to have originally been overrun by pirates i
assume it was meant to actually spawn because the cannon and gunpowder
barrels also spawn for usage, but the cannonballs themselves didn't.
allows players to find 'em in the area in maints they're supposed to be
found in so you can get up to some hijinks as i assume the creator
intended for all you maint dwellers.
## Changelog
🆑
fix: replaces the unspawnable cannonballs in birdshot maintenance with a
stack so that the 4 cannonballs properly spawn, make sure to point them
away from medical!
/🆑
* Fixes birdshots cannonballs not spawning by replacing the cannonballs with a stack
* Update birdshot.dmm
---------
Co-authored-by: Donglesplonge <120208006+Donglesplonge@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
* SPECIES NUKING 2023 EXTRA: Makes skin tones a trait instead of a species variable (#76410)
very similar to https://github.com/tgstation/tgstation/pull/76297, much
simpler though
removes the uses_skintones variable for similar reasons
Species variables are less useful and modular than traits.
If for some reason we ever add a mechanic that for some reason makes
your character use skin tones instead of whatever their original color
is, it will be much simpler to be handled.
not player facing
* Fixes all of the remaining issues
---------
Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
* Fixes mini-fridge name (#76927)
## About The Pull Request
mini_fridge becomes mini-fridge. Shrimple as that
Closes: #76890
## Why It's Good For The Game
Minor grammatical mistake 💀
## Changelog
🆑
spellcheck: Maints fridge doesn't have _ in its name anymore
/🆑
Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>
* Fixes mini-fridge name
---------
Co-authored-by: DaydreamIQ <62606051+DaydreamIQ@users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>
* makes the pinguin a basic animal (#76790)
## About The Pull Request
the penguin now is a basic animal and also now he can go and layed
penguin eggs to make penguin babys also the baby have a new behavier he
will now go and looked for his mom and when he found his mom he will
went to her and be happy when he close to his mom or if he mom is died
he will went to her body and he will be sad and also i putted this
behavier in the baby chicken. also now the pinguen mom will go and
looked for her eggs and when she find a egg she will putted it in the
middile of her legs and walked with it

## Why It's Good For The Game
the pinguen now is a advance ai
## Changelog
the pinguen now have a more advance
🆑
refactor: the penguin is a basic animal
add: the penguin now layed eggs
add: the penguin and the chicken babys will go look for adult penguin or
chicken and be happy when he is near the adult
/🆑
* make the pinguen a basic animal
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
* Optimization pass focused on foam code (saves about 30% of cpu usage I think) (#76104)
## About The Pull Request
Foam is crummy at high load rn, both because it runs on a low priority
background subsystem, and because it wastes a bit of time.
Let's reduce usage (while speeding up a bunch of other stuff too), and
give it more cpu generally.
[Optimizes reagent processing
somewhat](https://github.com/tgstation/tgstation/commit/d409bd4afc3c208cd6f00ff406e1e9f78d5ac5ad)
Turns out most of the cost of foam is the reagents it carries, and the
varying effects they have
I'm doing my best here to optimize them without touching "user space"
too much
That means doing things like prechecking if we're gonna spawn on top of
an existing decal (from glitter, flour, etc), and using that same proc
to also avoid spawning on unacceptable turfs (I had to convert
inheritance to a bitflag system to make this work, but I think that's ok
since we want it imparative anyhow)
It's actually nice for code quality too, since it lets me clean up code
that was using raw locates and weird var pong.
god I wish I had implied types man
[Optimizes foam spreading in its most accursed aspect, reagent
copying](https://github.com/tgstation/tgstation/commit/5cc56a64ad1a22ba7467cb0446b9558560259437)
Holy shit reagent code is a lot.
I'm doing a bunch of small things here. istype in init -> typecache,
removing procs that are called once and loop over a list we JUST looped
over (ph and the caching for reactions in particular)
I am mainly trying to optimize copy_to here, since that's what foam
spams
As a part of this, I removed a pair of update_total and handle_reactions
calls that were done on the reagents we are copying FROM
I have no god damn idea why you would want to do that, but if anything
is relying on the copy proc modifying the source, then that code
deserves to break
Speaking of, I cleaned up handle_reaction's main filter loop a lot,
removed a lot of redundant vars and changed it from a full loop w
tracker vars to an early exit pattern
This meant using a loop label, which is unfortunate, but this is the
fastest method, and it does end up cleaning up the code significantly,
Which is nice
Oh also I made the required_other var function even if there is no atom
attached to the reaction, since I don't see why it wouldn't
This last bit is gonna get a bit esoteric so bear with me
Failing calls (which are most of them) to handle_reactions are going to
be fastest if they need to check as few reactions as possible
One reagent in a reaction's required list is marked as the "primary",
and thus gets to trigger checking it.
We need all the reagents to react anyhow, so we might as well only check
if we have one particular one to avoid double checking
Anyhow, in order to make most calls the fastest, we want these reactions
distributed as evenly as possible across all our reagents.
The current way of doing this is just taking the first reagent in the
requirements list and using it, which is not ideal
Instead of that, lets figure out how many reactions each reagent is in,
then divy reactions up based off that and the currently divvied
reactions
This doubles the reagent index count, and takes the most common reagent,
water, from 67 reactions to I think like 22
Does some other general cleaning in reagent code too, etc etc etc
[Fixes runtimes from the forced gravity element being applied more then
once](https://github.com/tgstation/tgstation/commit/941d0676114fd455a585f2c65ffc79b81e8438b7)
I feel like this element should take a trait source or something to make
them potentially unique, it's too easy to accidentally override one with
another
[Removes connect_loc usage in atmos_sensitive, replaces it with direct
reg/unreg](https://github.com/tgstation/tgstation/commit/de1c76029d5c49dff152f0ea168b9e6c4a4a04aa)
I only really used it because I liked the componentization, but it costs
like 0.2 seconds off init alone which is really stupid, so let's just do
this the very slightly harder way
[Micros foam code slightly by inlining a LinkBlockedWithAccess
call](https://github.com/tgstation/tgstation/commit/744da3694cd4a85b3bdf44d754de57d7570bdd1c)
This is in the space of like 0.05 seconds kinda save so I can put it
back if you'd like, the double loop just felt silly
[Changes how foam processes
slightly](https://github.com/tgstation/tgstation/commit/ee5e633e3256fe7df229af71d78424d502459c16)
Rather then treating spreading and processing as separate actions, we do
both in sync.
This makes foam fade faster when spreading, which is good cause the
whole spread but unclearing foam thing looks silly.
It also avoids the potential bad ending of foam spreading into itself,
backwards and forwards. This is better I promise.
[Bumps fluid priority closer to heavy eaters, moves it off
background](https://github.com/tgstation/tgstation/commit/811797f09db7b060f75f15ad06d0ce8982375f47)
Also fixes a bug where foam would travel under public access airlocks.
## Why It's Good For The Game
Saves a lot of cpu just in general, from both init and live.
In theory makes foam faster, tho I'd have to test that on live at
highpop to see if I've actually succeeded or not. Guess we'll see.
* Optimization pass focused on foam code (saves about 30% of cpu usage I think)
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>