AAndromedaSalvageItem¶
Kind: class
Source: Source/Andromeda/Salvage/AndromedaSalvageItem.h
Base classes: AActor, IAndromedaFocusCandidateProviderInterface, IAndromedaPromptableInterface, IAndromedaCarryableInterface, IAndromedaScannableInterface, IAndromedaPackageableInterface
Details¶
World actor that bridges salvage item data into carry, scanning, packaging, and prompt capabilities.
Public Properties¶
| Member | Type | Summary |
|---|---|---|
MeshComponent |
TObjectPtr< UStaticMeshComponent > |
Root static mesh, collision, physics, placement preview mesh/materials, and placement bounds source. |
CapabilityEventsComponent |
TObjectPtr< UAndromedaCapabilityEventsComponent > |
Shared prompt and carry-availability event source for this salvage actor. |
ItemData |
TObjectPtr< UAndromedaSalvageItemData > |
Authored salvage metadata plus scan and package rules. |
Protected Properties¶
| Member | Type | Summary |
|---|---|---|
bPackageAssigned |
bool |
Runtime package assignment state set by the packager workflow. |
ScanInstanceId |
FGuid |
Stable per-instance id used by station databanks instead of actor pointers. |
bCarryEnabled |
bool |
Runtime carry availability flag; carrying disables it to suppress duplicate pickup capabilities. |
Public Methods¶
| Member | Type | Summary |
|---|---|---|
AAndromedaSalvageItem |
function |
Creates mesh and capability event components. |
IsPackageAssigned |
bool |
Returns packaging completion state. |
GetScanInstanceId |
FGuid |
Returns this actor instance's stable scan identity. |
SetCarryEnabled |
void |
Toggles carry availability and notifies capability observers when it changes. |
GetFocusCandidate_Implementation |
UObject * |
Returns this actor as the focus object only for mesh trace hits. |
CanShowPrompt_Implementation |
bool |
Shows carry prompts only when entering carried state is currently possible. |
GetPromptText_Implementation |
FText |
Returns named or fallback carry prompt text. |
GetPromptEvents_Implementation |
UAndromedaCapabilityEventsComponent * |
Returns the shared capability event component for prompt refresh. |
CanBeCarried_Implementation |
bool |
Requires item data and enabled carry state. |
SetCarriedPhysicalState_Implementation |
void |
Disables physics/collision and attaches to the carry parent using the supplied relative transform. |
SetReleasedPhysicalState_Implementation |
void |
Detaches, moves, restores collision, and optionally simulates physics after release. |
GetPlacementPreviewMesh_Implementation |
UStaticMesh * |
Returns the mesh used by the placement ghost. |
GetPlacementPreviewMaterial_Implementation |
UMaterialInterface * |
Returns the source material used for placement ghost fallback. |
GetPlacementBoundsExtent_Implementation |
FVector |
Returns scaled half extents for placement overlap tests. |
GetPlacementCollisionObjectType |
TOptional< ECollisionChannel > |
Returns the mesh collision object type, or unset when no mesh exists. |
GetPlacementIgnoredActor_Implementation |
AActor * |
Returns this actor for placement trace and overlap ignoring. |
GetCurrentPlacementTransform_Implementation |
FTransform |
Returns the actor transform as placement preview baseline. |
GetScannableId_Implementation |
FGuid |
Returns the stable scan instance id. |
BuildScannableScanResult_Implementation |
FAndromedaScanResult |
Builds scan output from ItemData, or an invalid result when data is missing. |
HasAssignedPackage_Implementation |
bool |
Returns runtime package assignment state. |
AssignRequiredPackageForObject_Implementation |
bool |
Marks package assignment complete when item data exists. |
Protected Methods¶
| Member | Type | Summary |
|---|---|---|
PostInitializeComponents |
void |
Generates ScanInstanceId when it is not already valid. |
Members¶
MeshComponent¶
Root static mesh, collision, physics, placement preview mesh/materials, and placement bounds source.
CapabilityEventsComponent¶
Shared prompt and carry-availability event source for this salvage actor.
ItemData¶
Authored salvage metadata plus scan and package rules.
bPackageAssigned¶
Runtime package assignment state set by the packager workflow.
ScanInstanceId¶
Stable per-instance id used by station databanks instead of actor pointers.
bCarryEnabled¶
Runtime carry availability flag; carrying disables it to suppress duplicate pickup capabilities.
AAndromedaSalvageItem¶
Creates mesh and capability event components.
IsPackageAssigned¶
Returns packaging completion state.
Returns:
True after the packager workflow assigns the required package.
GetScanInstanceId¶
Returns this actor instance's stable scan identity.
Returns:
GUID used by station databanks to key scan records.
SetCarryEnabled¶
Toggles carry availability and notifies capability observers when it changes.
Parameters:
| Name | Type | Description |
|---|---|---|
bEnabled |
bool |
New carry availability flag. |
GetFocusCandidate_Implementation¶
UObject * AAndromedaSalvageItem::GetFocusCandidate_Implementation(APawn *ViewingPawn, const FHitResult &Hit) const override
Returns this actor as the focus object only for mesh trace hits.
Parameters:
| Name | Type | Description |
|---|---|---|
ViewingPawn |
APawn * |
Pawn whose camera trace produced Hit. |
Hit |
const FHitResult & |
Trace result to inspect. |
Returns:
This actor for mesh hits, otherwise nullptr.
CanShowPrompt_Implementation¶
Shows carry prompts only when entering carried state is currently possible.
If the viewing pawn provides carry state, the prompt is shown only when that carry component can pick up this item.
Parameters:
| Name | Type | Description |
|---|---|---|
ViewingPawn |
APawn * |
Pawn that would see the prompt. |
Returns:
True when carry prompt text should be shown.
GetPromptText_Implementation¶
Returns named or fallback carry prompt text.
Parameters:
| Name | Type | Description |
|---|---|---|
ViewingPawn |
APawn * |
Pawn that would see the prompt. |
Returns:
Carry prompt containing item name when available, otherwise fallback prompt text.
GetPromptEvents_Implementation¶
UAndromedaCapabilityEventsComponent * AAndromedaSalvageItem::GetPromptEvents_Implementation() const override
Returns the shared capability event component for prompt refresh.
Returns:
CapabilityEventsComponent.
CanBeCarried_Implementation¶
Requires item data and enabled carry state.
Parameters:
| Name | Type | Description |
|---|---|---|
CarryingPawn |
APawn * |
Pawn requesting carried state. |
Returns:
True when this item can be carried.
SetCarriedPhysicalState_Implementation¶
void AAndromedaSalvageItem::SetCarriedPhysicalState_Implementation(USceneComponent *HoldParent, const FVector &RelativeLocation, const FRotator &RelativeRotation) override
Disables physics/collision and attaches to the carry parent using the supplied relative transform.
Parameters:
| Name | Type | Description |
|---|---|---|
HoldParent |
USceneComponent * |
Component that should own the carried attachment. |
RelativeLocation |
const FVector & |
Location offset relative to HoldParent. |
RelativeRotation |
const FRotator & |
Rotation offset relative to HoldParent. |
SetReleasedPhysicalState_Implementation¶
void AAndromedaSalvageItem::SetReleasedPhysicalState_Implementation(const FTransform &TargetTransform, bool bSimulatePhysics) override
Detaches, moves, restores collision, and optionally simulates physics after release.
The actor scale is preserved while the actor is moved to TargetTransform.
Parameters:
| Name | Type | Description |
|---|---|---|
TargetTransform |
const FTransform & |
World transform where the actor should be released. |
bSimulatePhysics |
bool |
Whether the mesh should simulate physics after release. |
GetPlacementPreviewMesh_Implementation¶
Returns the mesh used by the placement ghost.
Returns:
Static mesh from MeshComponent, or nullptr when unavailable.
GetPlacementPreviewMaterial_Implementation¶
UMaterialInterface * AAndromedaSalvageItem::GetPlacementPreviewMaterial_Implementation(int32 MaterialIndex) const override
Returns the source material used for placement ghost fallback.
Parameters:
| Name | Type | Description |
|---|---|---|
MaterialIndex |
int32 |
Mesh material slot index. |
Returns:
Material at MaterialIndex, or nullptr when unavailable.
GetPlacementBoundsExtent_Implementation¶
Returns scaled half extents for placement overlap tests.
Uses static mesh bounds multiplied by component scale when a static mesh exists, then falls back to calculated component bounds.
Returns:
Half extents for placement overlap queries.
GetPlacementCollisionObjectType¶
TOptional< ECollisionChannel > AAndromedaSalvageItem::GetPlacementCollisionObjectType() const override
Returns the mesh collision object type, or unset when no mesh exists.
Returns:
Mesh collision channel when available.
GetPlacementIgnoredActor_Implementation¶
Returns this actor for placement trace and overlap ignoring.
Returns:
This salvage actor.
GetCurrentPlacementTransform_Implementation¶
Returns the actor transform as placement preview baseline.
Returns:
Current actor transform.
GetScannableId_Implementation¶
Returns the stable scan instance id.
Returns:
ScanInstanceId.
BuildScannableScanResult_Implementation¶
FAndromedaScanResult AAndromedaSalvageItem::BuildScannableScanResult_Implementation() const override
Builds scan output from ItemData, or an invalid result when data is missing.
A valid result copies item name, manifest claim, legal requirement, scan profile, and package requirement into a standalone scan payload.
Returns:
Scan result ready for scanner UI and station databank storage.
HasAssignedPackage_Implementation¶
Returns runtime package assignment state.
Returns:
bPackageAssigned.
AssignRequiredPackageForObject_Implementation¶
Marks package assignment complete when item data exists.
Returns:
True when package state was assigned; false when ItemData is missing.
PostInitializeComponents¶
Generates ScanInstanceId when it is not already valid.