Move Hotbar types to seperate file (#3532)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-08-03 14:38:36 -04:00
1 parent 77077ef72c
commit 3fe8014f11
8 files changed
+82 -73

No files matched your search

+2 -8
View File
@@ -20,20 +20,14 @@
*/
// Cleans up a store that had the state related data stored
import { Hotbar, HotbarStore } from "../../common/hotbar-store";
import * as uuid from "uuid";
import type { MigrationDeclaration } from "../helpers";
import { catalogEntity } from "../../main/catalog-sources/general";
import { getEmptyHotbar } from "../../common/hotbar-types";
export default {
version: "5.0.0-alpha.0",
run(store) {
const hotbar: Hotbar = {
id: uuid.v4(),
name: "default",
items: HotbarStore.getInitialItems(),
};
const hotbar = getEmptyHotbar("default");
const { metadata: { uid, name, source } } = catalogEntity;
hotbar.items[0] = { entity: { uid, name, source } };