Commit Graph

97 Commits

Author SHA1 Message Date
Andrew
626e5c9dea Eating from floor may cause disease (#76018)
![image](https://github.com/tgstation/tgstation/assets/3625094/a60ac166-5772-4ee1-aa08-4f82828033e7)

## About The Pull Request

There is a 10% chance of getting one of 3 new diseases when you eat
dirty things.

Things become dirty when left on the floor for [more than 5
seconds](https://en.wikipedia.org/wiki/Five-second_rule).

But you can wash (with any method you know from spraying water to
cleaning with soap) or cook them later to avoid this.


![image](https://github.com/tgstation/tgstation/assets/3625094/0f78ef11-1737-4c9c-aecd-072dd95ef013)

Packaged, bowled, canned food (any food that spawns package as trash
afterwards) is protected from this effect.

Makes crafted food spawn on nearby tables when the hands are full.
Except the one behind you.


![8wSPp0hsx1](https://github.com/tgstation/tgstation/assets/3625094/6a51ebce-5626-4aac-9e59-cc4eab46a95a)

#### New diseases:

40% chance:

![image](https://github.com/tgstation/tgstation/assets/3625094/a0b72459-cc10-47e1-99db-b11013eaa61b)

40% chance (Vomiting is of special type that does not stun):

![image](https://github.com/tgstation/tgstation/assets/3625094/ce8e254c-7a65-49ed-bfb2-68652a624aed)

20% chance:

![image](https://github.com/tgstation/tgstation/assets/3625094/b792ae5e-8a99-4271-93d1-bcc172292049)

## Why It's Good For The Game

Things that are left on the floor for too long intentionally are trash
that should be disposed by janitor. If you make a meal or prepare a
medication, it makes sense that you should keep your product sanitized.

Things that are dropped unintentionally are supposed to be picked up
quickly. "Oops I dropped this pie, need to pick it up quickly before the
germs spread". 5 seconds are enough for this. If you didn't manage you
will be like "Oh dammit, now I need to wash this pie in a sink".

Now players will consider to not just throw items meant for eating onto
the floor neglecting the fact that it looks odd. If they still ignore
it, people who consume the items will receive a harmless but annoying
disease.

In general this PR aims to force some IC gameplay onto Medics, Chefs and
Botanists so that they care a bit more about things they make for other
players.

The items have a warning message saying that they are dirty and
dangerous, so the consumers have a way to detect dirty items and an
option to wash them with soap/rag/sink/shower/fire extinguisher to
remove the harmful part from the edible item.

So to avoid this, players just need to examine an item before eating it.

Botanists can spray a pile of fruits from a hose for the same effect,
and washed items that stay on floor dont regain germs until moved to
another tile.

Food that converts into another item during cooking (like meat slab
turning into steak) or crafting, will not retain the infection. This
kinda simulates the sanitizing during cooking.

Medics can use elevated structures (e.g. conveyor belt) to avoid getting
their pills dirty during creation in plumbing. Or they can wash the
pills they want to distribute in the shower before packaging them into
pill bottles or a bag.

## Changelog

🆑
add: Food and pills have a 10% chance to infect with one of three new
diseases on consumption when left for more than 5 seconds on the floor.
You can wash it to avoid disease. ChemMaster and Pill Press are added to
the list of elevated structures (Considered as tables for pills). Made
harvest spawn on top of hydrotrays to stay protected from germs.
add: Added three new advanced diseases: Gastritium, Carpellosis, Nebula
Nausea with static cures obtained by digesting dirty food.
fix: Food no longer decomposes on Hydrotrays, Grilles, Bonfires and all
dense kitchen machinery
code: Decomposition now uses `germ_sensitive` component and follows 5
second rule too.
qol: Crafted food items spawns on nearby tables (except the one behind
you) instead of dropping on floor when hands are full.
/🆑
2023-06-30 01:28:12 -07:00
ChungusGamer666
62ccbff0df SPECIES NUKING 2023: Makes tongues handle liked/disliked food instead of species datum (#76204)
## About The Pull Request

Alright, let's get real, handling food tastes with the species datum is
hacky at best - This is a continuation of my nuking of the species
datum, which currently handles way too much of human mobs' behaviors.

While moving that to the tongue isn't exactly a perfect solution, it
allows for more interesting behavior than the species datum, especially
now that I added getter procs to get foodtypes liked/disliked by the mob
and such.

## Why It's Good For The Game

Makes tongue transplants more appealing and emergent, since they fully
control tastes and not just taste sensitivity which is pretty much
cosmetic.

## Changelog

🆑
refactor: Liking/disliking food is now handled by the tongue organ, not
the species. Also, having a failing tongue means you can't taste food
properly!
add: You can read peoples' tongues now, if you have the entrail reading
skillchip.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2023-06-26 08:17:54 +02:00
ChungusGamer666
6da96bef84 SPECIES NUKING 2023: Mein leber! Allows livers to handle reagents in special ways, instead of the species datum doing it (#76184)
## About The Pull Request

Refactors livers so special chemical handling can be done by them,
instead of the species datum.
Plasmamen, skeletons and golems all use the liver for all their species
specific chem handling now.

## Why It's Good For The Game

SPECIES DATUM I HATE YOU!
Also, being able to handle reagents like any species if you have their
liver is REALLY FREAKING COOL and allows for emergent gameplay by mixing
various organs from various sources.

## Changelog

🆑
refactor: Mutant livers can now handle chemicals in special ways.
Currently, only plasmaman, skeleton and golem livers do it. Every other
species is the same.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2023-06-24 21:05:29 +02:00
ChungusGamer666
3ec8bd669e Food gets stink lines when about to go rotten (#76038)
## About The Pull Request

Title says it all, food that decomposes gets stink lines halfway
through.

![image](https://github.com/tgstation/tgstation/assets/82850673/ae90220c-4b27-49dd-873a-6f349055f891)

![image](https://github.com/tgstation/tgstation/assets/82850673/c982055d-ed69-4935-bda5-7851836fad2c)

Moldy messes always gets stink lines.

## Why It's Good For The Game

1. It's funny
2. It's a visual indicator for food going bad which is kinda nice

## Changelog

🆑
add: Food now gets stink lines when going bad. Uh oh, stinky.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-06-18 18:29:29 -06:00
ChungusGamer666
ce2a1185ad Renames COMSIG_ITEM_ATTACK_OBJ to COMSIG_ITEM_ATTACK_ATOM (#76112)
## About The Pull Request
 
For some reason this was missed when moving attack_obj() to /atom level.

## Why It's Good For The Game

It peeves me that this signal is misnamed
2023-06-18 18:48:01 +08:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
LemonInTheDark
daf55e611c Cleans up/renames as private some internal var definitions, removes some fucked uses of internal list vars (#75769)
## About The Pull Request

[Improves the documentation of DCS lists, removes old list of callback
docs that no longer
apply](c3821d9f5f)

[Adds a second signal register to decal rotating, adds a trait to
objects under a tile. STOP DIRECTLY READING HIDDEN LISTS I SWEAR TO
GOD](6b3f97a76a)

[Removes direct reads of the timer list, they were redundant
mostly](14fcd9f8a6)

[Please stop directly reading/modifying the traits list to ensure your
dna rot follows the
brain](ec0e5237ec)

[Marks internal datum lists as well internal with
_](57c6577ff6)

[57c6577](57c6577ff6)

Does the same to _clear_signal_refs() in hopes of keeping people from
touching it

## Why It's Good For The Game

They pissed me off.

Users should not be touching these lists, especially in ways that make
assumptions about their structure and are thus prone to breaking if that
ever changes.
Most of these are close to zero cost changes, using a wrapper to solve
the problem, or just yeeting it

Two aren't, Decals with a direction have gained a second signal register
on init, and things that sit underfloor (cables/pipes) now get a trait
when inserted there.

This should have a minimal impact on memory/init time, bugging
@Mothblocks about it just in case
2023-06-05 22:25:09 -06:00
Jacquerel
1a918a2e14 Golem Rework (#74197)
This PR implements this design document:
https://hackmd.io/@Y6uzGFDGSXKRaWDNicSiEg/BkRr176st
Put briefly, this will remove every existing golem subtype and
consolidate golems into a single species with cool new sprites.
NOT implemented from that PR is the ability to eat Telecrystals, I
couldn't come up with an appropriate visual that can stack with the
existing ones, but that should be a reasonably trivial add for a future
artist & developer.

New Golems have a food-based mechanic where their hunger decays pretty
quickly and can only be replenished by eating minerals. They start
moving slower as they get hungrier, until eventually they become
completely immobilised and need to be rescued.
Eating different kinds of minerals will visually change your sprite and
give you a special effect in a similar way to old golems, but temporary.
While transformed, you can't eat any other kind of mineral which would
transform you (but can still consume glass).
To see the full list of effects, look at the hackmd above.

In service of these sprites working I have refactored the
`species/offset_features` feature by killing it and delegating that
responsibility to limbs instead. Rather than applying an offset to items
due to your species, it is due to your weird head or arms. This makes
overall more sense to me, but it inflates the code changes in this PR
somewhat.
It doesn't make a lot of sense to atomise unfortunately because that
code also seemed to be entirely unused until I tried to use it in this
PR, so you wouldn't be able to tell if my changes broke anything. I
might make a downstream sad by doing this.

All of the actual numbers in this PR are made up and only loosely
tested, it will need some testmerges to gather feedback about whether it
sucks or not.

Other relevant changes:
I reworked how bioscrambling works based off bodypart bodytypes, to
automatically exclude golem limbs in either direction. There's really no
way to have those work on humans or vice versa. Organs still fly though.
2023-05-07 22:45:20 +00:00
MrMelbert
6085e3b5ee Reagent soup / Soup rework / Stoves - A kitchen expansion (#74205)
## About The Pull Request


![image](https://user-images.githubusercontent.com/51863163/227391708-8de28b68-149f-4e02-a2d3-22f6e3067784.png)

**This PR:** 

- Reworks most* existing soup into reagents. 

- Adds Stoves and Ranges. Ranges replace most* existing ovens. 

- Adds soup pots, to cook soup

**How does it work?** 

In the kitchen you will find a stove now.

Stoves act as a "reagent container heater", essentially a chem heater.
You can set a pot onto the stove.

To make soup, visit the cooking recipe book for a guide. Most recipes
are the same as before, just tweaked slightly - Add water to the pot (50
units for 1 batch generally), then add all the corresponding ingredients
to the pot. Set the pot out on the stove and right click it to turn it
on. If the recipe's correct, shortly it will start to mix and give you
soup!

One soup recipe will give you roughly 3 servings of soup. You can pour
our the soup into a bowl using a ladle or just by pouring it manually.

Of note: **All of the reagent contents of the ingredient are transferred
into the soup.** Better, more nutrient rich ingredients produces more
soup, and poisoned produce will pass it on.

If you place the soup into a chem master, you will notice it's roughly
half "soup reagent" and half a variety of reagents, including nutriments
/ proteins. This is your soup! It is recommended you serve your soup
with the reagents included, as they make up more nutrition for the
customer, however you can separate it out if you're picky.

**Todo:** 

- [x] Fill out the PR body a bit more 
- [x] Mapping (wait for big merge conflict pr to go past)
- [x] Soup colors
- [x] Balance pass over for soup recipes
- [x] TODOs
- [ ] Unit tests
- [x] Cullen Skink's recipe is invalid
- [x] Try to see if there's an easy way to prevent soup from fattening
you up too easy.

## Why it's good for the game

Adds some more depth to the kitchen and moves chef away from the
click-button-get-food style that exists.

Allows for inherently custom soups by the way of making it reagents, so
no need to support custom soup food items.

## Changelog

🆑 Melbert, stove and pot sprites by Kryson, ladle sprite by Kinneb
add: Kitchens are now stocked with Ranges. 
add: You can now print (and create) Stoves. 
add: The dinnerware vendor now dispenses ladles. 
add: Spoons can now actually spoon... things.
add: Soup has been reworked entirely. Soups are now reagents, cooked via
a soup pot on a Stove or Range. Simply add water and your required
items, then apply heat. Be careful not to boil over!
add: Stoves, Ranges, and Griddles will now heat up their surroundings -
don't turn them on around plasma!
fix: Fixes being able to cook in an Oven while the room is depowered
qol: Hitting a customer bot with an incorrect recipe no longer counts as
a hostile attack leading to your demise shortly after
refactor: Customer bots that request a reagent now use custom orders
code: Cut down a lot of code in the crafting menu code, and removes some
ugly ispaths
del: Soup is no longer food items, so can't appear in random food pools
(at least not yet).
balance: Virus Food recipe now requires you cool it to 200k.
/🆑
2023-04-07 19:42:49 -06:00
Zephyr
ecbcef778d Refactors Regenerate Organs, and a few organ helpers (#74219)
## About The Pull Request

Refactors regenerate organs to be slightly more intelligent in handling
organ changes and replacements.
Noteably:
- We don't remove organs that were modified by the owner; such as
changing out your heart for a cybernetic
- We early break out of the for loop if they aren't supposed to have an
organ there and remove it
- We check for the organ already being correct, and just healing it and
continuing if it is

Also changes the names of some of the organ helpers into snake_case
### Mapping March
Ckey to receive rewards: N/A

## Why It's Good For The Game
## Changelog

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-26 17:54:36 +01:00
Jack Edge
c98136fc4f Fix chef food ownership to follow mind (#73600)
🆑 coiax
fix: A chef who is beheaded, and the head stitched on another body will
still see their food as their own.
/🆑

## Why It's Good For The Game

Having food ownership be based on the mind, rather than the mob, makes
it resilient to body-swap, mind-swap, podcloning (cloning!?),
situations. Because even though you may have been reduced to just a
head, that stew is still yours, you still made it.
2023-02-24 14:42:55 -07:00
Jacquerel
7e4a6d842c [no gbp] Allows clothes to be eaten (#73565)
## About The Pull Request

Fixes #73546
In #73481 I made the foolish assertion that it's never correct for
someone to eat something which isn't physically nearby.
I had of course forgotten that while Moths _think_ they can eat clothes,
what they are actually eating is the abstract concept of clothes if they
were edible, functionally nothing, which exists nowhere.
By moving the check to only run when you are trying to eat a turf
(conveniently, no clothing is also a turf... yet) I allow them to return
to their delusion.

Alternate fixes and why I didn't do them:
- Always allow people to eat food which is in nullspace. This feels
pretty gross.
- Put the abstract clothes food physically inside the clothes. I assume
this wasn't done because there's some scenarios where you would be able
to remove abstract clothes food from the clothes, so that's not
desirable.
- Move the food into the actual clothes object just before taking a bite
and then put it back in nullspace again. This is silly.
- Try to make moth clothes food work in a way which doesn't involve
creating an imaginary food item in the void. I don't want to do this.

## Why It's Good For The Game

It's funny to eat clothes I guess.

## Changelog

🆑
fix: Moths can eat clothes again.
/🆑
2023-02-21 21:49:20 -07:00
Jacquerel
6dc123735d You can't eat a turf unless you are standing next to it (#73481)
## About The Pull Request

Fixes #73115, don't you love telepathy?
Just adds a range check to the general "can I eat this now?" proc. I
couldn't think of any situation where you should be able to eat
something which isn't next to you.
I tested it and you can still feed people and eat food from your
inventory.

## Why It's Good For The Game

It's funny to be able to eat pizza floor with your brain but not
intended.

## Changelog

🆑
fix: You can no longer eat pizza floor tiles with your brain.
/🆑
2023-02-18 13:45:53 -07:00
John Willard
c097f167b1 Completely removes do_mob and do_after_mob (#73117)
## About The Pull Request

This is a remake of #70242

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

## Why It's Good For The Game

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

## Changelog

🆑
fix: Mechs should now cancel out of drilling when they move.
/🆑
2023-02-02 21:17:20 +00:00
carshalash
141b2cac1b Adds nutriment factor to liquid gibs. (#73033)
## About The Pull Request

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

## Why It's Good For The Game

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

## Changelog

🆑
balance: Gibs now provide a small amount of nutriment.
/🆑
2023-01-30 23:40:24 -07:00
Jeremiah
872e64fb05 Adds spaces around logical operators (#72603)
## About The Pull Request
Part of a prior PR that was closed (#72562). This version does not add
the check in CI.
## Why It's Good For The Game
The work is already done, so I figured why not.
## Changelog
N/A Nothing player facing

Co-authored-by: Jeremiah Snow <jlsnow301@pm.me>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-16 16:56:35 -08:00
MrMelbert
c3a1f21c1a Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind (#72267)
## About The Pull Request

- Nearsighted is now a grouped status effect.
- Blindness is now a grouped status effect.
   - Eye handling of blindness has improved. 
- When eyes are removed, they now cause you to become blind, rather than
handling it in `update_tint`.
- Being ahealed no longer blinds you for one tick, meaning that black
overlay on aheal is gone.
- Temporary Blindness is now a status effect.
- Both Nearsightedness and Blindness have been exorcised from mob vars
and life chains. This means that we've finally cut 2 procs from life,
`handle_status_effect` and `handle_traits`, and moved both to event
based processing. Wooo optimizations.
- Swapped pacifism status effect to use apply and set helpers. 
- Removed an unused admin toggle that disabled welding helmet tint but
also tint from every clothing item and also blindness from losing your
eyes.
- Clothes now generally all blind their mob more consistently.
- Oculine, eye surgery, and sensory restoration are now no longer the
only way to fix blindness from eye damage. If your eyes are healed
through any other means, it will also heal your blindness.
- Some things that made you blind, such as ling blind sting, no longer
just flat made you blind from eye damage forever. They now cause eye
damage directly, which in turn makes you blind from eye damage, as
expected.
- Pacifists can't eyestab anymore. Eyestabs now have a limit on the
amount of blur applied.
- Refactored some `is_x_covered` procs to accept flags rather than have
a lot of arguments for some silly reason.
- Unit tests for blindness. 

## Why It's Good For The Game

Blindness was exceptionally poorly handled prior, primarily due to the
fact that it was tied to the mob instead of separated out

On top of that the system put a LOT of faith in proper handling of
blindness on the coder's end which was misplaced evidently. Many places
didn't update or handle blindness correctly, or just let people
perma-blind.

Deferring it to a status effect improves this a lot

## Changelog

🆑 Melbert
refactor: Refactored blindness and nearsightedness. Important to note is
that all mobs are naturally blind until their eyes are actually created.
refactor: Refactored "is covered" procs
fix: Less sources of blindness now cause permanent blindness. Includes
the "Blind" Spell and "Blind Sting" from changelings.
admin: Ahealing someone no longer flashes the blind overlay for 1 tick.
admin: I removed an unused (sort of) inaccessible admin verb that
allowed you to toggle the tint from all welding helmets (and clothing)
(and lack of eyes) in existence, let me know if you want similar back
balance: Changeling "Blind Sting" now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Visionloss virus symptom now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Oculine has been reworked slightly. Prior, Oculine arbitrarily
healed blindness and nearsightedness from eye damage reagrdless of how
damaged the eyes were, and applied blur on success. Now, Oculine just
heals eye damage, and blindness / nearsightedness is restored in the
process. There is now a probability every tick that eye blur is applied
based on how pure the oculine is while healing very damaged eyes.
balance: Pacifists can no longer eyestab.
balance: Any clothing item that covers your eyes contributes to getting
the bonus while sleeping, and to removing temporary blindness faster
/🆑
2023-01-15 23:01:40 -08:00
MrMelbert
acb96fee1d Refactors memories to be less painful to add and apply, moves memory detail / text to memory subtypes. Adds some new memories to demonstrate. (#72110)
## About The Pull Request

So, a huge issue with memories and - what I personally believe is the
reason why not many have been added since their inception is - they're
very annoying to add!

Normally, adding subtypes of stuff like traumas or hallucinations are as
easy as doing just that, adding a subtype.

But memories used this factory argument passing method combined with
holding all their strings in a JSON file which made it just frustrating
to add, debug, or just mess with.

It also made it much harder to organize new memories keep it clean for
stuff like downstreams.

So I refactored it. Memories are now handled on a subtype by subtype
basis, instead of all memories being a `/datum/memory`.

Any variety of arguments can be passed into memories like addcomponent
(KWARGS) so each subtype can have their own `new` parameters.

This makes it much much easier to add a new memory. All you need to do
is make your subtype and add it somewhere. Don't need to mess with jsons
or defines or anything.

To demonstrate this, I added a few memories. Some existing memories had
their story values tweak to compensate.

## Why It's Good For The Game

Makes it way simpler to add new memories. Maybe we'll get some more fun
ones now?

## Changelog

🆑 Melbert
add: Roundstart captains will now memorize the code to the spare ID
safe.
add: Traitors will now memorize the location and code to their uplink.
add: Heads of staff winning a revolution will now get a memory of their
success.
add: Heads of staff and head revolutionaries who lose their respective
sides of the revolution also get a memory of their failure.
add: Completing a ritual of knowledge as a heretic grants you a quality
memory.
add: Successfully defusing a bomb now grants you a cool memory. Failing
it will also grant you a memory, though you will likely not be alive to
see it.
add: Planting bombs now increase their memory quality depending on how
cool the bomb is.
refactor: Memories have been refactored to be much easier to add.
/🆑
2023-01-03 11:23:31 -08:00
Jacquerel
eb6c0eb37c Dogs use the Pet Command system (#72045)
About The Pull Request

Chiefly this refactors dogs to use the newer component/datum system for "pet which follows instructions". It also refactors it a little bit because I had better ideas while working on this than I had last week. Specifically, instead of passing around keys we just stick a weakref to our currently active behaviour in the blackboard. Basically the same but skipping an unecessary step.

Additionally it adds a component for the previous "befriending a mob by clicking it repeatedly" behaviour which hopefully we won't use too much because it's not very exciting (I am planning on replacing it for dogs some time after Christmas).
The biggest effort in here was making the Fetch command more generic, which includes multiple behaviours (which might be used on their own?) and another component (for holding an item without hands).

Additionally I noticed that dogs would keep following my instructions after they died.
This seems unideal, and would be unideal for virtually any AI controller, so I added it as an AI_flag just in case there's some circumstance where you do want to process AI on a dead mob.

Finally this should replicate all behaviour Ian already had plus "follow" (from rats) and a new bonus easter egg reaction, however I noticed that the fetch command is supposed to have Ian eat any food that you try to get him to fetch.
This has been broken for some time and I will be away from my desk for a couple weeks pretty soon, so I wrote the behaviour for this but left it unused. I will come back to this in the future, once I figure out a way to implement it which does not require adding the "you can hit this" flag to every edible item.

Also I had to refit the recent addition of dogs barking at felinids to fit into this, with a side effect that now dogs won't get mad at a Felinid they are friends with. This... feels like intended behaviour anyway?
Why It's Good For The Game

It's good for these to work the same way instead of reimplementing the same behaviour in multiple files.
Being able to have Ian (or other dogs) follow you around the station is both fun and cute, and also makes him significantly more vulnerable to being murdered.
Changelog

cl
add: Ian has learned some new tricks, tell him what a good boy he is!
add: Ian will come on a walk with you, if you are his friend.
refactor: Ian's tricks work the same way as some other mobs' tricks and should be extendable to future mobs.
fix: Dogs no longer run at the maximum possible speed for a mob at all times.
add: When Ian gets old, he also slows down. Poor little guy.
add: Dogs will no longer dislike the presence of Felinids who have taken the time to befriend them.
/cl
2022-12-29 14:37:25 +13:00
tattle
83c819b55a Log the food's type instead of the component's (#72031)
## About The Pull Request
Two year old bug that was filling the food_made table with
/datum/component/edible instead of actual food
## Why It's Good For The Game
Means I don't have to parse two different tables instead of one
convenient one
## Changelog
🆑 Tattle
fix: crafted foods are logged in the blackbox once more
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-12-16 21:52:18 -08:00
tralezab
a592e157be Legitimizes BOMBGERs. Add grenades to burgers and assistants will still eat it. (#71552)
## About The Pull Request

Here's the changes to custom food:
- Can now accept grenades
- If you add something larger than the custom food, the custom food
becomes that size
- Biting down on food with grenades in them triggers the grenades

## Why It's Good For The Game

We're trying so hard to remove getting around this whole bombger thing
but wait it's actually based as hell. Why don't we just cut the fat of
what doesn't work (getting around sanity checks with deep frying) and
legitimize what does?

## Changelog
🆑
add: You can add grenades to food
add: Grenades explode when accidentally bitten into
balance: Adding something large to custom food will make it, too, also
large
/🆑
2022-12-01 20:03:39 +00:00
MrMelbert
e339ae76cb This kills the deep fried foods holder. Refactors deep frying to just make the thing edible but still functional. (#71551)
## About The Pull Request

Refactors deepfrying, removing the gross Deep Fried Foods Holder Object
and replacing it with the edible component.

Now, deep frying a food will simply make the item edible directly. This
means it's still functional and doesn't become a dead item.

This follows the same method that grilling uses when applying its
effects. Tweaks grilling a bit so they line up better. Also, silver
foods can make grilled items.


![image](https://user-images.githubusercontent.com/51863163/204105022-ee66889b-f843-4dc2-b0dc-5f1eb5ba19c3.png)

I swear this is unrelated to the other 2 fried foods related PRs. I
started this a few weeks ago.

## Why It's Good For The Game

Tangibly better code (doesn't have to copy a million vars! Less
abusable!) at the price of removing a soulful piece of code. Also means
that deep frying an item doesn't irreversibly make it unusable / dead.
This is sad, but... damn the holder object sucks.

Unfortunate side effect is that anything that overrides `attack` to not
send signal will *not* be edible when deepfried. Maybe this encourages
better signal use?

Either that or fried foods can override `pre_attack` to hook directly
into eating. I can do that as well.

## Changelog

🆑 Melbert
refactor: Refactored deep fried foods. Deep fried foods are still
""usable"" as their normal item, but are just edible.
qol: Silver Slime stuff can spawn grilled as well as fried. 
/🆑
2022-11-30 16:23:23 -08:00
Roryl-c
637e92fa8a Fix Flypeople food consumption (#71432)
## About The Pull Request

This PR fixes #70716 by having flypeople ingest vomited reagents into
their stomach instead of directly modifying nutrition. To accomplish
this, flypeople no longer vomit their entire stomach contents every life
tick, which also fixes them vomiting immediately on spawn. Instead they
vomit only after taking bites of food.

Since flypeople aren't currently metabolizing food the same way as other
species there's a huge discrepancy in nutrition gained from food. For
example, a human gets 37 nutrition from a slice of pizza and 270
nutrition from a whole margherita pizza, but a flyperson only gets 10
and 70 respectively, meaning they'd need to eat 4 entire margherita
pizzas and slurp up the vomit to go from total starvation to being
satiated again. With this change flypeople get ~190 nutrition from a
whole margherita pizza.
## Why It's Good For The Game

Makes it easier for flypeople to stay satiated without having to consume
mass amounts of food. Also makes it easier and more predictable to deal
with flyperson interactions with other reagents getting in their stomach
- for example, currently taking a happy pill causes flypeople to vomit
due to the sugar.
## Changelog
🆑
fix: Flypeople gain a comparable amount of nutrients from vomited food
to other species (~70%, up from ~30%)
fix: Flypeople no longer vomit after drinking fluids
fix: Flypeople no longer vomit all contents of their stomach on spawn
code: Stomachs can now react to foods entering them by overriding the
`after_eat` proc
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-23 11:02:43 -08:00
Mothblocks
fa7688d043 Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED (#71056)
- Makes QDELETED use isnull(x) instead of !x, giving about 0.2 to 0.25s
of speed.
- Make disposal constructs only update icon state rather than go through
expensive overlay code. Unfortunately did not have much effect, but is
something they should've been doing nonetheless.
- Makes RegisterSignal only take signals directly as opposed to
allocating a fresh list of signals. Very few consumers actually used
this and it costs about 0.4s. Also I think this is just a bad API anyway
and that separate procs are important

`\bRegisterSignal\((.*)list\(` replaced with `RegisterSignals($1list(`
2022-11-22 07:40:05 +00:00
ShizCalev
9dab26371c Throws a bunch of parenthesis around to ensure dear Aunt Sally is always properly excused. (#71281)
Similar vein to #37116

This is supposed to be standard, yet here we are.

SHOULDN'T change anything, but there's likely something out there that's
bound to behave different because of it.


These were done manually, regex to find things that MIGHT need to be
corrected;
`^#define.+\+((?!\)).)*$`
`^#define.+-((?!\)).)*$`
`^#define.+\*((?!\)).)*$`
`^#define.+\/((?!\)).)*$` (yeah that's a lot of stuff.)
`^#define.+%((?!\)).)*$`
`^#define.+SECONDS((?!\)).)*$`
`^#define.+MINUTES((?!\)).)*$`
2022-11-21 20:53:06 -08:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
Fikou
78124de4c1 concussive gauntlets now launch you away from gibtonite and mine basalt (#71108)
when you mine gibtonite using concussive gauntlets, you now get launched
away from it, so you wont get hit by the explosion
also lets them mine basalt for glass
2022-11-07 14:07:51 -05:00
MrMelbert
1ac4a67c27 Chefs can now kiss food they make to make it with love. (And a lot of cooking refactoring) (#70409)
About The Pull Request

    Adds a skillchip to the chef's vendor. This vendor allows the chef to kiss their food to deliver a chef's kiss.
        Chef's kissing your food will add the "love" reagent to the food, which makes people much happier when they eat it. Be careful, overdosing on love can cause heart attacks.

    Refactors microwaving.
        Separates microwaving out of the edible component and makes it its own element, like grillable and bakeable.
        Also removes some magic numbers from microwave code.

    Code improvements all around baking and grilling code.

    Refactors edible component inheritance.
        Inheriting the edible component is now a viable way to cleanly add food types, flags, and callbacks. This makes it much much easier to change the values of an edible item without adding hacky signals / procs / getcomponent.

Why It's Good For The Game

Emergent chef gameplay.
Being able to further enhance your food with mood buffs.
Better code.
Changelog

cl Melbert
add: Chefs can now make food with love. They can purchase a skillchip from their vendor which enhances their kiss emote. Using your kiss on food you create will add a special reagent to it which makes it nicer.
refactor: Separated Microwavable from the Edible component, refactored microwave act to accompany this
refactor: Refactored how grilled items are generated
refactor: Refactored how silver slime food items are generated
refactor: Refactored how edible items inherit new edible statuses
code: Removed some magic numbers from microwaves
code: General code improvements for grillable / bakeable / etc
/cl
2022-11-04 09:45:01 +13:00
LemonInTheDark
cd3a778915 PKP Mind Virus: Glorfing Cigs edition (#69904)
* PKP Mind Virus: Glorfing Cigs edition

If you glorf while smoking you'll get the cig stuck in your throat, leaving you unable to breath, speak, or eat. Based off the sort of cig you have a random delay before you vomit up the cig. (Pipes last forever don't philoso-larp kids). Other players can help you by using the help action on you while you're hurt, which leads to something imitating the himelich manuver, a broken chest, and a vomited up blockage. Other forms of vomiting will work too, if that's even applicable.

Oh I fixed a bug in vomit code. Because paralyzing you forces you to the ground, thus changing your dir, paralyzing vomits always went down. This is cringe, easy fix tho.

Ah and I added some extra functionality to sound loops too. You can set them to pick and take from the provided list, then refilling it once it's empty. This keeps some variety while preventing the risk of repeat sounds

Oh and I added some new signals. Some misc ones, for force say and a different kind of help then the existing one, which I renamed. One for breathing, which I used to clean up leroxin. I was planning to hook this but didn't need to in the end.

One for vomiting too. and eating. Also added a way to update looping timer delays. Forgot about that, I also added variable delay for sound loops, because I thought it sounded better here.

Features audio courtesy of our very own san7890, and the quake jump sound.
2022-10-19 06:34:45 -04:00
MrMelbert
dc8fcf82c9 Silver slime extract created food isn't toxic to jellypeople (#70424) 2022-10-18 21:21:50 -07:00
lizardqueenlexi
be635bd6c0 Fixed a bug that causes sliced food to have significantly fewer reagents than intended. (#69733) 2022-09-08 08:22:04 -04:00
tattle
e427fcf8ce Makes alerts for blind people being fed/stripped larger (#69171)
Revert "blind alert too big for stripping and feeding (#69114)"

This reverts commit 6b0c6e8ded.
2022-08-13 13:40:14 -04:00
Mooshimi
6b0c6e8ded blind alert too big for stripping and feeding (#69114)
About The Pull Request

span_userdanger -> span_danger

Why It's Good For The Game

I think it's hilarious that it's that big, but it's not necessary. It only makes sense for blind hit alerts which use span_userdanger for nonblind alerts too.
2022-08-12 09:43:11 -07:00
Seth Scherer
34b4034777 Replaces the mood component with a mood datum (#68592)
About The Pull Request

Mood was abusing signals and get component pretty badly, so I redid it as a datum to stop this.
Why It's Good For The CODEBASE

Better code pratices, also gives admins easier tools to manage mood
Changelog

cl
admin: Added two new procs into the VV dropdown menu to add and remove mood events from living mobs.
/cl
2022-08-12 08:59:20 +12:00
Mooshimi
f340897498 blind people know when things happen to them (#68950)
* Update strippable.dm

* hit by things blind support

* indentation sadness

* wrong var type moment

* Update code/datums/elements/strippable.dm

I didn't touch this but sure we can add this

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>

* requested changes

Co-Authored-By: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-08-05 20:25:59 -04:00
Superlagg
febe66e5d1 Voracious allows eating while full (#68826)
People with the voracious trait actually eat faster now, and are able to eat even while they are full, albeit much more slowly. This also means voracious people can be force fed faster, and it bypasses the overfed delay.
Voracious doesnt do what it says it does, currently just letting you eat more junk food and get a mood boost when full. This fixes it to have more of an impact on the game.
2022-07-29 14:44:17 +03:00
Salex08
2e0ac49ff9 Makes silver spawned food actually disgusting (#68319)
Fixes silver spawned food not tasting disgusting by sending a signal to the Edible component to make it disgusting.
2022-07-11 19:38:24 -04:00
magatsuchi
7d0f393f5d Tsu's Brand Spanking New Storage: or, How I Learned To Pass Github Copilot As My Own Code (#67478)
Currently, storage works as a subtype of /datum/component, utilizing GetComponent() and signals to operate. While this is a pretty good idea in theory, the execution was pretty trash, and we end up with alot of GetComponent() snowflake code (something that shouldn't even need to be used frankly), and a heaping load of scattered procs that lead into one another, and procs that don't get utilized properly.

Instead, this PR adds atom_storage and proc/create_storage(. . .) to every atom, allowing for the possibility of storage on quite frankly anything. Not only does this entirely remove the need for signals, but it heavily squashes down the number of needed procs in total (removing snowflake signal procs that just lead to one another), reducing overall proc overhead and improving performance.
2022-07-08 18:13:18 -07:00
LemonInTheDark
e15e0f3e91 Lemon does weather effects (#67469)
* Lemon does weather effects

Ok so I don't like how weather effects look when they run up against
some sort of border, particularly walls and darkness.
They just sorta snap out of existence. This is cause they were recently
moved from the AREA_PLANE to the ABOVE_LIGHTING_PLANE. This fixed things
like snow or ash storms looking dim, but had some annoying side effects.

I'm gonna do my best to mesh the two, at least somewhat.
I've done two things. The first is letting weather choose to apply a
second icon state to its area, one that draws above lighting, and moving
the current overlay down to AREA_PLANE again.

Oh and the above lighting stuff gets made a bit see through, so it's not
too intense.

This way darkness doesn't totally mask effects, it just makes them
harder to see.

I've gone through the existing effects for this process. I basically
just removed the "background" from any effects that had it. This way you
see the particles at a reduced intensity, but not the "shadow" that the
effect applies.

Oh also can't use glow with lava, cause it draws onto the floor, or
under walls.

In the process of this I realized that snow looks really bad right now.
It's really jerky, has a very clear wrap point, and doesn't even
complete a full animation. So I redid it, added some more flakes and
made it "faster"

I also tweaked non smoothed lava (IE: floor is lava and the wizard ship)
It was scrolling a pixel a tick, but in steps of 3 ticks. Looked bad, I
think the smoothing is better.

I'm not really a spriter or anything, this stuff just cheesed me off a
bit

* whoops
2022-06-10 09:38:38 -04:00
Iamgoofball
6a08c3b626 Silver slime food is now toxic(causes disgust when eaten), as it's not real food. (#67181)
Silver slime food is now toxic, as it's not real food.
2022-05-23 04:04:59 -04:00
Ghom
03900dcdf4 Customer robots can now order ice cream. (#66073) 2022-04-26 17:50:49 -05:00
John Willard
4a381a0c62 makes grilles grill food, not drinks/condiments (#65833)
When food was moved to newfood (and use an edible component), drinks and condiments were left both as subtypes of a no-longer-existant food. (Even worse, one isn't even a subtype of the other).

Grilles were not updated to make the edible component's foodtypes fried, instead they kept making old food (which again, is just drinks and condiments) get the grilled foodtype instead, so it likely just runtimed and didn't work at all.

This most probably wasn't caught because all the vars for the edible food component were all kept the same when they were created off of old food, even the procs. Edible component is a copy paste of drinks/condiments.

Less runtime errors, more grilling!
2022-04-14 16:14:28 -07:00
Timberpoes
c4b5b53ee1 Feex (#65612)
Splits reagent log string creation to a standard proc and a bespoke stupid proc that takes an external list instead of using its own reagents_list.
2022-03-31 16:42:32 -05:00
capsaicinz
0902769f8b throat hole + code clean (#65717) 2022-03-27 22:41:48 -04:00
John Willard
99413ebcd9 makes decomposing take all asteroid floor into account (#65439)
Prevents it from decomposing on asteroid floors (space) & icemoon floors, which is a subtype of asteroid floors.
2022-03-17 18:17:12 +08:00
LemonInTheDark
0e904f7032 [MDB IGNORE] Moves non floor turfs off /floor. You can put lattices on lavaland edition (#65504)
About The Pull Request

Alternative to #65354

Ok so like, there was a lot of not floor types on /floor. They didn't actually want any of their parent type's functionality, except maybe reacting to breaking (which was easy to move down) and some other minor stuff.
Part of what we don't want them to have is "plateable" logic.
I should not be able to put floor tiles on the snow and be fine. It's dumb.

Instead, I've moved all non floor types down to a new type, called /misc.

It holds very little logic. Mostly allowing pipes and wires and preventing blob stuff.
It also supports lattice based construction, which is one of the major changes here. I think it makes more sense, and it fixes an assumption in shuttle code that assumed you couldn't place "a new tile" by just hitting some snow with a floor tile.
Oh and lattices don't smooth with asteroid tiles anymore, this looks nicer I think.

Moving on to commits, and minor changes

Changes clf3 to try and burn any turfs it's exposed to, instead of just floors
Moves break_tile down to the turf definition, alongside burn_tile
If you're in basic buildmode and click on anything that's not handled in a targeted way, you just build plating
FUNCTION CHANGE: you can't use cult pylons to convert misc tiles over anymore
Generalizes building floors on top of something into two helper procs on /turf/open, reducing copypasta
Adds a new turf flag, IS_SOLID, that describes if a turf is tangible or not.
Uses this alongside a carpet and open check to replace plating and floor checks in carpet code. This does mean that non iron tiles can be carpeted, but I think that's fine

Moves the /floor update_icon -> update_visuals call to /open
This change is horrificly old, dating back to 8e112f6 but that commit describes nothing about why it was done. Choosing to believe it was a newfriend mistake. Uncomfortable nuking it though, because of just how old it is. Moving down instead

Create a buildable "misc" type off open, moves /dirt onto it
Basically, we want a type we can use to make something support
construction, since that can be a messy bit of logic. Also enough
structure to set things up sanely.

I'm planning on moving most misc turfs onto it, if only because
constructing on a dirt tile with rods should be possible, and the same
applies to most things

Murders captain planet, disentangles /turf/open/floor/grass/snow/basalt

Adds a diggable component that applies the behavior of "digging"
something out from a turf.

Uses it to free the above pain typepath into something a bit more
sensible

The typepaths that aren't actually used by floor tiles are moved onto
/misc

The others are given names that better describe them, and kept in
fancy_floor

Oh and snowshoes don't work on basalt anymore, sorry

Snowed over platings now actually have broken/burned icon states, fixing black holes to nowhere

Misc turfs no longer smooth as floors, so lattices will ignore them

Placing a lattice will no longer scrape the tile it's on

Ok this is a really old one.
I believe this logic is a holdover from kor's baseturf pr
(97990c9)
It used to be that turfs didn't have a concept of "beneath" and instead
just decided what should be under them by induction. This logic of "if
it's being latticed scapeaway to space" made sense then, but has since
been somewhat distorted

We do want to scape away on lattice spawn sometimes, mostly when we're
being destroyed, but not always. We especially don't want to scape away
if someone is just placing a rod, that's dumb.

Adds a path updating script for this change

I've done my best to find all the errors this repathing will pull out, but I may have missed some. I'm sorry.
Why It's Good For The Game

Very old code made better, more consistent turfs for lavaland and icebox, better visuals, minor fix to snowed plating, demon banishment in lattice placement, fixes the icebox mining shuttle not being repairable
Changelog

cl
add: Rather then being tileable with just floor tiles, lavaland turfs, asteroid and snow (among other things) now support lattice -> floor tile construction
fix: Because of the above, you can now properly fix the icebox mining shuttle
refactor: Non floor turfs are no longer typed as floor. This may break things, please yell at me if it does
/cl
2022-03-16 15:55:56 +13:00
Wallem
8d7492cafa Decomposition now has mold first, then ants, instead of both. (#65409)
Someone made a suggestion to me that fixed a problem I've been trying to work around, and now that I've made it so people can set custom decompose times, that made this WAY EASIER.

When most foods decay, they will turn into the generic moldy food sprite you've become accustomed to, without the ants. After 30 seconds, that moldy food will get consumed by ants, leaving only the anthill.

Ants also no longer spawn on lavaland's basalt, by Fikou request.
2022-03-13 10:19:13 +00:00
Wallem
e0e677f145 De-hardcodes the decomposition examine proc, and makes the decompose time editable (#65284)
Makes the decomposition examine proc, which handles the little examine warning telling you how close to decomposing a piece of food is, not hardcoded anymore. Doing this allowed me to also...

Adds a variable to food that lets them edit the decomposition timer. By default it's set to 0, which makes food automatically get its timer based off its flags. By setting the decomposition_time variable in a /obj/item/food to anything other than 0 (using SECONDS or MINUTES), it will take that amount of time to decompose instead.
2022-03-08 16:11:43 -08:00
Wallem
3bd5a2d8df Makes Ants glow, puts a minimum on ant screaming and shoe permeability, and other ant-related things. (#64786)
I found out how emissives work and my first thought was "damn ants should glow that would look sick"
So now they do.

Also, having less than 5u ants in your body will make you not scream, so 0.0001u ants will no longer have that tiny chance of making someone scream for their life.

If an ant pile has a max damage value less than 1, then they won't be able to bite through your shoes. This is the same threshold as the second tier ant icon.

Makes the giant ant a hostile mob with the neutral faction, meaning they will attack anything not in the neutral faction.
2022-03-01 17:09:53 -06:00
TemporalOroboros
5802743796 Ensures reagent conservation in custom foods, food slices, and fried food. (#63265) 2022-01-03 15:08:15 -08:00