* 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
e929cf39cd/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
e929cf39cd/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](d409bd4afc)
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](5cc56a64ad)
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](941d067611)
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](de1c76029d)
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](744da3694c)
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](ee5e633e32)
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](811797f09d)
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>
Replaces lava and chasm's "safeties" and ignoring turf slowdown on catwalks with traits and a new element. (#76376)
This adds a new element for movables that grants turfs they're in
traits, changes lava and the chasm component to check for traits
instead, ditto for turf slowdown. It also implements another trait that
prevents wet floor from slipping people, as well as some other changes
(feel free to opine on them really):
- Tables and conveyor belts now stop turf slowdown, much like catwalks,
as I imagine people walking on them are not really touching the floor.
(I'd include protection against lava too... until they melt, but that'd
mean finding a way to have these objects burn in the first place, and
lava code is still stupid despite a years old refactor I did)
- Tables also stop slippery turfs from slipping (bananas, soaps etc.
still apply). I wish there were a way to make some objects slippery by
coating them in water vapor or splashing water/lube, but that's outside
the scope of this PR.
- Fixed an edge case in which a mob standing on a lava turf would be
left permanently visually on fire if the lava is changed to another kind
of turf.
- Removed unused code from stone tiles.
I'm going to include these traits in that global list for admin-added
traits... tomorrow perhaps. 💤
Replacing some hard-coded mechanics with easier to use traits and an
element, which I also need for the submerge element PR.
🆑
refactor: Replaced hardcoded "safeties" for lava, chasms and ignoring
turf slowdowns on catwalks with traits.
balance: much like catwalks, tables and conveyors also disable turf
slowdowns.
balance: slippery turfs won't slip you when walking on a table.
fix: Fixed an edge case in which a mob standing on a lava turf would be
left visually but permanently on fire if the lava is changed to another
kind of turf.
/🆑
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Macros multi-z code, removes the false premise of manual offsets (#76248)
## About The Pull Request
[Removes the pretense of relative multiz
levels](0293fdc2bd)
Our multiz system does not support having a z level that is only
connected one way, or which goes down backwards or anything like that.
That's a fiction of the trait system, the actual backend has never
really supported this.
This pr removes the assumptions we were making backend around this, and
uses that to save cpu time.
I am also converting multiz_levels from an assoc list to a pure one,
which saves significantly on access times and cleans up the code
somewhat.
Also I'm making the get_below/get_above procs into macros, for the sake
of cpu time.
[Converts the starlight disease to use BYOND's directional defines
instead of our
own](7d698f02d9)
To some extent spurred on by
https://github.com/DaedalusDock/daedalusdock/pull/298, tho it was known
before
## Why It's Good For The Game
Faster multiz code, faster init, etc etc etc
* modular files how very dare you
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Fixes carbon bodytypes not always being synchronized with bodyparts (#76522)
Fixes https://github.com/tgstation/tgstation/issues/76481
TLDR /mob/living/carbon/human/species subtypes were NOT updating their
bodytypes on spawn due to absurd and wacky carbon bodypart creation code
that meant try_attach_limb() never got called (What the FUCK?)
* Fixes CI too
* [NO GBP] Fixes dumb usage of TRAIT_LIVERLESS_METABOLISM i caused (#76500)
## About The Pull Request
TRAIT_LIVERLESS_METABOLISM should do what it implies, and make you
always metabolize as if you were liverless.
This was a stupid mistake on my part because I wasn't aware
TRAIT_STABLELIVER was a thing.
## Why It's Good For The Game
TRAIT_LIVERLESS_METABOLISM and TRAIT_STABLELIVER should not behave the
exact same.
## Changelog
Not quite player facing.
* I fucking swear I fixed this before
---------
Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
* New traitor item: Polarized Contacts (#76752)
## About The Pull Request
Adds a new simple but sweet traitor item for 3 tc, polarized contacts.
Use them in hand to upgrade your eyes to have +tier 2 flash resistance.
Single use.
Now if you have welder protection of 2 or higher, and someone checks
your eyes with a flashlight, your pupils to not dilate. This is
potentially possible non-antagonistically through the use of upgraded
robotic eyes.
## Why It's Good For The Game
The idea behind this change is to allow traitors some counterplay
against revolutionaries and security. If a traitor thinks they are about
to go into combat with people with flashes, they will be rewarded for
preparing. It also fills a similar role as no-slip shoes as being a low
cost but always nice to have passive item, which I don't think we have
enough of.
Its arguable that this should only be worth 2 tc to be on-par with
noslips, or that it should be more because flash protection is more
valuable.
## Changelog
🆑 itseasytosee
add: A new traitor item has been added, Polarized Contacts!
/🆑
---------
Co-authored-by: Sealed101 <cool.bullseye@ yandex.ru>
* New traitor item: Polarized Contacts
---------
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
Co-authored-by: Sealed101 <cool.bullseye@ yandex.ru>
SPECIES NUKING 2023: Head flags 2: Electric Boogaloo (#76298)
Continues the work I started on
https://github.com/tgstation/tgstation/pull/76074
Fixes https://github.com/tgstation/tgstation/issues/73782
Implements a bunch of wrapper procs for hair style, facial hair style,
etc etc the whole nine yards.
Fixes many issues, especially with gradients because I did sloppy tired
code that didn't work there.
Makes head/get_limb_icon() not a disgusting mess (well, at least makes
it less of a disgusting mess).
Actually makes hair and lips depend entirely on the bodypart.
🆑
refactor: Head rendering code has been updated significantly... Again.
Please report any issues with hair, facial hair, lipstick and such.
/🆑
Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
* Some iron floor fixes. (#76785)
fixed that borgs cant merge their floor with other iron floor fixed
power amount floor tiles use
## About The Pull Request
- Changed energy cost for borgs so its not the same as for rods.
- Made cyborg's floor tiles merge with base floor tiles and not the
cyborg base ones, so you can pickup floortiles.
## Why It's Good For The Game
Things work like intended.
## Changelog
🆑
fix: fixed energy cost on floor tiles for engi borgs.
fix: engi borgs can now properly merge base floor tiles with other base
floor tiles.
/🆑
---------
Co-authored-by: Time-Green <7501474+Time-Green@ users.noreply.github.com>
* Some iron floor fixes.
---------
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@ users.noreply.github.com>
* Signalizes an AI card thing (#76869)
## About The Pull Request
Changes this code to be signalized on AI cards
76bddbd903/code/modules/mob/living/silicon/ai/death.dm (L44-L49)
Minor code improvements as well (Moving the sleep out from flushing into
its own async proc)
## Why It's Good For The Game
Cringe code
## Changelog
🆑 Melbert
code: AI cards should react more snap-ily to having their occupant
perish
/🆑
* Signalizes an AI card thing
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Converts sec armories to using the (not) random mapping spawners (#76392)
## About The Pull Request
Title.
## Why It's Good For The Game
Armories aren't really a dense area mapping wise, just a few guns there,
armor there, and some fluff security stuff (like HUDs or whatever).
This PR just converts most of the heavy stuff (armor, helmets, guns)
into spawning helpers with the aim to make mapping armories just a tad
bit quicker and easier.
The only thing this does kinda nuke is the neatly stacked stuff, which
the mapping helpers kinda suck at doing, but its not totally woeful.
## Changelog
🆑 Jolly, timothymtorres
code: Jolly: Armories across all maps have been tweaked slightly. Report
to a Nanotrasen security advisor for any missing guns, armor, helmets or
anything else that was there previously (that means, post an issue on
Github if theres an issue!!)
code: timothymtorres: Random item spawners now support better control of
their X/Y pixel offset.
/🆑
---------
Co-authored-by: Tim <timothymtorres@gmail.com>
* Adds the spawners to the modular armories where applicable
* Update random_spawners.dmi
* grr
---------
Co-authored-by: Jolly <70232195+Jolly-66@users.noreply.github.com>
Co-authored-by: Tim <timothymtorres@gmail.com>