space-station-14 icon indicating copy to clipboard operation
space-station-14 copied to clipboard

Price of food depends on its nutritional capacity

Open corentt opened this issue 2 years ago • 2 comments

About the PR

This allow to calculate a price based on the reagents in a SolutionContainerManager.

The reagent prototype now have a PricePerUnit datafield that is used is the calculation. Right now only Nutriment, Vitamin and Protein got a price.

This can easily be extended to drinks and chemicals.

fixes #11464

Changelog

:cl:

  • add: the price of food now depends on its nutritional capacity

corentt avatar Oct 07 '22 12:10 corentt

Kinda weird having SolutionPrice considering the same reagent in one container or another changes its price.

metalgearsloth avatar Oct 16 '22 05:10 metalgearsloth

Kinda weird having SolutionPrice considering the same reagent in one container or another changes its price.

You mean I should remove that component and calculate the price on every SolutionContainer ?

corentt avatar Oct 16 '22 19:10 corentt

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Oct 22 '22 22:10 github-actions[bot]

Kinda weird having SolutionPrice considering the same reagent in one container or another changes its price.

You mean I should remove that component and calculate the price on every SolutionContainer ?

yes, it seems like it's too prone to data entry bugs where contributors forget about it.

metalgearsloth avatar Oct 30 '22 06:10 metalgearsloth