Steemnova - Show current techlevel in the techtree

Words
170
Reading
1 min
Listen
Play
9y

Bug Fixes

What was the issue?

In the techtree if a requirement is fulfilled it only shows the required level of the technology instead of the current level.

image.png
So even though your own shipyard level is way higher, it only displays it as level 1 in the techtree for ships that require only a level 1 shipyard.

This is very confusing for the player as he doesn't see the real level of the technology/building/etc he owns.

If the requirement is not met it already displays the current level, but in red color.
image.png

What was the solution?

In the techtree template the min function was used to determine what level was lower, the required level (saved in "$NeedLevel.count") or the current level (saved in "$NeedLevel.own"). This level was then displayed.

image.png

To fix this issue, I removed the call to the min function altogether. So now the current level is always displayed independent of the requirement.

Github-Links

Repository

Pull Request



Posted on Utopian.io - Rewarding Open Source Contributors

Steemnova - Show current techlevel in the techtree | Ecency