[MIRROR] fixes gutlunch udder production & some general changes to the udder #795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25208
Original PR: tgstation/tgstation#79893
About The Pull Request
When the ranching PR came out (we love it downstream), there seemed to be an issue-- the gutlunches would produce milk instead of the miner's salve that the code said it would. I looked into it and realized that some of the code would not take into consideration if the udder already had a preset reagent to create.
I've changed some of the arguments for the procs to be called override instead, which will be empty. If you want something that functions similarly to the udder but want it to produce something else and not care about creating a new udder, you can just use the override when attaching the component; otherwise, leave it blank for milk (or whatever kind of reagent the udder you want will produce).
Additionally, gutlunches not only did not produce miner's salve, but with the special ores, it did not produce any of the additional reagents. This was fixed by just adding a return TRUE at the end of the normal udder.
Perhaps it is out of scope (if it is too extreme, please let me know), but I have changed the probability 95 to not produce milk to a var instead, which means you can have udders that are more prone to producing their milk reagent. 95 is still technically the default, but I have made it 5 in a more readable manner (as in you have a 5 percent chance to get milk every 2 seconds if the udder has it's required food type, if any).
Why It's Good For The Game
Some of this PR is fixes-- we wanted certain behaviors that were not happening and so I fixed that. Other parts of the PR are for, in the future, if we want udders that have higher/lower chances to produce its milk reagent.
Changelog
🆑 jjpark-kb
fix: gutlunches now produce miner salve instead of milk, as well as the other reagents if fed the correct ore
/:cl: