31 lines
560 B
TypeScript
31 lines
560 B
TypeScript
import { NetworkState } from "./types";
|
|
import { AppState } from "../types";
|
|
import { Module } from "vuex";
|
|
|
|
import actions from "./actions";
|
|
import mutations from "./mutations";
|
|
import getters from "./getters";
|
|
|
|
const namespaced = true;
|
|
|
|
export const state: NetworkState = {
|
|
peerType: "none",
|
|
connectionStatus: null,
|
|
peer: null,
|
|
server: null,
|
|
local: null,
|
|
serverID: null,
|
|
players: [],
|
|
chatLog: []
|
|
};
|
|
|
|
export const network: Module<NetworkState, AppState> = {
|
|
namespaced,
|
|
state,
|
|
actions,
|
|
mutations,
|
|
getters
|
|
};
|
|
|
|
export default network;
|