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

Scarpet: Add functions to get a food item's hunger value and saturation modifier #1701

Open
James103 opened this issue Apr 15, 2023 · 0 comments · May be fixed by #1791
Open

Scarpet: Add functions to get a food item's hunger value and saturation modifier #1701

James103 opened this issue Apr 15, 2023 · 0 comments · May be fixed by #1791

Comments

@James103
Copy link
Contributor

Currently, there is no way I know of to get the hunger value of a food item, nor is there a way to query its saturation modifier.
A current workaround is to hardcode all hunger and saturation values of all edible foods, but that does not scale well with modded food items.

To fix this, I would like to suggest the following two functions (names subject to change):

item_hunger(item)

Returns the hunger value of the given item, or null if it is not a food item.

item_saturation_mod(item)

Returns the saturation modifier of the given item, or null if it is not a food item.

(The return value null can be substituted with 0 if necessary).

@Ghoulboy78 Ghoulboy78 linked a pull request Aug 4, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant