knowyt/client/src/store/engine.js
2022-02-27 20:54:13 +01:00

23 lines
415 B
JavaScript

export const state = () => ({
json: {},
version: -1,
user: undefined,
gameinfo: undefined,
})
export const mutations = {
setJson(state, json) {
state.json = json
state.version = parseInt(json.version, 10)
},
setVersion(state, version) {
state.version = version
},
setUser(state, user) {
state.user = user
},
setGameInfo(state, gameinfo) {
state.gameinfo = gameinfo
},
}