Parsing and error logging complete
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameLiftClpTypes.h"
|
||||
#include "ShooterGameModeBase.h"
|
||||
#include "ShooterGameMode.generated.h"
|
||||
|
||||
@@ -13,24 +14,14 @@ struct FServerParameters;
|
||||
|
||||
struct FGameLiftConfig
|
||||
{
|
||||
bool bDebugMode = false;
|
||||
bool bIsAnywhereFleet = false;
|
||||
bool bIsCriticalError = false;
|
||||
bool bAllOptionsFound = false;
|
||||
|
||||
int32 ServerPort;
|
||||
int32 ServerPort = 7777;
|
||||
|
||||
FString AuthToken;
|
||||
FString FleetId;
|
||||
FString HostId;
|
||||
FString WebSocketUrl;
|
||||
FString ServerRegion;
|
||||
};
|
||||
|
||||
enum ETokenStatus : uint8
|
||||
{
|
||||
Found,
|
||||
NotFoundRequired,
|
||||
NotFoundNotRequired
|
||||
cmdlineparser::details::FParseResult AuthTokenResult;
|
||||
cmdlineparser::details::FParseResult FleetIdResult;
|
||||
cmdlineparser::details::FParseResult HostIdResult;
|
||||
cmdlineparser::details::FParseResult WebSocketUrlResult;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -55,6 +46,6 @@ private:
|
||||
static FString GetSHA256Hash(const FString& CommandLineString);
|
||||
void InitGameLift();
|
||||
|
||||
bool GetAnywhereFleetParameters(FString CommandLineString);
|
||||
bool GetAnywhereFleetParameters(const FString& CommandLineString);
|
||||
void LogAnywhereFleetParameters();
|
||||
};
|
||||
|
||||
@@ -19,5 +19,6 @@ namespace cmdlineparser::details
|
||||
|
||||
FString EnsureEndsWith(const FString& Token, const TCHAR* Suffix);
|
||||
int32 GetConfiguredOrDefaultPort(const FString& CommandLine, const FString& Token);
|
||||
bool DoesRegExMatch(const FString& Text, const FString& Pattern);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace cmdlineparser::details
|
||||
|
||||
extern const TArray<FString>& ERROR_MESSAGES;
|
||||
extern const TArray<FString>& CLI_TOKENS;
|
||||
extern const TArray<FString>& REGEX_PATTERNS;
|
||||
|
||||
struct FParseResult
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user