mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-20 05:24:52 +08:00
Grammar fixed
This commit is contained in:
@@ -39,10 +39,7 @@ export default class Entity {
|
||||
fullKey,
|
||||
target[property],
|
||||
defaultValue,
|
||||
(t, _, v) => {
|
||||
console.log(v)
|
||||
t.push(v)
|
||||
})
|
||||
(t, _, v) => t.push(v))
|
||||
continue
|
||||
}
|
||||
if (defaultValue instanceof TypeInitialization) {
|
||||
|
||||
@@ -3,10 +3,7 @@ import ObjectReferenceEntity from "./ObjectReferenceEntity"
|
||||
|
||||
export default class FunctionReferenceEntity extends Entity {
|
||||
static attributes = {
|
||||
MemberParent: new ObjectReferenceEntity({
|
||||
type: "Class",
|
||||
path: "/Script/Engine.GameplayStatics"
|
||||
}),
|
||||
MemberParent: ObjectReferenceEntity,
|
||||
MemberName: ""
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
import Entity from "./Entity"
|
||||
|
||||
export default class Integer extends Entity {
|
||||
|
||||
static attributes = {
|
||||
value: 0
|
||||
}
|
||||
|
||||
constructor(value) {
|
||||
super()
|
||||
this.value = Math.round(new Number(value).valueOf())
|
||||
if (value?.constructor === String) {
|
||||
value = Number(value)
|
||||
}
|
||||
if (value?.constructor === Number) {
|
||||
value = {
|
||||
value: Math.round(value.valueOf())
|
||||
}
|
||||
}
|
||||
super(value)
|
||||
}
|
||||
|
||||
getAttributes() {
|
||||
return Integer.attributes
|
||||
}
|
||||
}
|
||||
15
js/entity/LocalizedTextEntity.js
Normal file
15
js/entity/LocalizedTextEntity.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import Entity from "./Entity"
|
||||
|
||||
export default class LocalizedTextEntity extends Entity {
|
||||
|
||||
static attributes = {
|
||||
namespace: "",
|
||||
key: "",
|
||||
value: ""
|
||||
}
|
||||
|
||||
getAttributes() {
|
||||
return LocalizedTextEntity.attributes
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import VariableReferenceEntity from "./VariableReferenceEntity"
|
||||
export default class ObjectEntity extends Entity {
|
||||
|
||||
static attributes = {
|
||||
Class: "",
|
||||
Class: ObjectReferenceEntity,
|
||||
Name: "",
|
||||
bIsPureFunc: new TypeInitialization(false, false),
|
||||
VariableReference: new TypeInitialization(new VariableReferenceEntity(), false),
|
||||
|
||||
@@ -3,7 +3,7 @@ import Entity from "./Entity"
|
||||
export default class ObjectReferenceEntity extends Entity {
|
||||
|
||||
static attributes = {
|
||||
type: "None",
|
||||
type: "",
|
||||
path: ""
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ export default class ObjectReferenceEntity extends Entity {
|
||||
}
|
||||
|
||||
toString() {
|
||||
return this.type + (this.path ? `'"${this.path}"'` : "")
|
||||
return (this.type ?? "") + (
|
||||
this.path
|
||||
? this.type ? `'"${this.path}"'` : this.path
|
||||
: ""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,13 @@ import Entity from "./Entity";
|
||||
import Guid from "../Guid";
|
||||
import ObjectReferenceEntity from "./ObjectReferenceEntity";
|
||||
import TypeInitialization from "./TypeInitialization";
|
||||
import LocalizedTextEntity from "./LocalizedTextEntity";
|
||||
|
||||
export default class PinEntity extends Entity {
|
||||
static attributes = {
|
||||
PinId: Guid,
|
||||
PinName: [new TypeInitialization(5, true), "ciao"],
|
||||
PinName: "",
|
||||
PinFriendlyName: new TypeInitialization(new LocalizedTextEntity(), false),
|
||||
PinToolTip: "",
|
||||
Direction: new TypeInitialization("", false),
|
||||
PinType: {
|
||||
|
||||
Reference in New Issue
Block a user