Network total reforge. Team-List and Race-Data handled

This commit is contained in:
2025-06-29 19:04:36 +02:00
parent 3a45d4c3b7
commit 81bf37639b
92 changed files with 3736 additions and 4202 deletions

View File

@ -0,0 +1,26 @@
using UnrealBuildTool;
public class DTFluxUtilities : ModuleRules
{
public DTFluxUtilities(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"SlateCore"
}
);
}
}

View File

@ -0,0 +1,53 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DTFluxDatesUtilities.h"
#include "DTFluxUtilitiesModule.h"
DTFluxDatesUtilities::DTFluxDatesUtilities()
{
}
DTFluxDatesUtilities::~DTFluxDatesUtilities()
{
}
bool DTFluxDatesUtilities::CompileDateAndTime(const FString& Time, const FString& Date, FDateTime& OutDateTime)
{
if(Time.Len() < 8 && Date.Len() < 10)
{
TArray<FString> ExplodedTime;
Time.ParseIntoArray(ExplodedTime, TEXT(":"));
if(ExplodedTime.Num() != 3 && !ExplodedTime[0].IsNumeric() && !ExplodedTime[1].IsNumeric() & !ExplodedTime[2].IsNumeric())
{
UE_LOG(logDTFluxUtilities, Error, TEXT("Bad Time Format [%s]. Unable to parse"), *Time);
return false;
}
TArray<FString> ExplodedDate;
Date.ParseIntoArray(ExplodedDate, TEXT("-"));
if(ExplodedDate.Num() != 3 && !ExplodedDate[0].IsNumeric() && !ExplodedDate[1].IsNumeric() && !ExplodedDate[2].IsNumeric() )
{
UE_LOG(logDTFluxUtilities, Error, TEXT("Bad Date Format [%s]. Unable to parse"), *Date);
return false;
}
int32 Hours = FCString::Atoi(*ExplodedTime[0]);
int32 Minutes = FCString::Atoi(*ExplodedTime[1]);
int32 Seconds = FCString::Atoi(*ExplodedTime[2]);
int32 Day = FCString::Atoi(*ExplodedDate[2]);
int32 Month = FCString::Atoi(*ExplodedDate[1]);
int32 Year = FCString::Atoi(*ExplodedDate[0]);
if(FDateTime::Validate(Year, Month, Day, Hours, Minutes, Seconds, 0))
{
OutDateTime = FDateTime(Year, Month, Day, Hours, Minutes, Seconds);
return true;
}
}
return false;
}
bool DTFluxDatesUtilities::CompileDateAndTime(const FDateTime& Time, const FDateTime& Date, FDateTime& OutDateTime)
{
return false;
}

View File

@ -0,0 +1,19 @@
#include "DTFluxUtilitiesModule.h"
#define LOCTEXT_NAMESPACE "FDTFluxUtilitiesModule"
DTFLUXUTILITIES_API DEFINE_LOG_CATEGORY(logDTFluxUtilities)
void FDTFluxUtilitiesModule::StartupModule()
{
}
void FDTFluxUtilitiesModule::ShutdownModule()
{
}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FDTFluxUtilitiesModule, DTFluxUtilities)

View File

@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
/**
*
*/
class DTFLUXUTILITIES_API DTFluxDatesUtilities
{
public:
DTFluxDatesUtilities();
~DTFluxDatesUtilities();
static bool CompileDateAndTime(const FString& Time, const FString& Date, FDateTime& OutDateTime);
static bool CompileDateAndTime(const FDateTime& Time, const FDateTime& Date, FDateTime& OutDateTime);
};

View File

@ -0,0 +1,13 @@
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
DTFLUXUTILITIES_API DECLARE_LOG_CATEGORY_EXTERN(logDTFluxUtilities, All, All);
class DTFLUXUTILITIES_API FDTFluxUtilitiesModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};