I was thinking that besides labeling food as (Fresh) or (Rotten) you could color code them, adding a colored dot before, after, or even on the icon somewhere. Green would be for fresh items, yellow for normal/stale items, red for rotten items, and blue for non-perishable items. Not needed as much, but you could add a grey dot for other items indicating that they're not items you need to worry about their freshness levels, and perhaps to keep the UI uniform overall. It would also be nice if there was some visual indicator to tell you how much is left of a particular food item, especially for when choosing which items to select for cooking.
Some people have a found a couple errors in the map ill have these fixed tommorrow, also thought of another Idea that I will try get working shortly, I know people have been requesting it from the devs for a while so stay tuned.
I'm attempting to write a function that will loop over each of the body parts of a player and restore them to full health using RestoreToFullHealth(), but it seems that if I loop over them as so:
local parts = getPlayer():getBodyDamage():getBodyParts();
for i=0, (getPlayer():getBodyDamage():getBodyParts():size() - 1) do
then I get a "java.lang.RuntimeException: attempted index: RestoreToFullHealth of non-table: null" error and I'm not sure why. Can anyone explain to me why this is happening and/or the appropriate way to accomplish what I'm trying to do?