mapcomplete/Models/ThemeConfig/MoveConfig.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
555 B
TypeScript
Raw Normal View History

2022-09-08 21:40:48 +02:00
import MoveConfigJson from "./Json/MoveConfigJson"
export default class MoveConfig {
public readonly enableImproveAccuracy: boolean
public readonly enableRelocation: boolean
constructor(json: MoveConfigJson, context: string) {
this.enableImproveAccuracy = json.enableImproveAccuracy ?? true
this.enableRelocation = json.enableRelocation ?? true
if (!(this.enableRelocation || this.enableImproveAccuracy)) {
throw "At least one default move reason should be allowed (at " + context + ")"
}
}
2022-09-08 21:40:48 +02:00
}