mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-24 10:46:03 +10:00
update to node site
This commit is contained in:
29
website/scripts/nodes/ChatConnectNode.js
Normal file
29
website/scripts/nodes/ChatConnectNode.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @file ChatConnectNode.js
|
||||
* @UCLASS(BlueprintType, Blueprintable)
|
||||
*/
|
||||
|
||||
import { NodeBase } from './NodeBase.js';
|
||||
import { NodeRegistry } from './NodeRegistry.js';
|
||||
|
||||
/**
|
||||
* @UCLASS(BlueprintType)
|
||||
* Calls connect() on a ChatNode instance received via the target input.
|
||||
*/
|
||||
export class ChatConnectNode extends NodeBase {
|
||||
/** @UCLASS(BlueprintType) */
|
||||
static NodeType = "chat_connect";
|
||||
|
||||
/**
|
||||
* @UFUNCTION(BlueprintCallable)
|
||||
* @param {import('./NodeExecutionContext.js').NodeExecutionContext} ctx
|
||||
*/
|
||||
async BlueprintCallable_Execute(ctx) {
|
||||
const chatInstance = ctx.BlueprintPure_ResolveInput("target");
|
||||
if (chatInstance && typeof chatInstance.connect === "function") {
|
||||
chatInstance.connect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NodeRegistry.UCLASS_Register(ChatConnectNode);
|
||||
Reference in New Issue
Block a user