* Mafia update: Return to body when the game ends (#75258)
## About The Pull Request
Mafia players are now sent to their last body when the Mafia game ends,
and in the meantime they have text saying why they are dead.
They can still be revived during this period, and when the game is up
they'll be forced back into their body if alive, if they are dead then
they'll just be able to re-enter their corpse as normal.
Also since I was poking around in Mafia stuff:
- I removed mafia observing because it was unused (this previously was
used to allow ghosts to see Changeling chat).
- I fixed it being a Draw when there was one Town or Changeling left.
- I fixed the role list showing some roles multiple times
- I fixed the Chaplain not being able to use their night ability (and
therefore being completely useless)
- I added prevention to prevent Admins from causing runtimes or straight
up crashing the server, with a very real chance it can happen purely by
accident, through the Admin UI.
I'm hoping to change how this actually does the job because I find it to
be very bad coding practices, but my problem is that everyone who signs
up for Mafia is a ghost, and they are added into the game through their
CLIENTS, so we don't have access on the mafia controller or the role, to
the player's previous body or mind, without this shit.
Also adds a new mafia board icon
Made by tatax and I find it fits more the theme of Mafia than the
current one.
New UI
* Mafia update: Return to body when the game ends
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Makes the juice of death berries poisonous, like poison berry's (#72443)
Found out poison berry juice existed from the wiki and code diving,
however, only poison berries juice into it. Death berries, despite their
stronger poison, juice into normal berry juice instead. This changes
that to have death berries also juice into poisoned juice.
Mostly a consistency change, it doesn't make sense for the berry with
the stronger poison to not juice into something poisonous as well, when
a berry that's less poisonous does do so. For transparency's sake, this
will make the death berry marginally stronger, as with plant traits you
can get the juiced reagent inside of a plant without juicing it.
Co-authored-by: Unit2E <41054578+Unit2E@users.noreply.github.com>
* Auto-wiki setup for soup (#74931)
## About The Pull Request
Sets up an auto-wiki run for Soup.
It's all in the in game cookbook, but keeping the wiki up to date is
good.
Still figuring out how auto-wiki works with the help of Smithers, so it
might need to be updated in a follow-up PR.
```
{{Autowiki/SoupRecipeTemplate
|name=Tomato Soup
|taste=tomato
|foodtypes=Vegetables, Fruits
|description=Drinking this feels like being a vampire! A tomato vampire...
|icon=soup/Tomato Soup
|requirements=50 units Water, 2 tomatos, at temperature 450K
|results=30 units Tomato Soup, 20 units Tomato Juice
}}
```
Templates:
https://tgstation13.org/wiki/Template:Autowiki/SoupRecipeTemplatehttps://tgstation13.org/wiki/Template:Autowiki/SoupRecipeTableTemplate
* Auto-wiki setup for soup
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Reagent soup / Soup rework / Stoves - A kitchen expansion
* fixes that stuff
* puts the range stove on maps that sohuld have it
* fixes some paths that don't exist anymore
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
* Fix onion slices being plural (#74096)
Despite being a single onion slice in a sprite, it was entitled "onion
slices". Had to tweak the desc accordingly.
* Fix onion slices being plural
---------
Co-authored-by: Jack Edge <yellowbounder@gmail.com>
Makes a few previously microwave only cooking options also doable in an oven (#72473)
## About The Pull Request
Make the following list of things that can only be cooked in the
microwave currently also able to be cooked in an oven:
Uncooked rice
Raw spaghetti
Wet leather (YUM!)
Aloe
Onion slices
Cheese curds
Eggs, rotten or not
Ready donk
## Why It's Good For The Game
We've already got stuff that's microwave-oven interchangeable (donk
pockets), sometimes you don't have a microwave and you're just locked
out of more than a few recipes because something that could easily be
made in an oven isn't coded to be. The simple solution is just not have
that be the case.
## Changelog
🆑
qol: A few recipes that were microwave only (like boiling rice, heating
ready donk, so on) can now also be made in an oven
/🆑
Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
* Food code sweepups + heart boxes have more chocolate variety (#72127)
- Chocolate boxes now contain bonbons (formerly tiny chocolates),
truffles, and peanut butter cups
- Slices of bread now taste like their respective breads instead of
tasting "indescribable"
- Fiesta skewers have food categories now
- Misc food file has had more split out of it into sweets.dm,
vegetables.dm, and packaged.dm
- Removed a bunch of redundant food_reagent code
- Changed the sugar in clown cakes' food_reagents to banana juice
- Increased the amount of vitamin in pound cakes (it's four whole cakes
and the amount of vitamin doesn't go up?)
* modular foods
* Fixes the first merge skew of 2023 (#72414)
https://github.com/tgstation/tgstation/pull/72232
skews with
https://github.com/tgstation/tgstation/pull/72127
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* [ready] unit tests all worn icons (#72370)
Fixes#71692🆑 ShizCalev
code: Added a unit test for ALL worn icons.
fix: Fixed a bunch of broken worn icons!
/🆑
* [ready] unit tests all worn icons
* Should have fixed most of the failures now
* Here, hopefully that should fix what was left
* Okay maybe it just hadn't been fixed yet
* I can be a bit dumb sometimes
* Okay, now it's going to work, I promise
* I'm so tired of this
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
* Crafting/Cooking menu update
* Yeeted away all of the merge conflicts, time to fix the code
* Okay, now it compiles, and after testing, it seems to work just fine
* Actually, early addition of an upstream fix, so those that don't have hunger can still open the cooking menu
* Fixes the units tests by removing the extra comma in the Stuffed Muli Pod recipe
Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
* Smoothing groups optimization, save 265ms with configs, more on production & w/ space ruins (#71989)
This one is fun.
On every /turf/Initialize and /atom/Initialize, we try to set
`smoothing_groups` and `canSmoothWith` to a cached list of bitfields. At
the type level, these are specified as lists of IDs, which are then
`Join`ed in Initialize, and retrieved from the cache (or built from
there).
The problem is that the cache only misses about 60 times, but the cache
hits more than a hundred thousand times. This means we eat the cost of
`Join` (which is very very slow, because strings + BYOND), as well as
the preliminary `length` checks, for every single atom.
Furthermore, as you might remember, if you have any list variable set on
a type, it'll create a hidden `(init)` proc to create the list. On
turfs, that costs us about 60ms.
This PR does a cool trick where we can completely eliminate the `Join`
*and* the lists at the cost of a little more work when building the
cache.
The trick is that we replace the current type definitions with this:
```patch
- smoothing_groups = list(SMOOTH_GROUP_TURF_OPEN, SMOOTH_GROUP_FLOOR_ASH)
- canSmoothWith = list(SMOOTH_GROUP_FLOOR_ASH, SMOOTH_GROUP_CLOSED_TURFS)
+ smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_FLOOR_ASH
+ canSmoothWith = SMOOTH_GROUP_FLOOR_ASH + SMOOTH_GROUP_CLOSED_TURFS
```
These defines, instead of being numbers, are now segments of a string,
delimited by commas.
For instance, if ASH used to be 13, and CLOSED_TURFS used to be 37, this
used to equal `list(13, 37)`. Now, it equals `"13,37,"`.
Then, when the cache misses, we take that string, and treat it as part
of a JSON list, and decode it from there. Meaning:
```java
// Starting value
"13,37,"
// We have a trailing comma, so add a dummy value
"13,37,0"
// Make it an array
"[13,37,0]"
// Decode
list(13, 37, 0)
// Chop off the dummy value
list(13, 37) // Done!
```
This on its own eliminates 265ms *without space ruins*, with the
combined savings of turf/Initialize, atom/Initialize, and the hidden
(init) procs that no longer exist.
Furthermore, there's some other fun stuff we gain from this approach
emergently.
We previously had a difference between `S_TURF` and `S_OBJ`. The idea is
that if you have any smoothing groups with `S_OBJ`, then you will gain
the `SMOOTH_OBJ` bitflag (though note to self, I need to check that the
cost of adding this is actually worth it). This is achieved by the fact
that `S_OBJ` simply takes the last turf, and adds onto that, meaning
that if the biggest value in the sorting groups is greater than that,
then we know we're going to be smoothing to objects.
This new method provides a limitation here. BYOND has no way of
converting a number to a string at compile time, meaning that we can't
evaluate `MAX_S_TURF + offset` into a string. Instead, in order to
preserve the nice UX, `S_OBJ` now instead opts to make the numbers
negative. This means that what used to be something like:
```dm
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WEEDS)
```
...which may have been represented as
```dm
smoothing_groups = list(15, MAX_S_TURF + 3)
```
...will now become, at compile time:
```dm
smoothing_groups = "15,-3,"
```
Except! Because we guarantee smoothing groups are sorted through unit
testing, this is actually going to look like:
```dm
smoothing_groups = "-3,15,"
```
Meaning that we can now check if we're smoothing with objects just by
checking if `smoothing_groups[1] == "-"`, as that's the only way that is
possible. Neat!
Furthermore, though much simpler, what used to be `if
(length(smoothing_groups))` (and canSmoothWith) on every single
atom/Initialize and turf/Initialize can now be `if (smoothing_groups)`,
since empty strings are falsy. `length` is about 15% slower than doing
nothing, so in procs as hot as this, this gives some nice gains just on
its own.
For developers, very little changes. Instead of using `list`, you now
use `+`. The order might change, as `S_OBJ` now needs to come first, but
unit tests will catch you if you mess up. Also, you will notice that all
`S_OBJ` have been increased by one. This is because we used to have
`S_TURF(0)` and `S_OBJ(0)`, but with this new trick, -0 == 0, and so
they conflicted and needed to be changed.
* Sorting how did I miss it
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
* Unfuckies pod blood (#72323)
I broke it in #72220
Thanks to @ Fikou for catching this
list(variable = 0.1) doesnt work on byond, so I last-minute improvised
and changed it to
list("[variable]" = 0.1), using a string instead of a typepath. I
already tested it thoroughly so decided it was probably good without
thinking of it anymore
🆑
fix: fixes pod blood I swear
/🆑
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
* Unfuckies pod blood
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
* Fermentation and barrel refactoring (#71475)
## About The Pull Request
The barrel was essentially a grinder that also added a lot of wine on
top of other reagents. Now it converts only nutriment and vitamin into
the wine.
Also the Auto-Distilling Composition plant gene didn't make fruit wine
and gave only half of the distilled drink volume.
- Now the fermentation is consistent and it happens in one place - the
`ferment()` proc of the plant. Both gene and barrel use it.
- Added some sounds and ballon alerts.
- Increased the barrel volume to 600, as other stationary reagent
containers have even more.
https://user-images.githubusercontent.com/3625094/203582992-8d31cff6-15bd-416f-b2fb-c7a0f6cfbcb4.mp4
## Why It's Good For The Game
Barrels are cute, we should use them more.
## Changelog
🆑
qol: barrel works with the plant bag now
balance: barrel volume increased to 600 units
fix: barrel now properly converts nutriments into wine
fix: added 4% nutriments to sugar cane, to allow rum creation
refactor: barrel logic and fermentation refactoring
/🆑
* Fermentation and barrel refactoring
Co-authored-by: Andrew <mt.forspam@gmail.com>
* Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED
* modular RegisterSignals
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
* Gives bread and cake slice_types and adds screentip verbs to proccessed foods (#71449)
## About The Pull Request
A side effect of my pizza PR #71202 I added contextual screentips as
part of processable.dm. In doing this, I noticed that with a few
exceptions, almost every single bread and cake type copies the proc
exactly the same for every single child of cake or bread, so I put the
proc on the parent of bread and cake and gave them slice_types, making
them more similar to pizza.dm
For everything else I've changed the default that I put in
processable.dm into "slice" or "cut" for things that use the knife and
"flatten" for things that use the rolling pin.
Finally, you can slice bread with saws now, because I think its silly
that only pizza gets this luxury.
## Why It's Good For The Game
Because it wasnt the focus of #71202 I didn't mess with screentips
outside of the pizza file a lot, but now that it's merged I figure I
should go and do that.
As Bread and Cake's processables are almost fully standardized it seems
silly for them to call on the proc 12 times in the same document so I
did this, which also allows for more versatility in editing how they
work as well allow people to, if they want to, add more tool behaviours
in the future without adding in 12 lines of code. Also means that people
who want to add new cake or bread have one less thing to do.
## Changelog
🆑
add: you can saw bread with a saw into bread slices
qol: added screentip verbs to a bunch of food files
code: bread and cake now have slice types and all only have one call on
the processable.dm proc
/🆑
* Gives bread and cake slice_types and adds screentip verbs to proccessed foods
* sco'ish
* fuck me ig
Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
* Funny merge skew from banana (#71039)
When a food feature PR and a food refactor come together, and get merged
without re-running checks, something very funny happens.
A merge skew.
Edible component uses inherent component so this is fine.
* Funny merge skew from banana
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Clowns will now always like bananas. (#70919)
## About The Pull Request
Clown's liver makes them like bananas, ignoring their racial food
preferences.
## Why It's Good For The Game
I don't think clown moths should vomit from eating bananas. They are
clowns, after all.
Also clowns are healed from eating them, so it's a bit silly that they
vomit from their funny medicine.
## Changelog
🆑
balance: Non-human clowns enjoy eating bananas now.
/🆑
* Clowns will now always like bananas.
Co-authored-by: Striders13 <53361823+Striders13@users.noreply.github.com>
* Splits up 'Gross' food from 'Gore' and reshuffles taste preferences accordingly (#68899)
* Splits up 'gross' food from 'carrion'
* Adds a couple of missed burgers.
Moths dislike Carrion rather than it being poison to them.
* BEES is now BUGS
* It's always safe and a good idea to use find/replace
* Splits up 'Gross' food from 'Gore' and reshuffles taste preferences accordingly
* Splits up 'Gross' food from 'Gore' and reshuffles taste preferences accordingly
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Add liquid dark matter to bluespace bananas (#69207)
* Add liquid dark matter to bluespace bananas
* Buff liquid dark matter
* Add antimatter to taste description
* Add liquid dark matter to bluespace bananas
Co-authored-by: Tim <timothymtorres@gmail.com>
* Removes ComponentInitialize()
* Fixes a leftover merge conflict marker
* Fixes the oversight that came from the upstream merge skew
* Fixes all of the instances where we used ComponentInitialize() when we shouldn't've been
* Fixes CI being broken because of the HEV suits
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>