Skip to content

Commit

Permalink
Merge pull request #1145 from solaris-games/feature/245-ui-fixes
Browse files Browse the repository at this point in the history
UI fixes 245
  • Loading branch information
SpacialCircumstances authored Aug 30, 2024
2 parents e4c0564 + b533d73 commit 2272b81
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
10 changes: 10 additions & 0 deletions client/src/services/gameHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,16 @@ class GameHelper {
return this.getDateToString(t, largestUnitOnly)
}

getCountdownTimeStringByTicksWithTickETA (game, ticks, useNowDate = false, largestUnitOnly = false) {
const str = this.getCountdownTimeStringByTicks(game, ticks, useNowDate, largestUnitOnly);

if (game.settings.gameTime.gameType === 'realTime') {
return `${str} - Tick ${game.state.tick + ticks}`
}

return str
}

getCountdownTimeStringByTicks (game, ticks, useNowDate = false, largestUnitOnly = false) {
if (game == null) {
return ''
Expand Down
6 changes: 3 additions & 3 deletions client/src/views/game/components/research/Selection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
{ text: 'Specialists', value: 'specialists' }
]
this.optionsNow = options.filter(o => TechnologyHelper.isTechnologyEnabled(this.$store.state.game, o.value)
this.optionsNow = options.filter(o => TechnologyHelper.isTechnologyEnabled(this.$store.state.game, o.value)
&& TechnologyHelper.isTechnologyResearchable(this.$store.state.game, o.value))
this.optionsNext = options.filter(o => TechnologyHelper.isTechnologyEnabled(this.$store.state.game, o.value)
&& TechnologyHelper.isTechnologyResearchable(this.$store.state.game, o.value))
Expand Down Expand Up @@ -133,12 +133,12 @@ export default {
this.loadingNext = false
},
recalculateTimeRemaining () {
this.timeRemainingEta = GameHelper.getCountdownTimeStringByTicks(this.$store.state.game, this.player.currentResearchTicksEta)
this.timeRemainingEta = GameHelper.getCountdownTimeStringByTicksWithTickETA(this.$store.state.game, this.player.currentResearchTicksEta)
if (this.player.nextResearchTicksEta == null) {
this.timeNextRemainingEta = null
} else {
this.timeNextRemainingEta = GameHelper.getCountdownTimeStringByTicks(this.$store.state.game, this.player.nextResearchTicksEta)
this.timeNextRemainingEta = GameHelper.getCountdownTimeStringByTicksWithTickETA(this.$store.state.game, this.player.nextResearchTicksEta)
}
}
},
Expand Down
11 changes: 11 additions & 0 deletions client/src/views/game/components/star/StarDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,17 @@
<i class="fas fa-wrench ms-2"></i>
</div>
</div>


<div v-if="star.ownedByPlayerId && !isDeadStar && ticksToNextShip" class="row pt-1 pb-1 bg-dark">
<div class="col">
Ticks to next ship
</div>
<div class="col text-end" title="Ticks to next ship">
<span>{{ticksToNextShip}}</span>
<i class="fas fa-spinner ms-1"></i>
</div>
</div>
</div>

<div v-if="getCarriersInOrbit().length">
Expand Down

0 comments on commit 2272b81

Please sign in to comment.