UNPKG

arx-level-generator

Version:
21 lines 556 B
import { ScriptProperty } from '../ScriptProperty.js'; /** * A ScriptProperty for setting the name of an Entity * * @extends ScriptProperty * @see https://wiki.arx-libertatis.org/Script:setname */ export class Label extends ScriptProperty { toString() { if (this.isI18nKey()) { return `setname ${this.value}`; } else { return `setname "${this.value}"`; } } isI18nKey() { return this.value.startsWith('[') && this.value.endsWith(']'); } } //# sourceMappingURL=Label.js.map