Files
TheracUE/Plugins/hstherac25/Source/hstherac25/Public/TheracAdapterComponent.h

69 lines
1.6 KiB
C
Raw Normal View History

2025-05-10 21:31:54 +01:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Components/ActorComponent.h"
2025-05-13 19:02:19 +01:00
#include "CoreMinimal.h"
2025-05-12 21:39:32 +01:00
#include <HsFFI.h>
2025-05-13 19:02:19 +01:00
#include <Therac.h>
#include <Internationalization/Text.h>
2025-05-12 21:39:32 +01:00
#include "TheracAdapterComponent.generated.h"
2025-05-13 19:02:19 +01:00
UCLASS(
BlueprintType,
ClassGroup = (Custom),
meta = (BlueprintSpawnableComponent)
)
class HSTHERAC25_API UTheracAdapterComponent : public UActorComponent {
2025-05-10 21:31:54 +01:00
2025-05-13 19:02:19 +01:00
GENERATED_BODY()
2025-05-10 21:31:54 +01:00
2025-05-13 19:02:19 +01:00
HsStablePtr wrappedComms;
2025-05-10 21:31:54 +01:00
2025-05-13 19:02:19 +01:00
TMap<FText *, StateInfoRequest> compMap;
2025-05-12 21:39:32 +01:00
2025-05-13 19:02:19 +01:00
public:
// Sets default values for this component's properties
UTheracAdapterComponent();
2025-05-10 21:31:54 +01:00
2025-05-13 19:02:19 +01:00
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FText TreatmentOutcome;
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FText ActiveSubsystem;
2025-05-10 21:31:54 +01:00
2025-05-13 19:02:19 +01:00
// TPhase
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FText TreatmentState;
2025-05-10 21:31:54 +01:00
2025-05-13 19:02:19 +01:00
// TreatmentOutcome
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FText Reason;
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FText BeamMode;
UPROPERTY(BlueprintReadOnly, VisibleAnywhere)
FText BeamEnergy;
2025-05-13 21:22:31 +01:00
void UpdateSimulator(
ExtCallType ect,
HsStablePtr wrapped_comms = nullptr,
BeamType beam_type = BeamTypeUndefined,
CollimatorPosition collimator_position = CollimatorPositionUndefined,
HsInt beam_energy = 25000
);
2025-05-13 19:02:19 +01:00
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(
float DeltaTime,
ELevelTick TickType,
FActorComponentTickFunction * ThisTickFunction
) override;
2025-05-10 21:31:54 +01:00
};