chore: lintfix
This commit is contained in:
parent
1474a13b73
commit
6cc6f94dd4
|
@ -131,20 +131,20 @@ export const state = () => ({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
gameDate: {
|
gameDate: {
|
||||||
month: 12,
|
month: 12,
|
||||||
year: 1990
|
year: 1990,
|
||||||
},
|
},
|
||||||
playerAge: {
|
playerAge: {
|
||||||
month: 0,
|
month: 0,
|
||||||
year: 34
|
year: 34,
|
||||||
},
|
},
|
||||||
playerAgeMax: {
|
playerAgeMax: {
|
||||||
month: 0,
|
month: 0,
|
||||||
year: 80
|
year: 80,
|
||||||
},
|
},
|
||||||
playerLivedTotal: {
|
playerLivedTotal: {
|
||||||
month: 0,
|
month: 0,
|
||||||
year: 0
|
year: 0,
|
||||||
},
|
},
|
||||||
wisdomGained: 0, // wisdom gained so far on this run, not applied until player sends the book.
|
wisdomGained: 0, // wisdom gained so far on this run, not applied until player sends the book.
|
||||||
wisdomApplied: 0, // wisdom from previous runs
|
wisdomApplied: 0, // wisdom from previous runs
|
||||||
|
@ -166,10 +166,10 @@ export const getters = {
|
||||||
return getters.activeColorClasses(state.activeTabIndex)
|
return getters.activeColorClasses(state.activeTabIndex)
|
||||||
},
|
},
|
||||||
canTimeTravel: (state) => {
|
canTimeTravel: (state) => {
|
||||||
if (state.playerAge.year < state.playerAgeMax.year) return true
|
if (state.playerAge.year < state.playerAgeMax.year) return true
|
||||||
if (state.playerAge.year > state.playerAgeMax.year) return false
|
if (state.playerAge.year > state.playerAgeMax.year) return false
|
||||||
return (state.playerAge.month < state.playerAgeMax.month)
|
return state.playerAge.month < state.playerAgeMax.month
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mutations = {
|
export const mutations = {
|
||||||
|
@ -212,16 +212,16 @@ export const mutations = {
|
||||||
let gameYear = state.gameDate.year
|
let gameYear = state.gameDate.year
|
||||||
let gameMonth = state.gameDate.month + 1
|
let gameMonth = state.gameDate.month + 1
|
||||||
if (gameMonth > 12) {
|
if (gameMonth > 12) {
|
||||||
gameMonth = 1
|
gameMonth = 1
|
||||||
gameYear = gameYear + 1
|
gameYear = gameYear + 1
|
||||||
}
|
}
|
||||||
let ageYear = state.playerAge.year
|
let ageYear = state.playerAge.year
|
||||||
let ageMonth = state.playerAge.month + 1
|
let ageMonth = state.playerAge.month + 1
|
||||||
let wisdomGained = 0
|
let wisdomGained = 0
|
||||||
if (ageMonth > 12) {
|
if (ageMonth > 12) {
|
||||||
ageMonth = 1
|
ageMonth = 1
|
||||||
ageYear = ageYear + 1
|
ageYear = ageYear + 1
|
||||||
wisdomGained += 1
|
wisdomGained += 1
|
||||||
}
|
}
|
||||||
Vue.set(state.gameDate, 'year', gameYear)
|
Vue.set(state.gameDate, 'year', gameYear)
|
||||||
Vue.set(state.gameDate, 'month', gameMonth)
|
Vue.set(state.gameDate, 'month', gameMonth)
|
||||||
|
|
Reference in New Issue