mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:41:34 +08:00
Small serialization fixes
This commit is contained in:
@@ -30,8 +30,8 @@ export default class ArrayEntity extends IEntity {
|
||||
).map(([_0, values, trailing]) => {
|
||||
values = values instanceof Array ? values : []
|
||||
let Self = this
|
||||
if (trailing !== undefined != Self.trailing) {
|
||||
Self = Self.flagTrailing()
|
||||
if ((trailing !== undefined) !== Self.trailing) {
|
||||
Self = Self.flagTrailing(trailing !== undefined)
|
||||
}
|
||||
const result = new Self(values)
|
||||
return result
|
||||
|
||||
@@ -346,6 +346,7 @@ export default class ObjectEntity extends IEntity {
|
||||
obj.Node.getter = () => new ObjectReferenceEntity(
|
||||
this.PCGNode.type,
|
||||
`${this.Name}.${this.PCGNode.path}`,
|
||||
nodeRef.full,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,11 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
super()
|
||||
this.#type = type
|
||||
this.#path = path
|
||||
this.#full = full ?? `"${this.type + (this.path ? (`'${this.path}'`) : "")}"`
|
||||
this.#full = full ?? (
|
||||
this.type.includes("/") || this.path
|
||||
? `"${this.type + (this.path ? (`'${this.path}'`) : "")}"`
|
||||
: this.type
|
||||
)
|
||||
}
|
||||
|
||||
/** @returns {P<ObjectReferenceEntity>} */
|
||||
@@ -89,7 +93,7 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
}
|
||||
|
||||
static createNoneInstance() {
|
||||
return new ObjectReferenceEntity("None")
|
||||
return new ObjectReferenceEntity("None", "", "None")
|
||||
}
|
||||
|
||||
getName(dropCounter = false) {
|
||||
|
||||
Reference in New Issue
Block a user