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

Conversion of obj/item/fish into /obj/item/reagent_container/food/fish and addition of fish oil #14857

Merged
merged 14 commits into from Jul 28, 2023

Conversation

M-Earthfire
Copy link
Contributor

@M-Earthfire M-Earthfire commented Jul 5, 2023

[Catering][Hydroponics][Chemistry][Code-Quality][Rework]

About the PR

This PR consists of three parts

The first part consists of moving obj/item/fish into a subtype of obj/item/reagent_container/food/fish. This allows fish to use the slicing behaviour already avaible for the obj/item/reagent_container/food/ parent. To accomodate for the new sliced results, process_sliced_products on the created slice will only be applied if it the resulting slice is of type obj/item/reagent_container/food/ as well.

The second part is that fish now, because they can hold reagents and have them able to be handled properly, get a new innate chemical: fish oil

Fish oil is a light nutrious foodchem that tries to stabilize the blood level of the user. It's a reference to omega-3 fatty acids being helpfull in controlling the blood pressure.

Currently, each fish spawns with 10u of fish oil. This can be changed for specific fish by overwriting the newly added make_reagents proc. Also, fish is now able to be injected with chemicals via syringes and are able to be stuffed in the chem extractor.

This fixes #11181

The third part consists of work on the wholetuna cordata plant mutation, since, through the newfound ability of fish to hold chems, now need to account for that. Various changes were made:

  • The mutation now adds fish oil as assoc_reagent
  • On mutation, the plant gains the new "inert" gene strain. This prevents the produce from gaining chemicals from botany with a 95% chance. To make this possible, two new procs were added to plant mutations, HYPon_mutation_general and HYPon_mutation_pot
  • the obj/item/fish/random and obj/item/fish/botany objects were removed, since they were only used by this plant and the same behaviour can be achieved by just setting the crop of the plant to a list with the 3 fishes it should spawn, akin to how synthlimbs handle it. No dummy objects needed. As a result, the HYPsetup_DNA proc from botany fish was moved to the parent.

In this PR, fillet slicing behaviour was also changed to use the slicing behaviour of its parent. Else it wouldnt carry along fish oil to the fillet slices.

Why's this needed?

Currently, different fish do very hardly deviate from another and offer minor mechanical reward besides fishing currency. This PR enables other PR's to offer chemicals to anglers as a reward for fishing in uncommon areas. An additional upside is that this enables coders to lock away chemical recipes behind fishing, which is another method to discourage mass production of problematic chems to be able to enable new recipes. Personally, i look forward in seeing chemists working with the angler to get a T2 rod to go to fish in some lava for a chem they want to play with.

Additionally, the move to the parent of obj/item/reagent_container/food and the use of its slicing behaviour removes the need to copy/paste its own slicing behaviour.

The inert gene strain for the wholetuna plant firstly makes it able for botanists to make rather safe produce even with splices in the mix. Also, since the base plant has mercury as its base chem, this gene strain prevents botany fish to be utterly unuseable for the chef. The 5% chance to still spawn with chemicals is a little reference on ocean fish, like tuna, accumulating mercury along the food chain. This also keeps botany on their toes a bit :)

Changelog

(u)Lord_Earthfire
(*)Fish now contain fish oil and can have chemicals. Keep your blood pressure stable today!
(+)Fish can now be loaded into the chemical extractor and be injected with syringes
(+)Fish from the wholetuna cordata plant now can gain botany chems, the plant gains the "inert" gene strain on mutation, though
(+)Plants spliced with the wholetuna cordata plant now contain fish oil.

@keywordlabeler keywordlabeler bot added A-Catering Deals with food, the chef, the bar or otherwise edible/drinkable stuff A-Chemistry Deals with the chemistry system in some way A-Hydroponics Deals with plants, hydro, etc. C-Rework Reworks a feature labels Jul 5, 2023
@boring-cyborg boring-cyborg bot added the A-Mapping A mapping change label Jul 5, 2023
@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 5, 2023
@keywordlabeler keywordlabeler bot added the C-Bug A bug that impacts usage of a feature label Jul 6, 2023
@M-Earthfire
Copy link
Contributor Author

Apparently, two fish are given properties reserved for materials, which threw an error duribg the bot tests. Will fix that this evening.

@Gannets
Copy link
Contributor

Gannets commented Jul 6, 2023

Apparently, two fish are given properties reserved for materials, which threw an error duribg the bot tests. Will fix that this evening.

You're welcome to remove those properties, they're a failed attempt to make those fish burn in engine furnaces.

@Sord213 Sord213 removed their request for review July 6, 2023 16:29
@github-actions github-actions bot added the S-Merge-Conflict Applied and removed when a PR has or no longer has a merge conflict label Jul 20, 2023
@github-actions github-actions bot removed the S-Merge-Conflict Applied and removed when a PR has or no longer has a merge conflict label Jul 20, 2023
@TheColorCyan
Copy link
Contributor

this will need changes in allowed_item of wall trophy since #14642 was merged

@M-Earthfire
Copy link
Contributor Author

this will need changes in allowed_item of wall trophy since #14642 was merged

Alright, i gonna take care of it, thanks for the information!

@M-Earthfire M-Earthfire requested a review from ZeWaka as a code owner July 25, 2023 18:02
@github-actions github-actions bot added the S-Merge-Conflict Applied and removed when a PR has or no longer has a merge conflict label Jul 28, 2023
@TobleroneSwordfish TobleroneSwordfish merged commit 81eb017 into goonstation:master Jul 28, 2023
21 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Catering Deals with food, the chef, the bar or otherwise edible/drinkable stuff A-Chemistry Deals with the chemistry system in some way A-Hydroponics Deals with plants, hydro, etc. A-Mapping A mapping change C-Bug A bug that impacts usage of a feature C-Rework Reworks a feature S-Merge-Conflict Applied and removed when a PR has or no longer has a merge conflict size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't inject fish with stuff
4 participants