Establish UE 5.8 known-good baseline with Batch 1 archaeology docs.

Initialize Git with LFS for binary assets and add standard Unreal Engine .gitignore/.gitattributes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-16 19:40:19 -07:00
co-authored by Cursor
commit ff5640a020
17216 changed files with 62362 additions and 0 deletions
@@ -0,0 +1,43 @@
// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved.
#include "UI/HUD/RIRHUD.h"
#include "UI/Widgets/RIRUserWidget.h"
#include "UI/WidgetController/OverlayWidgetController.h"
UOverlayWidgetController* ARIRHUD::GetOverlayWidgetController(const FWidgetControllerParams& WCParams)
{
if (OverlayWidgetController == nullptr)
{
OverlayWidgetController = NewObject<UOverlayWidgetController>(this, OverlayWidgetControllerClass);
OverlayWidgetController->SetWidgetControllerParams(WCParams);
OverlayWidgetController->BindCallbacksToDependencies();
return OverlayWidgetController;
}
return OverlayWidgetController;
}
void ARIRHUD::InitOverlay(APlayerController* PC, APlayerState* PS, UAbilitySystemComponent* ASC, UAttributeSet* AS)
{
// Ensure that both the widget and its controller class are properly assigned in the editor or constructor
checkf(OverlayWidgetClass, TEXT("Overlay Widget Class uninitialized, please fill out WBP_PlayerHUD"));
checkf(OverlayWidgetControllerClass, TEXT("Overlay Widget Controller Class uninitialized, please fill out WBP_PlayerHUD"));
// Create the UMG overlay widget from the specified class
UUserWidget* Widget = CreateWidget<UUserWidget>(GetWorld(), OverlayWidgetClass);
OverlayWidget = Cast<URIRUserWidget>(Widget);
// Package the controller parameters (used to bind player data to the UI)
const FWidgetControllerParams WidgetControllerParams(PC, PS, ASC, AS);
UOverlayWidgetController* WidgetController = GetOverlayWidgetController(WidgetControllerParams);
// Assign the controller to the widget so it can bind and respond to gameplay data
OverlayWidget->SetWidgetController(WidgetController);
// Broadcast Initial Attribute values
WidgetController->BroadcastInitialInitialValues();
// Add the widget to the viewport to make it visible to the player
Widget->AddToViewport();
}
@@ -0,0 +1,69 @@
// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved.
#include "UI/WidgetController/OverlayWidgetController.h"
#include "Attributes/RIRAttributeSet.h"
void UOverlayWidgetController::BroadcastInitialInitialValues()
{
const URIRAttributeSet* RIRAttributeSet = CastChecked<URIRAttributeSet>(AttributeSet);
OnHealthChanged.Broadcast(RIRAttributeSet->GetHealth());
OnMaxHealthChanged.Broadcast(RIRAttributeSet->GetMaxHealth());
OnManaChanged.Broadcast(RIRAttributeSet->GetMana());
OnMaxManaChanged.Broadcast(RIRAttributeSet->GetMaxMana());
OnStaminaChanged.Broadcast(RIRAttributeSet->GetStamina());
OnMaxStaminaChanged.Broadcast(RIRAttributeSet->GetMaxStamina());
}
void UOverlayWidgetController::BindCallbacksToDependencies()
{
const URIRAttributeSet* RIRAttributeSet = CastChecked<URIRAttributeSet>(AttributeSet);
// Register a delegate to be notified when the Health attribute changes.
AbilitySystemComponent->GetGameplayAttributeValueChangeDelegate(RIRAttributeSet->GetHealthAttribute()).AddUObject(this, &UOverlayWidgetController::HealthChanged);
// Register a delegate for MaxHealth changes.
AbilitySystemComponent->GetGameplayAttributeValueChangeDelegate(RIRAttributeSet->GetMaxHealthAttribute()).AddUObject(this, &UOverlayWidgetController::MaxHealthChanged);
// Register a delegate for Mana changes.
AbilitySystemComponent->GetGameplayAttributeValueChangeDelegate(RIRAttributeSet->GetManaAttribute()).AddUObject(this, &UOverlayWidgetController::ManaChanged);
// Register a delegate for MaxMana changes.
AbilitySystemComponent->GetGameplayAttributeValueChangeDelegate(RIRAttributeSet->GetMaxManaAttribute()).AddUObject(this, &UOverlayWidgetController::MaxManaChanged);
// Register a delegate for Stamina changes.
AbilitySystemComponent->GetGameplayAttributeValueChangeDelegate(RIRAttributeSet->GetStaminaAttribute()).AddUObject(this, &UOverlayWidgetController::StaminaChanged);
// Register a delegate for MaxStamina changes.
AbilitySystemComponent->GetGameplayAttributeValueChangeDelegate(RIRAttributeSet->GetMaxStaminaAttribute()).AddUObject(this, &UOverlayWidgetController::MaxStaminaChanged);
}
void UOverlayWidgetController::HealthChanged(const FOnAttributeChangeData& Data) const
{
// Broadcasts the new Health value to the UI layer.
OnHealthChanged.Broadcast(Data.NewValue);
}
void UOverlayWidgetController::MaxHealthChanged(const FOnAttributeChangeData& Data) const
{
// Broadcasts the new MaxHealth value to the UI layer.
OnMaxHealthChanged.Broadcast(Data.NewValue);
}
void UOverlayWidgetController::ManaChanged(const FOnAttributeChangeData& Data) const
{
// Broadcasts the new Mana value to the UI layer.
OnManaChanged.Broadcast(Data.NewValue);
}
void UOverlayWidgetController::MaxManaChanged(const FOnAttributeChangeData& Data) const
{
// Broadcasts the new MaxMana value to the UI layer.
OnMaxManaChanged.Broadcast(Data.NewValue);
}
void UOverlayWidgetController::StaminaChanged(const FOnAttributeChangeData& Data) const
{
// Broadcasts the new Stamina value to the UI layer.
OnStaminaChanged.Broadcast(Data.NewValue);
}
void UOverlayWidgetController::MaxStaminaChanged(const FOnAttributeChangeData& Data) const
{
// Broadcasts the new MaxStamina value to the UI layer.
OnMaxStaminaChanged.Broadcast(Data.NewValue);
}
@@ -0,0 +1,22 @@
// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved.
#include "UI/WidgetController/RIRWidgetController.h"
void URIRWidgetController::SetWidgetControllerParams(const FWidgetControllerParams& WCParams)
{
PlayerController = WCParams.PlayerController;
PlayerState = WCParams.PlayerState;
AbilitySystemComponent = WCParams.AbilitySystemComponent;
AttributeSet = WCParams.AttributeSet;
}
void URIRWidgetController::BroadcastInitialInitialValues()
{
}
void URIRWidgetController::BindCallbacksToDependencies()
{
}
@@ -0,0 +1,10 @@
// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved.
#include "UI/Widgets/RIRUserWidget.h"
void URIRUserWidget::SetWidgetController(UObject* InWidgetController)
{
WidgetController = InWidgetController;
WidgetControllerSet();
}