Appears that the issue is when fullness or inebriety isn't set yet on an item, it isn't considered to be a food or drink item. As per this:
Code:
if ((i.fullness > 0) && (!contains_text(consumed, to_upper_case(to_string(i))))){
food[foodcount]=i;
foodcount=foodcount+1;
}
if ((i.inebriety > 0) && (!contains_text(consumed, to_upper_case(to_string(i))))) {
booze[boozecount]=i;
boozecount=boozecount+1;
}
But that's mafia not having the information yet... if you're trying to do an override, say for siphoned drinks, just do something like this:
Code:
if ((i.to_int() >= 5573 && i.to_int() <= 5638) && (!contains_text(consumed, to_upper_case(to_string(i))))) {
booze[boozecount]=i;
boozecount=boozecount+1;
}
Boom, done. We know all those numbers are the siphon drinks, and we don't really know necessarily (since mafia doesn't know) much much inebriety they have, but it would work great as drink/overdrink code for the end of the day.