Skip to content

SeinARTS Construction Library

Class · USeinConstructionBPFL : UBlueprintFunctionLibrary

#include "Lib/SeinConstructionBPFL.h"

deterministic: safe in simulation code

Nodes that run construction sites: queue, start, advance, pause and complete a job, set its stage, spawn a site, and read its state and work. Call the changing nodes from abilities and effects.

Read work measurement stored on the current construction job. Valid is false before a job has been queued.

static FSeinConstructionWorkStatus SeinGetConstructionWorkStatus(const UObject* WorldContextObject, FSeinEntityHandle Entity);

Read the current state, stage and job. Invalid entities or missing settings return Valid=false.

static FSeinConstructionStatus SeinGetConstructionStatus(const UObject* WorldContextObject, FSeinEntityHandle Entity);

True for Queued, Building and Paused. False for Complete or invalid entities.

static bool SeinIsUnderConstruction(const UObject* WorldContextObject, FSeinEntityHandle Entity);

Work fraction for a widget. Missing construction or an unqueued entity returns zero; completion does not change work.

static FFixedPoint SeinGetConstructionPercent(const UObject* WorldContextObject, FSeinEntityHandle Entity);

Prepare this existing entity as an unfinished site. Returns its job without resetting an already unfinished site. Captures the completion effect, clears its stage, resets contributed work, and owns one UnderConstruction tag grant. Does not spawn an entity, assign workers, pay resources or start work. Call from an authorized simulation callback.

static ESeinConstructionResult SeinQueueConstruction(const UObject* WorldContextObject, FSeinEntityHandle Entity, FSeinConstructionHandle& Construction);

Start a queued job or resume a paused one. Work already meeting its requirement returns Work Complete; lifecycle remains Building. Repeated calls never reset progress. An old job handle cannot start a newer job.

static ESeinConstructionResult SeinStartConstruction(const UObject* WorldContextObject, FSeinConstructionHandle Construction);

Add positive work in units chosen by the build ability while Building. Uses the work fields on Sein Construction. Clamps without overflow. Work Complete reports the threshold; it never changes lifecycle or applies completion effects.

static ESeinConstructionResult SeinAdvanceConstruction(const UObject* WorldContextObject, FSeinConstructionHandle Construction, FFixedPoint Amount);

Pause a Building job, preserving its progress and stage. Start Construction resumes it.

static ESeinConstructionResult SeinPauseConstruction(const UObject* WorldContextObject, FSeinConstructionHandle Construction);

Completes any unfinished job: the entity stops being under construction and its Completion Effect, captured when the job was queued, is applied once. The ability decides whether work, HP, materials or other requirements are met; this does not change the work fields.

static ESeinConstructionResult SeinCompleteConstruction(const UObject* WorldContextObject, FSeinConstructionHandle Construction);

Set a designer milestone on an unfinished job. Empty clears it; equal tags produce no change event. The stage is construction data, not an entity tag grant. It persists through pause and completion.

static ESeinConstructionResult SeinSetConstructionStage(const UObject* WorldContextObject, FSeinConstructionHandle Construction, FGameplayTag Stage);

Spawn an entity as a construction site before its passive abilities and spawn observers run. Requires construction settings on Actor Class. Initial State overrides Start Queued for Construction. Resource payment and worker orders remain in the calling ability. Invalid spawn returns an invalid Entity.

static FSeinEntityHandle SeinSpawnConstructionSite(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, const FFixedTransform& SpawnTransform, FSeinPlayerID OwnerPlayerID, ESeinConstructionInitialState InitialState, FSeinConstructionHandle& Construction);
C++ members (1)
  • static void InitializeAtSpawn(USeinWorldSubsystem& World, FSeinEntityHandle Entity, const ESeinConstructionInitialState* Override = nullptr); Spawn-only initialization after tag seeding and before ability activation. Never used for snapshot restoration.