mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-13 03:37:31 +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,
|
...super.attributes,
|
||||||
PinCategory: StringEntity.withDefault(),
|
PinCategory: StringEntity.withDefault(),
|
||||||
PinSubCategory: StringEntity.withDefault(),
|
PinSubCategory: StringEntity.withDefault(),
|
||||||
PinSubCategoryObject: ObjectReferenceEntity.withDefault(),
|
PinSubCategoryObject: ObjectReferenceEntity,
|
||||||
PinSubCategoryMemberReference: FunctionReferenceEntity.withDefault(),
|
PinSubCategoryMemberReference: FunctionReferenceEntity,
|
||||||
ContainerType: SymbolEntity,
|
ContainerType: SymbolEntity,
|
||||||
bIsReference: BooleanEntity.withDefault(),
|
bIsReference: BooleanEntity,
|
||||||
bIsConst: BooleanEntity.withDefault(),
|
bIsConst: BooleanEntity,
|
||||||
bIsWeakPointer: BooleanEntity.withDefault(),
|
bIsWeakPointer: BooleanEntity,
|
||||||
bIsUObjectWrapper: BooleanEntity.withDefault(),
|
bIsUObjectWrapper: BooleanEntity,
|
||||||
bSerializeAsSinglePrecisionFloat: BooleanEntity.withDefault(),
|
bSerializeAsSinglePrecisionFloat: BooleanEntity,
|
||||||
}
|
}
|
||||||
static grammar = this.createGrammar()
|
static grammar = this.createGrammar()
|
||||||
|
|
||||||
@@ -5617,7 +5617,7 @@ class PinEntity extends IEntity {
|
|||||||
bDefaultValueIsReadOnly: BooleanEntity.withDefault(),
|
bDefaultValueIsReadOnly: BooleanEntity.withDefault(),
|
||||||
bDefaultValueIsIgnored: BooleanEntity.withDefault(),
|
bDefaultValueIsIgnored: BooleanEntity.withDefault(),
|
||||||
bAdvancedView: BooleanEntity.withDefault(),
|
bAdvancedView: BooleanEntity.withDefault(),
|
||||||
bOrphanedPin: BooleanEntity.withDefault(),
|
bOrphanedPin: BooleanEntity,
|
||||||
}
|
}
|
||||||
static grammar = this.createGrammar()
|
static grammar = this.createGrammar()
|
||||||
|
|
||||||
@@ -5837,7 +5837,7 @@ class PinEntity extends IEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getSubCategory() {
|
getSubCategory() {
|
||||||
return this.PinType.PinSubCategoryObject.path
|
return this.PinType.PinSubCategoryObject?.path
|
||||||
}
|
}
|
||||||
|
|
||||||
pinColor() {
|
pinColor() {
|
||||||
@@ -6509,7 +6509,7 @@ class ObjectEntity extends IEntity {
|
|||||||
getClass() {
|
getClass() {
|
||||||
if (!this.#class) {
|
if (!this.#class) {
|
||||||
this.#class = (this.Class?.path ? this.Class.path : this.Class?.type)
|
this.#class = (this.Class?.path ? this.Class.path : this.Class?.type)
|
||||||
?? this.ExportPath.type
|
?? this.ExportPath?.type
|
||||||
?? "";
|
?? "";
|
||||||
if (this.#class && !this.#class.startsWith("/")) {
|
if (this.#class && !this.#class.startsWith("/")) {
|
||||||
// Old path names did not start with /Script or /Engine, check tests/resources/LegacyNodes.js
|
// Old path names did not start with /Script or /Engine, check tests/resources/LegacyNodes.js
|
||||||
@@ -13425,10 +13425,10 @@ function initializeSerializerFactory() {
|
|||||||
NumberEntity.grammar,
|
NumberEntity.grammar,
|
||||||
Parsernostrum.alt(
|
Parsernostrum.alt(
|
||||||
ObjectReferenceEntity.fullReferenceGrammar,
|
ObjectReferenceEntity.fullReferenceGrammar,
|
||||||
Parsernostrum.regArray(
|
Parsernostrum.regArray(new RegExp(
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
new RegExp(`"(${Grammar.Regex.Path.source})'(${Grammar.symbol.getParser().regexp.source})'"`)
|
`"(${Grammar.Regex.Path.source})'(${Grammar.Regex.Path.source}|${Grammar.symbol.getParser().regexp.source})'"`
|
||||||
).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
)).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
||||||
),
|
),
|
||||||
StringEntity.grammar,
|
StringEntity.grammar,
|
||||||
LocalizedTextEntity.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() {
|
getClass() {
|
||||||
if (!this.#class) {
|
if (!this.#class) {
|
||||||
this.#class = (this.Class?.path ? this.Class.path : this.Class?.type)
|
this.#class = (this.Class?.path ? this.Class.path : this.Class?.type)
|
||||||
?? this.ExportPath.type
|
?? this.ExportPath?.type
|
||||||
?? ""
|
?? ""
|
||||||
if (this.#class && !this.#class.startsWith("/")) {
|
if (this.#class && !this.#class.startsWith("/")) {
|
||||||
// Old path names did not start with /Script or /Engine, check tests/resources/LegacyNodes.js
|
// 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(),
|
bDefaultValueIsReadOnly: BooleanEntity.withDefault(),
|
||||||
bDefaultValueIsIgnored: BooleanEntity.withDefault(),
|
bDefaultValueIsIgnored: BooleanEntity.withDefault(),
|
||||||
bAdvancedView: BooleanEntity.withDefault(),
|
bAdvancedView: BooleanEntity.withDefault(),
|
||||||
bOrphanedPin: BooleanEntity.withDefault(),
|
bOrphanedPin: BooleanEntity,
|
||||||
}
|
}
|
||||||
static grammar = this.createGrammar()
|
static grammar = this.createGrammar()
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ export default class PinEntity extends IEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getSubCategory() {
|
getSubCategory() {
|
||||||
return this.PinType.PinSubCategoryObject.path
|
return this.PinType.PinSubCategoryObject?.path
|
||||||
}
|
}
|
||||||
|
|
||||||
pinColor() {
|
pinColor() {
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ export default class PinTypeEntity extends IEntity {
|
|||||||
...super.attributes,
|
...super.attributes,
|
||||||
PinCategory: StringEntity.withDefault(),
|
PinCategory: StringEntity.withDefault(),
|
||||||
PinSubCategory: StringEntity.withDefault(),
|
PinSubCategory: StringEntity.withDefault(),
|
||||||
PinSubCategoryObject: ObjectReferenceEntity.withDefault(),
|
PinSubCategoryObject: ObjectReferenceEntity,
|
||||||
PinSubCategoryMemberReference: FunctionReferenceEntity.withDefault(),
|
PinSubCategoryMemberReference: FunctionReferenceEntity,
|
||||||
ContainerType: SymbolEntity,
|
ContainerType: SymbolEntity,
|
||||||
bIsReference: BooleanEntity.withDefault(),
|
bIsReference: BooleanEntity,
|
||||||
bIsConst: BooleanEntity.withDefault(),
|
bIsConst: BooleanEntity,
|
||||||
bIsWeakPointer: BooleanEntity.withDefault(),
|
bIsWeakPointer: BooleanEntity,
|
||||||
bIsUObjectWrapper: BooleanEntity.withDefault(),
|
bIsUObjectWrapper: BooleanEntity,
|
||||||
bSerializeAsSinglePrecisionFloat: BooleanEntity.withDefault(),
|
bSerializeAsSinglePrecisionFloat: BooleanEntity,
|
||||||
}
|
}
|
||||||
static grammar = this.createGrammar()
|
static grammar = this.createGrammar()
|
||||||
|
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ export default function initializeSerializerFactory() {
|
|||||||
NumberEntity.grammar,
|
NumberEntity.grammar,
|
||||||
Parsernostrum.alt(
|
Parsernostrum.alt(
|
||||||
ObjectReferenceEntity.fullReferenceGrammar,
|
ObjectReferenceEntity.fullReferenceGrammar,
|
||||||
Parsernostrum.regArray(
|
Parsernostrum.regArray(new RegExp(
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
new RegExp(`"(${Grammar.Regex.Path.source})'(${Grammar.symbol.getParser().regexp.source})'"`)
|
`"(${Grammar.Regex.Path.source})'(${Grammar.Regex.Path.source}|${Grammar.symbol.getParser().regexp.source})'"`
|
||||||
).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
)).map(([full, type, path]) => new ObjectReferenceEntity(type, path, full))
|
||||||
),
|
),
|
||||||
StringEntity.grammar,
|
StringEntity.grammar,
|
||||||
LocalizedTextEntity.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'"`)).toBeInstanceOf(ObjectReferenceEntity)
|
||||||
expect(parser.parse(`"/Script/MetasoundEditor.MetasoundEditorGraphVariable'MetasoundEditorGraphVariable_1'"`).serialize())
|
expect(parser.parse(`"/Script/MetasoundEditor.MetasoundEditorGraphVariable'MetasoundEditorGraphVariable_1'"`).serialize())
|
||||||
.toEqual(`"/Script/MetasoundEditor.MetasoundEditorGraphVariable'MetasoundEditorGraphVariable_1'"`)
|
.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)")).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("(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)
|
expect(parser.parse(`("Hello", "World",)`)).toBeInstanceOf(ArrayEntity)
|
||||||
|
|||||||
Reference in New Issue
Block a user