Skip to content

Commit

Permalink
fix: several issues around macro/plugin loading
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpineda committed Oct 6, 2022
1 parent b487a3d commit 3651460
Show file tree
Hide file tree
Showing 10 changed files with 439 additions and 911 deletions.
18 changes: 15 additions & 3 deletions src/common/default-settings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import { SettingsV6, SettingsV5, MacroDTO } from "./types";
import defaultMacros from "common/macros/default-macros.json";

export const DEFAULT_PLUGIN_PACKAGES: string[] = [
"@titan-reactor-plugins/clock",
"@titan-reactor-plugins/player-colors",
"@titan-reactor-plugins/camera-standard",
"@titan-reactor-plugins/camera-overview",
"@titan-reactor-plugins/camera-battle",
"@titan-reactor-plugins/players-bar",
"@titan-reactor-plugins/unit-selection-display",
"@titan-reactor-plugins/production-bar",
"@titan-reactor-plugins/unit-sounds",
];

export const defaultSettingsV6: SettingsV6 = {
version: 6,
language: "en-US",
Expand Down Expand Up @@ -83,11 +95,11 @@ export const defaultSettingsV6: SettingsV6 = {
},
plugins: {
serverPort: 8080,
enabled: [],
enabled: DEFAULT_PLUGIN_PACKAGES,
},
macros: {
revision: 0,
macros: [],
macros: defaultMacros as MacroDTO[],
},
};

Expand Down Expand Up @@ -133,7 +145,7 @@ export const defaultSettingsV5: SettingsV5 = {
},
macros: {
revision: 0,
macros: defaultMacros as MacroDTO[],
macros: []
},
};

Expand Down
Loading

0 comments on commit 3651460

Please sign in to comment.