Commit Graph

4203 Commits

Author SHA1 Message Date
oranges
a4e39ba9e5 Might fix reagent loop (#81952)
There's potentially an infinite loop if the amount to remove falls below
the min quantization level.

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2024-03-11 14:24:42 -07:00
SyncIt21
086a879d61 General maintenance for grilling related stuff. (#81647)
## About The Pull Request

Deals with `/obj/machinery/grill` & its related components & elements.

**1. Qol**
- Adds examines & screen tips for toolacts, adding fuel & food items on
the grill, Converts some chats into balloon alerts
  - Grills can be safely deconstructed with a crowbar when not anchored
- Food items can be grilled & re-grilled any number of times so you can
achieve that perfect crispiness. Its also realistic because there is
nothing physically stopping you from putting that item back on the grill
- Monkey fuel & any other reagent(see examines) can be added into the
grill from any open container & not just from glass bottles
- Grills can now be constructed in the crafting menu. Cargo pack cost
for purchasing grill has been halved

**2. Fixes**
- Grills now won't burn foods into a mouldy mess (if that item did that
that on the girdle). You can safely grill any item without worrying
about losing it. This also means grills no longer cook an item like a
girdle does, for e.g. the grill now won't both cook a meat slab into a
steak & grill it at the same time. You need the girdle for that.
This is only realistic because unlike a girdle which exposes the food to
direct heat the grill only exposes it to light heat & smoke so it does
not have that energy to cook/burn that item. Also this creates
immersion, you now need the girddle to cook the item & the grill to
smoke it so you know more gameplay

- The amount of time an item has been grilled for is now stored on that
food item & not as a locale variable in the grill. This means if you
remove & replace that item on the grill or move that item from 1 grill
to another it will correctly remember how long that item has been
grilled for so you don't have to re-grill that item on a different
machine for the same length of time
  
- Imposes a maximum limit on the amount of fuel you can put into an
grill (roughly 50 coal stacks). Unlimited space for fuel is not
realistic
 
**3. Code Improvements**
- Moved all non combat interactions to `item_interaction()` to end the
attack chain early before we even reach `attackby()`
- Removed trait `TRAIT_FOOD_GRILLED` no longer needed as we can re-grill
items as many times needed
 - Converts some constant values into `SECONDS` for accuracy
 - Autodoc for vars & procs

**4. Refactor**
- Grills now process manualy upon placing food or fuel into it & not
round start
   

## Changelog
🆑
qol: adds examines & screentips for grill (the machine for grilling
food), converts some chats to balloon alerts
qol: foods that can be re-grilled any number of times 
qol: grill (the machine for grilling food) can now be made in the
crafting menu. Cargo pack cost for purchasing grill has now been halved.
qol: monkey fuel & other reagents(see examines) can be added from any
container & not just from glass bottles to the grill (the machine for
grilling food)
fix: grills (the machine for grilling food) now don't burn foods into a
mouldy mess unlike the girdle
fix: correctly computes grill times of items that were previously
grilled
fix: grills now have an upper fixed fuel limit
code: autodoc procs & vars for the grill (the machine for grilling food)
refactor: grills (the machine for grilling food) has been refactored.
report bugs on github, also they only start processing after putting
food/fuel into them.
/🆑
2024-03-11 02:57:23 +00:00
SyncIt21
352c8bdbfb General maintainence for HPLC (#81613)
## About The Pull Request

Moves around code for portable chem mixer & chem heater. No functional
changes, As for the HPLC

**1. Qol**
- Adds examines & screentips for
    1) Screwdriver, crowbar & wrench acts
    2) Inserting & replacing input/output beakers
    3) Alt click ejecting input/output beakers
- Balloon alerts replaces chat messages to reduce spam.
- HPLC will now display the status of each reagent if it can be purified
or not before starting the refining process thus saving you the headache
of pressing the start button only to waste power & time & get no work
done

**2. Code Improvements**
- Moved screwdriver, wrench & crowbar acts out of `attackby()` into
their respective tool act PROCS
- Merged procs `calculate_largest_mass()` & ` calculate_smallest_mass()`
procs into a single proc `calculate_mass()` with a boolean var to decide
if we want the smallest or largest mass reagent
  - Computes estimated time only when UI changes & not every ui update
 
**3. Fixes**
 - HPLC won't accept hologram or abstract items
- HPLC now displays off icon state & pauses processing when the machine
is either opened, powered off, unanchored or broken
- HPLC will ignore reagents that are either already at max purity or are
inverse thus lowering eta & work done to purify your remaining reagents

**4. Refactor**
- Converted UI to typescript, moved vars such as `in_range` & `color` to
the client side to reduce data sent.
2024-03-10 17:20:23 +00:00
John Willard
9ac81e1a64 New station trait job: Human AI (#81681)
## About The Pull Request

This PR does many things, I'll try to explain the basic/background stuff
to the main thing first:

1. Adds a new remote that allows a human to function like an AI. It
controls a fly that will fly around the station slowly, and when it
reaches a machine then the person can interact with it as if they were
an AI. This required changing a lot of silicon/AI checks with one that
also checks for this remote, and some messing with shared ui state.
2. Moves req_access from the obj and bot to ``/atom/movable`` which lets
it be shared between the two, no more copy-paste and one side lacking
features/checks/signals the other has.
3. Adds a check for AI config for AI-related station traits, which was
lacking prior

Now for the good part...
Adds a new station trait that replaces the AI with a Human.
This person is equipped with an AI headset (including Binary), an
advanced camera console, an omni door wand, the machine controller, and
their laws.
They are immune to the SAT's turrets (even if set to target borgs) and
are slow outside of the SAT, mimicing the actions of the AI.

They interact with the world through their advanced camera console,
which allows them to do most AI stuff needed, and the holopad they can
connect to without having to ring first (like Command can).

They are given a paper with the laws they must follow, but since they
are human they are able to bend it. Cyborgs that run the default lawset
are "slaved" to them via an unremovable law 0, so the Human AI can bend
the laws if they really need to (for their own survival n such), and
make the cyborgs obey their commands above laws, but in general this
shouldn't be a frequent occurrence. This does take into account the
unique AI trait, so it's not guaranteed Asimov.

When this station trait rolls, all Intellicards, AI uploads, and AI core
boards are destroyed and are unresearchable. They can be spawned by
admins in-game if necessary. Maybe in the future we can also exclude
Oldstation from this but I haven't really decided.

Extra perks:

Human AI spawns with a Robotic voicebox (unless they are a body purist)
and teleport blocking implant, so they can't use teleporters to bypass
their on-station slowdown.
They also have an infinite laser pointer that can be used to blind
through their camera console. This is unfortunately nerfed from the
recent borg balance PR that removed its stun. This was meant to be the
alternative to no longer being able to permanently lock borgs down like
AIs can (or more than one, for that matter).
They aren't affected by Roburgers, Acid, and Fuel's toxicity.
Bots salute them like they do Beepsky (which is now a trait)
They spawn with SyndEye to replace the AI's tracking ability
They do not have a bank account

### The machine remote

The machine remote has a little fly in it that flies to the machines it
is pointed to, working as the arms and legs of the Human AI. It scans
the machine and punches in the action the AI does, and is how the AI
accesses basically anything. This fly slowly moves from one machine to
the next, and can be recalled with Alt Click.
It works on machines and bots.

### Video (Low quality to fit Github)


https://github.com/tgstation/tgstation/assets/53777086/e16509f8-8bed-42b5-9fbf-7e37165a11e8

## Why It's Good For The Game

I've seen a funny screenshot one day of a person replacing the AI by
using a bunch of door remotes, camera console, crew monitoring console,
and a few other things. I've been thinking about that for a few years
and really wanted to make it official if not easier to make possible,
because it is an incredibly funny interaction.
This makes it a reality, and while they aren't as powerful as regular
AIs, I think it makes for better and funnier in-game moments. With the
same weight as Cargorilla (1), I hope this wouldn't be rolling too often
and ruin rounds, but instead show off the different capabilities that
Humans and AIs can do, to do the job of an AI. You win some you lose
some.

## Changelog

🆑 JohnFulpWillard, Tattax
add: Adds a new station trait job: The Human AI.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-03-09 23:48:39 +01:00
Nick
cc63ecd65b Chem stun reductions now all use AdjustAllImmobility, and the AllImmobility procs now adjust unconscious (#81873)
## About The Pull Request
Meth, maints tar, synaptizine, and nicotine now all use the
`AdjustAllImmobility` to handle their stun reductions, instead of
individually adjusting all 5-6 immobility effects. `AllImmobility`,
`SetAllImmobility`, and `AdjustAllImmobility` now also affect the
unconscious status effect as well. I'm calling this a bug/consistency
issue, since every chem that didn't already use `AdjustAllImmobility`
was adjusting the unconscious status effect anyway, and they are all
clearly trying to do the same thing.

If I missed anything that could also be replaced with
`AdjustAllImmobility`, let me know and I'll fix it.
## Why It's Good For The Game
Makes things more consistent, and consistency is good.
## Changelog
🆑
code: Chem stun reductions are now applied more consistently.
fix: Chem stun reductions should now more consistently apply to
unconsciousness.
/🆑
2024-03-09 04:29:01 +01:00
2whatever2
d29c354016 Webedit, fixes sanity checks for tackle and wellcheers. (WEBEDIT PR, TESTED IN VSC.) (#81855)
## About The Pull Request
Fixes both tackle Insanity checks and wellcheers sanity check. 

I couldn't get make VSC clone my fork so I just did a webedit, and
tested changes with VSC.


https://github.com/tgstation/tgstation/assets/24631139/73730216-0c0a-45ee-8ee3-94c7695f4337


https://github.com/tgstation/tgstation/assets/24631139/90d96a5f-98cd-4bf5-b1d3-d0e0d14a917a
## Why It's Good For The Game
Bugfixes are good.
Fixes https://github.com/tgstation/tgstation/issues/81852
## Changelog
🆑
fix: Tackle and wellcheers code for sanity values now function.
/🆑
2024-03-07 04:37:26 +01:00
Ghom
88bdabe53b Adds a small cafeteria behind the right wing shutters of the museum. (#81465)
## About The Pull Request
I was thinking to contribute something to the new away mission map to
make it better. Mapping and all takes too much time for me, so I could
do little. Though it comes with its own unique gimmicks.

To reach the cafeteria, one has to complete a couple puzzles.
The first set is opened by inputing the correct PIN on the password
panel beside it. There're several clues to help you guess this fairly
easy puzzle, in the form of several number graffitis, a scrapped piece
of paper full of numbers, and a board filled with colored dots also
found just beside the panel.
The second one is opened by a keycard, and is generally lazier. To find
it, you'll need to do a bit of (toilet) searching.

As for the unique things this PR adds:
- A fire extinguisher... that actually contains welding fuel
- A (dirt-cheap) hotdog vending machine*
- A completely ornamental maneki-neko (that's the name of the
luck-bringing, paw-waving cat figurine)
- A piggy bank that carries money between rounds. It has a cap of 10k
credits worth of holochips, cash and coins, which is pretty high, but
I'm confident people will just destroy it for its contents the moment
they find it. His name is Pigston Swinelord VI.
- More, totally legit and not actually fake bombable walls :^)

*By the by, you can also find it during the national hotdog day.

Screenshots of the new location:
![museum
cafe](https://github.com/tgstation/tgstation/assets/42542238/1c0d93b7-90d5-4459-a48d-81430f0d3613)
![museum
restrooms](https://github.com/tgstation/tgstation/assets/42542238/5a9e049d-6acc-464b-998d-901e43154bae)


## Why It's Good For The Game
You know how most away missions are not that special at all? Yeah,
@mc-oofert set an example of a pretty decent one actually, if not a tad
small. I thought it could use a touch of another mind actually
contributing to it too, because it deserves it.

Also, this sets the basis for other persistent piggy banks. I don't
think they should all have that 10k cap like this one, perhaps 1k is
enough. Beside, the code that mothblocks did for json database datum is
pretty good, so there is not a whole lot of shitcode here.

## Changelog

🆑
add: Added a cafeteria to the museum away mission, with a few special
things to it. To reach it, you'll have to complete a couple puzzles
however.
map: The museum away mission now has a couple restrooms.
add: Hotdog vending machines may spawn during the National Hot Dog Day.
/🆑
2024-03-05 18:19:39 -07:00
Ghom
84f4740fb9 Fishes love kronkaine + Examining fishing spots. (#81519)
## About The Pull Request
Food items with kronkaine in it now count as great baits (this is the
case of the "all-natural" bait from that overpriced cargo pack I'm
converting into a less expensive goodie in another PR)

Sufficiently high fishing skill (and the relative skillchip) allows you
to list fishes in a fishing spot by examining it twice.

## Why It's Good For The Game
Little fishing things off the top of my head before I move on bigger
stuff.

## Changelog

🆑
add: Fishes love kronkaine.
qol: Examining a fishing spot twice with sufficiently high fishing skill
(or the skillchip) will get you a list of fishes that can be caught.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-01 13:54:45 -07:00
Echriser
d1a57df03b Allows dragging from boxes into All-In-One Grinders (#81591)
## About The Pull Request
Simply allows you to drag from storage containers directly onto
All-In-One Grinders. Current behavior just spills it on the same tile.

## Why It's Good For The Game
I already had to put all these items in the box in the first place, this
just makes it slightly easier on the way back.
2024-02-29 13:39:23 -06:00
Jacquerel
f2ceb77a41 Temporary bees animate on death and no longer produce corpses (#81714)
## About The Pull Request

I requested this as a change on the Hive Head PR but Ghommie didn't
notice and merged it anyway so I had to do it myself instead of forcing
the underclass to do it for me 😔


![dreamseeker_d8pI4uCCqt](https://github.com/tgstation/tgstation/assets/7483112/bff1a2d7-98c7-49d2-854b-a16f709520ab)

Anyway now bees created by the "beesplosion" reaction and by the Hive
Head changeling power no longer produce corpses, and have a death
animation.

## Why It's Good For The Game

It looks better.
It was weird that the bees would create corpses if killed but not if
they expired.

## Changelog

🆑
image: adds a visual effect for hive head bees despawning
/🆑
2024-02-28 19:22:09 +01:00
SyncIt21
8144d991e1 Lowers thermic constant of Cryostylane reaction (#81709)
## About The Pull Request
- Fixes #81687

Thermic constant of Cryostylane reaction now reduced from -7.5 to -1.5.

Meaning for every 1u of Cryostylane created the overall temperature of
the holder reduces by 1.5k so for e.g. if you create 30u of cryostylane
without any heating the temps reduces by 30 * 1.5 = 45k(the drop of
temperature increases as the reaction temps grows closer to optimal
temperature in our case -200k)

When testing upon adding 30u of water, nitrogen & stable plasma and
cooling the mixture to 270k via tier1 chem heater you acheive 30u of
Cryostylane at 82% purity and the final temps are 180k

P.S. adjusted range of chem debuger to include negative values. Helped
me in debugging this

## Changelog
🆑
fix: Cryostylane reaction now has a moderate & not extreme cooling
effect. Helps you achieve more pure amounts of Cryostylane
/🆑
2024-02-28 19:21:30 +01:00
IndieanaJones
1ed08fd957 Gorilla Buffs: King of the Jungle Edition (Funky New Mode!) (#81540)
## About The Pull Request

This PR buffs gorillas by making them more formidable threats while also
adjusting some of the related traitor items as well. The changes are as
listed:

- Gorillas now have the same understanding of language as monkeys. They
speak and understand monkey, and cannot speak but understand galactic
common.
- Gorillas are now slightly faster than humanoids when not holding
anything. While Usain Bolt may be slightly faster than a gorilla, you
are not.
- Gorilla damage increased from 18-20 to 25-30.
- Object damage doubled, going from 20 to 40.

These changes altogether make gorillas much more scary to come across,
as they'll be able to outpace you and get to the part where they maim
you much quicker. Crewmembers beware!

Furthermore, I've done some additional changes to the gorilla-related
traitor items as well:

- Gorilla cube box is replaced in the uplink by a singular gorilla cube.
Due to the changes above, this singular gorilla should be far more
useful than the 3 gorillas this item gave prior. The gorilla cube box
has been left in for any sort of mapping or admin shenanigans.

- Magillitis Serum Autoinjector has been buffed for self-use as a
consequence of the above changes, while nerfing its use against other
players to make them easier to kill. Additionally, Magillitis Serum
Autoinjector now also grants the resulting gorilla a self-regeneration
buff which kicks in after 12 seconds of not taking damage. I threw in
this additional buff as making yourself into a sentient gorilla pretty
much shows everyone you're valid salad, prevents you from using a lot of
traitor items and its cost of 15 is quite high.

## Why It's Good For The Game

Gorillas are fun, but in previous history we couldn't let them be too
powerful since it was relatively easy to mass-produce them via Genetics.
Since gorillas are pretty much traitor and admin-event exclusive now, we
can do more right by them by allowing them to be more like real-life
gorillas: faster than most humans, very powerful, and very scary if you
run into one who doesn't like you.

## Changelog
🆑
balance: Gorillas are faster, stronger, but not bigger too. Note while
holding an item, they are the same speed as they were prior.
balance: Gorillas now have the understanding of languages as monkeys do.
balance: The Gorilla Cube Box for traitors has been replaced with a
singular gorilla cube. Due to the aforementioned changes, this singular
gorilla should be as scary if not scarier than 3 gorillas were prior.
balance: Magillitis Serum Autoinjector now grants the resulting gorilla
a slow passive regeneration effect which kicks in after not taking
damage for 12 seconds.
/🆑
2024-02-26 18:43:45 +01:00
John Willard
aace5f46f4 You can do more things while floored (#81641)
## About The Pull Request

While on the floor, you can:
- Use the UIs of Atmos machinery (except thermomachine and bluespace gas
vendor), Holopads, Crayons (spray cans too), radios, and Disposal bins
- Close extinguisher cabinets with Right-Click
- Click and drag yourself onto a photocopier to climb onto it.

I also changed all instances of ``ui_status`` to have all the args it's
being passed, I was messing with it a bit but it's gonna be for a later
PR.

## Why It's Good For The Game

It's an extra layer of harmless realism, also nice QoL for people who do
not have functional legs and do not have a wheelchair.

## Changelog

🆑
qol: You can use atmos machines, holopads, crayons, spray cans, and
disposal bins while floored.
fix: You can close extinguisher cabinets while floored.
fix: You can climb onto a photocopier from the floor.
/🆑
2024-02-26 18:34:20 +01:00
necromanceranne
a074f8e7ce Riot armor and helmets (and similar gear) protect against more melee-based attacks (like RNG punches), bottles aren't near guaranteed knockdowns (#81365)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

### Riot Armor and Helmets (including SWAT armor and plate armor;
partially includes Syndicate modsuits and other suits with a module)

TRAIT_SHOVE_KNOCKDOWN_BLOCKED is now called
TRAIT_BRAWLING_KNOCKDOWN_BLOCKED. This is possessed by riot suits, SWAT
suits and now **plate armor**. Not the chaplain variety, because fuck
them I guess. (this was apparently deliberate so don't complain to me,
okay?)

Anyone with this trait is now unable to be knocked down by;

- Pure RNG on blunt objects attacks to the chest (Probability is
otherwise altered by melee armor already)
- Unarmed punches, both RNG and deterministic
- Bodies thrown at them. Instead, dealing stamina damage and causing
them to become staggered.

A new trait called TRAIT_HEAD_INJURY_BLOCKED, which protects from
various head injury related effects. This is possessed by riot helmets,
SWAT helmets, plate helmets, hardhats and applied to MODsuits with armor
boosters activated/the infiltrator suit while active.

The trait is also granted to anyone wearing a modsuit with the Head
Protection module installed. This can be printed from round start, and
comes pre-installed into all the engineering modsuits, security moduits,
research modsuit and magnate modsuit. (I had to bump up the security
modsuit complexity a bit to put it in iunno if we have a policy about
that)

Anyone with this trait is protected against:

- Bottle smashes to the head.
- RNG Blunt force trauma to the head by blunt objects (Probability is
otherwise altered by melee armor already)
- Partially protects against getting your spine snapped during a bad
tackle (this used to be a check ONLY for the riot helmet or hardhat)

### Bottle Smash

The bottle smash's chance of a knockdown is based on the force and
knockdown duration of the bottle, altered by relevant head melee armor.
It's no longer basically guaranteed due to weird math that would
determine whether or not you were knocked down only if your armor
exceeded certain values or not.

### Misc Changes

Any instance that would check either for riot armor or riot helmets
instead checks for the new traits.

## Why It's Good For The Game

People weren't particularly happy with the possibility of getting
ownzoned by a naked assistant or random toolbox-wielding tider while in
dedicated melee protection armor as a result of pure RNG jank. [There
was a whole thread here about
it](https://tgstation13.org/phpBB/viewtopic.php?f=83&t=35645) with
regards to unarmed combat.

If you're in riot gear, you should feel like you can confidently combat
improvised/blunt weapons at a cost of general protection from the more
serious dangers to your wellbeing (AKA lead poisoning or heatstroke. Get
it....it's bullets and lasers...)

For some reason, bottle smash knockdowns, despite using the values
just...conveniently don't get blocked by armor except for extreme
values? If at all? I felt like this was really weird for something with
such a hefty and fairly powerful knockdown effect, particularly one you
can lob at someones head at range. I remember, way back when I first
started playing, that this was a feature that used to stun, and one I
used a lot to get cheap kills. The amount of bullshit stuns I got on
people with it still haunt me to this day. It hasn't improved in the
current era, despite being a knockdown, simply because any knockdown
still takes several seconds to exit. An arbitrarily low knockdown is
still a several second one. It's time to bring this in line with similar
equipment.

Rather than using flat values that are _clearly_ meant to be only
applicable to riot armor the decade ago that the code was written, let's
use traits instead. That's way better than relying on magic numbers that
may become irrelevant when the code around it changes, which anyone
touching that code may not even be aware existed.

Since we're using a trait, we can actually allow modsuits to
occasionally fill defensive niches that aren't strictly armor values.
Handy.

## Changelog

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

🆑
balance: Nanotrasen, in direct response to the increasing danger posed
by wannabe martial artists and rioters in the fringes of the Spinward
Sector, have upgraded the impact dampeners found in their riot armor.
Staff have also started to rediscover the value of medieval armor; it
isn't particularly easy to topple a knight in a suit of plate with just
your fists.
balance: Melee-focused armor is now more able to protect you from
various RNG-based knockdowns, such as critical hits from punches (as
well as the ones applied through the staggered status), shoves, critical
hits with a blunt weapon to the chest, and body throws.
balance: Melee-focused helmets also protect you from head injuries, such
as bottle smashes, accidentally hitting something dense during a tackle,
and critical hits from a blunt weapon to the head.
balance: Bottlesmash knockdowns are less reliable in general.
add: A new module, the Safety-First Head Protection module, protects you
from head trauma! Available in most modsuits expected to take hits to
the head often. And from roundstart exofabricators.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2024-02-25 22:55:45 +01:00
SyncIt21
a4292a0772 Reaction & holder tweaks (#81545)
## About The Pull Request
- Fixes #81537. For competing reactions where reaction B consumes the
results formed from reaction A `total_step_added` yields values higher
than the actual volume of products formed causing the reaction to end
early leading to less volume of product formed as explained in the
comment
- Removes `update_total()` from instant reactions as it already does
that for us making it a little faster
- merges `remove_all_direct()` with `remove_all()` to reduce code as
their functionalities are very similar

## Changelog
🆑
fix: multiple reactions occuring in the same holder like mixing drinks
will yield correct reagent result volumes
code: Removes `update_total()` from instant reactions improving
performance slightly
code: merges `remove_all_direct()` with `remove_all()` to reduce code
size
/🆑
2024-02-19 15:45:28 +01:00
jimmyl
54192fda81 deathmatch (#81444)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/70376633/44f1d1af-2cd6-4e69-a13e-6d2a663d668d)

adds a deathmatch minigame, a port and slightly redone version of the
aetherstation deathmatch (by TheChosenEvilOne)
the goal is to kill everyone else with loadouts

## Why It's Good For The Game

CTF sucks and this is probably better to filter out the bloodthirsty
terry players anyway

## Changelog
🆑
add: deathmatch minigame
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-18 03:39:00 +01:00
destrucktoid
63550f5f02 Nukie Mediborgs no longer kill slimes with their nanites (#81458)
## About The Pull Request

Makes it so that regenerative nanites no longer harm slimepeople and in
fact heal them. This was originally PRed downstream by myself in
[Bubberstation](https://github.com/Bubberstation/Bubberstation/pull/1143)
and i've thought to PR it upstream as well to avoid conflicts in the
future, i do think it's a ok change for upstream as well, whilst Nukies
cannot be slimepeople on TG similar to Bubber, they can (in theory)
induct a traitor slimeperson into the team who wouldn't be able to get
healed from the nukie borg. The traitor could also emag the nukie borg
to flip them from working for the nukies. Odds of either of those
happening? Very implausible. However, i still i don't see how it would
negatively affect nukies either.
## Why It's Good For The Game

It's kind of dumb that these magical syndicate nanites that are meant to
be able to heal virtually any wound flounder in the face of slimepeople.
## Changelog
🆑
fix: Restorative Nanites now heal Slimepeople just as well as they do
other people.
/🆑
2024-02-16 21:48:38 +01:00
MLGTASTICa
32802c029f Salicylic acid & Oxandrolone now care about purity. (#81191)
## About The Pull Request
Just makes salicylic acid and oxandrolone scale with purity (so they're
consistent with libital & aiuri scaling)
## Why It's Good For The Game
Now mass producing good salicylic acid / oxandrolone with a chem factory
takes some effort.

## Changelog

🆑
balance: Oxandrolone now scales with purity. Its default purity is 100%
balance: Salicylic acid now scales with purity. Its default purity is
100%
/🆑
2024-02-16 21:35:10 +01:00
MrMelbert
be823f9e26 Adds a new mobility option for wizards, the Telegram Scepter, not inspired by any relic at all (#81413)
## About The Pull Request

This PR adds a new mobility option for wizards, the Telegram Scepter, a
magical rod that teleports you anywhere you point it.

But be warned, its method of teleportation is very volatile, putting you
in a state of flux. While the scepter itself has no cooldown, using it
while in flux will damage you severely and purge some of your chems. In
fact, any form of magical teleportation will damage you while in flux.


https://github.com/tgstation/tgstation/assets/51863163/b1008f6c-d724-4b7d-8e47-b70e2e770183

Non-wizards who attempt to utilize the wand will find themselves in a
state of permanent flux, meaning any and all teleports are met with
damage. It's also less precise.

Also adds an admin-only version which has infinite range and applies no
flux.

Any semblances to any other game is purely coincidental, I assure you.

Misc. Details: 

- I added the ability to pass sound datums to playsound, so it doesn't
override custom sound settings you may want.
- I moved the teleport signals out of the pure-sounding proc `check
teleport`.

## Why It's Good For The Game

I've always thought wizard mobility has been rather lacking, in that you
generally only pick Jaunt.


![image](https://github.com/tgstation/tgstation/assets/51863163/6eb2b136-7ec4-445e-b28d-c8841e5bcbe9)

So when someone threw an offhanded suggestion to make a certain item
from a certain game in discord, my wheel started to turn.

And here we are.

- Teleporting anywhere you can see is very powerful (especially in
conjunction with the Scrying Orb) so this makes it a very high potency
item a wizard can pick up, almost like a targeted blink.
- It is, however, offset by a few things: Namely, the flux mechanic
putting a soft cooldown on teleporting (lest you kill yourself), and it
being an item, meaning you may have to pick up Instant Summons for added
safety.

Overall, I thought it to be a very flavorful mobility option for
wizards. Maybe it will shake up spell selection. Who knows?

## Changelog

🆑 Melbert
add: Wizards have a new mobility option available, the Telegram Scepter.
The ability to travel anywhere you can see at the point of a wand... but
at a price?
/🆑
2024-02-16 19:17:31 +01:00
MrMelbert
0dbf9c78f6 Nuka Cola causes irradiation (#81362)
## About The Pull Request

Nuka Cola now causes irradiation. 

## Why It's Good For The Game

Most of our speed bonuses, such as Methamphetamine, comes with a
downside (the usual one being brain damage), because speed is king.

When you give people a speed boost that comes with absolutely NO
downsides outside of visual, it turns out people abuse it, a lot.

Even a small speed boost ends up being abused. It is not uncommon to see
security officers saddled with two, three bottles. Nor is it uncommon to
see tiders use it to escape said officers, or antags to escape said
tiders. Do you see the problem here? It has become a situation where not
having it puts you at a disadvantage, which is sad.

Irradiation fits thematically, too. And it also shows you when someone's
using it, since they start glowing green.

## Changelog

🆑 Melbert
balance: Scientists have discovered Nuka Cola is not good for short term
health.
/🆑
2024-02-14 03:56:35 +01:00
Lucy
081b84c631 Painkillers now actually induce analgesic effects (#81335)
## About The Pull Request

This adds a new trait, `TRAIT_ANALGESIA`, and makes various painkillers
(+ tenacity trauma) apply said trait.

This prevents various pain-related effects, such as screaming due to
pain, and also provides a speed bonus during surgery.

## Why It's Good For The Game

Gives more of an incentive to actually use reagents such as morphine or
miner's salve.

## Changelog
🆑
add: Painkillers (i.e morphine, miner's salve) now actually induce
analgesic effects, preventing various pain-related effects, such as
screaming due to pain, and also provides a speed bonus during surgery.
add: The tenacity trauma (traumatic neuropathy) also applies analgesic
effects.
refactor: Simplified code related to reagents adding traits.
/🆑
2024-02-14 01:01:06 +01:00
SyncIt21
4495ea2e4d Refactors how machines are deconstructed (#81291)
## About The Pull Request
This refactors how machines are deconstructed in the following ways

- You can no longer override `obj/machinery/deconstruct()`. If you want
customized behaviour then override `on_deconstruction()` instead.

This comes with the added benifit of no longer needing to check for the
`NO_DECONSTRUCTION` flag because the machine base proc does that for us
& if it finds that flag it won't proceed to call `on_deconstruction()`
meaning no machine will have a chance to spawn anything which is the
current behaviour.

This is required to make #81290 work for all machines at least so that
machine can send the `COMSIG_OBJ_DECONSTRUCT` signal without subtypes
overriding & forgetting to call the parent proc

- `dump_contents()` only gets called when the machine is deconstructed
not destroyed thus not leaving behind any of its contents inside. Fixes
https://github.com/tgstation/tgstation/pull/81290#issuecomment-1925752583

## Changelog
🆑
fix: machines that should not drop contents when deleted no longer do.
refactor: refactors how machines are deconstructed. report bugs on
github.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-02-11 14:52:19 +01:00
Nick
ae7fa73bef Allows shakers to pour drinks with custom names and descriptions (#81234)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
This adds the ability for shakers to pour drinks with custom names and
descriptions. You can alt-click on a shaker and it will prompt you to
set the name and desc for the drink, and they will be given to
description of whatever drinking glass you pour into.
Washing the glass will remove these customization (it will also now
remove any changes made using a pen).


https://github.com/tgstation/tgstation/assets/42454181/6cf336f0-0621-49f3-baf1-91038f454c24


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

## Why It's Good For The Game
While this already kind of exists by using a pen to change the name and
desc, this is pretty annoying to do for every single glass of a beverage
you serve. It also is overwritten whenever the kind of drink in the
glass is changed. This PR will let bartenders serve plenty of their own
special concoctions without having to rename every single glass they
serve.
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

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

🆑
add: Shakers can now pour drinks with custom names and descriptions!
Alt-click the shaker to enable this.
/🆑

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

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-11 01:47:59 +00:00
Nick
815c7913d7 Adds fire ants as a chem (#81214)
## About The Pull Request
Adds fire ants as a chem. They work pretty much exactly the same as
normal ants, but they deal roughly 2x damage. Also mildly cleans up
whatever ant code I touched
## Why It's Good For The Game
Doesn't really make sense that when you scoop up an anthill of fire
ants, you get a beaker full of normal ants. It's honestly an injustice.
Also, new flavours for the bartender and chef to work with are always
nice.
## Changelog
🆑
add: Fire ants can now be scooped up and used as a chem like normal
space ants
/🆑

---------

Co-authored-by: Aki Ito <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
2024-02-11 00:34:48 +01:00
John Willard
18a5b5011f Cucumber Lemonade now has a price (#81368)
## About The Pull Request

One of the bar restaurant bots asks for cucumber lemonade but it has no
price attached to it, so it takes this drink (that requires help from
botany) and gives nothing in exchange, this fixes that.

## Why It's Good For The Game

bug fix

## Changelog

🆑
fix: Bar bots asking for Cucumber Lemonade now gives you money for
completing it.
/🆑
2024-02-10 06:15:41 +01:00
_0Steven
f01ded9dd4 Fixes screwdriver cocktail not being a screwdriver. (#81030)
## About The Pull Request

Alternative title: The screwdriver cocktail is now the world's worst
screwdriver (for real this time).

As mentioned in my writeup in the related issue (#81017), as far as I
know, it has never actually worked.
Tl;dr: It requires `on_transfer` to be called with the method as
ingestion, but in no way does transferring into a drinking glass ever
use that method, and most ways don't even specify a method and thus
`on_transfer` doesn't even get called in the first place.
Then I went back to the original pr and tried it, and it didn't work.

Then for resolving it, it feels unwieldy to do all this trickery on the
reagent to change a value on the drinking glass when the drinking glass
already has the perfect procs for this: the `on_cup_change` and
`on_cup_reset` callbacks.
Instead of using `on_transfer` and registering a hell of a lot of
signals to re-check the master reagent every time the contents get
changed, we just check whether the style we changed into is that of a
screwdriver cocktail.
This actually works.

Oh, and I also added use sounds because it didn't have them, which I
believe only actually get used when using it as a tool and thus only
when it's a screwdriver.
## Why It's Good For The Game

Fixes #81017.
## Changelog
🆑
fix: As they should've for a while, screwdrivers (cocktail) actually
work as screwdrivers (tool).
sound: The screwdriver cocktail also actually plays the screwdriver
sound when used.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-09 23:22:12 +01:00
A miscellaneous Fern
44ce6d923d Adds an IS_CHANGELING helper (#81228)
## About The Pull Request

What it says on the tin. I also replaced checks with it everywhere I
found appropriate, hopefully without accidentally breaking anything.
## Why It's Good For The Game

We have a helper for most other antags, and it makes code a lot cleaner
and easier to read. I'm surprised we didn't have this one already.
## Changelog
🆑
code: added an IS_CHANGELING() helper and used it where applicable
/🆑
2024-02-09 08:56:57 -05:00
SyncIt21
eda08fef89 [NO GBP] Instant reactions yield reagent results again (#81334)
## About The Pull Request
- Fixes #81333

Should calculate purity before we remove the reagents

## Changelog
🆑
fix: Instant reactions yield reagent results again
/🆑
2024-02-07 13:15:46 +00:00
SyncIt21
d1b2ce09b8 Reactions now use volume averaged purity (#81246)
## About The Pull Request
Cause it only makes sense

Currently the purity of reagents created in a reaction is computed as
follows

`total sum of purity of all reagents present / total number of reagents`

This is incorrect because regardless of how much "volume" of an
impure/pure reagent is present the purity of the final solution is
unaffected. Logically if we have more amount of an impure reagent the
more impure the final solution should be & same for opposite case. This
is the case for ph, where if we have a large volume of say "acidic"
reagent then changes in other reagents have a small effect to the
overall "acidity" of the solution. The same concept now applies for
purity as well

`get_average_purity()`accounts for volume thus yielding more realistic
results. The effect becomes more significant with larger volumes of
reagents.

🆑
fix: reactions now compute purity of reagents based on their volume,
meaning larger amounts of reagents created will have more significant
effects on the final purity of the solution
/🆑
2024-02-07 05:14:08 +01:00
MrMelbert
8b7fdc401a Tinacusiate doesn't futz with things it doesn't need to futz with (#81277)
## About The Pull Request

Rather than replacing the entire raw message, just adds to spans. 

Also adds some flavor ™️ while i'm here. 

## Changelog

🆑 Melbert
fix: Tinacusiate should break less, and break less things
fix: Speaking to a Sign Languager with Tinacusiate in your system
doesn't mess with their text, because they're not speaking.
/🆑
2024-02-05 12:09:18 -05:00
Higgin
dbc4c8286e Adds Climbing to a Bunch of Old Stuff (#81283)
## About The Pull Request

What it says. a lot of old atmospherics stuff and a few other
unintuitive things lacked climbability sometimes leading to stupid
situations where you could get stuck or their use as inappropriate
obstacles.

Canisters, pumps/scrubbers, welding/water/foam tanks, heaters, and racks
can now be climbed.


![image](https://github.com/tgstation/tgstation/assets/3894717/1e5582c5-8b41-42c6-99e8-810970adc1e9)

![image](https://github.com/tgstation/tgstation/assets/3894717/78c31589-1088-4e25-8194-d27316e526e2)

![image](https://github.com/tgstation/tgstation/assets/3894717/bc7625a5-6d0f-4b4a-adb3-a52e9eb8d04b)


## Why It's Good For The Game

i remember when tables were a kit you could carry, immediately assemble,
and then use to two-click table somebody to kill them. somehow this
seems overdue.

## Changelog

🆑
qol: portable air pumps, scrubbers, heaters, canisters, liquid tanks,
and racks are now climbable.
/🆑
2024-02-05 12:06:27 -05:00
LemonInTheDark
18075704e9 Implements rgb2num, uses it to replace all our manual rgb reading. Redoes HSV management (#81182)
## About The Pull Request

[Converts all manual extraction of rbg with rgb2num. It's just
better](ae798eabd5)

[Yanks out old HSV management, replaces it with list
stuff](4997e86051)

There's this old lummy era clunky code that passed HSV as text

We can now cleanly replace it with passing hsv as lists from a rgb2hsv
proc

So let's just do that.

Also, cleans up spraytan code (and ethereal lighting)

## Why It's Good For The Game

Code better
2024-02-01 13:43:50 +01:00
MrMelbert
f1a3fc839f Replaces /obj:: -> parent_type:: (#81146)
## About The Pull Request

This just seemed like a minor error with the new syntax that popped up:

The intent of these seem to be "take our obj flags and add
`NO_DECONSTRUCTION` to it", which was perfectly serviceable in a
majority of places, as the parent type had the same obj flags as `/obj`.
But in a small handfull of places (such as any table subtypes) this was
not the case, and it caused some objects to have missing flags that they
were otherwise intended(?) to inherit.

So I replaced `/obj::` with `parent_type::` meaning rather than using
the base obj flags and then adding `NO_DECONSTRUCTION`, they use their
parent type's obj flags and then add `NO_DECONSTRUCTION`.

## Changelog

🆑 Melbert
fix: You can build on some niche tables again, such as the Wabbajack
Altar.
/🆑
2024-01-29 11:37:04 -05:00
SyncIt21
113676f496 Sets reagent holder minimum volume to 0.01 (#81131)
## About The Pull Request
- Fixes #81096

Basically if the reagent volume inside an reagent holder falls below
`CHEMICAL_VOLUME_ROUNDING`(or 0.01) only then is it garbage collected.
Helps with small transfer rates like the plumbing iv drip

This means volumes like 0.01 of a reagent can now exist inside your
beaker, previously this was 0.05

## Changelog
🆑
fix: sets minimum volume of reagent allowed to exist inside anything to
0.01 therefore allowing plumbing iv drip small transfer rates to occur
without reagents disappearing.
/🆑
2024-01-28 23:55:02 +01:00
Krypandenej
90d0bd9ed3 A few food fixes (#81128)
## About The Pull Request

Some bug smashing, as well as adding decent values to martian drinks.
This is also my first few ever PRs, so if something goes wrong, yell at
me

## Why It's Good For The Game

This should hopefully make it so that martian drinks appear more at
bars. Also, you can now eat a pesto pizza whole. Yey.

## Changelog


🆑
fix martian drinks give various moodboosts that aren't just "nice" now
fix: pesto pizza (cooked) is no longer raw, and cilbir is meat instead
of fruit
/🆑
2024-01-28 23:39:28 +01:00
SyncIt21
62a81a4829 Minor code cleanup for PCM (#81092)
## About The Pull Request
- Shortened the description for readability. Makes sense to display
further details only when examining.
- Removed deprecated `content` tag from button elements in the UI
- Added more sanity checks when dealing with numbers inside `ui_act()`
- Make sure we don't insert hologram items
- Use `as anything` to speed up some for loops
- Capitalized some text inside examine

## Changelog
🆑
spellcheck: shortened description for the PCM and capitalized some text
for its examines.
code: adds sanity checks and removed deprecated `content` tag from PCM
UI. Stops hologram items from being inserted.
/🆑
2024-01-27 15:15:31 +01:00
lessthanthree
2c2a7c1c3d Fixes reagent transfer logging on organs (#81078)
## About The Pull Request

Fixes combat log for reagent transfer into organs, closes
https://github.com/tgstation/tgstation/issues/80907

## Changelog
Not player-facing.

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2024-01-26 11:18:49 -08:00
SyncIt21
882b6a176e Chemical Reaction Tester/Debugger 2.0 (#80987)
## About The Pull Request
This machine belongs in runtime station and is used for debugging
reactions. This PR fully reworks the chemical reaction tester or
`/obj/machinery/chem_recipe_debug` from ground up. Here is a comparison
between the old and the new system

**1. Old System**
- Played all reactions sequentially and very rapidly, stopping the
machine would halt all reactions. It has no ability to replay an
reaction, Play forward/backward through the long reaction list or more
importantly pick a reaction at random
- It would spawn a ton of beakers per reaction and create a ton of
reagent waste
- It would spam the chat with a lot of `say()`, overloading us with too
much information
- Cannot debug soup reactions which require solid ingredients
- Code quality is just poor & UI is clunky

**2. New System**
- Gives you the option to play 1 reaction at a time, You can play
next/play previous/pick a reaction from the list.
- Gives you the explicit option to create a beaker from the stored
reagents or even better reuse a beaker if you inserted 1 in
- No chat spams
- Now has support for soup reactions
- Reaction display now matches that of chem heater for easy
understandability
- Better code & typescript UI



https://github.com/tgstation/tgstation/assets/110812394/d2a73913-b7b2-4e2a-903c-c43fec1923f5



## Changelog
🆑
refactor: chemical reaction tester in runtime station has been
remastered from ground up.
/🆑
2024-01-25 09:07:22 -05:00
A miscellaneous Fern
8230069702 The addiction withdrawal blur effect is now properly centered (#81069)
## About The Pull Request

What it says on the tin. It also affects the psychic projection ability,
since it seemed to suffer from the same problem.
It's an odd interaction, and seems to be the fault of the wave filter.
If the blur filter is applied after it, it seems to try and center
itself at a certain point of the wave which may not be aligned with the
center of the screen.
(Adding an initial offset to the wave filter makes the blur be
misalligned both horizontally *and* vertically, so it seems to try and
place itself at the initial position of the wave?)
<details>
<summary> Pictured here with 0.5 offset</summary>


![image](https://github.com/tgstation/tgstation/assets/80640114/60a850bd-8893-4054-8f1f-f389187e37a2)

</details>

One way or another, applying the blur filter before the wave filter
keeps it nice and centered.

![image](https://github.com/tgstation/tgstation/assets/80640114/2760b9f2-11a3-484d-9a61-36f8defd43b9)
## Why It's Good For The Game

Closes #81004
## Changelog
🆑
fix: the blur effects for hallucinogenic withdrawal and psychic
projection are now properly centered on the screen
/🆑
2024-01-24 15:01:47 +01:00
SyncIt21
ee1583bd49 Fixes for Oatmeal & multi-result reaction termination (#81039)
## About The Pull Request
This PR is a 2 part fix

**1. Ending reactions that produce multiple reagents**
These kinds of reactions are very rare which is why this bug wasn't
detected for so long and Oatmeal was one of them. The Oatmeal reaction
produces both oatmeal & milk i.e. 2 reagents as results.

Because of this the check to terminate reactions

`if((step_add >= step_target_vol) && (length(holder.reaction_list) ==
1))`

Failed because `step_add` is the value of the last(single) reagent added
but `step_target_vol` is computed from a (list) of all resultant
reagents. We should instead use `total_step_added` which is computed
from the (list) of all the reagents added (in this case oatmeal & milk)
for comparison to get the right results.
  
The check `length(holder.reaction_list) == 1` isn't necessary because
this should be applied for all reactions in general & not just for
plumbing or competitive reactions

**2. Make oatmeal produce correct quantity of reagents**
Even though the above fix is enough to make oatmeal reactions work again
we should still remove milk as one of the results. This is because the
results produced from a reaction is added back to the holder & consumed
again creating a feedback loop (which decreases over time but is still
large enough to keep the reaction going for a significant length of
time) therefore you end up getting twice more amount of oatmeal than
intended.

Plus it makes sense. 20 units of milk should convert to 20 units
oatmeal. The extra 12 units of milk comes from nowhere which doesn't
make sense

- Fixes #81038

## Changelog
🆑
fix: reactions that create multiple reagents now terminate without
looping endlessly.
fix: oatmeal reactions now terminate & produce the right quantity of
results but without milk.
/🆑
2024-01-23 10:29:21 +01:00
carshalash
d90813eb86 Nanotrasen stops stocking discount Irish Cognac: Cognac is now properly french. (#81024)
## About The Pull Request

For some reason, somebody thought that cognac was an Irish spirit.
Please, please look up real-world things you are touching


![image](https://github.com/tgstation/tgstation/assets/16896032/fe70e10b-6a22-497e-9086-a13139b3b174)


## Why It's Good For The Game

I don't want to drink any cheap ass, backwater, nasty ass, dirty, cheap,
angry Irish cognac.

## Changelog


🆑
fix: Nanotrasen is now stocking proper french Cognac instead of discount
Irish Cognac. It will now taste Smooth and French
/🆑
2024-01-21 09:03:06 +01:00
Bloop
fc0a1f4068 Removes timeout_mod arg from add_mood_effect (#80964)
## About The Pull Request

Partial Revert of https://github.com/tgstation/tgstation/pull/80800

Assuming every num passed in the parameters of `add_mood_effect` is a
`timeout_mod` is incorrect, because there can be mood events that take a
numeric arg which is not meant to be multiplied against the timeout.

This leads to the same issue as multiplying it with strings essentially
(in one case, shown below, this results in a negative duration of a
timer).


![image](https://github.com/tgstation/tgstation/assets/13398309/f8af858f-04ef-4144-9a0b-2fae60b71272)


![Code_ZN176cpMqA](https://github.com/tgstation/tgstation/assets/13398309/a6ec7689-0171-4909-91cb-a17b56454eb6)

Plus having a keyword arg that may or may not actually be what the
keyword arg claims to be is really confusing and bad.

Instead here's what I propose: passing in an instantiated mood datum
itself, which has been modified, and copying the timeout from it before
discarding it.

It is not as clean as I'd prefer either, but at least it's logically
sound and the intent is clear, and it's the best I can think of short of
a major refactor of the entire system for this one small thing which is
only being used by food quality.


![image](https://github.com/tgstation/tgstation/assets/13398309/8560c066-bb0b-4066-af94-372d5ea62679)

## Why It's Good For The Game

Clearer, less smelly code.

## Changelog

🆑
code: removed the timeout_mod arg from add_mood_event, which was only
used for one thing and causes more issues than it's worth
/🆑
2024-01-16 20:57:42 +01:00
SyncIt21
f7b926d5f5 General maintenance for cryo chamber (#80873)
## About The Pull Request
The changes can be summarized into the following categories

1. **Qol**(Should not be a problem for feature freeze hopefully)
- Adds balloon alerts for screwdriver & wrench acts, when inserting a
beaker and other stuff
- Adds extra examines for the beaker inside the cryo, how to open
maintenance panel & other stuff. Most of the examines were not enclosed
in `span_notice`
- Adds screen tips for crowbar act, when inserting beaker into cryo etc
- Cryo can now be pried open when there is no power with a crowbar so
you can free someone stuck inside in case of an emergency
- Cryo now auto turns on immediately without a 2 second delay & without
the need for auto eject

2. **Fixes**   
- Cryo won't drop the beaker onto the floor when ejected, but will put
it in the players hands as intended
- Fixes #80699. The cryo was on `ABOVE_MOB_LAYER` which rendered on top
of everything, Now its set to the default layer so mobs & other stuff
now render on top of it
- Loc checks were incorrect instead of doing `mob.loc == src`(which
would fail if the mob was standing in the open cro) we now do
`get_turf(mob) == get_turf(src)`(which works if the mob by anyway in on
the turf of the machine)

3. **Code Improvements**
- Get's rid of unused variables such as `sleep_factor`,
`unconscious_factor` etc. Simply unused
   - Autodocs remaining variables and procs
- Slightly touched on the UI shared by cryo, chem heater etc. Removes
the `transfer_amounts` var that went unused in these cases
 
4. **Refactors**
    - Converted UI to typescript
- Removes `check_nap_violations()` from `process()`. This proc checks if
the occupant has an ID card & money in the account which makes no sense
for cryo
- Cryo will turn off if there is no occupant OR if there is no beaker
- It no longer starts processing round start & only when the machine is
turned on/off thus saving cpu
- Removed old cryo icon states such `cell-open` , `cell-off` etc. These
were used for the old cryo tube from years ago but are no longer needed
now so the icon file size has been trimmed

## Changelog
🆑
qol: adds more examines, screentips & balloon alerts for cryo actions,
cryo can be pried open with a crowbar when there is no power to free
someone trapped inside
qol: cryo auto turns on immediately without a 2 second delay & without
needing auto eject mode on
fix: ejecting beaker from cryotube will put it in the players hand & not
drop it on the floor
fix: mobs & other stuff now render on top of cryo tubes and not bottom
of it
fix: cryo checks for if the mob is on the same turf as cryo is now
fixed, i.e. you can no longer close the machine on yourself
code: removed unused vars from cryo, autodocs vars, removed unused
`transfer_amounts` from some chem machinery ui
refactor: removed unused icon states for cryo tube, cryo no longer
processes round start and it's UI is now typescript
/🆑
2024-01-16 02:24:42 +01:00
Hatterhat
27386bffe8 fixes a bunch of moodlets potentially lasting forever (less band-aidy) (#80800)
## About The Pull Request
In a previous PR (https://github.com/tgstation/tgstation/pull/79661), I
noted that a lot of moodlets tended to have their timeouts break because
it was passing their names and whatnot as a parameter, that gets fed
into the timeout modifier parameter, causing the timeout multiplier to
break, because BYOND type-agnosticism means that it can multiply a
number (timeout_mod) by text (a name or some other object), resulting in
0 - which makes a moodlet permanent. This is probably not intended.

This fixes that in two ways:
- Adding a `1` to potentially applicable moodlets (searched for with a
regex of `.add_mood_event(.*, .*,)`) just to make sure the timeout
doesn't get multiplied out weirdly.
- Making the add_mood_event thing CRASH() if the timeout_mod is bad.

If someone else wants to come up with a solution better than this,
please do.

## Why It's Good For The Game
Maybe having your arm permanently fall asleep after getting it
reattached sucks, moodlet-wise. (Being stuck with permanent
positive/negative moodlets is probably not intended.)

## Changelog

🆑
fix: Moodlets with parameters/effects e.g. limb reattachment moodlets
should probably disappear more appropriately.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2024-01-15 07:08:01 +01:00
SyncIt21
a220cb4d39 [NO GBP] Chem Heater with empty buffers can be refilled again (#80934)
## About The Pull Request
- Fixes #80933

Should check if beaker has the buffer and not the machine

## Changelog
🆑
fix: chem heater with empty buffers can be refilled again
/🆑
2024-01-13 19:30:11 -05:00
Paxilmaniac
620dbfa656 Makes chemical reactions that need a certain container, but accept subtypes of that container, actually work again (#80882)
## About The Pull Request

During I think a semi-recent chem refactor, the variable that lets
reactions accept subtypes of their required container was made
non-functional. This is due to a little logic error in the check for
reagent containers, as it checked for the exact path of container
regardless of what the variable said.
## Why It's Good For The Game

If a variable says it should do something, it should actually do that
thing instead of just nothing
## Changelog
🆑
fix: The "required_container_accepts_subtypes" variable on chemical
reactions now actually works again
/🆑
2024-01-12 05:03:28 +01:00
John Willard
873b5511f9 Heretic monsters can drink heretic reagent (#80837)
## About The Pull Request

Human heretic monsters (like the husked ones) can now drink the heretic
reagent and heal from it like heretics can, rather than dying.

## Why It's Good For The Game

I assume it is unintentional that a reagent for heretics kills heretic
allies, especially when they can already do so much like using their
knives and even abilities.
It's noob bait at best since people will assume that since they are also
heretics, they would heal from the same sources as heretics do.

## Changelog

🆑
fix: Eldritch reagent (the one that heals heretics) now heal heretic
monsters rather than kill them.
/🆑
2024-01-09 14:11:41 -05:00
John Willard
12c80b8892 Fixes a punctuation error with Luini Amaretto (#80711)
## About The Pull Request

This bugged me so I am fixing it.

## Why It's Good For The Game

self explanatory.

## Changelog

🆑
spellcheck: Fixed punctuation in Luini Amaretto's description.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-04 20:51:08 +01:00
Kyle Spier-Swenson
352627e04a [s]Fix exploit that allows players to close every single tgui window for all players (#80768)
Fixes #80767
2024-01-03 23:16:27 +00:00
SyncIt21
926d000d76 Some Processing improvements (#80693)
## About The Pull Request
Got the idea from #80682. A lot of parent procs don't do anything, some
are just formatted in a bad way, and others early return and do no ops,
it's bad in general but this should give us a head start.

Some good overhead saved here
2024-01-01 20:58:34 +01:00