mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Minor fixes
This commit is contained in:
26
dist/ueblueprint.js
vendored
26
dist/ueblueprint.js
vendored
@@ -5251,14 +5251,14 @@ class PinTypeEntity extends IEntity {
|
||||
...super.attributes,
|
||||
PinCategory: StringEntity.withDefault(),
|
||||
PinSubCategory: StringEntity.withDefault(),
|
||||
PinSubCategoryObject: ObjectReferenceEntity.withDefault(),
|
||||
PinSubCategoryMemberReference: FunctionReferenceEntity.withDefault(),
|
||||
PinSubCategoryObject: ObjectReferenceEntity,
|
||||
PinSubCategoryMemberReference: FunctionReferenceEntity,
|
||||
ContainerType: SymbolEntity,
|
||||
bIsReference: BooleanEntity.withDefault(),
|
||||
bIsConst: BooleanEntity.withDefault(),
|
||||
bIsWeakPointer: BooleanEntity.withDefault(),
|
||||
bIsUObjectWrapper: BooleanEntity.withDefault(),
|
||||
bSerializeAsSinglePrecisionFloat: BooleanEntity.withDefault(),
|
||||
bIsReference: BooleanEntity,
|
||||
bIsConst: BooleanEntity,
|
||||
bIsWeakPointer: BooleanEntity,
|
||||
bIsUObjectWrapper: BooleanEntity,
|
||||
bSerializeAsSinglePrecisionFloat: BooleanEntity,
|
||||
}
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
@@ -5617,7 +5617,7 @@ class PinEntity extends IEntity {
|
||||
bDefaultValueIsReadOnly: BooleanEntity.withDefault(),
|
||||
bDefaultValueIsIgnored: BooleanEntity.withDefault(),
|
||||
bAdvancedView: BooleanEntity.withDefault(),
|
||||
bOrphanedPin: BooleanEntity.withDefault(),
|
||||
bOrphanedPin: BooleanEntity,
|
||||
}
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
@@ -5837,7 +5837,7 @@ class PinEntity extends IEntity {
|
||||
}
|
||||
|
||||
getSubCategory() {
|
||||
return this.PinType.PinSubCategoryObject.path
|
||||
return this.PinType.PinSubCategoryObject?.path
|
||||
}
|
||||
|
||||
pinColor() {
|
||||
@@ -6509,7 +6509,7 @@ class ObjectEntity extends IEntity {
|
||||
getClass() {
|
||||
if (!this.#class) {
|
||||
this.#class = (this.Class?.path ? this.Class.path : this.Class?.type)
|
||||
?? this.ExportPath.type
|
||||
?? this.ExportPath?.type
|
||||
?? "";
|
||||
if (this.#class && !this.#class.startsWith("/")) {
|
||||
// Old path names did not start with /Script or /Engine, check tests/resources/LegacyNodes.js
|
||||
@@ -13425,10 +13425,10 @@ function initializeSerializerFactory() {
|
||||
NumberEntity.grammar,
|
||||
Parsernostrum.alt(
|
||||
ObjectReferenceEntity.fullReferenceGrammar,
|
||||
Parsernostrum.regArray(
|
||||
Parsernostrum.regArray(new RegExp(
|
||||
// @ts-expect-error
|
||||
new RegExp(`"(${Grammar.Regex.Path.source})'(${Grammar.symbol.getParser().regexp.source})'"`)
|
||||
).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
||||
`"(${Grammar.Regex.Path.source})'(${Grammar.Regex.Path.source}|${Grammar.symbol.getParser().regexp.source})'"`
|
||||
)).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
||||
),
|
||||
StringEntity.grammar,
|
||||
LocalizedTextEntity.grammar,
|
||||
|
||||
6
dist/ueblueprint.min.js
vendored
6
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -414,7 +414,7 @@ export default class ObjectEntity extends IEntity {
|
||||
getClass() {
|
||||
if (!this.#class) {
|
||||
this.#class = (this.Class?.path ? this.Class.path : this.Class?.type)
|
||||
?? this.ExportPath.type
|
||||
?? this.ExportPath?.type
|
||||
?? ""
|
||||
if (this.#class && !this.#class.startsWith("/")) {
|
||||
// Old path names did not start with /Script or /Engine, check tests/resources/LegacyNodes.js
|
||||
|
||||
@@ -93,7 +93,7 @@ export default class PinEntity extends IEntity {
|
||||
bDefaultValueIsReadOnly: BooleanEntity.withDefault(),
|
||||
bDefaultValueIsIgnored: BooleanEntity.withDefault(),
|
||||
bAdvancedView: BooleanEntity.withDefault(),
|
||||
bOrphanedPin: BooleanEntity.withDefault(),
|
||||
bOrphanedPin: BooleanEntity,
|
||||
}
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
@@ -313,7 +313,7 @@ export default class PinEntity extends IEntity {
|
||||
}
|
||||
|
||||
getSubCategory() {
|
||||
return this.PinType.PinSubCategoryObject.path
|
||||
return this.PinType.PinSubCategoryObject?.path
|
||||
}
|
||||
|
||||
pinColor() {
|
||||
|
||||
@@ -13,14 +13,14 @@ export default class PinTypeEntity extends IEntity {
|
||||
...super.attributes,
|
||||
PinCategory: StringEntity.withDefault(),
|
||||
PinSubCategory: StringEntity.withDefault(),
|
||||
PinSubCategoryObject: ObjectReferenceEntity.withDefault(),
|
||||
PinSubCategoryMemberReference: FunctionReferenceEntity.withDefault(),
|
||||
PinSubCategoryObject: ObjectReferenceEntity,
|
||||
PinSubCategoryMemberReference: FunctionReferenceEntity,
|
||||
ContainerType: SymbolEntity,
|
||||
bIsReference: BooleanEntity.withDefault(),
|
||||
bIsConst: BooleanEntity.withDefault(),
|
||||
bIsWeakPointer: BooleanEntity.withDefault(),
|
||||
bIsUObjectWrapper: BooleanEntity.withDefault(),
|
||||
bSerializeAsSinglePrecisionFloat: BooleanEntity.withDefault(),
|
||||
bIsReference: BooleanEntity,
|
||||
bIsConst: BooleanEntity,
|
||||
bIsWeakPointer: BooleanEntity,
|
||||
bIsUObjectWrapper: BooleanEntity,
|
||||
bSerializeAsSinglePrecisionFloat: BooleanEntity,
|
||||
}
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ export default function initializeSerializerFactory() {
|
||||
NumberEntity.grammar,
|
||||
Parsernostrum.alt(
|
||||
ObjectReferenceEntity.fullReferenceGrammar,
|
||||
Parsernostrum.regArray(
|
||||
Parsernostrum.regArray(new RegExp(
|
||||
// @ts-expect-error
|
||||
new RegExp(`"(${Grammar.Regex.Path.source})'(${Grammar.symbol.getParser().regexp.source})'"`)
|
||||
).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
||||
`"(${Grammar.Regex.Path.source})'(${Grammar.Regex.Path.source}|${Grammar.symbol.getParser().regexp.source})'"`
|
||||
)).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
||||
),
|
||||
StringEntity.grammar,
|
||||
LocalizedTextEntity.grammar,
|
||||
|
||||
@@ -1201,6 +1201,9 @@ test("Unknown", () => {
|
||||
expect(parser.parse(`"/Script/MetasoundEditor.MetasoundEditorGraphVariable'MetasoundEditorGraphVariable_1'"`)).toBeInstanceOf(ObjectReferenceEntity)
|
||||
expect(parser.parse(`"/Script/MetasoundEditor.MetasoundEditorGraphVariable'MetasoundEditorGraphVariable_1'"`).serialize())
|
||||
.toEqual(`"/Script/MetasoundEditor.MetasoundEditorGraphVariable'MetasoundEditorGraphVariable_1'"`)
|
||||
expect(parser.parse(`"/Script/AIModule.BlackboardData'/Game/Enemies/AI/BB_EnemyBase.BB_EnemyBase'"`)).toBeInstanceOf(ObjectReferenceEntity)
|
||||
expect(parser.parse(`"/Script/AIModule.BlackboardData'/Game/Enemies/AI/BB_EnemyBase.BB_EnemyBase'"`).serialize())
|
||||
.toEqual(`"/Script/AIModule.BlackboardData'/Game/Enemies/AI/BB_EnemyBase.BB_EnemyBase'"`)
|
||||
expect(parser.parse("(1,2,3,4,5,6,7,8,9)")).toBeInstanceOf(ArrayEntity)
|
||||
expect(parser.parse("(1,2,3,4,5,6,7,8,9)").serialize()).toEqual("(1,2,3,4,5,6,7,8,9)")
|
||||
expect(parser.parse(`("Hello", "World",)`)).toBeInstanceOf(ArrayEntity)
|
||||
|
||||
Reference in New Issue
Block a user