Steemnova - Show current techlevel in the techtree

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@mwfiae·
0.000 HBD
Steemnova - Show current techlevel in the techtree
## 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](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519251978/sbzewyoz189xn2rnmkcg.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](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519252147/dnhuo8vfg0yvaldeqluc.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](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519252397/st1oyhstfsu4litauinn.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](https://github.com/steemnova/steemnova)

[Pull Request](https://github.com/steemnova/steemnova/pull/32)

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@mwfiae/steemnova-show-current-techlevel-in-the-techtree">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,