Bugfixes, LocalizedText is an entity again

This commit is contained in:
barsdeveloper
2021-10-31 14:51:36 +01:00
parent 113f65964d
commit 12e44c5482
10 changed files with 79 additions and 58 deletions

View File

@@ -2,6 +2,7 @@ import Entity from "./Entity"
import ObjectReference from "./primitive/ObjectReference"
export default class FunctionReferenceEntity extends Entity {
static attributes = {
MemberParent: ObjectReference,
MemberName: ""

View File

@@ -0,0 +1,19 @@
import Entity from "./Entity"
export default class LocalizedTextEntity extends Entity {
static attributes = {
namespace: String,
key: String,
value: String
}
getAttributes() {
return LocalizedTextEntity.attributes
}
toString() {
"NSLOCTEXT(" + `"${this.namespace}"` + ", " + `"${this.key}"` + ", " + `"${this.value}"` + ")"
}
}

View File

@@ -1,6 +1,6 @@
import Entity from "./Entity"
import Guid from "./primitive/Guid"
import LocalizedTextEntity from "./primitive/LocalizedTextEntity"
import LocalizedTextEntity from "./LocalizedTextEntity"
import ObjectReference from "./primitive/ObjectReference"
import PinReferenceEntity from "./PinReferenceEntity"
import TypeInitialization from "./TypeInitialization"

View File

@@ -3,7 +3,7 @@ import Primitive from "./Primitive"
export default class Guid extends Primitive {
static generateGuid(random) {
let values = new Uint32Array(4);
let values = new Uint32Array(4)
if (random === true) {
crypto.getRandomValues(values)
}

View File

@@ -1,22 +0,0 @@
import Primitive from "./Primitive"
export default class LocalizedTextEntity extends Primitive {
/**
*
* @param {String} namespace
* @param {String} key
* @param {String} value
*/
constructor(namespace, key, value) {
super()
this.namespace = namespace
this.key = key
this.value = value
}
toString() {
"NSLOCTEXT(" + `"${this.namespace}"` + ", " + `"${this.key}"` + ", " + `"${this.value}"` + ")"
}
}