* Fixes some invisible inhands from the transforming component (#73807)
## About The Pull Request
The original issue caused by #70037
Esword issue caused by #73716
Originally the transforming component did not override the inhand icon
state of the the item on its own (instead putting the onus on the item
itself if they wanted unique behavior). It was changed to always update
inhand icon state, most of which don't have one
I don't really like this fix, it should be explicit "I want inhand to
change" and not default, but this will work for now
Also the PR that fixed the Jaws issue didn't actually set the var they
created
Fixes#73805Fixes#73711 (Actually)
## Why It's Good For The Game
Invisible sword bad
## Changelog
🆑 Melbert
fix: Fixed a eswords, some tools, and some other misc. items from being
invisible while extended / active
fix: Teleshields and other misc items not extending in hand when active
fix: Switchblades click on extend again
fix: Pendrivers click on extend
/🆑
* Fixes some invisible inhands from the transforming component
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes Luminescence actions (#73802)
## About The Pull Request
- Add Component was supposed to use a named arg, quick fix
- While testing the fix I noticed it doesn't properly remove the
appearance when the item is lost, cuts the overlay on failures
## Why It's Good For The Game
Mothblox said this broke things (it was making a weakref of a callback
on accident)
## Changelog
🆑 Melbert
fix: Luminsecent slime actions correctly update their appearance when
integrating or ejecting slime cores
/🆑
* Fixes Luminescence actions
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Refactor egg to chick logic into component (#73537)
Refactored how eggs growing into chicks is implemented, and
how the number of chickens and chicks are tracked. It's now possible for
admins to make anything into an egg.
- Instead of the "fertility" of an egg being whether or not it's
processing (along with the ugliness of adding a variable to a item
defined in another file), fertile eggs are now implemented via
components.
- The number of chickens in the world, and the number of chicks hatched
from egg throwing are now global variables, rather than static variables
on the class.
I've tried very hard to keep these changes completely feature freeze
compatible, any variation in the old behaviour is non-intended (at this
point).
* Refactor egg to chick logic into component
---------
Co-authored-by: Jack Edge <yellowbounder@gmail.com>
* Sourced Component Backend (#73571)
## About The Pull Request
Adds a backend for sourced components. which was requested by @ Fikou
Also cleans up a little bit of the AddComponent logic
## Why It's Good For The Game
Backend for fancy stuff and having a component from multiple sources
---------
Signed-off-by: GitHub <noreply@ github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Sourced Component Backend
---------
Signed-off-by: GitHub <noreply@ github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Optimizes INVOKE_ASYNC by making it a macro and avoiding a proc call (#73264)
## About The Pull Request
This is quite literally the same behavior but faster, and also catches
improper arguments better than the old macro/proc approach.
Credit to Lohikar for writing the macro.
Port of https://github.com/DaedalusDock/daedalusdock/pull/196
Also, `world.ImmediateInvokeAsync()` never set a return value, so
expecting one was never valid behavior.
At MSO's request, the documentation of `spawn(-1)`:
As per the reference, calling `spawn()` with a negative value will
execute the spawned code until a blocking action (such as `sleep()`) is
encountered. Then, it will step outside of the spawned code, and
continue the proc. This is the same behavior as calling a `waitfor =
FALSE` proc. Specifically, under the hood, `spawn(-1)` creates a copy of
the callstack like `sleep()`, incase the spawned code is blocked and
needs to be rescheduled.
As an added bonus, `spawn(-1)` silences SHOULD_NOT_SLEEP errors, whereas
`waitfor = FALSE` does not.
## Why It's Good For The Game
ITS FREE FUCKING CPU TIME
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
* Optimizes INVOKE_ASYNC by making it a macro and avoiding a proc call
---------
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
* this code is so fucking funny it makes me want to merge w/o looking
* safety component stuff
* safeties should be finished
* I loooove safety component
* I swear that's all for gun safety
* manufacturer component
* cant forget this
* this is so awful
* 1100 line long gun file
* ok it actually compiles now
* that should not be an addition of any sort
* these defines should not be used anymore
* why?? the fuck??? are there var edited fire modes on black mesa?????
* how did that even happen
* maybe ci will shut up now
* oh man so many guns are lacking autofire now
* probably fixes safety toggling
* that should reference the gun not the component
* that should probably return
* makes it replicate current behavior, defaults safeties to being ON
* and that is all i have to say about that
* its automagically
* Fixes wrong inhand icon state for jaws of life (#73716)
## About The Pull Request
Fixes#73711
## Why It's Good For The Game
## Changelog
🆑
fix: fixed missing inhand icon state for jaws of life
/🆑
* Fixes wrong inhand icon state for jaws of life
---------
Co-authored-by: FinancialGoose <92416224+TheBoondock@users.noreply.github.com>
Buff scythes, goats, and plantbgone vs PLANT biotypes (#72889)
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.
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.
🆑
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.
/🆑
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message (#73453)
## About The Pull Request
### Refactor
Turns all the behavior for the nuke disk raising lone op probability
when unsecured into a new component, the "Keep Me Secure" component. As
an example (and really, I made it to test that the component was
actually working), there is a new admin plush called the "whiny plushie"
that will change icon depending on whether it is secure or not. Useful!
### Examine
I also added an examine message. Will explain below
## Why It's Good For The Game
The examine message was really what this entire pr's purpose was really
for.
>
[Capsandi](https://tgstation13.org/phpBB/memberlist.php?mode=viewprofile&u=7767)
wrote:
[↑](https://tgstation13.org/phpBB/viewtopic.php?p=665827#p665827)Wed Feb
15, 2023 2:42 pm
Someone needs to pr some sort of indicator as to whether the disk is
'secure' or not so players who don't know about the niche lone op
mechanic won't make the same intuitive assumption (though swat has been
trolled for putting it in the safe before).
I agree with this for the same reasons I did #73016 so I'll restate the
point with it here: A piece of banning a captain recently was that they
didn't secure the disk, but there is no indication in game that the disk
has special condiitons that trigger lone op, just that it should be kept
safe (which yeah, nuke ops want it). I'd rather remove the ambiguity of
a captain knowing this mechanic or not for the sake of the game, a
single examine for it is harmless
I'm considering this administration, not a feature. If maints want me to
take it out and have this be refactor only, that's fine with me
## Changelog
🆑
refactor: Refactors how nuclear activation disk works. Shouldn't notice
a whole lot but if you do, it might be because of this.
admin: Disk now has an examine message for whether it's secure or not,
to make it less ambiguous for players.
/🆑
* Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message
---------
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Fixes taking items from storage in hyperspace (#73428)
Taking items from storages actually puts it on the floor and then in
your hands, which isnt really caught by movement signals. So deletes the
hyperspace component on item pickup
closes#72727🆑
fix: fixes taking items from inventories glitching out in hyperspace
/🆑
* Fixes taking items from storage in hyperspace
---------
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* Fixes being able to "Drive" ridden vehicles without the key/in space. (#73611)
## About The Pull Request
Fixes: #73610
I've elevated the code that prevents you from grabbing the thing your
riding from the creature subtype to the main riding component. I cannot
think of any ridden vehicles that you should be able to grab while
riding so I don't think there is any issue in making this change,
although please advise me if this is not true.
## Why It's Good For The Game
Using a wheelchair for space traversal seems like a bug.
## Changelog
🆑
fix: You can no longer drive ridable vehicles without keys or in space.
/🆑
* Fixes being able to "Drive" ridden vehicles without the key/in space.
---------
Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
* [no gbp] Allows clothes to be eaten (#73565)
## About The Pull Request
Fixes#73546
In #73481 I made the foolish assertion that it's never correct for
someone to eat something which isn't physically nearby.
I had of course forgotten that while Moths _think_ they can eat clothes,
what they are actually eating is the abstract concept of clothes if they
were edible, functionally nothing, which exists nowhere.
By moving the check to only run when you are trying to eat a turf
(conveniently, no clothing is also a turf... yet) I allow them to return
to their delusion.
Alternate fixes and why I didn't do them:
- Always allow people to eat food which is in nullspace. This feels
pretty gross.
- Put the abstract clothes food physically inside the clothes. I assume
this wasn't done because there's some scenarios where you would be able
to remove abstract clothes food from the clothes, so that's not
desirable.
- Move the food into the actual clothes object just before taking a bite
and then put it back in nullspace again. This is silly.
- Try to make moth clothes food work in a way which doesn't involve
creating an imaginary food item in the void. I don't want to do this.
## Why It's Good For The Game
It's funny to eat clothes I guess.
## Changelog
🆑
fix: Moths can eat clothes again.
/🆑
* [no gbp] Allows clothes to be eaten
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* You can't eat a turf unless you are standing next to it (#73481)
## About The Pull Request
Fixes#73115, don't you love telepathy?
Just adds a range check to the general "can I eat this now?" proc. I
couldn't think of any situation where you should be able to eat
something which isn't next to you.
I tested it and you can still feed people and eat food from your
inventory.
## Why It's Good For The Game
It's funny to be able to eat pizza floor with your brain but not
intended.
## Changelog
🆑
fix: You can no longer eat pizza floor tiles with your brain.
/🆑
* You can't eat a turf unless you are standing next to it
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Chasms should not render contents invisible (#73424)
## About The Pull Request
Fixes#69507
Occasionally a mob would start processing itself as falling into a chasm
while already falling into a chasm. This would reset the "stored"
appearance data to the data from the end of the fall (where you are
invisible and size 0) and so just leave it in that state.
I couldn't find a way to replicate this reliably through gameplay but
spamming "get mob" worked.
I fixed it by just... not doing any of that stuff if you're already
falling into a chasm.
Also while unreported I noticed that `notransform` could get stuck on as
well, which it shouldn't do.
## Why It's Good For The Game
It's hard enough to rescue someone from a chasm, if their corpse is also
invisible and intangible afterwards then that's probably not ideal.
## Changelog
🆑
fix: Things dropped into a chasm should no longer occasionally become
invisible and intangible.
/🆑
* Chasms should not render contents invisible
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
* Bileworms won't evolve if they're dead (#73427)
## About The Pull Request
Fixes#70865
I kind of agree with the comments that it would be funny to canonise
_something else_ happening to dead ones once the alive ones evolve but
that would qualify as "a feature".
## Why It's Good For The Game
Even if it's pretty funny it's not really ideal for unbutchered mobs to
come back to life without warning at the 30 minute mark, and clearly not
intended.
## Changelog
🆑
fix: Bileworms which have been struck down but not butchered no longer
return in a more powerful form.
/🆑
* Bileworms won't evolve if they're dead
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Adds a new event, "Radiation Leak" (#72655)
Adds a new random event, "Radiation Leak".
A random machine in a random department will begin leaking radiation.
This includes a radiation aura around it, and semi-regular puffs of
smoke clouds containing mutagen and polonium.
The machine will stop leaking after some time, but can also be stopped
by using a random tool on it, indicated in its examine text.
I added a new "radiation emitter" component, for simple "emits
radiation" behavior. Then I made the radioactive mutation use it. This
means that the radioactive gene emits radiation while on stasis and
dead, rather than only in life.
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Prevents nulls in the always_visible_inventory list (which caused runtimes blocking PM reapplication) (#73400)
## About The Pull Request
Attempting to add a null to images (even in a list) is a runtime, which
in this case blocks off the rest of show_hud, breaking planemasters and
other shit
## Why It's Good For The Game
Closes#73387, closes#73364
## Changelog
🆑
fix: Equipping an fov item, disconnecting, waiting 6 minutes and
reconnecting will no longer break your game
/🆑
* Prevents nulls in the always_visible_inventory list (which caused runtimes blocking PM reapplication)
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Heretic blades can properly butcher (#73145)
Presets initial butchering component, which allows heretic blades to
properly butcher, and sounds to work on items that don't have a custom sound.
* Heretic blades can properly butcher
---------
Co-authored-by: the-orange-cow <76538214+the-orange-cow@users.noreply.github.com>
* Fixes soul-stealer component being broken (#73285)
## About The Pull Request
It extracted the first index soulstone from the list and tried to
proc-call it.
But it's a list of weakrefs, so that doesn't work.
I just changed it to hard references. It didn't really need to be
weakrefs, since it owned it.
## Why It's Good For The Game
Useful items woo
## Changelog
🆑 Melbert
fix: The bastard sword can create constructs again. Just hit the shells
with it
/🆑
* Fixes soul-stealer component being broken
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes custom drink names / description being overridden (#73239)
## About The Pull Request
If the glass was renamed by a player, don't override the name /
description in `update_name` and `update_desc`. Simple enough
Unfortunate side effect is changing the name but not the desc leaves the
desc as it is, but I don't think anyone would really care or notice. It
used to be like this anyways.
## Why It's Good For The Game
Aesthetics. Fixes#72890
## Changelog
🆑 Melbert
fix: Custom named drinks (with a pen) no longer reset after their glass
volume updates
/🆑
* Fixes custom drink names / description being overridden
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Fixes walking against hyperspace (#73219)
https://user-images.githubusercontent.com/7501474/216772808-97fa24a4-c9ba-4469-91d1-caebc76b81cf.mp4
Fixes not being able to do the above. The quickstart meant you would
instantly push you back., which was fine originally but then I added
diagonal movement so people could occationally get softlocked
🆑
fix: fixes issues with being walking against hyperspace locking you
/🆑
* Fixes walking against hyperspace
---------
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* Update gloves examine text (#73265)
## About The Pull Request
Fixes https://github.com/tgstation/tgstation/issues/73240
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage ma
🆑 LT3
spellcheck: Gloves now mention modes, not intents
/🆑
* Update gloves examine text
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Capture The Flag: Skill Issue (#72960)
## About The Pull Request
QoL update for CTF to make the experience better and smoother.
## Why It's Good For The Game
The CTF experience is a bit unpolished in some areas such as important
information (shield charge, control point score) being obscured,
mandatory hand switching on spawning, and players messing with their
team by blocking the controller.
## Changelog
🆑
qol: CTF guns spawn in the default active hand
qol: CTF shields become transparent as they lose charge
qol: CTF King of the Hill scores are visible to players in-game
qol: CTF controllers can no longer be blocked by players standing on
them
/🆑
* Capture The Flag: Skill Issue
---------
Co-authored-by: Thunder12345 <Thunder12345@users.noreply.github.com>
* 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>
* Makes some improvements to how AI can use JPS with movement loops
---------
Co-authored-by: CapybaraExtravagante <110635252+CapybaraExtravagante@users.noreply.github.com>
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>
* 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.
/🆑
* Fixes the modular uses of liquid gibs
* Fixes an error that somehow slipped through.
---------
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind
* Fixes the conflicts and makes shit compile!
* Fixes other things that didn't show up because I hadn't updated
* Fixes the lints.
* Okay NOW it's ready (please don't add anything else that touches blindness I beg you)
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* [WEBEDIT INCOMING]Allows any atom that is not an effect to increase supermatter matter power on consumption. (#73029)
If the consumed_object does not pass the isitem check, then it increases
the matter_increase by half of consumed_object.max_integrity, capped at
1000.
# WEBEDIT INFORMATION
This is indeed a webedit, but I tested the changes on local.
## About The Pull Request
If the atom is not an item, the matter power increase will be half of
the object's max integrity, up to a maximum of 1GeV (in case some object
has an absurd amount of integrity).
## Why It's Good For The Game
When a physical object gets consumed by the supermatter, people expect
it to do what it does for items, to give it trickled power over time.
It's confusing when it doesn't increase the power.
## Changelog
🆑
fix: Objects that are not items can increase supermatter power on
consumption.
/🆑
* [WEBEDIT INCOMING]Allows any atom that is not an effect to increase supermatter matter power on consumption.
---------
Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
* fixes fov removal f12 exploit (#73107)
## About The Pull Request
adds a variable to huds containing all screen objects that should be
permanently there
fov stuff goes there now rather than not being kept on the screen at all
therefore fov no longer disappears
## Why It's Good For The Game
i must torture lemon.
## Changelog
🆑
fix: fixes fov removal f12 exploit
/🆑
* fixes fov removal f12 exploit
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
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: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Fixes a bad assignment of parent in spirit holding component (#72999)
## About The Pull Request
`parent` is a reference to the datum parent of the component, but this
was assigning it to a string for some reason?
I just removed it. It doesn't seem to be doing anything anyways
~~I was going to make parent a private variable but too many things
access it for some weird reason. Kinda wack~~
## Why It's Good For The Game
Bad code
## Changelog
🆑 Melbert
fix: Maybe fixes some issues with spirit holding, particularly relating
to it being in-exorcism-able.
/🆑
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* 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>
* Adds windup autofire functionality. The future is now. (Later) (#67911)
Pulls the wind up autofire functionality from my energy weapon pr as a standalone code improvement.
(cherry picked from commit ff21ecc626)
# Conflicts:
# code/datums/components/fullauto.dm
* Modular!
Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
Add signal override back as a runtime (#72561)
We're not seeing this on CI and I'm not seeing it on my local DD logs
unless I go out of my way to check. Keeping separate file means it's
easy to go through, but this indicates a bug that needs to be fixed and
so it should still be in runtime.
Doesn't revert #70034, as it still keeps log_signal.
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Lambs can now be killed with swords (#71500)
Previously hitting a sheep with any item which was not "a razor" or
"some grass" would have no effect whatsoever.
Now hitting a sheep with a sword, axe, toolbox, or implement of your
choice will hurt it.
If you do this a sufficient number of times (more than you might expect)
the sheep will expire.
(cherry picked from commit e285b75fc5)
Co-authored-by: Jacquerel <hnevard@gmail.com>
You no longer have to sacrifice your soul to give a mouse sentience. (#72782)
## About The Pull Request
Some Manuel shift I didn't take note of the round ID for.
A player ahelps because they LITERALLY VANISH. They think it's a genetic
meltdown. I check the logs and I don't think it is.
The player mentions they got attacked by a mouse just before they died.
I check the logs and what do we have, but the same game tick the player
gets yeeted into the void that a mouse gains sentience.
```
Line 11801: [2023-01-17 23:39:00.036] ACCESS: Mob Login: Cheeseromancer/(Lemmiwinks) was assigned to a /mob/living/basic/mouse/white
Line 11802: [2023-01-17 23:39:00.052] GAME: Cheeseromancer/(Lemmiwinks) Client Cheeseromancer/(Lemmiwinks) has taken ownership of mob Lemmiwinks(/mob/living/basic/mouse/white) (Medbay Treatment Center (155,85,2))
Line 11804: [2023-01-17 23:39:00.068] ACCESS: Mob Login: Super17andre/(Carter Wolfe) was assigned to a /mob/dead/observer
Line 11806: [2023-01-17 23:39:00.111] GAME: Cheeseromancer/(Lemmiwinks) has gained antag datum �Sentient Creature(/datum/antagonist/sentient_creature).
```
There's other chatter IC about sentience potions, which narrows down the
investigation.
Long story short, 20 month ago arm couldn't code and 20 month ago
maintainers couldn't review code. On this blessed day, we're all
complicit.
`on_tame` signal handler proc. Without source parameter. Signal handler.
Without source parameter.

This leads to your classic offset-by-1 arg error. The signal's source is
the mouse. The tamer is the player that used the intelligence potion.
There is no food. But because the signal handler omits source, the tamer
is the mouse and the food is the tamer. Makes perfect sense in my head.
The food then, obviously, gets qdeleted in the later after_tame callback
invocation. Meaning the player using the sentience potion gets sent to
the Shadow Realm with no log entries suggesting cause of death.
Add in the missing source param, pass the source arg in the really,
really bad signal handler proc being called directly. And we feex.

## Why It's Good For The Game
Players being randomly qdeleted leads to admins crying. In the future
I'm going to log qdeletions of cliented mobs. March. Because I have time
off work then.
## Changelog
🆑
fix: Mice given sentience through intelligence potions no longer
immediately consume the body and soul of the person whom uplifted them.
/🆑
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Stock Part Datumization Complete (#72559)
So i accidently reverted all my commits in #72511 when resolving a merge
conflict So ummm yeah fuck my bad anyway
Finishes what was started in #71693 and completes the
[initiative](https://github.com/tgstation/dev-cycles-initiative/issues/1)
Except for `obj/item/stock_parts/cell` and its subtypes. All machines
now use `datum/stock_part` for its requested components & component
parts
Not sure if i caught every machine & stuff in the game so merge with
caution
🆑
code: datum stock part for every obj stock part
refactor: all machines & dependent experiments to use datum stock parts
/🆑
* Fixes a teeny tiny Funce mistake :)
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Trying to grab something restricted by HAUL gauntlets now has a Balloon alert. (#72758)
## About The Pull Request
Part of #72710 that I think is useful to be PRed even if the original is
closed. When you try to grab someone or something restrained by HAUL
gauntlets theres now a balloon alert telling you that its gripped too
strongly, rather than no indication at all.
## Why It's Good For The Game
There being no player facing indication to attempting to steal an item
being pulled by HAUL gauntlets seemed odd to me as without the feedback
its easy to mistake it for just missing the grab.
## Changelog
🆑
qol: Theres now a visual indicator when you attempt to grab an object or
person restrained by the HAUL gauntlets.
/🆑
Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
* Uses RegisterSignals for lists of signals, instead of RegisterSignal. (#72581)
## About The Pull Request
Uses RegisterSignals instead of RegisterSignal when registering to a
list of signals.
## Why It's Good For The Game
Less error messages, RegisterSignals is meant to be used for lists.
## Changelog
Nothing player-facing.
* Uses RegisterSignals for lists of signals, instead of RegisterSignal.
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* New Mob [Garden Gnomes] (#72672)
## About The Pull Request
Garden gnomes can go into the ground when they stand still for a while.
If they are damaged and underground they will heal. If they are
underground they will also gain damage resistance. They can make people
trip when underground and deal some damage. They are available through
golden slime cores or you can collect them from cargo with an emag. If
one of them gets damaged they will all retaliate against the attacker.
They have a very realistic colour pallet based on online gathered data.
Depending on their colour pallets some of them have a very low chance of
spawning.
## Why It's Good For The Game
These new garden gnomes come with expanding the world building of space
station 13. These gnomes will add more variety to the game play and use
an interesting AI and behavior that interacts with the player.


## Changelog
🆑
add: Adds garden gnomes.
imageadd: Adds garden gnome sprites.
/🆑
* New Mob [Garden Gnomes]
Co-authored-by: Comxy <tijntensen@gmail.com>