Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifies the way burning food is handled, kills burns_in_oven and burns_on_grill #77570

Merged
merged 8 commits into from
Sep 3, 2023

Conversation

FernandoJ8
Copy link
Contributor

@FernandoJ8 FernandoJ8 commented Aug 12, 2023

About The Pull Request

Currently, burning food is handled in the following way (for the sake of brevity I'll explain it with baking but it's essentially the exact same with grilling):

  • If a recipe has a baking recipe added in it's make_bakeable, then it will produce that when baked.
  • If it does not have a recipe added, but burns_in_oven is TRUE, then it will have a negative baking recipe for "burned mess" added by the parent of make_bakeable, and be turned to that after 20 to 25 seconds.
  • If it has neither, it will instantly be set on fire.

What this PR does is, basically, remove the check for burns_in_oven/burns_on_grill and make food always have a negative burned mess recipe unless overriden by an actual recipe.

Also modified the examines a bit to better fit food that hasn't necessarily been baked/grilled before but would still turn to a burnt mess if put in either.

Why It's Good For The Game

My issues with the way it currently works are:

  1. The "default" case is one that largely doesn't make sense for food. Most things would logically just get turned to a burnt mess after being overcooked for some time rather than combusting the very moment you close the range.
  2. If you make any cooking item the result of a baking recipe, then you must also remember to make its burns_in_oven var true, because otherwise it will be set on fire as soon as it finishes baking, making it impossible to cook. (See issue Baked boiled rice has no after-cook time #77377) This is pretty bad because it's easy not to notice or add these vars, given that they're a bit out of the way mechanically and...
  3. ...the var names are very unintuitive. In practical terms all burns_in_oven and burns_in_grill do is add a timer before the item is ruined, not actually cause or prevent the ruining.

By removing these vars and their function we deal with all three, as turning into a burnt mess is now the default outcome for food that shouldn't be baked/grilled and coders adding food/recipes don't need to worry about the confusingly-named vars.

Also, as mentioned before, fixes #77377.

Changelog

🆑
fix: boiled rice doesn't burn instantly after being baked
code: simplifies the way burning food is handled, grilled/baked food now turns to a burnt mess rather than being set on fire, unless they have a baking/grilling recipe
/:cl:

@tgstation-server tgstation-server added Fix Rewrites a bug so it appears in different circumstances Code Improvement Code is now easier to copy paste. labels Aug 12, 2023
@san7890
Copy link
Member

san7890 commented Aug 12, 2023

will clash with #77562

@FernandoJ8 FernandoJ8 changed the title Simplifies the way burning food is handled, kills burns_in_oven and burns_in_grill Simplifies the way burning food is handled, kills burns_in_oven and burns_on_grill Aug 12, 2023
@FernandoJ8
Copy link
Contributor Author

FernandoJ8 commented Aug 12, 2023

will clash with #77562

Do that one first, I suppose, since it's the one compliant with the current code as opposed to altering it.

@san7890 san7890 marked this pull request as draft August 14, 2023 02:15
@san7890
Copy link
Member

san7890 commented Aug 14, 2023

undraft when all fires relating to clashing pr is resolved

@SyncIt21
Copy link
Contributor

Fixes #77807

@github-actions
Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale Even the uncaring universe rejects you, why even go on label Aug 29, 2023
@SyncIt21
Copy link
Contributor

@FernandoJ8 this PR ready?

@FernandoJ8
Copy link
Contributor Author

@FernandoJ8 this PR ready?

Now it is. Apologies for the delay.

@FernandoJ8 FernandoJ8 marked this pull request as ready for review August 29, 2023 16:27
@github-actions github-actions bot removed the Stale Even the uncaring universe rejects you, why even go on label Aug 30, 2023
@Ghommie Ghommie added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Sep 2, 2023
@Ghommie
Copy link
Member

Ghommie commented Sep 2, 2023

Lots of merge conflicts.

@tgstation-server tgstation-server removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Sep 2, 2023
@FernandoJ8
Copy link
Contributor Author

FernandoJ8 commented Sep 2, 2023

Lots of merge conflicts.

Should be ready if/when it passes checks.

Copy link
Member

@Ghommie Ghommie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh well, this means every food item now has these two components attached, but I don't think it's a big deal overall.

@Ghommie Ghommie merged commit a928437 into tgstation:master Sep 3, 2023
19 checks passed
comfyorange added a commit that referenced this pull request Sep 3, 2023
github-actions bot added a commit that referenced this pull request Sep 3, 2023
Jolly-66 added a commit to TaleStation/TaleStation that referenced this pull request Sep 5, 2023
…ls burns_in_oven and burns_on_grill (#7603)

Original PR: tgstation/tgstation#77570
-----
## About The Pull Request

Currently, burning food is handled in the following way (for the sake of
brevity I'll explain it with baking but it's essentially the exact same
with grilling):
- If a recipe has a baking recipe added in it's `make_bakeable`, then it
will produce that when baked.
- If it does not have a recipe added, but `burns_in_oven` is TRUE, then
it will have a negative baking recipe for "burned mess" added by the
parent of `make_bakeable`, and be turned to that after 20 to 25 seconds.
- If it has neither, it will instantly be set on fire.

What this PR does is, basically, remove the check for
`burns_in_oven/burns_on_grill` and make food always have a negative
burned mess recipe unless overriden by an actual recipe.

Also modified the examines a bit to better fit food that hasn't
necessarily been baked/grilled before but would still turn to a burnt
mess if put in either.

## Why It's Good For The Game

My issues with the way it currently works are:

1. The "default" case is one that largely doesn't make sense for food.
Most things would logically just get turned to a burnt mess after being
overcooked for some time rather than combusting the very moment you
close the range.
2. If you make any cooking item the result of a baking recipe, then you
must also remember to make its `burns_in_oven` var true, because
otherwise it will be set on fire as soon as it finishes baking, making
it impossible to cook. (See issue #77377) This is pretty bad because
it's easy not to notice or add these vars, given that they're a bit out
of the way mechanically and...
3. ...the var names are very unintuitive. In practical terms all
`burns_in_oven` and `burns_in_grill` do is add a timer before the item
is ruined, not actually cause or prevent the ruining.

By removing these vars and their function we deal with all three, as
turning into a burnt mess is now the default outcome for food that
shouldn't be baked/grilled and coders adding food/recipes don't need to
worry about the confusingly-named vars.

Also, as mentioned before, fixes #77377.

## Changelog
:cl:
fix: boiled rice doesn't burn instantly after being baked
code: simplifies the way burning food is handled, grilled/baked food now
turns to a burnt mess rather than being set on fire, unless they have a
baking/grilling recipe
/:cl:

Co-authored-by: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
Tsar-Salat added a commit to Tsar-Salat/BeeStation-Salatland that referenced this pull request Mar 11, 2024
github-merge-queue bot pushed a commit to BeeStation/BeeStation-Hornet that referenced this pull request Apr 2, 2024
* tgstation/tgstation#55319

* tgstation/tgstation#55619

* tgstation/tgstation#57743

* tgstation/tgstation#65833

* tgstation/tgstation#55548

* tgstation/tgstation#56557

* misc fixes

* tgstation/tgstation#77570

* No pancakes for beestation (stupidass atom reagent exposure)

* 515 and reagent exposure notice

* tgstation/tgstation#65783

* unused var

* sausage fix

* amerikaner sosig

* guh

* giled chese

* pigeon maps

* fix broken grill noise?

* unrelated, but why not

* ummm grill fix

* rad typepath fix

* tweaks

* test

* full-replacement

* full-replacement2?

* kilo try

* kilotry2

* delta

* fland

* echo

* fastfood

* fuckoff
DrDuckedGoose pushed a commit to DrDuckedGoose/BeeStation-Hornet that referenced this pull request May 11, 2024
* tgstation/tgstation#55319

* tgstation/tgstation#55619

* tgstation/tgstation#57743

* tgstation/tgstation#65833

* tgstation/tgstation#55548

* tgstation/tgstation#56557

* misc fixes

* tgstation/tgstation#77570

* No pancakes for beestation (stupidass atom reagent exposure)

* 515 and reagent exposure notice

* tgstation/tgstation#65783

* unused var

* sausage fix

* amerikaner sosig

* guh

* giled chese

* pigeon maps

* fix broken grill noise?

* unrelated, but why not

* ummm grill fix

* rad typepath fix

* tweaks

* test

* full-replacement

* full-replacement2?

* kilo try

* kilotry2

* delta

* fland

* echo

* fastfood

* fuckoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Code is now easier to copy paste. Fix Rewrites a bug so it appears in different circumstances
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Baked boiled rice has no after-cook time
6 participants