Pin name small adjustment

This commit is contained in:
barsdeveloper
2023-04-09 22:32:23 +02:00
parent f373ec98b0
commit c58c8be0a0
5 changed files with 20 additions and 18 deletions

View File

@@ -253,7 +253,7 @@ const tests = [
`,
color: Configuration.nodeColors.blue,
icon: SVGIcon.spawnActor,
pins: 8,
pins: 7,
pinNames: ["Class", "Spawn Transform", "Collision Handling Override", "Owner", "Return Value"],
delegate: false,
development: false,

17
dist/ueblueprint.js vendored
View File

@@ -1854,6 +1854,7 @@ class PinTypeEntity extends IEntity {
/** @type {Boolean} */ this.bIsWeakPointer;
/** @type {Boolean} */ this.bIsUObjectWrapper;
/** @type {Boolean} */ this.bIsUObjectWrapper;
/** @type {Boolean} */ this.bSerializeAsSinglePrecisionFloat;
}
/** @param {PinTypeEntity} other */
@@ -2122,18 +2123,18 @@ class PinEntity extends IEntity {
}
getDisplayName() {
let matchResult = null;
let result = Utility.formatStringName(this.PinFriendlyName?.toString() ?? this.PinName);
let match;
if (
this.PinToolTip
// Match up until the first \n excluded or last character
&& (matchResult = this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))
&& (match = this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))
) {
return matchResult[1]
if (match[1].toLowerCase() === result.toLowerCase()) {
return match[1]
}
}
if (this.PinFriendlyName) {
return Utility.formatStringName(this.PinFriendlyName.toString())
}
return Utility.formatStringName(this.PinName)
return result
}
/** @param {PinEntity} other */
@@ -2148,7 +2149,7 @@ class PinEntity extends IEntity {
this.PinType.bIsConst = other.PinType.bIsConst;
this.PinType.bIsWeakPointer = other.PinType.bIsWeakPointer;
this.PinType.bIsUObjectWrapper = other.PinType.bIsUObjectWrapper;
this.PinType$bSerializeAsSinglePrecisionFloat = other.PinType$bSerializeAsSinglePrecisionFloat;
this.PinType.bSerializeAsSinglePrecisionFloat = other.PinType.bSerializeAsSinglePrecisionFloat;
}
getDefaultValue(maybeCreate = false) {

File diff suppressed because one or more lines are too long

View File

@@ -171,18 +171,18 @@ export default class PinEntity extends IEntity {
}
getDisplayName() {
let matchResult = null
let result = Utility.formatStringName(this.PinFriendlyName?.toString() ?? this.PinName)
let match
if (
this.PinToolTip
// Match up until the first \n excluded or last character
&& (matchResult = this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))
&& (match = this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))
) {
return matchResult[1]
if (match[1].toLowerCase() === result.toLowerCase()) {
return match[1]
}
}
if (this.PinFriendlyName) {
return Utility.formatStringName(this.PinFriendlyName.toString())
}
return Utility.formatStringName(this.PinName)
return result
}
/** @param {PinEntity} other */
@@ -197,7 +197,7 @@ export default class PinEntity extends IEntity {
this.PinType.bIsConst = other.PinType.bIsConst
this.PinType.bIsWeakPointer = other.PinType.bIsWeakPointer
this.PinType.bIsUObjectWrapper = other.PinType.bIsUObjectWrapper
this.PinType$bSerializeAsSinglePrecisionFloat = other.PinType$bSerializeAsSinglePrecisionFloat
this.PinType.bSerializeAsSinglePrecisionFloat = other.PinType.bSerializeAsSinglePrecisionFloat
}
getDefaultValue(maybeCreate = false) {

View File

@@ -60,6 +60,7 @@ export default class PinTypeEntity extends IEntity {
/** @type {Boolean} */ this.bIsWeakPointer
/** @type {Boolean} */ this.bIsUObjectWrapper
/** @type {Boolean} */ this.bIsUObjectWrapper
/** @type {Boolean} */ this.bSerializeAsSinglePrecisionFloat
}
/** @param {PinTypeEntity} other */