Commit Graph

1298 Commits

Author SHA1 Message Date
SkyratBot
c5ca08fd01 [MIRROR] Adds spaces around logical operators [MDB IGNORE] (#18776)
* Adds spaces around logical operators

* Update code/modules/admin/verbs/admingame.dm

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-01-21 22:16:43 -08:00
SkyratBot
902caab964 [MIRROR] Stock Part Datumization Complete [MDB IGNORE] (#18639)
* 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>
2023-01-19 17:09:19 -05:00
SkyratBot
1ba8793785 [MIRROR] Makes a few previously microwave only cooking options also doable in an oven [MDB IGNORE] (#18576)
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>
2023-01-19 14:49:47 +13:00
SkyratBot
27492ff60d [MIRROR] Autounlock techwebs are shared between machines that use them. [MDB IGNORE] (#18734)
* Autounlock techwebs are shared between machines that use them. (#72515)

## About The Pull Request

Did you know that for every Autolathe, Limbgrower, Biogenerator, ORM,
and Smelter that was built, an entire new techweb was made? The average
round has 2 ORMs (smelters count) if not more from ORM deconstruction
objective, 2 biogenerators, several autolathes and generally 0-1
limbgrower, I think there's more techwebs being created than we need.

Creating a whole techweb was a pretty terrible way to optimize this, so
I made a global list that stores these techwebs. Created on demand,
these autounlocking techwebs now share between the machines that use
them. It also generate all hacked nodes which will be visible if the
machine is hacked, instead of 'researching' them for each hacked
individual machine.

The 'specialized' techweb subtype was removed because its sole purpose
was to allow autounlocking to be a subtype of it. Now autounlocking is
just the direct subtype. I also removed mechfab autounlocking type
because it wasn't used, mechfabs use techwebs directly.

Autolathes and Limbgrowers now locally store 'imported designs' which
are things uploaded from technology disks. Outside of this, the
autounlocking techweb subtype now stores 'hacked designs' which unlocks
when the machine is emagged.
While doing this, I saw ORMs and Biogenerators had disks you can insert
into them, but I did not find anything that can actually be uploaded to
them (I saw Alien Alloys as a possibility, but there's no such disk to
allow uploading this alloy to the machine, and I didn't think an entire
system for 1 single alloy was worth keeping around), so I removed this
unused feature from both machines.

I merged 'Hacked' and 'Emagged' categories because they served the same
purpose, 'hacked' being on hacked autolathes and 'emagged' being on
hacked (emagged) limbgrowers.

Tech disk techwebs (which is created every time a disk is made, however
I hope to change this in the future) into it's own subtype, so admins
understand where its from when looking in VV panel (because I was
confused when I saw them at first).

``autolathe_crafted`` proc was removed because it was entirely unused
too.

Now it looks like this, which I consider an improvement:

![image](https://user-images.githubusercontent.com/53777086/211052875-9215a84d-fb04-450b-a120-4d0316cec6ff.png)

## Why It's Good For The Game

We no longer initialize a brand new techweb for no reason whatsoever.
Each techweb made is making entire lists of experiments and research
papers, all of which is never to be seen in-game and is completely
useless to the player. Cutting down on these techwebs is a good first
step to this needless initializing.

## Changelog

🆑
qol: Removed the tech disk part of the ORM's UI as it was entirely
unused, now it's a little more compact with less scrolling needed.
refactor: Autolathes, Limb growers, Biogenerators, ORMs and Smelters now
share techwebs with other machines of their types, rather than all make
new techwebs each time. This means they only build their nodes once,
including hacked ones. Instead of researching nodes on hacking the
machine, they now show hacked ones depending on if it's hacked.
/🆑

Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>

* Autounlock techwebs are shared between machines that use them.

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
2023-01-14 18:54:19 -08:00
SkyratBot
090174da7a [MIRROR] Biogen shows default reagent container icons instead of beakers [MDB IGNORE] (#18503)
* Biogen shows default reagent container icons instead of beakers (#72247)

## About The Pull Request

With the new crafting menu some reagents now have default container
assigned.
I applied these to visualize reagents in biogen UI too.

<img alt="060ybChTkI"
src="https://user-images.githubusercontent.com/3625094/209483256-e4159a05-46ae-47b8-bc42-9d003cf6c303.png">

## Why It's Good For The Game

Better representation of a reagent.

## Changelog

🆑
qol: Biogenerator shows default reagent containers instead of beakers
/🆑

* Biogen shows default reagent container icons instead of beakers

Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2023-01-13 16:18:14 -08:00
Zonespace
fa0735b1f6 MIrror #72127 (#18652)
* 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>
2023-01-12 10:04:20 -05:00
SkyratBot
be18901411 [MIRROR] [ready] unit tests all worn icons [MDB IGNORE] (#18491)
* [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>
2023-01-09 21:10:28 -05:00
SkyratBot
ae713bf18a [MIRROR] Crafting/Cooking menu update [MDB IGNORE] (#18334)
* 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>
2023-01-08 15:02:18 -05:00
SkyratBot
2b9eba0fe0 [MIRROR] Smoothing groups optimization, save 265ms with configs, more on production & w/ space ruins [MDB IGNORE] (#18189)
* 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>
2023-01-07 23:51:36 +13:00
SkyratBot
650d64f6d4 [MIRROR] afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item [MDB IGNORE] (#18519)
* afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item

* Update _neck.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2023-01-07 06:55:38 +00:00
SkyratBot
ca4fedbd8b [MIRROR] adds reagents splashing animation [MDB IGNORE] (#18501)
* adds reagents splashing animation (#72231)

## About The Pull Request
Adds animations for splashing reagents on stuff. Both when combat mode +
right clicking something, and when throwing the reagent container at
something. The slosh sound now also plays in both these cases, because
it seemed weird that these were lacking sounds. There's also an
animation for splashing reagents into hydroponics trays.

default splash animation:
![default](https://user-images.githubusercontent.com/94711066/209586106-1c64bef2-ce1c-40e0-af12-8b17e40efd4c.gif)
splash animation when targeting turfs:
![floor](https://user-images.githubusercontent.com/94711066/209586125-c9eee1b0-96fc-4dd2-9b7b-4715f87d8842.gif)
animation for pouring reagents into hydroponics trays:
![hydroponics](https://user-images.githubusercontent.com/94711066/209586127-669be1d0-5fb8-4ae3-a611-7bde9876dcdc.gif)
(they all get recolored by the reagents)

[new demo video!](https://youtu.be/PuoOmbc3-Nc)

~~[old demo video](https://youtu.be/SfHrINpIidk)
[old extra demo because i forgot to record it the first
time](https://youtu.be/CscgltRpE64)~~
## Why It's Good For The Game
Visual and auditory feedback for splashing things and getting splashed
(with potentially dangerous chemicals). Also looks neat when watering
your plants.
## Changelog
🆑
add: added reagent splashing animation for spilling reagents on things
add: added reagent splashing animation for spilling reagents onto floors
add: added reagent splashing animation for pouring reagents into
hydroponics trays
soundadd: slosh sound now plays when spilling reagents on things, both
directly and by throwing
/🆑

* adds reagents splashing animation

Co-authored-by: kawoppi <94711066+kawoppi@users.noreply.github.com>
2023-01-06 08:30:03 -08:00
SkyratBot
b6cd073409 [MIRROR] Unfuckies pod blood [MDB IGNORE] (#18411)
* 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>
2022-12-30 03:26:31 +00:00
SkyratBot
e0417073de [MIRROR] Botany fix and clean up [MDB IGNORE] (#18394)
* Botany fix and clean up (#72234)

## About The Pull Request

On local server I found out that hydroponic trays had weird behaviours.
Forexample:
If you use radium on trays, the subtype of radium which is uranium would
also get in effect meaning:
You add radium to the tray and get radium AND uranium effect on it.
Radium wasnt the only reagent others would show the same effect.
So I fixed them

I also cleaned up some code bits, there were some inconsistency with the
on_hydroponics_apply proc, I made them all consistent. There was also
for some reason a duplicate on_hydroponics_apply proc for blood reagent
one of them was unfinshed

## Why It's Good For The Game

Botany will behave correctly and the code is more cleaned up

## Changelog

🆑
fix: using chemicals on botany wont have unrelated side effects
/🆑

* Botany fix and clean up

Co-authored-by: Salex08 <33989683+Salex08@users.noreply.github.com>
2022-12-28 23:18:47 -08:00
SkyratBot
f9f756d14b [MIRROR] Fixes infinite replicapodspawns [MDB IGNORE] (#18374)
* Fixes infinite replicapodspawns (#72220)

Max() was being used incorrectly here, it doesn't support assoc lists

This caused the pod to runtime and never go away if there were any
reagents and gave infinite respawns

Closes #67182

https://user-images.githubusercontent.com/7501474/209433613-f63d3355-78d8-46be-9fce-9a612a75f4c3.mp4

🆑
fix: replicapods no longer sometimes have infinite spawns
/🆑

Also thanks to randomdudefromtherim for reporting this

* Fixes infinite replicapodspawns

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2022-12-28 05:50:49 +00:00
SkyratBot
5b7d54c48e [MIRROR] Food expansion 5: The big one! [MDB IGNORE] (#18229)
* Food expansion 5: The big one! (#71914)

add: Adds 32 new foods!

* Food expansion 5: The big one!

Co-authored-by: MidoriWroth <kodyman@att.net>
2022-12-22 20:43:23 -05:00
SkyratBot
e06b6f3b3c [MIRROR] Biomass overlay thresholds use sine function [MDB IGNORE] (#18082)
* Biomass overlay thresholds use sine function (#71859)

In recent PRs, biogen cap got raised to 5000 units, which is far more
than people usually have during most shifts.

This makes the biomass overlay icons pointless, because it will always
have the same icon untill you go above 714 biomass, which is higher than
the previous cap and more than anyone needs for normal tasks.

I made the overlay use sine interpolation to make the icon change faster
at lower levels, but slower when the visual cap is near.

Linear thresholds (Old):
Min biomass at 1, 714, 1428, 2142, 2856, 3570, 4285

Sine thresholds (new):
Min biomass at 1, 440, 930, 1420, 1940, 2560, 3300

* Biomass overlay thresholds use sine function

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-12-16 12:20:15 -05:00
SkyratBot
62b65a72de [MIRROR] Natural booze [MDB IGNORE] (#18094)
* Natural booze (#71842)

## About The Pull Request

Makes fermented booze take quality and power from the endurance and
lifespan stats of the fruit.
These are the most neglected plant stats, and usually plants that have
these high by default, do not have much nutriments.

This change makes fermented drinks a bit more desirable because your
effort is reflected in their stats. And you get better mood buff by
making them higher.

Fruit wine and other reagents get a "Natural" prefix when made through
fermentation.

![image](https://user-images.githubusercontent.com/3625094/206508903-c3ff85d2-c904-4a12-ae23-422604d87edf.png)

I consider turning it into a more general solution so that dispensed
drinks will also have purity and if the barman wants to aim for an
absolute quality cocktail, he may want to cooperate with botany like
chef does.

## Why It's Good For The Game

Fermented drinks are now a bit special compared to the free booze
dispenser variants.

## Changelog

🆑
add: Fermented drinks give mood buffs according to the stats of
fermented fruit
/🆑

* Natural booze

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-12-11 16:54:30 +00:00
SkyratBot
ecbcf9a466 [MIRROR] Ultra-modularizes podperson hair restyling [MDB IGNORE] (#17873)
* Ultra-modularizes podperson hair restyling

* fix conflicts

Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-12-07 01:11:30 +00:00
SkyratBot
de000c422a [MIRROR] IV drip injects only to injectable things [MDB IGNORE] (#17922)
* IV drip injects only to injectable things (#71709)

## About The Pull Request

Previous PR https://github.com/tgstation/tgstation/pull/71217 made IV
drip work with any containers which, after a while led to some undesired
cases.

People could add reagents to medipens, making them free hypospray.
Refilling extinguishers with things other than water. And just
sabotaging pills, patches, etc.

Now IV drips inject only into injectable containers.

I added INJECTABLE flag to a few other things that were not originally
injectable - hydroponic trays, smoke machine, chem separator. May later
whitelist some other items that may be injectable by logic, but don't
lead to undesired accidents.

![image](https://user-images.githubusercontent.com/3625094/205488795-c2482b44-6296-4514-81de-36a69b0dffad.png)

## Why It's Good For The Game

Free sleepy pens are not OK.

## Changelog

🆑
fix: IV drip now injects only into injectable things
/🆑

* IV drip injects only to injectable things

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-12-05 13:17:04 +00:00
SkyratBot
23be78bbbc [MIRROR] Fermentation and barrel refactoring [MDB IGNORE] (#17878)
* 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>
2022-12-02 22:41:48 -08:00
SkyratBot
cf4a194e86 [MIRROR] Biogen Refactor and Code Cleanup, Faster Biomass Conversion and No More Biomass Cap! [MDB IGNORE] (#17828)
* Biogen Refactor and Code Cleanup, Faster Biomass Conversion and No More Biomass Cap! (#71563)

## About The Pull Request
So, I looked at the Biogenerator code and there was just, _so_ much old
and undocumented code, that I just spazzed out and started documenting
and refactoring everything. There's now a lot less usage of contents
lookups and for loops, and _almost_ everything is documented, now, too.

As for the changes, as you can see in the title, I made biomass
conversion faster. How much faster, you ask? 5 times faster with default
parts, up to 20 times faster with the best parts. It was painfully slow,
and that's not fun for anyone.

I also lifted the biomass cap. It wasn't useful, it wasn't fun, and
Melbert didn't really agree with it either. However, I enjoyed the look
of the biomass going up, so I gave it a max visual amount of 5000, so
you get to see it gradually filling up as you put your first 5000
biomass in. After that, you do you, chief. Watch the funny numbers go up
all you want.

I also improved the maths so that it wasn't just rounding stuff
constantly, and also gave a little bit more insight on how much biomass
everything would cost you, down to two decimals. If there's no decimals,
it won't show them, however.

<details>
<summary>Here's what that looks like now:</summary>
That's one screenshot per different decimal places, there's no trailing
zeros because I think we can all universally agree that those look bad
in this kind of setting.

![image](https://user-images.githubusercontent.com/58045821/204120744-a8c398dc-7c19-4ee0-a8cb-5615f1dce1ea.png)

![image](https://user-images.githubusercontent.com/58045821/204120749-90aae203-bdb8-4322-a657-bb4fd313d808.png)

![image](https://user-images.githubusercontent.com/58045821/204120755-8bed494d-0d70-4b4a-afa2-413610089f6d.png)

</details>

There's now also more information displayed when you examine the biogen,
namely, how many items it has stored, and how many it can hold. I also
fixed the formatting a bit, so it looks ever so slightly cleaner.

Other than that, I just improved the code everywhere I saw it to be
fitting, there shouldn't be any single-letter variables in there
anymore, and the code should be more spaced out. Honestly, at this
point, I wrote most of this code six hours ago so I don't remember all
of it, and I'm too lazy to go through and check what I've changed again.
Diff and changelog are there for that.

## Why It's Good For The Game
So, I'll be honest, there were two big reasons that motivated me to do
this. First of all, the biomass cap. That was a little silly, anyone
that has spent more than one shift in Hydroponics knows that you usually
only put Watermelons in the biomass generator as they're usually the
thing that nets you the most biomass. Botanists will generally stock the
fridges first, and if they have a lot of excess, they'll put it in the
generator if they want, but that's rarely what was done. I've talked
with @ MrMelbert about it and he gave me the go-ahead, as can be seen
here:

![image](https://user-images.githubusercontent.com/58045821/204115174-fb2610c0-61c5-44e1-845e-cc6925ee33e6.png)

The other reason was the excruciatingly slow processing speed, which
I've fixed. So we're good now. :)

## Changelog

🆑 GoldenAlpharex
refactor: Went through and refactored a lot of the old code of the
biogenerator, and made multiple improvements to its logic, which should
hopefully make it behave more consistently. Nearly all of it is now also
fully documented, so as to make it easier for anyone else that has to
sift through it in the future.
qol: The biogenerator now processes items five times faster, up to 20
times faster if properly upgraded!
qol: The biogenerator is no longer capped on biomass. Its visuals will
change up until 5000 biomass, but you're free to go as high as you'd
like with it! Sky's the limit!
fix: Fixed the logic of the biogenerator that would make it so the
amount of biomass used for recipes was wildly inconsistent. Now, there's
no more back-end rounding up, it's all on the front end when it needs to
be, so there's no loss or gain of biomass when there shouldn't be.
spellcheck: Fixed a capitalization issue with the seaweed sheets in the
biogenerator recipes.
spellcheck: Fixed multiple inconsistencies between the messages sent to
your chat by the biogenerator.
/🆑

* Biogen Refactor and Code Cleanup, Faster Biomass Conversion and No More Biomass Cap!

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-11-29 19:38:41 -05:00
SkyratBot
a70a6a8055 [MIRROR] Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED [MDB IGNORE] (#17670)
* 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>
2022-11-28 14:51:08 -05:00
SkyratBot
0ca2c0b527 [MIRROR] Gives bread and cake slice_types and adds screentip verbs to proccessed foods [MDB IGNORE] (#17721)
* 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>
2022-11-28 17:16:01 +00:00
SkyratBot
c275f3203f [MIRROR] Biogen backend optimization and bugfix [MDB IGNORE] (#17748)
* Biogen backend optimization and bugfix (#71460)

## About The Pull Request

In previous PR I didn't touch the backend much, but I've learned that
while loop the biogen was using is not very good when we have the
`process()`.
I replaced that with a cleaner `process(delta_time)`, it should also be
less resource intensive.
No real player-facing changes.

Also fixed a bug with non-stackable items not spawning more than 1 copy
on purchase. This was working on dev branch but somehow broke recently.

And increased the size of the most important buttons slightly, while I
was at it:

![image](https://user-images.githubusercontent.com/3625094/203447298-bdfedd49-ae90-41e4-81a8-668efd0b41dd.png)

## Changelog
🆑
fix: biogenerator now properly gives non-stackable items
refactor: biogenerator backend optimization
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Biogen backend optimization and bugfix

Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-11-25 14:22:50 +00:00
SkyratBot
874b7963c2 [MIRROR] [NO GBP] Biogen power usage hotfix [MDB IGNORE] (#17685)
* [NO GBP] Biogen power usage hotfix (#71443)

## About The Pull Request

Fixes the active power usage for biogenerator (300kw -> 3kw active
usage) because of wrong time conversion change in
https://github.com/tgstation/tgstation/pull/71175

There is also another bug with biogen, that looks like a regression of
some other PR as it wasn't there before the merge:
`build_path(drop_location(), amount)` ignores amount for non-stackable
items. Not sure why it got broken.

## Changelog
🆑
fix: biogenerator active power usage fix
/🆑

* [NO GBP] Biogen power usage hotfix

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-11-22 15:02:22 -08:00
SkyratBot
9309dd53c0 [MIRROR] Biogenerator tweaks, leather makes more belts and clothing [MDB IGNORE] (#17651)
* Biogenerator tweaks, leather makes more belts and clothing

* merge conflicts

* medbando is a leather recipes like the others, updated meat product biogen design

Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-11-22 14:15:35 -05:00
SkyratBot
67d547f539 [MIRROR] Better Seed Extractor UI [MDB IGNORE] (#17581)
* Better Seed Extractor UI (#71204)

## About The Pull Request

Added icons to the seed extractor, indicators that show the stat value
relative to maximum possible value, tooltips to the stats, list of
traits and reagents.

![image](https://user-images.githubusercontent.com/3625094/201560469-7d44122b-7abd-4c3d-a76d-79fd26d36cb7.png)

There is also an ability to sort and filter the table now:

https://user-images.githubusercontent.com/3625094/201498368-9d620f99-28d3-4197-b73e-cd65d8285334.mp4

And an ability to scrap unneeded seeds:

https://user-images.githubusercontent.com/3625094/202563846-420f395b-d4a0-4ebc-88a9-df74c9c8ca1c.mp4

## Why It's Good For The Game

It wasn't very informative with just numbers, especially if you don't
know is it 5 out of 10 or 5 out of 100.

## Changelog

🆑
qol: new seed extractor UI
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>

* Better Seed Extractor UI

Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>
2022-11-20 00:34:23 +00:00
SkyratBot
bd4e73411d [MIRROR] Gives growing plant icons custom offsets [MDB IGNORE] (#17502)
* Gives growing plant icons custom offsets

* Fixes the conflicts and most of our modular plants

* And now the dinosaurs are gone

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-11-16 14:29:56 -05:00
GoldenAlpharex
98ad864a30 [MANUAL MIRRORS] #71201, #71247 and #71143 (#17493)
* Changing z-level after being cleaned no longer makes the bubbles re-appear (#71201)

* Fixes plants showing up as errors when made into cells when their icon isn't in the same file as the other plants (#71247)

Basically, any cell made from a plant that didn't have its icon located
at the same place as all the other plant icons would turn into an error
(with the proper battery overlay though) when turned into a botanical
cell.

This fixes that, which means that it'll be one less thing to think about
when `harvest.dmi` gets eventually split into multiple files.

* Fixes the arms and legs not being printable from the Limb Grower (#71143)

Basically, https://github.com/tgstation/tgstation/pull/70422 broke the
limb grower's ability to grow limbs, because it was still, for instance,
trying to spawn a `/obj/item/bodypart/r_leg` for right legs, instead of
a `/obj/item/bodypart/leg/right`, because it uses the `id` variable of
the design associated with the limb/organ being grown.

As such, I simply updated the `id` variable of the different arms and
legs, and now they all work as expected again, instead of throwing a
runtime!
2022-11-16 08:17:40 -08:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
b5bd312379 [MIRROR] Add investigate_deaths [MDB IGNORE] (#17424)
* Add investigate_deaths

* merge changes other than giant_spider which deps on tg/70848

* gib

* dust

* death

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-11 14:44:33 -05:00
SkyratBot
9e9b09d90b [MIRROR] Chefs can now kiss food they make to make it with love. (And a lot of cooking refactoring) [MDB IGNORE] (#17334)
* Chefs can now kiss food they make to make it with love. (And a lot of cooking refactoring)

* update from master and fix conflicts

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-11-09 17:49:35 +00:00
SkyratBot
b2fd3eae0a [MIRROR] Funny merge skew from banana [MDB IGNORE] (#17335)
* 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>
2022-11-03 18:33:07 -04:00
SkyratBot
3dfeccbf27 [MIRROR] Clowns will now always like bananas. [MDB IGNORE] (#17300)
* 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>
2022-11-01 12:27:41 -07:00
SkyratBot
612568daa0 [MIRROR] Swaps sleep() to use SECONDS define [MDB IGNORE] (#16973)
* Swaps sleep() to use SECONDS define

* merge conflicts and skyrat modules

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-19 19:43:24 -04:00
SkyratBot
acb4bb68ee [MIRROR] Fixes improper hydro attack_hand_econdary return [MDB IGNORE] (#16988)
* Fixes improper hydro `attack_hand_econdary` return (#70542)

* Fixes improper hydro `attack_hand_econdary` return

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-10-19 10:54:18 +01:00
SkyratBot
b92ff3cbeb [MIRROR] Adds a bar to the biogen to show how full a container is [MDB IGNORE] (#16845)
* Adds a bar to the biogen to show how full a container is (#70407)

About The Pull Request

Adds a bar to the UI of the biogen to show how full the container inside is
2022-10-08.23-47-27.mp4

I tidied it up a little bit but forgot to record it so here's a screenshot of how it looks now
image
Why It's Good For The Game

Helpful so you don't have to keep doing math over how many u's of reagents you'll have room for in a container
Changelog

cl Wallem
qol: The Biogen will show how full the container inside it is
/cl

* Adds a bar to the biogen to show how full a container is

Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
2022-10-13 23:44:18 +01:00
SkyratBot
02cff9ef86 [MIRROR] Holymelons are more melon-like [MDB IGNORE] (#16840)
* Holymelons are more melon-like (#70411)

Holymelons inherent some melon stuff

* Holymelons are more melon-like

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-10-13 17:18:30 -04:00
SkyratBot
ccf4eedbbd [MIRROR] Töchtaüse Juicer Fix [MDB IGNORE] (#16825)
* Töchtaüse Juicer Fix (#70289)

Töchtaüse berry juicer fix

removed grind_results since it's redundant and removed the itching powder reagent from the juice_results variable. Added nutriment to Töchtaüse berries for juicing purposes

* Töchtaüse Juicer Fix

Co-authored-by: Shadyyy66 <114319683+Shadyyy66@users.noreply.github.com>
2022-10-12 23:06:21 -04:00
SkyratBot
f172bd153e [MIRROR] Inhands var hardsetting [MDB IGNORE] (#16707)
* Inhands var hardsetting

* Update sortingmachinery.dm

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-10-09 23:04:01 +01:00
SkyratBot
3795ed1a6b [MIRROR] [MDB Ignore]Hats DMI split [MDB IGNORE] (#16693)
* [MDB Ignore]Hats DMI split

* e

* STAFE

* e

* e

Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-10-09 23:00:42 +01:00
SkyratBot
2847b2b37e [MIRROR] [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons [MDB IGNORE] (#16649)
* [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons

* cf

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-10-09 22:36:07 +01:00
SkyratBot
81a026b53c [MIRROR] Fixes Hydroponics Water Adding [MDB IGNORE] (#16671)
* Fixes Hydroponics Water Adding (#70280)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Fixes Hydroponics Water Adding

Co-authored-by: Aki Ito <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-10-06 20:23:15 -04:00
SkyratBot
9bf006d189 [MIRROR] Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) [MDB IGNORE] (#16472)
* Multiz Rework: Human Suffering Edition (Contains PLANE CUBE)

* skyrat changes

* bodyparts merge

* unres door floorlight fix

* Future upstream fix for blindness

* upcoming upstream airlock fix

* fix button emissive

* Fix FOV markings?

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-02 23:30:09 -04:00
SkyratBot
1ce77983df [MIRROR] canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE [MDB IGNORE] (#16586)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE

* etes

* eyes

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-10-02 15:54:46 +01:00
SkyratBot
32db6d2411 [MIRROR] Properly checks flags with & instead of == [MDB IGNORE] (#16487)
* Properly checks flags with & instead of ==

* merge fixed for changeling

* skyrat equipment updated

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-09-28 16:38:59 -04:00
SkyratBot
eefbd40ce6 [MIRROR] Adds macros to help with common set_- and adjust_timed_status_effect uses [MDB IGNORE] (#16410)
* Adds macros to help with common `set_`- and `adjust_timed_status_effect` uses

* merge conflicts

* modular skyrat and missed changes

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-09-26 17:56:24 -04:00
SkyratBot
8a9e1002e8 [MIRROR] Cutting onions makes you cry [MDB IGNORE] (#16353)
* Cutting onions makes you cry (#70032)

Co-authored-by: tattle <article.disaster@ gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Cutting onions makes you cry

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: tattle <article.disaster@ gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-09-21 20:56:12 -07:00
Zonespace
a79315a098 Tgstation#67724 (#16261)
Add magic reactions to hydroponics plants (#67724)

* Add magic reactions to hydroponics plants

* Refactor magic bolts for plants

* Add polymorph proc to hydroponics plants

* Fix mob and plant_tray variable names

Co-authored-by: Tim <timothymtorres@gmail.com>
2022-09-15 22:36:50 +00:00
SkyratBot
bbadd8e831 [MIRROR] Cucumber Fever [MDB IGNORE] (#16034)
Cucumber Fever

Co-authored-by: Yaroslav Nurkov <78199449+AnywayFarus@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-09-05 18:09:54 -04:00