mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-06 15:47:30 +08:00
Several fixes
This commit is contained in:
@@ -15,6 +15,7 @@ export default class MirroredEntity extends IEntity {
|
||||
/**
|
||||
* @template {typeof IEntity} T
|
||||
* @param {T} type
|
||||
* @returns {typeof MirroredEntity<T>}
|
||||
*/
|
||||
static of(type) {
|
||||
const result = this.asUniqueClass()
|
||||
|
||||
@@ -344,7 +344,7 @@ export default class ObjectEntity extends IEntity {
|
||||
/** @param {ObjectEntity} obj */
|
||||
obj => {
|
||||
if (obj.Node !== undefined) {
|
||||
const nodeRef = obj.Node.get()
|
||||
const nodeRef = obj.Node.getter()
|
||||
if (
|
||||
nodeRef.type === this.PCGNode.type
|
||||
&& nodeRef.path === `${this.Name}.${this.PCGNode.path}`
|
||||
|
||||
@@ -129,7 +129,7 @@ export default class PinEntity extends IEntity {
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.Direction>} */ this.Direction
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.PinType>} */ this.PinType
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.LinkedTo>} */ this.LinkedTo
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.DefaultValue>} */ this.DefaultValue
|
||||
/** @type {T} */ this.DefaultValue
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.AutogeneratedDefaultValue>} */ this.AutogeneratedDefaultValue
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.DefaultObject>} */ this.DefaultObject
|
||||
/** @type {InstanceType<typeof PinEntity.attributes.PersistentGuid>} */ this.PersistentGuid
|
||||
@@ -147,9 +147,9 @@ export default class PinEntity extends IEntity {
|
||||
}
|
||||
|
||||
getType() {
|
||||
const category = this.PinType.PinCategory.valueOf().toLocaleLowerCase()
|
||||
const category = this.PinType.PinCategory?.valueOf().toLocaleLowerCase()
|
||||
if (category === "struct" || category === "class" || category === "object" || category === "type") {
|
||||
return this.PinType.PinSubCategoryObject.path
|
||||
return this.PinType.PinSubCategoryObject?.path
|
||||
}
|
||||
if (this.isEnum()) {
|
||||
return "enum"
|
||||
@@ -181,7 +181,8 @@ export default class PinEntity extends IEntity {
|
||||
}
|
||||
}
|
||||
if (category === "optional") {
|
||||
switch (this.PinType.PinSubCategory.toString()) {
|
||||
const subCategory = this.PinType.PinSubCategory?.valueOf()
|
||||
switch (subCategory) {
|
||||
case "red":
|
||||
return "real"
|
||||
case "rg":
|
||||
@@ -191,7 +192,7 @@ export default class PinEntity extends IEntity {
|
||||
case "rgba":
|
||||
return Configuration.paths.linearColor
|
||||
default:
|
||||
return this.PinType.PinSubCategory
|
||||
return subCategory
|
||||
}
|
||||
}
|
||||
return category
|
||||
|
||||
Reference in New Issue
Block a user