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

Request: Drink juice to reduce both thirst and hunger #6

Open
Golutazem opened this issue Jun 21, 2019 · 8 comments
Open

Request: Drink juice to reduce both thirst and hunger #6

Golutazem opened this issue Jun 21, 2019 · 8 comments

Comments

@Golutazem
Copy link

Currently, if both the thirst and hungry mods are installed, only thirst is decreased, which means that juice has no advantage over water.
Implementing this feature would make it so that juice reduces both thirst and hunger.

@NathanSalapat
Copy link
Collaborator

While that is true, I didn't want to make it so a person could just drink juice and not need to eat anything. I suppose I could make it that a drink reduced hunger a slight bit.

@Golutazem
Copy link
Author

That is what I had in mind also. You could define values for both hunger and thirst and then compute happens if there is only 1 for example.

Orange Juice { satiety = 1 , quench = 4 }
If exists mod hungry,
If exists mod thirsty then satiety += juice.satiety else satiety += juice.satiety * 2

and similar if only thirsty exists.
This sort of idea, regardless of how it is implemented.

@NathanSalapat
Copy link
Collaborator

I have two different files that handle the registration and uses of the different drink containers, one is loaded if the thirsty mod is enabled and the other is used if it is not. It looks like the current code actually does reduce hunger slightly either way. Look at drinks.lua and drinks2.lua. Maybe the values should be tweaked, as right now it looks like they are the same regardless of if the thirsty mod is enabled.

@Golutazem
Copy link
Author

Golutazem commented Jun 22, 2019

I do not remember which juice I tried, but drinking many gave no reduction of hunger. My thirst was already quenched (not thirsty) could it be that in that case, the code does not add satiety? It only increases satiety if you are thirsty and thirst is quenched?

The author of thirsty has not logged into the forum for a while and it needs some maintenance. The ultimate solution would be for Drinks to replace Thirsty.

@NathanSalapat
Copy link
Collaborator

If you drank from a canteen with juice it will only replenish thirst, because the code treats all canteens the same, as they are provided from the thirsty mod, and it doesn't do anything with hunger, just the thirst.

@Golutazem
Copy link
Author

I guess that was it.

@Golutazem
Copy link
Author

Nope, It was not the canteen. No container replenishes hunger.

@NathanSalapat
Copy link
Collaborator

   local desc = drinks.drink_table[i][1]
   local craft = drinks.drink_table[i][2]
   local color = drinks.drink_table[i][3]
   local health = drinks.drink_table[i][4]
   health = health or 1```
Is the code responsible for getting the heal amount. None of the entries in drinks.drink_table provide any heal values, so every drink should provide 1 health.

Maybe I have an error in drinks.lua where the drinking and eating is handled. I"ll look into it.

@NathanSalapat NathanSalapat reopened this Jun 4, 2020
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

No branches or pull requests

2 participants