mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
FormatWhole now displays decimals for numbers less than 1.
This commit is contained in:
parent
9a4302b56a
commit
dbff7b3f5f
4 changed files with 8 additions and 5 deletions
|
@ -2,9 +2,11 @@
|
|||
|
||||
- Added an infobox component. Thank you to thepaperpilot for this contribution!
|
||||
- Layer type is now optional, and defaults to "none".
|
||||
- Improved the look of bars and tab buttons.
|
||||
- Fixed the "blank" component breaking if only specifying the height.
|
||||
- Fixed some numbers not displaying with enough digits.
|
||||
- Made a few more things able to be functions.
|
||||
- A few other minor fixes.
|
||||
|
||||
### v2.1.3.1 - 10/21/20
|
||||
- Fixed the update function.
|
||||
|
|
|
@ -239,11 +239,11 @@ function canCompleteChallenge(layer, x)
|
|||
return !(player[lr][name].lt(readData(challenge.goal)))
|
||||
}
|
||||
else {
|
||||
return !(player[name].lt(challenge.cost))
|
||||
return !(player[name].lt(challenge.goal))
|
||||
}
|
||||
}
|
||||
else {
|
||||
return !(player[layer].points.lt(challenge.cost))
|
||||
return !(player[layer].points.lt(challenge.goal))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ function format(decimal, precision=2) {
|
|||
function formatWhole(decimal) {
|
||||
decimal = new Decimal(decimal)
|
||||
if (decimal.gte(1e9)) return format(decimal, 2)
|
||||
if (decimal.lte(0.95) && !decimal.eq(0)) return format(decimal, 2)
|
||||
return format(decimal, 0)
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ h1, h2, h3, b, input {
|
|||
|
||||
.barBorder {
|
||||
border: 2px solid;
|
||||
border-radius: 10%;
|
||||
border-radius: 10px;
|
||||
border-color: var(--color);
|
||||
overflow: hidden;
|
||||
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
|
||||
|
@ -153,7 +153,7 @@ h1, h2, h3, b, input {
|
|||
|
||||
.overlayTextContainer {
|
||||
z-index: 3;
|
||||
border-radius: 10%;
|
||||
border-radius: 10px;
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -180,7 +180,7 @@ h1, h2, h3, b, input {
|
|||
cursor: pointer;
|
||||
padding: 5px 20px 5px 20px;
|
||||
margin: 5px 5px 5px 5px;
|
||||
border-radius: 25%;
|
||||
border-radius: 10px;
|
||||
border: 2px solid;
|
||||
border-color: rgba(0, 0, 0, 0.125);
|
||||
|
||||
|
|
Loading…
Reference in a new issue