mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Fix missing values and update schedules
This commit is contained in:
@@ -59,7 +59,7 @@ export default class PinEntity extends IEntity {
|
||||
new CalculatedType(
|
||||
/** @param {PinEntity} pinEntity */
|
||||
pinEntity => new TypeInitialization(
|
||||
PinEntity.getEntityType(pinEntity.getType(), true) ?? String,
|
||||
pinEntity.getEntityType(true) ?? String,
|
||||
false,
|
||||
undefined,
|
||||
true
|
||||
@@ -76,13 +76,6 @@ export default class PinEntity extends IEntity {
|
||||
bOrphanedPin: false,
|
||||
}
|
||||
|
||||
static getEntityType(typeString, alternative = false) {
|
||||
const [entity, alternativeEntity] = [this.#typeEntityMap[typeString], this.#alternativeTypeEntityMap[typeString]]
|
||||
return alternative && alternativeEntity !== undefined
|
||||
? alternativeEntity
|
||||
: entity
|
||||
}
|
||||
|
||||
constructor(values = {}, suppressWarns = false) {
|
||||
super(values, suppressWarns)
|
||||
/** @type {GuidEntity} */ this.PinId
|
||||
@@ -125,6 +118,15 @@ export default class PinEntity extends IEntity {
|
||||
return this.PinType.PinCategory
|
||||
}
|
||||
|
||||
getEntityType(alternative = false) {
|
||||
const typeString = this.getType()
|
||||
const entity = PinEntity.#typeEntityMap[typeString]
|
||||
const alternativeEntity = PinEntity.#alternativeTypeEntityMap[typeString]
|
||||
return alternative && alternativeEntity !== undefined
|
||||
? alternativeEntity
|
||||
: entity
|
||||
}
|
||||
|
||||
getDisplayName() {
|
||||
let matchResult = null
|
||||
if (
|
||||
@@ -152,7 +154,10 @@ export default class PinEntity extends IEntity {
|
||||
this.PinType.bSerializeAsSinglePrecisionFloat = other.PinType.bSerializeAsSinglePrecisionFloat
|
||||
}
|
||||
|
||||
getDefaultValue() {
|
||||
getDefaultValue(maybeCreate = false) {
|
||||
if (this.DefaultValue === undefined && maybeCreate) {
|
||||
this.DefaultValue = new (this.getEntityType(true))()
|
||||
}
|
||||
return this.DefaultValue
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ export default class TypeInitialization {
|
||||
if (value === undefined) {
|
||||
if (type instanceof Array) {
|
||||
value = []
|
||||
} else if (serialized) {
|
||||
value = ""
|
||||
} else {
|
||||
value = () => TypeInitialization.sanitize(new type())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user