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

feat(UI): always show book's skill cap even if the PC has passed it #5791

Merged

Conversation

karxi
Copy link
Contributor

@karxi karxi commented Dec 5, 2024

Checklist

Required

Purpose of change

Currently, books stop showing how far they can teach once they can no longer teach the PC. They're still useful for teaching NPCs, though; after that point, only the Read command will show the skill they can teach to.
This synchronizes that functionality for the sake of convenience.

Describe the solution

I made a few very minor edits to item::book_info().

Describe alternatives you've considered

N/A. This was pretty simple.

Testing

Spawn a book → look at the book → set your skill level higher than the book's cap → look at the book again.

Additional context

image

@github-actions github-actions bot added the src changes related to source code. label Dec 5, 2024
@scarf005 scarf005 changed the title feat(UI): Adjusted item::book_info() so that it shows a book's skill cap even if the PC has passed it feat(UI): always show book's skill cap even if the PC has passed it Dec 5, 2024
src/item.cpp Outdated Show resolved Hide resolved
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fab 0 fab 10
image image

LGTM, i've modified it a bit to colorize the line to brown if player has higher skill than book provides.

@scarf005 scarf005 merged commit 8bdd237 into cataclysmbnteam:main Dec 5, 2024
12 checks passed
@karxi
Copy link
Contributor Author

karxi commented Dec 5, 2024

I really dislike adding brown to this block—it clashes with the nearby colors. But as long as it's merged, it's an improvement.

@chaosvolt
Copy link
Member

Worth noting that brown is already used in the UI elsewhere, mainly in the list of recipes a book can teach. If I recall it's for stuff you're missing other skills for or some other specific "can't learn this yet" condition.

@karxi
Copy link
Contributor Author

karxi commented Dec 5, 2024

I am well aware! But that specific block only uses cyan, blue, and yellow. The recipe block uses white, grey, and brown.
Orange could be a suitable compromise? At least it's in line with the yellow of the skill number that way.

@chaosvolt
Copy link
Member

Yellow could work too. Orange, funny enough, does not exist in the game's color definitions. XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants