arx-level-generator
Version:
A tool for creating Arx Fatalis maps
21 lines • 556 B
JavaScript
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