diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index acbf65f..662b897 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -3,6 +3,8 @@ import { Routes, RouterModule } from '@angular/router';
import { RawEditorComponent } from "./pages/raw-editor/raw-editor.component";
import { ConfigComponent } from "./pages/config/config.component";
import { QuestsComponent } from "./pages/config/quests/quests.component";
+import { GridComponent } from "./pages/config/grid/grid.component";
+import { DbsComponent } from "./pages/config/dbs/dbs.component";
const routes: Routes = [
@@ -10,7 +12,9 @@ const routes: Routes = [
{
path: 'config', component: ConfigComponent,
children: [
- //{path: '', component: ''}
+ {path: '', redirectTo: 'grid', pathMatch: 'full'},
+ {path: 'grid', component: GridComponent},
+ {path: 'dbs', component: DbsComponent},
{path: 'quests', component: QuestsComponent},
]
}
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 0ae1360..5653495 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -14,5 +14,6 @@ export class AppComponent {
constructor(private server: Server) {
// Temporary just load all the grid. Remove later.
this.server.serverGrid = new ServerGridModel().deserialize((data as any).default);
+ console.log(this.server.serverGrid);
}
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 446940f..22caf36 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -11,6 +11,12 @@ import { FormsModule } from "@angular/forms";
import { Server } from "./server";
import { PegjsService } from "./services/pegjs.service";
import { QuestsComponent } from './pages/config/quests/quests.component';
+import { GridComponent } from './pages/config/grid/grid.component';
+import { NumberComponent } from './components/form/number/number.component';
+import { TextComponent } from './components/form/text/text.component';
+import { PasswordComponent } from './components/form/password/password.component';
+import { DbsComponent } from './pages/config/dbs/dbs.component';
+import { CheckboxComponent } from './components/form/checkbox/checkbox.component';
@NgModule({
declarations: [
@@ -18,7 +24,13 @@ import { QuestsComponent } from './pages/config/quests/quests.component';
RawEditorComponent,
CodeEditorComponent,
ConfigComponent,
- QuestsComponent
+ QuestsComponent,
+ GridComponent,
+ NumberComponent,
+ TextComponent,
+ PasswordComponent,
+ DbsComponent,
+ CheckboxComponent
],
imports: [
BrowserModule,
diff --git a/src/app/components/form/checkbox/checkbox.component.html b/src/app/components/form/checkbox/checkbox.component.html
new file mode 100644
index 0000000..3736fc9
--- /dev/null
+++ b/src/app/components/form/checkbox/checkbox.component.html
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/app/components/form/checkbox/checkbox.component.ts b/src/app/components/form/checkbox/checkbox.component.ts
new file mode 100644
index 0000000..bec9071
--- /dev/null
+++ b/src/app/components/form/checkbox/checkbox.component.ts
@@ -0,0 +1,19 @@
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+
+@Component({
+ selector: 'app-checkbox',
+ templateUrl: './checkbox.component.html'
+})
+export class CheckboxComponent implements OnInit {
+ @Input() checkbox: boolean;
+ @Output() checkboxChange = new EventEmitter();
+ @Input() label: string;
+ @Input() id: string;
+ @Input() help: string;
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/components/form/number/number.component.html b/src/app/components/form/number/number.component.html
new file mode 100644
index 0000000..1d4ce00
--- /dev/null
+++ b/src/app/components/form/number/number.component.html
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/app/components/form/number/number.component.ts b/src/app/components/form/number/number.component.ts
new file mode 100644
index 0000000..4be39bd
--- /dev/null
+++ b/src/app/components/form/number/number.component.ts
@@ -0,0 +1,19 @@
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+
+@Component({
+ selector: 'app-number',
+ templateUrl: './number.component.html'
+})
+export class NumberComponent implements OnInit {
+ @Input() number: number;
+ @Output() numberChange = new EventEmitter();
+ @Input() label: string;
+ @Input() id: string;
+ @Input() help: string;
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/components/form/password/password.component.html b/src/app/components/form/password/password.component.html
new file mode 100644
index 0000000..fe1d82a
--- /dev/null
+++ b/src/app/components/form/password/password.component.html
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/src/app/components/form/password/password.component.ts b/src/app/components/form/password/password.component.ts
new file mode 100644
index 0000000..80cd1b0
--- /dev/null
+++ b/src/app/components/form/password/password.component.ts
@@ -0,0 +1,23 @@
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+
+@Component({
+ selector: 'app-password',
+ templateUrl: './password.component.html'
+})
+export class PasswordComponent implements OnInit {
+ @Input() password: string;
+ @Output() passwordChange = new EventEmitter();
+ @Input() label: string;
+ @Input() id: string;
+ @Input() help: string;
+ private show: boolean = false;
+
+ constructor() { }
+
+ private toggleShow() {
+ this.show = !this.show;
+ }
+
+ ngOnInit() {
+ }
+}
diff --git a/src/app/components/form/text/text.component.html b/src/app/components/form/text/text.component.html
new file mode 100644
index 0000000..a4f6351
--- /dev/null
+++ b/src/app/components/form/text/text.component.html
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/app/components/form/text/text.component.ts b/src/app/components/form/text/text.component.ts
new file mode 100644
index 0000000..7e3be2d
--- /dev/null
+++ b/src/app/components/form/text/text.component.ts
@@ -0,0 +1,18 @@
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+
+@Component({
+ selector: 'app-text',
+ templateUrl: './text.component.html'
+})
+export class TextComponent implements OnInit {
+ @Input() text: string;
+ @Output() textChange = new EventEmitter();
+ @Input() label: string;
+ @Input() id: string;
+ @Input() help: string;
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+}
diff --git a/src/app/models/atlasData/blueprintGeneratedClass.model.ts b/src/app/models/atlasData/blueprintGeneratedClass.model.ts
index 7a55159..80f594d 100644
--- a/src/app/models/atlasData/blueprintGeneratedClass.model.ts
+++ b/src/app/models/atlasData/blueprintGeneratedClass.model.ts
@@ -1,15 +1,15 @@
import {Deserialize} from "../util/deserialize.model";
export class BlueprintGeneratedClassModel implements Deserialize {
- public texture: string;
+ public blueprint: string;
public deserialize(raw: any): this {
if( raw[0] !== 'BlueprintGeneratedClass') Error('wrong type, expecting BlueprintGeneratedClassModel, got [' + raw[0] + ']!');
- this.texture = raw[1];
+ this.blueprint = raw[1];
return this;
};
public toJSON(): object {
- return [ 'BlueprintGeneratedClass', this.texture ];
+ return [ 'BlueprintGeneratedClass', this.blueprint ];
}
}
diff --git a/src/app/models/serverGrid.model.ts b/src/app/models/serverGrid.model.ts
index de753b9..0e54467 100644
--- a/src/app/models/serverGrid.model.ts
+++ b/src/app/models/serverGrid.model.ts
@@ -8,8 +8,10 @@ import { ServerModel } from "./atlasData/server.model";
export class ServerGridModel implements Deserialize {
// Server Argument Section
- public BaseServerArgs: string = "";
- public AdditionalCmdLineParams: string = "";
+ // Used internally by Grapeshot
+ //public BaseServerArgs: string = "";
+ // Probably also internal to Grapeshot
+ //public AdditionalCmdLineParams: string = "";
// World Options
public WorldFriendlyName: string = "New Server";
@@ -21,12 +23,17 @@ export class ServerGridModel implements Deserialize {
public gridSize: number = 1000;
public totalGridsX: number = 1;
public totalGridsY: number = 1;
- public coordsScaling: number = 0.000000000001;
public globalTransitionMinZ: number = 0.0;
+ // Used by ServerGridEditor for Zoom Level, so ignored
+ // Will be added if present in config when loading.
+ //public coordsScaling: number = 0.000000000001;
+
// Image Paths
- public backgroundImgPath: string = "image.png";
- public discoZonesImagePath: string = "image.png";
+ // Used for generating tile output
+ //public backgroundImgPath: string = "image.png";
+ // Used for displaying discovery zones in ServerGridEditor
+ //public discoZonesImagePath: string = "image.png";
// URL Options
public MetaWorldURL: string = "";
@@ -39,13 +46,13 @@ export class ServerGridModel implements Deserialize {
public columnUTCOffset: number = 0.0;
public lastImageOverride: string = "0001-01-01T00:00:00";
- // Info Options
- public showServerInfo: boolean = false;
- public showDiscoZoneInfo: boolean = false;
- public showShipPathsInfo: boolean = false;
- public showIslandNames: boolean = false;
- public showLines: boolean = false;
- public showBackground: boolean = false;
+ // Info Options for ServerGridEditor
+ // public showServerInfo: boolean = false;
+ // public showDiscoZoneInfo: boolean = false;
+ // public showShipPathsInfo: boolean = false;
+ // public showIslandNames: boolean = false;
+ // public showLines: boolean = false;
+ // public showBackground: boolean = false;
// S3 Options
public LocalS3URL: string = "";
@@ -54,9 +61,12 @@ export class ServerGridModel implements Deserialize {
public LocalS3BucketName: string = "";
public LocalS3Region: string = "";
- // Unsorted...
- public shipPathsIdGenerator: number = 1;
- public idGenerator: number = 127;
+ // ID Generator current values
+ // Used for individual ship path
+ public shipPathsIdGenerator: number = 0;
+ // Used for Discovery Zone IDs
+ public idGenerator: number = 0;
+ // Unused as far as can see in ServerGridEditor
public regionsIdGenerator: number = 0;
// Log Configs
diff --git a/src/app/pages/config/config.component.html b/src/app/pages/config/config.component.html
index e3870ae..a00ef9c 100644
--- a/src/app/pages/config/config.component.html
+++ b/src/app/pages/config/config.component.html
@@ -1,5 +1,7 @@
+
+
diff --git a/src/app/pages/config/config.component.ts b/src/app/pages/config/config.component.ts
index ca31f91..b141a24 100644
--- a/src/app/pages/config/config.component.ts
+++ b/src/app/pages/config/config.component.ts
@@ -13,5 +13,4 @@ export class ConfigComponent implements OnInit {
ngOnInit() {
}
-
}
diff --git a/src/app/pages/config/dbs/dbs.component.html b/src/app/pages/config/dbs/dbs.component.html
new file mode 100644
index 0000000..c6c360e
--- /dev/null
+++ b/src/app/pages/config/dbs/dbs.component.html
@@ -0,0 +1,15 @@
+
+
+
Database Settings
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/config/dbs/dbs.component.ts b/src/app/pages/config/dbs/dbs.component.ts
new file mode 100644
index 0000000..a6ec162
--- /dev/null
+++ b/src/app/pages/config/dbs/dbs.component.ts
@@ -0,0 +1,19 @@
+import { Component, OnInit } from '@angular/core';
+import { Server } from "../../../server";
+import { DatabaseConnectionModel } from "../../../models/databaseConnection.model";
+
+@Component({
+ selector: 'app-dbs',
+ templateUrl: './dbs.component.html'
+})
+export class DbsComponent implements OnInit {
+ dbs: DatabaseConnectionModel[];
+
+ constructor(private server: Server) {
+ this.dbs = server.serverGrid.DatabaseConnections;
+ }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/pages/config/grid/grid.component.html b/src/app/pages/config/grid/grid.component.html
new file mode 100644
index 0000000..17e976b
--- /dev/null
+++ b/src/app/pages/config/grid/grid.component.html
@@ -0,0 +1,102 @@
+
+
+
Grid Settings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/config/grid/grid.component.ts b/src/app/pages/config/grid/grid.component.ts
new file mode 100644
index 0000000..49d00c7
--- /dev/null
+++ b/src/app/pages/config/grid/grid.component.ts
@@ -0,0 +1,27 @@
+import { Component, OnInit } from '@angular/core';
+import { ServerGridModel } from "../../../models/serverGrid.model";
+import { Server } from "../../../server";
+import { TribeLogConfigModel } from "../../../models/tribeLogConfig.model";
+import { SharedLogConfigModel } from "../../../models/sharedLogConfig.model";
+import { TravelDataConfigModel } from "../../../models/travelDataConfig.model";
+
+@Component({
+ selector: 'app-grid',
+ templateUrl: './grid.component.html'
+})
+export class GridComponent implements OnInit {
+ private grid: ServerGridModel;
+ private tribeLog: TribeLogConfigModel;
+ private sharedLog: SharedLogConfigModel;
+ private travelData: TravelDataConfigModel;
+
+ constructor(private server: Server) {
+ this.grid = server.serverGrid;
+ this.tribeLog = server.serverGrid.TribeLogConfig;
+ this.sharedLog = server.serverGrid.SharedLogConfig;
+ this.travelData = server.serverGrid.TravelDataConfig;
+ }
+
+ ngOnInit() {
+ }
+}
diff --git a/src/app/pages/config/quests/quests.component.html b/src/app/pages/config/quests/quests.component.html
index d037b55..56c1afe 100644
--- a/src/app/pages/config/quests/quests.component.html
+++ b/src/app/pages/config/quests/quests.component.html
@@ -7,12 +7,12 @@
- - {{ feat }}
+ - {{ availableFeats[feat] }}
-
- Blueprint: {{ engram.texture }}
+ Blueprint: {{ engram.blueprint }}
@@ -23,7 +23,7 @@
(X: {{ poi.WorldMapPosition.X }} - Y: {{ poi.WorldMapPosition.Y }})
- - {{ feat }}
+ - {{ availableFeats[feat] }}
diff --git a/src/app/pages/config/quests/quests.component.scss b/src/app/pages/config/quests/quests.component.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/app/pages/config/quests/quests.component.ts b/src/app/pages/config/quests/quests.component.ts
index 0eb3061..2dd7b83 100644
--- a/src/app/pages/config/quests/quests.component.ts
+++ b/src/app/pages/config/quests/quests.component.ts
@@ -4,12 +4,26 @@ import { QuestEntryModel } from "../../../models/atlasData/questEntry.model";
@Component({
selector: 'app-quests',
- templateUrl: './quests.component.html',
- styleUrls: ['./quests.component.scss']
+ templateUrl: './quests.component.html'
})
+
export class QuestsComponent implements OnInit {
quests: QuestEntryModel[];
+ // TODO figure out what each dance actually is
+ private availableFeats = {
+ 'Dance1': 'Dance 1',
+ 'Dance2': 'Dance 2',
+ 'Dance3': 'Dance 3',
+ 'Dance4': 'Dance 4',
+ 'Dance5': 'Dance 5',
+ 'Dance6': 'Dance 6',
+ 'Dance7': 'Dance 7',
+ 'Dance8': 'Dance 8',
+ 'Dance9': 'Dance 9',
+ 'Dance10': 'Dance 10',
+ };
+
constructor(private server: Server) {
this.quests = server.serverGrid.globalGameplaySetup.QuestEntries;
}