Commit Graph

16208 Commits

Author SHA1 Message Date
lessthanthree
de46c57264 Tram Mk. IV hotfixes [NO GBP] (#73243)
## About The Pull Request
Fixes some little issues in
https://github.com/tgstation/tgstation/pull/73057

- tram doors only crush people if either emagged (100%) or
malfunctioning (15%)
- emag works on tram doors
- crossing signals use correct amount of power, increased brightness
- crossing signals and destination signs consume power when idle
- green static crossing signal shuts off when power lost
- left/right emag icons are swapped
- tram bench override shouldn't override all benches | Fixes
https://github.com/tgstation/tgstation/issues/73250
- reduced damage from tram door crushing (60 > 45)

## Changelog
🆑 LT3
fix: Fixed motion sensors on tram doors, they will now crush you much
less often!
balance: Reduced damage from being crushed by tram doors
code: Un-nested emag blacklist
code: emag works properly on tram doors
fix: Backwards tram door sparks animation
fix: Tram displays power consumption
fix: Tram crossing signals power consumption
balance: Increased brightness on tram crossing signals
fix: West Wing NW/SW and East Wing NE/SE crossing signals now shut off
when power is lost
fix: Tram benches don't override standard benches
fix: Reduced saturation and brightness of standard bench
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-02-05 20:47:26 -07:00
Comxy
7e41cd3c0b Netherworld Mobs Refractor (#73086)
## About The Pull Request

This PR refactors netherworld mobs into basic mobs as best as possible.
Also makes some of them run faster when they are getting damaged or deal
more damage. Now the mobs might be able to keep up a little with the
players.
## Why It's Good For The Game

Makes the mobs have better movement and more dynamic movement. Makes the
quality of these mobs better.
## Changelog
🆑
add: Added new damage buffs for netherworld mobs
refactor: Refactors netherworld mobs into basic mobs
/🆑
2023-02-05 12:42:07 -07:00
SyncIt21
c4744f419b Adds examine, balloon alert & screen tips for Meat Spike Frame (#73126)
## About The Pull Request
- Examining a meat spike frame will tell how you can either deconstruct
it with an welding tool or add spikes to it with iron rods
- Examining a meat spike will tell you how to remove its spikes and how
to basically use it
- A balloon alert will pop up if you don't have enough iron rods to add
spikes to a meat spike frame
- Screen tips when holding the correct tool are displayed

## Why It's Good For The Game
New players don't have to wiki this and honestly i got confused the
first time i used it so there is that. More information basically


## Changelog
🆑
qol: examining a meat spike frame & meat spike will tell you about
itself
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-02-05 12:26:43 -07:00
Rhials
a155df74a0 Abductor scientist self-retrieve failure/runtime fix (#73172)
## About The Pull Request

Since the abductor outfit/implant would load before the abductor ship
(and it's teleport pad) when first generating a team, a runtime would
occur when trying to link the pad to the implant. Another would occur
every time you attempted to retrieve yourself (as the linked pad would
be null), preventing recall and completely neutering an abductor team's
most important maneuver.

Now, using the implant will perform the linking process again if no
linked pad is found, and provides the owner with a warning if (by some
great calamity) they genuinely have no pad to teleport back to. This
solves the issue of the implant sometimes not linking to a pad properly
on initialize, and makes them way less prone to breaking.

Apparently this has been broken for a while, presumably since the
abductor ship was made into a lazyloading template.
## Why It's Good For The Game

The funny silly grey men get to torture the poor hapless crew once
again.
## Changelog
🆑
fix: abductor scientist's retrieval implants will now properly recall
the owner, and inform them upon recall failure.
/🆑
2023-02-05 12:20:09 -07:00
Mothblocks
d67555a0b5 the inevitable Revert "Refactors admin verbs from giant ass lists into datums" in case stuff breaks (#73206)
Reverts tgstation/tgstation#72407
2023-02-05 11:44:38 +13:00
SuperSlayer
ffff29b5f8 Improves the error message of inducer (#73183)
## About The Pull Request

Now instead of saying "Error unable to interface with device" it says
"Error: unable to interface with device".

## Why It's Good For The Game

The message now sounds better

## Changelog
🆑
spellcheck: Added a ":" to inducer error message
/🆑
2023-02-04 10:05:56 -08:00
CapybaraExtravagante
bd81d32080 Makes some improvements to how AI can use JPS with movement loops (#72685)
## About The Pull Request

This PR makes some changes to how JPS is used in movement loops, as it
was causing a variety of issues:

- Fixed some code where JPS would fail because the path is still being
made. Instead, the movement loop will now wait.
- Reduced the subsystem wait for the pathfinder subsystem from 2 seconds
to 0.1 seconds. @LemonInTheDark told me that this is better, I'll update
this with a better explanation once I squeeze it out of him :D
- Allows you to provide an initial path to the movement loop, in case
you pre-calculated one while making a plan.

## Why It's Good For The Game

Makes working with JPS a bit easier when making AI.

---------

Co-authored-by: Capybara <Capybara@CapybaraMailingServices.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-02-03 18:40:47 -08:00
Zephyr
7f25d7f17b Refactors admin verbs from giant ass lists into datums (#72407)
## About The Pull Request

See title.
## Why It's Good For The Game

Makes it easier for people to add new admin buttons, and also removes
the giant ass ugly lists that are an affront to my eyes.

Yes you are still able to call them manually via the verb bar

![image](https://user-images.githubusercontent.com/12817816/210163285-2ecb4b59-67b4-47d2-b324-77048ce852fe.png)

![image](https://user-images.githubusercontent.com/12817816/210163288-5a0ec98c-9589-4cab-8a6b-1ab5151aa040.png)
## Changelog
🆑
refactor: Admin verbs are now datums with a dedicated panel handler
admin: Admin verbs now come with a handy description when you hover over
them!
/🆑

---------

Signed-off-by: GitHub <noreply@github.com>
2023-02-03 16:32:37 -08:00
Roryl-c
9c06a13d0c Burn wounds bugfixing (#73113)
## About The Pull Request
Fixes three bugs related to burn wounds and medical gauze:

- Septic limbs could still heal slowly in stasis, despite the intention
being for the limb to be totally lost
- Limbs undergoing sepsis did not apply the intended cerebral paralysis
trauma
- Medical gauze can be re-applied immediately to no effect
## Why It's Good For The Game
Restores the original intent of these mechanics. Burn wounds will be
more predictable, as a septic wound can no longer be healed through any
means except cryo. Medical gauze now makes more sense and stops you from
blowing a whole stack for no effect.
## Changelog
🆑
fix: burn wounds going septic now properly paralyze the limb
fix: septic burn wounds no longer heal on stasis
fix: gauze now properly stops you from re-wrapping limbs that already
have fresh gauze
/🆑
2023-02-03 14:22:06 -07:00
cacogen
58949ebe0c Replace most uses of say() on tape recorder with balloon alerts to reduce spam (#72784)
## About The Pull Request
The tape recorder would spam the chat with multiple spoken lines when
Play was pressed on an empty tape or when playback ended. This fixes
that by replacing the spoken lines with balloon alerts only visible to
the user of the tape recorder.

Playback still uses say().
## Why It's Good For The Game
Less chat spam
## Changelog
🆑
qol: Tape recorder actions (e.g. starting/stopping playback) now use
balloon alerts instead of say() to reduce chat spam
fix: You can no longer get a tape stuck in the tape recorder by
unspooling it before inserting
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-02 21:06:01 -07:00
NamelessFairy
7740b791bc Last TGC Holodeck PR before the freeze! Card marking and Blank cards! (#73013)
## About The Pull Request

This should be the final PR required to finish my goal of the holodeck
TGC arena having all the features of the tabletop version. Marking cards
(e.g. for hivemind cards) and cards that summon other cards are both
intended to use the flipper as a counter. This is not possible on the
holodeck and as such this PR adds that functionality. When a card is in
a holder a new option to mark the card has been added which will add a
small indicator to the top right of the card summon when activated. For
empty card holders you can now right click them to create a blank card,
you will be prompted to input a name for the blank card, (e.g. Resin
Wall) and then the card will act like a regular card.
## Why It's Good For The Game

TGC can now be played in its entirety on the holodeck, at this point all
tabletop features should have representations on the holodeck.
## Changelog
🆑
add: You can now mark TGC cards on the holodeck battle arena, useful for
keeping track of effects such as hivemind.
add: Right clicking a card holder on the TGC holodeck battle arena will
allow you to generate a "blank card", useful for when using cards that
summon other cards, such as the xenomorph hivelord.
spellcheck: Capitalized some descriptions for TGC machines
/🆑
2023-02-02 20:56:53 -07:00
necromanceranne
35f0a93023 Purchasing weapon goodie packs require weapon permits, rather than actually being a head of security (includes other small changes) (#73044)
This makes it so that you need a weapon permit to be able to purchase
and open weapon goodie packs. The only one that still needs armory
access is combat shotguns.

In addition:

You can buy disablers and lasers as goodie packs. Disablers come with a
holster to stow your gun in, and also allow a security officer the
ability to stow two disablers in the holster if they choose to buy
another.

Energy holsters (what were just thermal holsters) can also store mini
ebows because I just kind of forgot about them the first time around,
oops!
2023-02-02 18:40:21 -05:00
lessthanthree
4894878ff6 Tram Mk. IV (#73057)
## About The Pull Request
- After one too many tram malfunctions, Nanotrasen's insurance provider
finally sprung the cash for a new tram. Made with the latest in
lightweight materials, there's more capacity than ever before to shuttle
your crew around the station.


https://user-images.githubusercontent.com/83487515/215639768-3f7fcb84-cfd2-4efe-b578-998197651f13.mp4

- Consolidates all the tram turfs, objs, and structures into respective
.dm files because they were haphazardly spread everywhere.
- Fixes tram doors playing open/close animations when they're already in
the correct state, corrects timing for when they change density.
- Tram now correctly has an operating status and will stop functioning
when power is lost.
- Call buttons no longer dispatch a tram that doesn't have power.
- Fix for emergency exit when tram has no power.
- Running at closing tram doors is a gamble, you may be crushed
- Fixes https://github.com/tgstation/tgstation/issues/73125

## Why It's Good For The Game
Looks nice, more space, tram doors demand a pound of flesh.
## Changelog
🆑 LT3
imageadd: Nanotrasen's insurance provider finally sprung the cash for a
new tram. Made with the latest in lightweight and mostly* non-flammable
materials, travel in comfort and style!
code: All tram components are now organised based on type
code: Tram is now aware if it has power or not
del: Removed movement slowdown running on tram plates
fix: Tram call buttons will not work calling an unpowered tram
fix: Tram doors will no longer cycle open/closed when they're already in
the correct position
fix: Fixed an edge case where running onto the tram you bounce off the
open door as if it was closed
fix: Unpowered tram doors can only be forced into the open position
fix: Westbound travel shows the correct controls animation
add: Tram doors take a chunk of flesh if you run at them last minute
qol: Reduced duration of amber stage on tram crossing signals 
/🆑
2023-02-02 14:21:46 -08:00
John Willard
c097f167b1 Completely removes do_mob and do_after_mob (#73117)
## About The Pull Request

This is a remake of #70242

Replaces all instances of ``do_mob`` and ``do_after_mob`` with
``do_after``.

## Why It's Good For The Game

All 3 of these are just copy pastes of eachother but some miss some
features (like do_after not checking for target loc change, which helps
towards fixing https://github.com/tgstation/tgstation/issues/66874
though it doesn't because mechs are setting ``do_after`` on the mob in
the mech) and signals only being used on ``do_after``.

## Changelog

🆑
fix: Mechs should now cancel out of drilling when they move.
/🆑
2023-02-02 21:17:20 +00:00
Tim
4151cf13d3 Barsign UI/UX Improvements - Emissive effects, balloon alerts, and refactored code (#73106)
The barsign code is over a decade old so this is a big refactor with
some notable improvements:

- Emissive effects (neon lights now glow in the dark)
- Balloon alerts instead of `to_chat` messages
- Mapping helpers based on direction and all_access
- Barsigns are considered machinery now and use power
2023-02-02 16:00:18 -05:00
SeigaSeiga
fe28420020 Changes spear custom_materials values to be more appropriate (#73120)
## About The Pull Request

The iron and glass spear was, for some reason, given material values
that perfectly encapsulated the cost of making it: accounting for rod,
cable, and shard. No other items as far as I can tell do this, with most
tools recycling at a material loss. The material total for the basic
spear now only accounts for the rod and the glass, introducing a small
loss factor into autolathe recycling.

Different glass spears, such as plasma glass and titanium glass spears,
also have been given their appropriate material values.

Bamboo and bone spears are now made of bamboo and bone, and recycle at a
much bigger loss factor than their rod/glass counterparts. [Recycling
these into an autolathe gets those materials stuck uselessly in the
lathe unless you deconstruct the lathe, but that's a completely separate
problem that requires a smarter coder than I to fix. autolathes accept a
LOT of materials they can't actually use/print rn. #73123]

## Why It's Good For The Game

Crafting and de-crafting a spear is no longer a materially perfect
process. Examining a spear made of plant no longer tells you that it's
made of iron and glass.

## Changelog
🆑
fix: Different types of spear now display accurate materials on examine,
and recycle appropriately.
/🆑
2023-02-01 23:14:07 -07:00
SyncIt21
19d918086c RPD UI ,bunch of pipe fixes & stack garbage collection (#72957) 2023-02-01 13:01:57 -08:00
Fikou
6f4e853be0 you can no longer change non null rod null rods (#73104)
## About The Pull Request
the initialize used an istype checkf or null rods. on a null rod.
obviousl this never worked
,makes it use a direct type check

## Why It's Good For The Game
stupid

## Changelog
🆑
fix: you can no longer change null rods that arent the normal null rod
into different types
/🆑
2023-02-01 14:33:35 +01:00
SyncIt21
5ba8cb295b Station monitoring console patches (#73096)
## About The Pull Request

- Distro & Waste loop sensors were only displaying the values of the air
on its turf not the actual pipes they were on, so the values were always
constant. Thats fixed now.
- Created a macro to map chamber id to air sensor to avoid typos. This
also fixed being unable to connect to the waste loop sensor due to a
typo in the word "_sensor".
- When reconnecting to a different chamber other than distro & waste
`atmos_chambers` is not lost when switching so you can once again
connect back to distro & waste. After reconnecting make sure to again
select the chamber from the drop down box cause the ui doesn't update
automatically


https://user-images.githubusercontent.com/110812394/215701505-105eba4d-d5d1-4a09-9ac7-0ab73fee2196.mp4

Fixes #73055
## Changelog
🆑
fix: distro & waste sensors not reading values from the actual pipes
they are on
fix: losing distro & waste options from the drop-down box after
connecting to a new sensor.
refactor: all occurrences of _sensor with a macro to avoid typos.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-31 23:02:50 -07:00
Sol N
a47afd9051 2 New Positive Quirks! (#72912)
## About The Pull Request

I added a few quirks to a downstream that I feel fit well with tg so
here they are.

First up is Poster Boy, a quirk that gives you three mood altering
posters, similar to the traitor objective to hang up demoralizing
posters. You spawn with a box that has one poster that will uplift the
entire crews spirits and 2 that are unique to your department. Captain
counts for security and assistants get only neutral posters. Finally,
with a crayon or spraycan, if you are any antagonist you can make your
poster into one of the ones from the traitor objective.

![dreamseeker_nRy44SL9Jb](https://user-images.githubusercontent.com/116288367/214109008-6f1b4b7c-e800-4142-be6d-926a8e975973.png)
example of quirk posters
Costs 4.


Finally, the characterful Throwing Arm quirk, which lets you throw
objects further (but not harder) and means you will never miss shots
into the disposals bin.
Costs 7.

previously i had a food subscription quirk here as well but i pulled it
out and plan to re-add it as a separate PR in march, where it will now
give you ingredients to cook a meal with occasionally.

## Why It's Good For The Game

Positive quirk variety is good and fun, I think that these positive
quirks are reasonable ones that offer unique things that the current
positive quirks do not.
Poster boy gives people a reason to run around and claim wall real
estate for their department and hopefully can build more solidarity in
departments, the hidden antag feature probably has uses but is just for
styling on people.
Throwing arm offers a fun character trait that probably can have some
slight uses and encourages the use of throwing weapons and tools more.
Also it is good to have a way to never miss the disposals bin. It's so
embarrassing.

## Changelog
🆑
add: Poster boy and Throwing arm positive quirks.
imageadd: added posters for poster boy quirk
/🆑
2023-02-01 12:16:57 +13:00
LemonInTheDark
51f02b5acc Fixes critical plane masters improperly not being readded in show_to (#72604)
## About The Pull Request

[Adds support for pulling z offset context from an atom's
plane](9f215c5316)

This is needed to fix paper bins, since the object we plane set there
isn't actually on a z level.
Useful elsewhere too!

[Fixes compiler errors that came from asserting that plane spokesmen had
a plane
var](b830002443)

[Ensures lighting backdrops ALWAYS exist for each lighting
plane.](0e931169f7)

They can't float becuase we can see more then one plane at once yaknow?

[Fixes parallax going to shit if a mob moved zs without having a
client](244b2b25ba)

Issue lies with how is_outside_bounds just blocked any plane readding
It's possible for a client to not be connected during z moves, so we
need to account for them rejoining in show_to, instead of just blocking
any of our edge cases.

Fixing this involved having parallax override blocks for show_plane and
anything with the right critical flags ensuring mobs have JUST the right
PMs and relays.
It's duped logic but I'm unsure of how else to handle it and frankly
this stuff is just kinda depressing.
Might refactor later

[show_to can be called twice successfully with no hide_from
call.](092581a5c0)

Ensures no runtimes off the registers from this

## Why It's Good For The Game

Fixes #72543
Fixes lighting looking batshit on multiz. None reported this I cry into
the night.

## Changelog
🆑
fix: Fixes parallax showing up ABOVE the game if you moved z levels
while disconnected
/🆑

---------

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-31 10:25:38 +00:00
LemonInTheDark
e9c87c0acb Starlight Polish (Space is blue!) (#72886)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Adds support to underlays to realize_overlays
Ensures decals properly handle plane offsets
Fixes space lighting double applying if it's changeturf'd into. this
will be important later
Makes solar vis_contents block emissives as expected
Moves transit tube overlays to update_overlays, adds emissive blockers
to them

#### Adds render steps

An expansion on render_target based emissive blockers. 
They allow us to hijack an object's appearance and draw it somewhere
else, or even modify it, THEN draw it somewhere else.
They chain quite nicely

Fixes shuttles deleting z holder objects

#### Makes space emissive, makes walls and floors block emissives
The core idea here goes like this:
We make space glow, and give its overlays some color

This way, the tile and space parallax remain fullbright, along with
anything that doesn't block emissives, but anything that does block
emissives will instead get shaded the color of starlight

This requires a bit of extra work, see later

This is done automatically with render relays, which now support
specifiying layer and color (Need to make an editor for these one of
these days)

The emissive blocking floor stuff requires making a second render plate
to prevent double scaling

Also adds some new layering defines for lighting, and ensures all turf
lights have a layer. We'll get to this soon

#### Makes things in space blue

We color them the same as starlight, by taking advantage of space being
emissive
This means that things in space that block emissive will block it
correctly and be colored blue by the light overlay, but space itself
will remain fullbright

This does require redefining what always_lit means, but nothing but
cordons use that so it's fineee


#### Makes glass above space glow, and some other stuff

Glass tiles that sit above space will now shine light with matching
color to the glasses color. This includes mat tiles.

Glass tiles (not mat because they have no alpha) also only partially
block emissives.
Adds a new proc that uses render steps to acomplish this, essentially
we're cutting out bits below X alpha and drawing what remains as an
emissive.

#### Modifies partial space showing to support glow

Essentially, alongside displaying space as an underlay, we also display
a light overlay colored like starlight.
That starlight overlay gets masked to only be visible in bits that do
not contain any alpha.

We also mask the turf lighting to not go into bits that have no alpha,
to ensure we get the effect we want.
This is done with that lighting layer thing I mentioned earlier.

#### Makes appearance realization's list output ordered

I want it output in order of overlay, sub overlay suboverlay, next
overlay
Need to use insert for that

## Why It's Good For The Game

Pretty!
Also having space be emissive is a very very good way to test for fucked
emissive blockers (If it's broken why are we even drawing the overlay)
I know for a fact mob blockers on lizards and socks are kinda yorked, I
think there's more

<details>
<summary>
Old
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916157-d4b38aa7-3ab6-42a4-989f-7bfba2dc2cba.png)

![image](https://user-images.githubusercontent.com/58055496/213916077-637fa288-bbee-477d-aded-730d9683477e.png)

![image](https://user-images.githubusercontent.com/58055496/213916088-0657a8a2-5627-48e2-8c4b-870c90ef2072.png)

</details>


<details>
<summary>
New
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916107-2af74e64-1817-4a44-b528-180a9160cb9e.png)

![image](https://user-images.githubusercontent.com/58055496/213916115-5fa36fcc-b988-4ccf-850e-21c26ed463d0.png)

![image](https://user-images.githubusercontent.com/58055496/213916120-6833187d-b12e-42a7-ac4b-63c56deb71e5.png)

</details>

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Space now makes things in it starlight faintly blue
fix: Glass floors that display space now properly let space shine
through them, rather then hiding it in the dark
add: Glass floors above space now glow faintly depending on their glass
type
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-01-31 09:52:27 +00:00
Dani Glore
5cf5037a97 Fix: DNA Infuser & Unit Tests, Organs Bugfixes (#73003)
## About The Pull Request

>_"I don't remember buying tickets to Mutants on Ice."_
>-Duke Nukem

This PR is (hopefully the final) part of a series of my continuing
refactors of the DNA Infuser. This PR represents a "quality pass" which
should also iron-out the rest of the most impactful bugs.

Granular list of changes:
- This PR adds unit tests for the DNA Infuser organs and
`/datum/status_effect/organ_set_bonus` as recommended by @AnturK
- I noticed that the base `/datum/infuser_entry` was being used in the
machine for the Fly and "rejected" infusions, whereas usually we would
expect it to be a base type used only as a development template. I
corrected this issue and created `/datum/infuser_entry/fly` to be used
for that use-case instead.
- Added `/mob/proc/can_mutate()` and `/mob/living/carbon/can_mutate()`
to replace a few copied lines across several files. The proc is normally
used in the context of mutating a Human via their DNA.
- I fixed a ton of typos in organ-related code, specifically where
"receiver" was typo'd as "reciever". There are far more of those typos,
but I limited the scope of my changes to organs.
- I noticed a bug in `/datum/species/proc/regenerate_organs` wherein a
race condition caused an organ to remove itself before it's done
inserting itself. This happens because the Fly organ set bonus runs
`regenerate_organs` which calls `Remove` on the organ while `Insert` is
still in the call-stack. I added `INVOKE_ASYNC` as a workaround, and
also changed the order the signals are emitted to prevent future bugs.
This bug primarily only impacted the flyperson species transformation,
which was part of the DNA Infuser's flyperson infusion organ set bonus.
- In my last refactor PR #72745 I also introduced a bug in
`/obj/machinery/dna_infuser/proc/infuse_organ` wherein I forgot to add
the usage of `new` when attempting to implant new organs, and this PR
fixes the erroneous code.
- Fxed a bug which causes the organ set bonus to activate when mixing
organs from different sources, which is caused by a developer oversight
wherein all `/datum/status_effect/organ_set_bonus` had identical IDs.
- Added a cleaner `replacetext`-based way of handling pronouns in
`/datum/element/noticable_organ/proc/on_receiver_examine`, using custom
macros `%PRONOUN_S` and `%PRONOUN_ES` as advised by @MrMelbert
- This PR also fixes #72767

## Why It's Good For The Game

With the changes in this PR the machine will finally work as we expect
it to. By adding unit tests we will also be able to ensure that it works
as expected from now on. I feel confident saying that the completeness,
algorithmic correctness, and code health of the DNA Infuser is much
better than it was before.

## Changelog

🆑 A.C.M.O.
fix: Fully fixed the DNA Infuser, which will now infuse organs as
expected.
fix: Fixed flyperson species transformation and organ set bonus, which
was throwing a runtime.
fix: Fixed many typos in organ-related source code.
/🆑

---------

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-31 09:30:25 +00:00
carshalash
141b2cac1b Adds nutriment factor to liquid gibs. (#73033)
## About The Pull Request

Over the years I've heard quite a few lizard players scratch their heads
in confusion due to the lack of gibs filling you up. I gave it a fairly
low value of 2 so people don't end up trying to power game it.

## Why It's Good For The Game

Adding an alternative use to gibs is always nice, at the moment it's
mostly just used for soap and cytology (Which barely anyone does.)

## Changelog

🆑
balance: Gibs now provide a small amount of nutriment.
/🆑
2023-01-30 23:40:24 -07:00
NamelessFairy
c1c3632fd4 Malfunctioning AIs whos brain is removed from the core and rehomed in another core will retain their law 0. (#73047)
## About The Pull Request

Currently if you are able to deconstruct a malfunctioning AI, such as
through methods that gib AIs, rehoming the AI in a new core results in
it losing its law 0, but it retains its antagonist datum and combat
upgrades. This is due to the law 0 only being generated when the AIs
gains the antag datum, I've made it so that when a brain with the
malfunctioning AI datum is inserted into an AI core it will re-produce
its law 0.
## Why It's Good For The Game

"Exploit"(?) that could be used to de-malf AIs patched and should cause
less confusion for malf AI players since they wont end up in a situation
where they have no law 0 but have all other malf AI components.
## Changelog
🆑
fix: Removing a malf AIs brain and inserting it into a new core
no-longer clears its zeroth law
/🆑
2023-01-30 23:37:15 -07:00
itseasytosee
e977974750 Implements functionality for variable weapon attack and secondary weapon attack speeds. (#72959)
## About The Pull Request
The click cooldown after attacking with a weapon can now be controlled
with a var. A var can also be set for secondary attack cooldown, if
unset it is the same as the weapon's normal attack speed.

The two weapons who already had hardcoded mechanics to achieve this
effect (see: The Stinger, Hyper Frequency Blade) have been converted to
this system.
## Why It's Good For The Game
Future varying of weapon qualities and admin shenanigans.
## Changelog
🆑
code: Greater support for variability in weapon attack speed 
admin: Admins are now able to grief you by hitting you with a toolbox 10
times in one second.
/🆑
2023-01-30 20:20:43 -07:00
SyncIt21
218ce4840c APC assigns itself the correct name based on its area (#73054)
## About The Pull Request
APC was assigned a name before it was assigned an area causing null
names.

Another bug i noticed was that newly built apcs were also not assigned
names. Thats fixed now too

Fixes #73052

## Changelog
🆑
fix: apc not assigning itself a name based on its area
fix: newly built apc's not getting assigned area names
/🆑
2023-01-30 19:50:03 -07:00
OrionTheFox
d2cd957fe3 Fixes extinguisher cabinet examine saying to alt-click to toggle (it is now right-click) (#72955)
Fixed fire cabinet examine text falsely saying to alt-click to
open/close; it now has contextual screentips, and uses balloon alerts
when relevant
2023-01-30 08:19:42 +00:00
SyncIt21
484d2b5900 Don't initialize stack components inside machines (#72863)
## About The Pull Request

An attempt at the
[Initiative](https://github.com/tgstation/dev-cycles-initiative/issues/29)
all types/subtypes of `obj/item/stack` no longer exist inside any
machine. Only during deconstruction is the stack created from the
circuit boards requested components.

Also moved the component printer & module duplicator circuitboards into
`machine_circuitboards.dm` so they all are in one place

I was unable to do this for circuitboards because that still needs to
exist so we can use `apply_default_parts()` on the machine. I tried to
do the whole datum circuitboard approach just like with stock parts but
i'm unsure about it so maybe next time

## Changelog
🆑
refactor: stack components no longer exist inside a machine's
component_parts
refactor: move component printer & module duplicator circuitboards into
machine_circuitboards.dm
/🆑
2023-01-29 18:42:52 -08:00
ATH1909
5c44b03bfc eswords now have a demoliton_mod of 1.5x (#73004)
## About The Pull Request

most energy sword-like weapons have had their demolition_mod increased
to 1.5x (from 1x). energy scalpels did not receive this buff, as they're
easily crew-accessible and I don't want to deal with a balance flamewar.

this affects damage vs. robots, objects, structures, etc.

the melee part of the mecha damage unit test now accounts for
demolition_mod.

## Why It's Good For The Game


![image](https://user-images.githubusercontent.com/42606352/215234868-f2a61911-99ca-4326-8f43-632e6236b0dc.png)


## Changelog

🆑 ATHATH
balance: Most energy sword-like weapons have had their demolition_mod
increased to 1.5x (from 1x). This affects damage vs. robots, objects,
structures, etc. Energy scalpels did not receive this buff.
/🆑
2023-01-29 16:26:17 -08:00
Rhials
6eacdb03da Shuffles around the reagent scan readout to display as empty when only invisible reagents are present (#72915)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Formerly, the reagent scan would provide a header based on whether or
not reagents are present in a person's blood/stomach. This works, until
you get cases where a user only has invisible reagents in their system,
in which case the "Subject contains the following reagents" header would
appear, but no chemical readouts would be present.

The blood/stomach reagent readouts on the scanner now put their contents
into a separate list, before adding it to the master readout list. This
alternate list is checked for length, rather than whether or not the
user has any reagents in their system at all, to determine what readout
header to give. If there are no reagent readouts to provide, the scanner
will report as if there is nothing present.

In summary: If you have only invisible reagents in your system, the
health scanner will provide the same readout as if you had nothing in
you at all.

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

Closes #72311.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑 Rhials
fix: The chemical scanner will now properly display that "no" reagents
are present in a subject when only invisible reagents are present.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2023-01-29 19:45:21 +08:00
Halcyon
604d3080f3 Fixes headsets not using their proper worn sprites (#72953)
## About The Pull Request

You're probably wondering "They had worn icons?"
Yes, yes they do. No one fucking noticed.


![headsets-export](https://user-images.githubusercontent.com/81479835/214505362-3e8cd173-ff09-4163-a820-69f1b86c6423.png)
## Why It's Good For The Game

Missing sprites fixed.
## Changelog
🆑
fix: Headsets now have their old worn sprites back, did you ever notice
it?
/🆑

---------

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2023-01-29 19:43:05 +08:00
Zephyr
a8f5a6d158 Fix a merge skew on armor datums (#72909)
## About The Pull Request

And also add a check grep to find it in the future
## Why It's Good For The Game
## Changelog
2023-01-28 19:34:11 -05:00
Tim
e066e9d28a Add advanced fire extinguisher to techweb (#72933)
## About The Pull Request
This adds the advanced fire extinguisher to the `Experimental Tools`
node.

## Why It's Good For The Game

There are several advanced engineering tools in this node. This is an
item that is considered a better version of a regular fire extinguisher
for atmos techs. It makes sense to put this with the other upgraded
tools in techweb, since ya know, it's technically an advanced version.
It does spawn empty, so it needs to be refilled with a foam tank
dispenser.

## Changelog
🆑
qol: Add advanced fire extinguisher to techweb
/🆑
2023-01-28 18:18:13 -05:00
SuperSlayer
06a3befd88 Posters now say that you can trap them (#72974)
## About The Pull Request

Examining a poster will now say that you can trap it with a glass shard

## Why It's Good For The Game

While trapping posters with shards is a fun mechanic, not everyone knows
that you can do that. This PR makes easier to find out about this
mechanic for new players.

## Changelog
🆑
qol: Posters now tell that you can trap them with a glass shard when
examined
/🆑

---------

Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
2023-01-28 15:02:29 -05:00
NamelessFairy
d6f9e59273 [NO GBP] Trading card life and mana panels can be set to 0 life/mana (#72973)
## About The Pull Request

Setting the life or mana values in either of the panels to 0 would
trigger and if statement only meant to trigger if the value was set to
null, meaning that setting life or mana to 0 would be ignored.
## Why It's Good For The Game

Its possible to have 0 mana/life.
## Changelog
🆑
fix: You can now set life and mana panels to 0 life/mana.
/🆑
2023-01-28 00:00:33 -08:00
the-orange-cow
542fb4d58d Mint can gib obese people again (#72970)
## About The Pull Request

Changes minttoxin(a toxin) to mintextract(a food).

## Why It's Good For The Game

Fixes https://github.com/tgstation/tgstation/issues/72969

The chef's mint is intended to gib fat people. Due to
https://github.com/tgstation/tgstation/pull/70764, liver functionality
was reworked so that instead of being purged rapidly, toxin's in a mobs
system with 3 units or less have no effect. Since the chef's mint only
has 2 units of mint toxin, it's intended functionality is impossible
under normal circumstances.

By changing the reagent type from toxin to consumable, it restores the
ability to gib.

## Changelog

🆑
fix: Mint Toxin(a toxin) has been changed to Mint Extract(a food). The
chef's mint can once again gib, fatties beware.
/🆑
2023-01-28 17:16:15 +13:00
Tim
fd85f5c67f Buff scythes, goats, and plantbgone vs PLANT biotypes (#72889)
## About The Pull Request
This buffs scythes, goats, and plantbgone vs PLANT biotypes:

- Scythes now deal x1.5 damage to venus flytraps (3 hits to kill)
- Scythes now target the flower bud vines
- Goats now target flower bud vines and deal 15 damage to PLANT biotypes
- Goats have a eating sound whenever they bite PLANT biotypes
- Plantbgone now does 2 dmg per unit to PLANT biotypes (10 dmg per
spray)
- Plantbgone now has a 75% chance to remove weeds and deals large damage
to flower buds
- Weed control crates now come with a pair of leather gloves
- Golems are immune to thorn effects
- Any kind of thick glove material will prevent thorn effects when
attacking
- Flower buds will now take x4 damage from fire and sharp weapons
(unless they have fire trait)
- Regular scythes are now a sharp object

Also this fixes a few runtimes with spacevines and nulls. The bane
element now accepts `mob_biotypes` bitflags as an argument.

## Why It's Good For The Game
Before my changes:

- Plant-b-gone was doing 0.4 dmg per unit to PLANT biotypes (2 dmg per
spray)
- Scythes took 5 hits to kill venus flytraps
- Goats only affected podpeople
- Flower bud vines were being ignored by weed killing code
- Plantbgone only had a 50% chance to remove weeds (and this was very
inconsistent due to RNG)
- Botanical gloves and thick gloves didn't protect from thorns
- Golems were getting pierced by thorns despite having pierce immunity
- Flower buds were not taking the x4 damage like they should have been
- Regular scythes were not a sharp object, but other scythes
(chaplain's, megafauna loot) were sharp

This makes the weed killer crate more effective since people were
complaining about it being worthless vs vines and flower buds. These
changes give people more options to respond to threats vs plants.

## Changelog
🆑
add: Add a pair of leather gloves to weed control crate
balance: Mobs with the PLANT biotypes (venus flytraps, pod people,
killer tomatoes) are now much weaker vs scythes, goats, and plantbgone.
balance: Plantbgone is now more effective at destroying weeds.
balance: Regular scythes are now a sharp object
fix: Fixed scythes, goats, and plantbgone not affecting flower bud
vines.
fix: Thick and botanical gloves not protecting from thorns
fix: Golems not having pierce immunity from thorns
fix: Runtime where vines tried to spread into null turf
fix: Runtime where null vines that were destroyed were trying to spread
to nearby turfs
soundadd: Add eat food sound when goats eat plants
code: Improved goat targeting code
code: The bane element now accepts `mob_biotypes` bitflags as an
argument.
/🆑
2023-01-26 14:29:48 -08:00
MrMelbert
0007686bf5 Adds checkgrep for improper or missing atom Initialize args (mapload) (#72846)
## About The Pull Request

Adds a grep for atom initialize overrides which does not include mapload

Regex used
`^/(obj|mob|turf|area|atom)/.+/Initialize\((?!mapload).*\)`

Also replaced some space indentation with some tab indentation in some
other greps


![image](https://user-images.githubusercontent.com/51863163/213883049-ef6d953a-e11f-4876-9852-c09633ddc289.png)

## Why It's Good For The Game

See #69107, #61759, #61623

## Changelog

No player facing changes
2023-01-26 13:58:47 -08:00
SyncIt21
3c908fc280 Some more RCD Designs & Patches (#72757)
## About The Pull Request
Adds some more stuff you can build with the RCD
1. Under structures you can now build/deconstruct catwalks & construct
Reflector Frames. Destorying a catwalk will cut any cable on it leaving
pieces of it behind
![Screenshot
(92)](https://user-images.githubusercontent.com/110812394/212850493-b7a5d25a-dab5-42e4-bd56-8e7045023984.png)


2. If you have the frames upgrade you can construct APC, Air Alarm &
Fire Alarm frames on walls & Flood light fixtures[fully wired]. It only
creates the wall mount and sticks it on the wall. Wiring, Circuits and
finishing the frame is still your job
![Screenshot
(94)](https://user-images.githubusercontent.com/110812394/214264787-188c7783-473a-4f34-84c1-00ad73520f22.png)

3. If you have the furnishing upgrade you can create racks & beds &
additional bar stool
![Screenshot
(95)](https://user-images.githubusercontent.com/110812394/214264893-96b52fc9-1502-45af-bee3-724cce1935af.png)


**Important Code Refractors**
1. `/turf/closed/wall/proc/try_wallmount()` will return true only after
you have successfully mounted the wallframe or stuck an poster on it &
not simply check if you are trying to mount a valid thing on it
2. `apc_tool_act/rcd_act()` was incorrectly checking passed_mode for the
simple circuit upgrade and not the `the_rcd.upgrade `flag. Thats fixed
now to
3. newly created APC's weren't assigning themselves to their areas
allowing multiple to be created in one area. Thats fixed now
4. Walls, Airlocks & other stuff could be built on tiles having
something dense that would block it. For example a wall could be build
on top of a machine frame!!. Thats also fixed now

## Why It's Good For The Game
More stuff you can build rapidly with the RCD

## Changelog
🆑
add: more designs for the rcd
refactor:` try_wallmount()` to return true only after successful mount
fix: `apc_tool_act/rcd_act()` incorrecly checking for simple circuits
upgrade in the wrong variable
fix: newly created APC's not assigning themselves to their areas.
fix: rcd building structures [walls, airlocks etc] on turf's that
already have structures on them
/🆑
2023-01-25 12:05:53 -08:00
John Willard
ae9241beae Moves mining points from the ID to the bank account (+credit type shown on order console) (#72726)
## About The Pull Request

Mining points are now stored on the ID's bank accounts instead of the
individual IDs, bringing them on-par with credits. This allows miners to
safely replace their ID and keep their mining points just like they can
for their credits.

I also added the cost type on Produce Consoles, so people using them
will know whether they're using mining points or credits.

Because all IDs have a bank account by default, this won't be a problem
to Golems or the like.

## Why It's Good For The Game

1. It's more clear to the player what type of credit is being used in
the order console
2. Mining points being tied to the ID is no longer needed as all IDs
have a bank account
3. Brings mining points up to the same standard as credits.

## Changelog

🆑
qol: Mining points is now tied to bank accounts instead of individual
IDs, so they transfer over in cases of an ID replacement.
/🆑
2023-01-25 12:04:26 -08:00
lessthanthree
0a49edaf83 Change typepath for tram hit counter [NO GBP] (#72896)
Minor change request from JohnFulpWillard. Changes the typepath added
in https://github.com/tgstation/tgstation/pull/72811
2023-01-24 18:59:51 +00:00
NamelessFairy
1b9b020f4a Inspecting a trading card or card hologram now shows the full card art in chat. (#72862)
## About The Pull Request

Does what it says in the title, example below.


![image](https://user-images.githubusercontent.com/40036527/213866406-903a3049-faf8-4f90-b91c-365573a8df6b.png)
## Why It's Good For The Game

TGC cards get shrunk down whenever you place them, making their card art
very difficult to make out in a lot of cases, by doing this you can now
view the full card art by inspecting the card rather than needing to
pick it up.

Placed Ian card for reference 

![image](https://user-images.githubusercontent.com/40036527/213866537-cdbd48df-ca6f-4a56-803c-c43f552611f1.png)
## Changelog
🆑
qol: Inspecting a trading card or card hologram will now let you see the
full enlarged card art.
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-24 15:37:32 +00:00
NamelessFairy
573b955bdd Life and Mana bars for the TGC battle arena. (#72838)
## About The Pull Request

Adds a life and mana bar for each player in the TGC holodeck arena,
practically removing the need for players to keep track of these stats
using items outside of the holodeck. The mana bar features a next turn
button which will automatically increase the number of slots by 1 and
refill or slots. You can inspect the panels to see these values
numerically rather than visually.


![image](https://user-images.githubusercontent.com/40036527/213697852-9743a309-6cf1-40d0-92d7-c3be3f1884e5.png)
## Why It's Good For The Game

I've set out on a goal on making the TGC battle arena a complete
visualizer for the TGC game, where all you need to bring is a deck of
cards and a friend. Adding this eliminates the need for pen and paper or
an external notepad program for tracking life and mana, and replaces it
with a far more visually interesting option that is also significantly
easier for both players to see and keep track of.
## Changelog
🆑
add: The TGC arena on the holodeck now features display panels to track
each player's life shards and mana.
qol: Slightly increased the amount of space on the TGC holodeck arena's
tables by removing the windows on either side of the player.
/🆑
2023-01-24 15:19:47 +00:00
SyncIt21
78a5e90375 Rapid Wiring Device(RWD) (#72802)
## About The Pull Request

Just a big roll of cable(7 stacks worth of cable) you carry around it
has the following features
1. Dual wield it and just walk across plating to lay new cable. Make
sure you wear insulated gloves
2. If you just have it in one of your hands it can pick up any stray
cable pieces lying around
3. Right click on it to dispense a custom amount of cable
4. Refill with cable
5. Alt click to change cable layer
6. Available in autolathe & engineering protolathe round start


https://user-images.githubusercontent.com/110812394/213224959-f393e849-2e0a-4314-ab0e-c10924cf8fce.mp4

## Why It's Good For The Game
1. Clean up cable pieces bitten by rats and lay fresh cable in
maintenance very quickly.
2. For big construction projects. Carrying one big roll of 7 stacks of
cable is much more storage efficient than carrying 7 separate stacks
individually.
3. For wiring Solars very quickly

Also, I'm pretty sure something like this exists in real life so why
not. It's just the rapid pipe cleaner but for cables.

## Changelog
🆑
add: Rapid wiring device
imageadd: Sprite for RWD
/🆑
2023-01-24 01:16:30 -08:00
lessthanthree
088a93a51d Layering: Fixes wires and pipes on lattice catwalk, glass floor [NO GBP] (#72703)
## About The Pull Request
- Fixes https://github.com/tgstation/tgstation/issues/72894
- Fixes layering for wiring and disposal pipes on lattice-based catwalk.
(Goes on top.) Wiring and pipes on floor-based catwalk. (Goes
underneath.)
- Glass floor shifted to show wires/pipe underneath it.
- Moves tram plaque to the game plane, layered underneath tossed
objects.
## Why It's Good For The Game
Wiring the solars looks weird with the wrong layering.
## Changelog
🆑 LT3
fix: Wires and pipes again rest on top of lattice catwalk
/🆑
2023-01-24 01:14:09 -08:00
SyncIt21
4271da68fb Light Replacer Fixes & clean up (#72883)
## About The Pull Request
Fixes #72877

- Bluespace light replacer can only fix lights & turfs containing lights
in its line of sight
- No more spam beaming turfs which has no light sources
- Code clean up i.e early returns

## Changelog
🆑
fix: bluespace light replacer from fixing lights/turfs containing lights
not in its line of sight
fix: beaming any turf even those not containing lights from causing lag
/🆑

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-01-23 11:35:56 -08:00
Inari-Whitebear
fd66e3d420 Fix tape recorder recording null messages (fixes #72858) (#72870)
## About The Pull Request

Fixes #72858

Tape recorder was using `message` instead of `raw_message` in the `Hear`
callback:
`/obj/item/taperecorder/Hear(message, atom/movable/speaker,
message_langs, raw_message, radio_freq, spans, list/message_mods =
list(), message_range)`

Other instances of the callback being used seem to use `raw_message`.
Additionally, `living_say` as well as `say` call `Hear` with `message`
being just always being `null`.

Changed tape recorder to use `raw_message` as well

## Why It's Good For The Game

Tape recorders work!

## Changelog

🆑
fix: Tape recorders are not deaf anymore
/🆑
2023-01-23 17:48:19 +01:00
Bloop
c2f6a4408d Fixes toilet bongs, and fixes a serious bug in the crafting system (#72893)
## About The Pull Request

The PR everyone has been waiting for...fixed toilet bong crafting. Now
you can craft them just as before using the new crafting system.


![image](https://user-images.githubusercontent.com/13398309/213944308-74b3e50e-965d-4e69-9025-d011764b3247.png)

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 .

## Why It's Good For The Game

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>


![image](https://user-images.githubusercontent.com/13398309/213941079-ae7d007a-ca92-4de3-9de6-7a156b4a0618.png)

</details>

## Changelog
🆑
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
/🆑
2023-01-23 12:53:28 +01:00
SuperSlayer
961029548e Fixes high frequency blade ignoring pacifism trait (#72754)
## About The Pull Request

Fixes being able to slash mobs with wielded high frequency blades while
having pacifism trait.

## Why It's Good For The Game

Bugs are bad

## Changelog
🆑
fix: Wielded high frequency blades no longer ignore pacifism
/🆑
2023-01-23 12:02:14 +01:00