This commit is contained in:
barsdeveloper
2024-12-11 23:23:23 +02:00
parent 3de0e74ef0
commit e405a7245d
26 changed files with 471 additions and 181 deletions

View File

@@ -25,6 +25,7 @@ export default class ObjectReferenceEntity extends IEntity {
return this.#path
}
set path(value) {
this.#name = ""
this.#path = value
}
@@ -36,6 +37,8 @@ export default class ObjectReferenceEntity extends IEntity {
this.#full = value
}
#name = ""
/** @param {(t: String, p: String) => String} full */
constructor(
type = "None",
@@ -101,7 +104,13 @@ export default class ObjectReferenceEntity extends IEntity {
}
getName(dropCounter = false) {
return Utility.getNameFromPath(this.path.replace(/_C$/, ""), dropCounter)
if (!this.#name) {
if (!dropCounter) {
return this.#name = Utility.getNameFromPath(this.path.replace(/_C$/, ""), dropCounter)
}
return Utility.getNameFromPath(this.path.replace(/_C$/, ""), dropCounter)
}
return this.#name
}
doSerialize(insideString = false) {