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

Add food properties #1791

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Ghoulboy78
Copy link
Contributor

@Ghoulboy78 Ghoulboy78 commented Aug 4, 2023

Fixes #1701
I have added what was requested in the issue, but I realised that there is currently also no way to look at a food item's food properties, so I decided to add a system_info() style thing where you can either query it for a single property, or query all of them.
This way it's simple, and with no unnecessary overhead.

Todo:

  • Add conversion of effects to a simple map or smth display
  • Test if it works
  • See if gnembon/altrisi like it
  • Add docs once we decide which implementation to keep

Like system_info(), but simpler and only for food properties
@Ghoulboy78
Copy link
Contributor Author

On an unrelated note, altrisi, do you think it would be a good idea to have pull request checks not run on drafts?

@Ghoulboy78
Copy link
Contributor Author

Currently item_nutrition() and item_saturation() are technically missing some null checks which can be added easily, but if we go with food_properties() those will be redundant anyways.

@Ghoulboy78 Ghoulboy78 marked this pull request as ready for review August 4, 2023 17:00
@altrisi
Copy link
Collaborator

altrisi commented Aug 8, 2023

On an unrelated note, altrisi, do you think it would be a good idea to have pull request checks not run on drafts?

Why not? They don't cause issues, and they still provide all the benefits of checks normally, and you can ignore them if you don't want them yet.

@altrisi
Copy link
Collaborator

altrisi commented Aug 8, 2023

About the PR, wondering if it'd make sense to have a more general thing for item/block properties that you can then query for this stuff, though I don't know what else it'd have or how would be the best way to make handle it.

@Ghoulboy78
Copy link
Contributor Author

The thing is, that food properties are kinda unique.

I agree that maybe we could refactor the item/block properties thing to be easier, but tbh it's pretty understandable rn, and besides it would deprecate a bunch of apps which use these functions, especially in ways we don't expect.

Unless, of course, we were to add some new functions and deprecate the old ones, but that's separate from this cos, again, food is kinda unique. But that kind of a general querying thing could work for block properties and items both. That way if an item is inputted, then you get the default values for that item, but if a block value is inputted, then you get the properties of that block specifically, if that makes sense?
If it helps I could draft it, but tbh this sounds pretty similar to the system we already have.

@Ghoulboy78
Copy link
Contributor Author

On an unrelated note, altrisi, do you think it would be a good idea to have pull request checks not run on drafts?

Why not? They don't cause issues, and they still provide all the benefits of checks normally, and you can ignore them if you don't want them yet.

Well I figured cos that way you don't run unnecessary actions cos drafts can't be merged, but ig ye y not.

@Ghoulboy78
Copy link
Contributor Author

That should be it.

In my defence, the IDE said this import was unused...
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 this pull request may close these issues.

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