-
Notifications
You must be signed in to change notification settings - Fork 17
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
Some minor tweaks to improve experience #35
base: master
Are you sure you want to change the base?
Conversation
Make the hunger bar only appear red when the food is below 20%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like great changes
Desperately want that respawnGracePeriod change; hoping this gets in soon! |
@@ -88,7 +88,7 @@ private static void renderFoodSlot(#if PRE_CURRENT_MC_1_19_2 PoseStack #elif POS | |||
int startWidth = width - (size * offset) - offset + 1; | |||
float ticksLeftPercent = Float.min(1.0F, (float) food.ticksLeft / foodConfig.getTime()); | |||
int barHeight = Integer.max(1, (int)((size + 2f) * ticksLeftPercent)); | |||
int barColor = ticksLeftPercent < SOLValheim.Config.common.eatAgainPercentage ? | |||
int barColor = ticksLeftPercent < 0.2 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Rather than hard-coding, you should consider making this a configurable value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right, but on the other hand - there's a lot of hardcoded values here that should be config options, so I figured I'd leave it to whoever's making the config actually work to fix them!
@@ -99,6 +99,8 @@ private void onTick(CallbackInfo info) { | |||
} | |||
|
|||
float maxhp = Math.min(40, (SOLValheim.Config.common.startingHealth * 2) + sol_valheim$food_data.getTotalFoodNutrition()); | |||
// hack: round to full hearts | |||
maxhp = Math.round(maxhp / 2) * 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: I'd recommend adding a config value to enable/disable this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if a bug should be given a configuration option... for the record someone merged this in and is looking to get a more up to date version accepted at #42, they'd probably be the ones to ask for config updates as they got it working!
Adds some minor tweaks to improve the gameplay experience a little:
Red usually indicates that something is running out, it was causing visual misinformation with a higher eat again percentage
This should arguably be a separate option to permanently allow sprinting, but -1 usually means infinite so it should be alright!