issue-15 #21
@ -54,10 +54,15 @@ class SaveProject {
|
|||||||
}
|
}
|
||||||
static loadGamesystems(projectDir) {
|
static loadGamesystems(projectDir) {
|
||||||
const gamesystemDir = path.join(projectDir, "gamesystems");
|
const gamesystemDir = path.join(projectDir, "gamesystems");
|
||||||
|
if (fs.existsSync(gamesystemDir)) {
|
||||||
const loadedGamesystems = this.loadGamesystemsRecursively(gamesystemDir);
|
const loadedGamesystems = this.loadGamesystemsRecursively(gamesystemDir);
|
||||||
console.log("LoadedGamesystems: ", loadedGamesystems.length);
|
console.log("LoadedGamesystems: ", loadedGamesystems.length);
|
||||||
return loadedGamesystems;
|
return loadedGamesystems;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
static loadGamesystemsRecursively(gamesystemDir) {
|
static loadGamesystemsRecursively(gamesystemDir) {
|
||||||
let loadedGamesystems = [];
|
let loadedGamesystems = [];
|
||||||
const gamesystemFileNames = fs.readdirSync(gamesystemDir);
|
const gamesystemFileNames = fs.readdirSync(gamesystemDir);
|
||||||
|
@ -62,9 +62,13 @@ export class SaveProject {
|
|||||||
|
|
||||||
static loadGamesystems(projectDir: string): LoadModel[] {
|
static loadGamesystems(projectDir: string): LoadModel[] {
|
||||||
const gamesystemDir = path.join(projectDir, "gamesystems");
|
const gamesystemDir = path.join(projectDir, "gamesystems");
|
||||||
|
if(fs.existsSync(gamesystemDir)) {
|
||||||
const loadedGamesystems = this.loadGamesystemsRecursively(gamesystemDir);
|
const loadedGamesystems = this.loadGamesystemsRecursively(gamesystemDir);
|
||||||
console.log("LoadedGamesystems: ", loadedGamesystems.length);
|
console.log("LoadedGamesystems: ", loadedGamesystems.length);
|
||||||
return loadedGamesystems;
|
return loadedGamesystems;
|
||||||
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static loadGamesystemsRecursively(gamesystemDir: string): LoadModel[] {
|
static loadGamesystemsRecursively(gamesystemDir: string): LoadModel[] {
|
||||||
|
@ -42,6 +42,9 @@ export class AppComponent implements OnInit{
|
|||||||
private dialog: MatDialog
|
private dialog: MatDialog
|
||||||
) {
|
) {
|
||||||
console.log('APP_CONFIG', APP_CONFIG);
|
console.log('APP_CONFIG', APP_CONFIG);
|
||||||
|
if(this.gameModel == undefined) {
|
||||||
|
this.gameModel = new GameModel("Unknown GameModel")
|
||||||
|
}
|
||||||
|
|
||||||
if (electronService.isElectron) {
|
if (electronService.isElectron) {
|
||||||
console.log(process.env);
|
console.log(process.env);
|
||||||
|
Loading…
Reference in New Issue
Block a user