* Fixes toilet bongs, and fixes a serious bug in the crafting system (#72893)
The PR everyone has been waiting for...fixed toilet bong crafting. Now
you can craft them just as before using the new crafting system.

In attempting to fix this I encountered one of the gnarliest, nastiest,
meanest and most infuriatingly difficult to debug bugs I have come
across so far. And it's existed for as long as the crafting system has,
but due to unique circumstances it has been allowed to go unnoticed this
whole time.
Technical details below. Full list of changes here:
- crafting recipes can now contain structures as part of their
requirements
- removed deprecated var 'additional_req_tex' and changed text to use
the 'steps' list instead so they actually show in the gui
- toilet bongs are now passable terrain like normal toilets are
- fixed an atrocious bug with crafting that was by pure coincidence not
causing any problems
- this bug would prevent any recipes that did not contain a material
from deleting properly
- this bug would also cause any recipes that are supposed to use but not
consume machinery to consume them regardless
---
Basically, the bug that took me hours upon hours of debugging and
head-scratching to find is this:
from crafting.dm:
```
main_loop:
for(var/path_key in requirements)
amt = R.reqs[path_key] || R.machinery[path_key]
if(!amt)//since machinery can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
continue main_loop
```
specifically this line:
`amt = R.reqs[path_key] || R.machinery[path_key] `
The culprit ended up being that if you do machinery[path_key] on an
empty list, it can lead to very unexpected behavior (see: EXITING THE
FUNCTION without actually doing anything).
I spent so much time thinking that item deletion wasn't working because
amt was being set to 0, false, or null perhaps when no, it wasn't that.
The function was just exiting out even before the (!amt) check due to
the atrocities committed by someone before me.
Setting amt = `R.reqs[path_key] || R.machinery[path_key]` on the other
hand always evaluates to a positive integer (either the successfully
retrieved reqs amt, or a 1 from the OR expression). It was only by
coincidence that the code did what it was supposed to, because:
1) Every single recipe has R_reqs, so the first part will never cause
the function-exiting failure because the list is never empty.
2) As for the second part of the expression, there are no recipes that
make use of CRAFTING_MACHINERY_USE, so the fact that machinery[path_key]
was never actually being accessed and thus set to a var (which is what
causes the function to exit) didn't matter.
So these two things together have basically allowed a really bad bug to
go unnoticed this whole time. I only noticed it because when trying to
add a third part to the expression it just did not work at all how you
would expect.
The solution is rather simply to add a check like so:
```
main_loop:
for(var/path_key in requirements)
amt = R.reqs?[path_key] || R.machinery?[path_key]
if(!amt)//since machinery can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
continue main_loop
```
Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/18732 .
Fixes a bug with crafting that would inevitably torment someone else as
soon as they tried to add the right kind of recipe, if that hasn't
already happened by now.
<details>
<summary>Toilet bongs are back baby!!</summary>

</details>
🆑
fix: toilet bongs crafting recipes
fix: fixed crafting itself
refactor: cleaned up some old code in the recipes file, added support
for structures in recipes
/🆑
* Update tgui/packages/tgui/interfaces/PersonalCrafting.tsx
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
* Update tgui/packages/tgui/interfaces/PersonalCrafting.tsx
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Boxes created through the crafting menu no longer spawn with their contents full (#72397)
## About The Pull Request
What it says on the tin. Since the contents weren't emptied you could
get infinite beakers, donk pockets, chicken nuggets etc. by making and
remaking a box over and over.
Fixes #72385.
## Why It's Good For The Game
Bugfix. The world does not deserve infinite chicken nuggets yet
## Changelog
🆑
fix: Boxes created through the crafting menu no longer spawn with their
contents full
/🆑
Co-authored-by: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com>
* Crafting/Cooking menu update
* Yeeted away all of the merge conflicts, time to fix the code
* Okay, now it compiles, and after testing, it seems to work just fine
* Actually, early addition of an upstream fix, so those that don't have hunger can still open the cooking menu
* Fixes the units tests by removing the extra comma in the Stuffed Muli Pod recipe
Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
* OpenDream Cleanup Pass - Unused Vars (#71428)
## About The Pull Request
OpenDream (@ Altoids1 specifically) discovered that BYOND will not throw
an unused variable warning if its type doesn't exist. So this removes
those from TG.
Co-authored-by: ike709 <ike709@ github.com>
* OpenDream Cleanup Pass - Unused Vars
Co-authored-by: ike709 <ike709@users.noreply.github.com>
Co-authored-by: ike709 <ike709@ github.com>
* What if meteorslugs were mini cannonballs (#71137)
## About The Pull Request
Meteorslug shells fire effectively mini cannonballs. They're not as
strong, but they tear through everything they shoot, including walls and
airlocks. They're not as lethal as the real deal or go nearly as far
(range of 7, not even a screens length), but they are still pretty
destructive. They don't fling people, but they could potentially barrel
over several people, which I think is a good trade-off.
Meteorslugs need gunpowder (for a bigger shot) and rum (yarr) to
construct.
## Why It's Good For The Game
Only through sleep deprivation do I get such diabolical ideas.
Also, the original functionality wasn't very interesting except for
like, maybe a few niche silly things, but the real value was using them
to get into places. This version still definitely does that. But it's
_cooler_.
(The object displacement was pretty jank and I think this accomplishes a
very similar effect without actively harming why people would look to
use meteorslugs)
## Changelog
🆑
balance: Meteorslugs are now miniature cannonballs. They also need more
gunpowder and rum to be constructed.
/🆑
* What if meteorslugs were mini cannonballs
Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
* Biogenerator tweaks, leather makes more belts and clothing
* merge conflicts
* medbando is a leather recipes like the others, updated meat product biogen design
Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
* Visually update containers when crafting (#71135)
## About The Pull Request
Makes reagent containers update their appearance when crafting.
Fixes#69935, minor but annoying bug, especially when you are playing as
chef.
## Changelog
🆑
fix: Containers visually update after crafting.
/🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Visually update containers when crafting
Co-authored-by: antropod <antropod@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Excercise Equipment is now craftable (#71190)
## About The Pull Request
Imagine if you will a humble chaplain who wants nothing more than for
all of the spiritual folk on the station to get as massive gains as they
can, after finding that they can not just make more exercise equipment
and that the station does not have any in public places, they go annoy
security enough to get into permabrig only to find out that they cant
even unwrench the equipment and move it to the church!!!
NOT ANYMORE!!!

crafting recipies

demonstrating unwrenching and wrenching equipment

crafting a punching bag and punching it
Now you can craft as much exercise equipment as you want! May everyone
on the station get as strong as possible and not just prisoners.
Also I changed the message that plays when you try to use exercise
equipment someone else is using into a balloon alert.

## Why It's Good For The Game
Access to exercise equipment on some maps is limited to static positions
and is currently mostly only for prisoners as every map does not have
public exercise equipment. Expanding the access means that you can have
a Drill Sargent Head of Security or Captain who commands people use
these or allows a psychologist to prescribe healthy exercise habits to
their patients.
I think having the potential for exercise equipment on every map is more
fun and also if prisoners get their hands on tools they should be
allowed to mess with these to annoy security or aid in their escape.
## Changelog
🆑
add: the punching bag, bench press, and chest press are all able to be
crafted and unanchored.
add: crafting recipes for the above
qol: changed a chat message into a balloon alert
qol: adds screentips to equipment (thanks for suggesting i do this
mothblocks!)
/🆑
* Excercise Equipment is now craftable
Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
* Easy's Super Omega "unarmed strike based species var moved to limbs" refractor, unarmed strike striking with specific body parts rather than it just being flavor, and brain based attacking limb selection extra chunky edition. And also bodypart traits.
* Removed all the conflicts, and started converting all the arms and legs to the proper typepaths
* Actually makes the game compile :)
* Makes the maps compile too!
* Early mirror of #71143 because it's more relevant to us
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Bed war: add pillow weaponry and pillowman juggernaut suit (#69977)
* Add pillows you can hit someone you hate with it until they collaspe from exhaustion. The pillow can be made with cloth
* Adds a Pillow juggernaut suit, this suit allows you to automatically hit people with a pillow when you bump into them. It can be made from pillows and duct tape via the crafting menu
* Adds a bumpattack component, this can be added to any item and allows the user to auto attack on bump with a target, used for the juggernaut suit.
* Adds a Pillow hat an alternative to the paperbag hat, also made from duct tape and pillow. Very fashionable!
add: Clown/mime pillows
* The beds in dorm now come properly equipped with a pillow
* Bed war: add pillow weaponry and pillowman juggernaut suit
* repathed SR pillow to /obj/item/fancy_pillow
Co-authored-by: FinancialGoose <92416224+TheBoondock@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
* V8 Engine fixes (#71033)
The V8 engine now allows you to learn the recipe and will no longer runtime when it checks if you already know it.
* V8 Engine fixes
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
* Adds a new black market item, the V8 Engine. (#70393)
This PR adds a new item to the black market uplink, the V8 Engine. The V8 engine is a classic, vintage engine, kept perserved for hundreds of years by black market smugglers, and they'll only ship it to you for an exceptional cost.
* Adds a new black market item, the V8 Engine.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Fixes shields inhands (#70395)
Fixes#70377
Stobe shield has been broken for.... hell I don't even know how long lmao
cl ShizCalev
fix: Fixed some missing shield inhand icons.
fix: The strobe shield's inhand icon now plays the flashing animation when triggered again.
fix: The strobe shield will no longer blind the person holding it when it deflects a blow.
fix: The light from the strobe shield's flash no longer appears in your held inventory slot.
fix: Fixed the east facing left-handed strobe shield sprite being misaligned by two pixels.
/cl
* Fixes shields inhands
* goliath shield
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Carries over carded AIs into crafted intellicards (#70402)
* AIs that are crafted into Intellitater/Lantern is now moved into the new intellicard.
* Allows intellitaters/lanters to be crafted with intellicards that have an AI inside of them.
* Carries over carded AIs into crafted intellicards
Co-authored-by: GoblinBackwards <22856555+GoblinBackwards@users.noreply.github.com>
* Teshari cultural food
* reorganized some file paths
* made the jerky a little more appetizing
* removed unnecessary text from the teshari food define
* Adds the Mothroach (#68763)
About The Pull Request
Yup. That's pretty much it. This PR adds the Mothroach to the game, described as "An ancient ancestor of the moth that surprisingly looks like the crossbreed of a moth and a cockroach."
Do you love the Mothroach? Then you can cuddle with it and pat it, as well as place it on your head for extra cuteness.
What if you hate it, though? You can always kill and butcher Mothroaches in order to mass produce moth plushes for your own profit... How fun!
Either way, you win!
The Mothroach can be picked up and has a special on-head sprite (which looks really cute). It is able to vent-crawl and you may get one by randomly summoning a friendly mob through the gold slime extracts, or by ordering one through the Cargo Requests. After butchered, you may use its hide, a heart, and some cloth to craft a moth plushie, the most devilish of Devil's designs.
Full Preview of all the Sprites (NEW): https://www.youtube.com/watch?v=pdg8FTNEYjI
Preview of some of the Sprites (OLD): https://www.youtube.com/watch?v=9A-8hGCiW0s
In-hand, on-head, and grounded Mothroach sprite credits go to ValuedEmployee.
I did the Mothroach hide sprite though!
Why It's Good For The Game
The Mothroach is incredibly cute and a neat, fresh, new piece of content. Although it could use some future repurposing, right now it's simply a cute exotic pet with a few interactions.
These cute sprites are just too good to go to waste...
I keep seeing people complain about the lack of new content. Well, here's something niche that won't break the whole balance of the game and that will be cute. I seriously cannot see a motive not to add this to the game. Just because it isn't a powergaming tool or something that is seen every shift, that doesn't mean that it won't have a positive influence on the game. As I have stated, right now the Mothroaches are underperforming in terms of interactions and ways of getting them, but adding them is the first step to later improve them.
Changelog
cl
add: The Mothroach, your new local exotic pet
add: Mothroach Hide and Mothroach Meat
add: New crafting recipe for the Moth Plush: 1 Mothroach Hide; 1 heart; 3 cloth
fix: Fixes dead mobs on-head not having sprites
/cl
* Adds the Mothroach
Co-authored-by: Justice <42555530+Justice12354@users.noreply.github.com>
* The Toiletbong and other poetical additions (*click* Noice) (#68193)
* Main
* Added deconstruction and better rotation
* Open flame during usage, emagging
* Wording fix, sound fix
* Extra-indestructable check
* Storage is now a normal datum instead of a component? Noice
* Updated harvest.dmi after bell pepper resprite
* The new atom storage broke the emag capability, added a small fix
* The Toiletbong and other poetical additions (*click* Noice)
Co-authored-by: LordVollkorn <66637090+LordVollkorn@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Tsu's Brand Spanking New Storage: or, How I Learned To Pass Github Copilot As My Own Code
* Delete storage.dm
* yippee
* shit
* holy shit i am stupid
* more fixes
* fuck
* woops
* ash ritual magic
* oops
* recommended changes and fixes
* there
* ashwalker only
* refactor
* there
* the curse needs work
* there, curse is good
* componentify the elements
* adds new rituals and some qol
* fix a small issue
* This tail refactor turned into an organ refactor. Funny how that works.
* Firstly, fixing all the conflicts.
* Fixes all our maps (hopefully)
* Actually, this should fix pod people hair :)
* Almost everything is working, just two major things to fix
* Fixed a certain kind of external organ
* Cleaning up some more stuff
* Turned tail_cat into tail because why the fuck are they separate?
* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file
* Adds relevant_layers to organs to help with rendering
* Makes stored_feature_id also check mutant_bodyparts
* Fixes the icon_state names of ALL the tails (pain)
* Fixes wagging, gotta refactor most mutant bodyparts later on
* I Love Added Failures
* Fixed some organs that slipped through my searches
* This could possibly fix the CI for this?
* It doesn't look like it did fix it
* This will make it pass, even if it's ugly as sin.
* Fixed Felinids having a weird ghost tail
* Fixes instances of snouts and tails not being properly colored
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Adds steam vents to maintenance, adds some flavor to maintenance. (#66915)
* Steam Vent Challenge (Do not meme)
* Fixes icebox, I think
* Changes to how smoke behaves appears to have removed the need for the opacity setting on the vent. Sounds.
* Mapmerge sama please
* Adds signal system, crafting recipe, and some basic crafting organization.
* Potential fix
* Apply suggestions from code review
Co-authored-by: Seth Scherer <supernovaa41@ gmx.com>
* makes changes thanks anturk
Co-authored-by: Seth Scherer <supernovaa41@ gmx.com>
* Adds steam vents to maintenance, adds some flavor to maintenance.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Seth Scherer <supernovaa41@ gmx.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Vim mecha changes (#66153)
This PR changes the following:
fixes a bug with Vim overlays, making it always appear as if there was a pilot inside, even after leaving it
adds a balloon alert when a mob fails to enter the mech due to its size
adds a crafting recipe for Vim in the "robots" category
allows using Vim as a circuit shell
allows small mobs to use the mech as well
My reasoning behind the changes:
fixing the overlay bug - bugfixes good, bugs bad
balloon alert - it should help reduce confusion among players who can't figure why on earth they cannot enter the mech
crafting recipe - I think a crafting recipe will make it a lot more accessible to players, especially because there is no way to learn about its existence in-game
circuit shell - non-standard circuit shells can be pretty fun and people seemed to enjoy the ability to use circuits inside their piano synths or cameras, so I figured we could expand on this, while giving players more ways to interact with sentient pets
maximum mob size increase - Vim has never really been built too often, most likely because even if people got their hands on a sentient pet, it wouldn't probably fit in the tiny mecha anyway. Currently pretty much only butterflies, rats and cockroaches can use Vim and they pretty much never become sentient.
* Vim mecha changes
Co-authored-by: B4CKU <50628162+B4CKU@users.noreply.github.com>
* Making medbots through the crafting menu now accounts for medkit and health analyser type (#64725)
In it's current state, using the crafting menu to create a medbot will always create one with the default medkit and health analyser, regardless of the type used to craft it. This PR fixes it, meaning you can now use the crafting menu to create medbots with the different healthkit types for their healing bonuses and you won't lose your special medkit/advanced health analyser if it is destroyed.
* Making medbots through the crafting menu now accounts for medkit and health analyser type
Co-authored-by: GoblinBackwards <kinggreenyoshi@gmail.com>