Only allow saving quest files in GC or BB format.

This commit is contained in:
Daan Vanden Bosch 2020-01-16 23:07:39 +01:00
parent 50d1ff7f93
commit 606b0661f4
3 changed files with 14 additions and 4 deletions

View File

@ -234,7 +234,17 @@ export class QuestEditorToolBarController extends Controller {
};
set_version = (version: Version): void => {
this._version.val = version;
// We only support GC and BB at the moment.
switch (version) {
case Version.DC:
case Version.GC:
this._version.val = Version.GC;
break;
case Version.PC:
case Version.BB:
this._version.val = Version.BB;
break;
}
};
debug = (): void => {

View File

@ -14,7 +14,7 @@ import { View } from "../../core/gui/View";
import { Dialog } from "../../core/gui/Dialog";
import { TextInput } from "../../core/gui/TextInput";
import "./QuestEditorToolBarView.css";
import { Version, VERSIONS } from "../../core/data_formats/parsing/quest/Version";
import { Version } from "../../core/data_formats/parsing/quest/Version";
export class QuestEditorToolBarView extends View {
private readonly toolbar: ToolBar;
@ -130,7 +130,7 @@ export class QuestEditorToolBarView extends View {
const version_select = this.disposable(
new Select({
label: "Version:",
items: VERSIONS,
items: [Version.GC, Version.BB],
selected: ctrl.version,
to_label: version => {
switch (version) {

View File

@ -1 +1 @@
48
49