Delete Enum class
This commit is contained in:
parent
0ccc0ecf71
commit
0e4bca7399
2 changed files with 5 additions and 36 deletions
|
|
@ -1,34 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright © 2024 - Faiumoni e. V. *
|
||||
***************************************************************************
|
||||
***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
* published by the Free Software Foundation; either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
import { AbstractEnum } from "./AbstractEnum";
|
||||
|
||||
|
||||
/**
|
||||
* Represents a string enumeration type.
|
||||
*/
|
||||
export class Enum extends AbstractEnum<string> {
|
||||
|
||||
/** String enumeration type must have a value. */
|
||||
override readonly value!: string;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new string enumeration.
|
||||
*
|
||||
* @param value {string}
|
||||
* String value representation of this instance.
|
||||
*/
|
||||
constructor(value: string) {
|
||||
super(value);
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
* *
|
||||
***************************************************************************/
|
||||
|
||||
import { Enum } from "../enum/Enum";
|
||||
import { AbstractEnum } from "../enum/AbstractEnum";
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -18,7 +18,7 @@ import { Enum } from "../enum/Enum";
|
|||
*
|
||||
* NOTE: string names should match `games.stendhal.common.constants.SoundLayer`
|
||||
*/
|
||||
export class SoundLayer extends Enum {
|
||||
export class SoundLayer extends AbstractEnum<string> {
|
||||
|
||||
/** Reference to layers. */
|
||||
private static readonly layers: SoundLayer[] = [];
|
||||
|
|
@ -29,6 +29,9 @@ export class SoundLayer extends Enum {
|
|||
static readonly SFX = new SoundLayer("sfx");
|
||||
static readonly GUI = new SoundLayer("gui");
|
||||
|
||||
/** Value is required. */
|
||||
override readonly value!: string;
|
||||
|
||||
|
||||
private constructor(value: string) {
|
||||
super(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue