Space Plunder
Loading...
Searching...
No Matches
MenuData.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Data/BaseData.h"
7#include "Engine/DataTable.h"
8#include "UObject/Object.h"
9#include "MenuData.generated.h"
10
11DECLARE_LOG_CATEGORY_EXTERN(LogMenuSystem, Display, All);
12
13// UENUM(BlueprintType)
14// enum class EMultiplayerMode : uint8
15// {
16// Default,
17// Menu,
18// Campaign,
19// TeamDeathMatch, //- Team Death Match
20// SpiesVsMercs, //- Spies Vs Mercs splinter cell type Game Mode
21// FreeForAll, //- No Teams
22// CaptureTheFlag, //- Take flag to enemy Base
23// Domination, //- Score Zones
24// Fiesta, //- Randomised Weapons
25// BattleRoyal, //- No respawns, last standing wins
26// Hardcore, //- Headshots increased, Friendly fire, no shields
27// Assault, //- Carry a bomb into an enemy base, can have 1 life version
28// Infection, //- when died change teams
29// Race, //- A Race
30// HideAndSeek, //-
31// Imposter, //- Amung us
32// OneInTheChamber, //- Each player has one bullet
33// PrisonerRescue, //- Board ship and get AI character out alive, maybe one player plays as hostige
34// Heist, //- 8 players work to take down AI for cash, can betray, once dead, spawn as AI team
35// Horde,
36// };
37
38UENUM(BlueprintType)
39enum class EGameplayMode : uint8
40{
43 Horde,
44 Debug, //- All Modes //
45};
46
47UENUM(BlueprintType)
48enum class EOnlineSubsystem : uint8
49{
50 Null,
51 Steam,
52 Epic,
53 Switch,
54 Ps4,
57 Google,
58 Amazon,
59 Apple,
60 Ios,
62 PlayFab,
63 Other,
64};
65
66
67USTRUCT(BlueprintType)
69{
70 GENERATED_BODY()
71
72 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Save Game")
73 int32 SlotNumber = 0;
74 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Save Game")
75 FString Name = "Default";
76 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Save Game")
77 FString LastSaved = "11/11/11";
78 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Save Game")
79 bool bAutoSave = false;
80
82 {
83
84 }
85};
86
87
88USTRUCT(BlueprintType)
90{
91 GENERATED_BODY()
92 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
93 FString ServerName = "Default";
94 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
95 int32 CurrentPlayers = 0;
96 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
97 int32 MaxPlayers = 1;
98 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
99 FString HostUsername = "UserName";
100 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
101 int32 Ping = 10;
102 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
103 FString GameMode = "DeathMatch";
104 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
105 FString GameMap = "Default";
106 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
107 bool bPasswordProtected = false;
108 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Server Info")
109 FString Region = "Australia";
110
111};
112
113USTRUCT(BlueprintType)
114struct FGameLevel : public FTableRowBase
115{
116 GENERATED_BODY()
117
118 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Level")
119 FString LevelName = "Default";
120 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Level")
121 FString LevelLocation = "/Levels/x.map";
122
123 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
124 class UTexture2D* LevelThumbnail = nullptr;
125 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
126 FString LevelDescription = "Description";
127
128 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
129 bool bMultiplayerPlayable = true;
130 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
131 int32 RecommendedNumberOfPlayers = 6;
132 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
133 bool bCampaignPlayable = false;
134 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
135 bool bHordePlayable = false;
136 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
137 bool bDebugMap = false;
138
139 //- Will be Selected First //
140 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level")
141 bool bDefaultMap = false;
142
143
144
145 //- Implementing the '==' operator for the struct
146 bool operator==(const FGameLevel& Other) const
147 {
148 return LevelName == Other.LevelName;
149 }
150 bool IsValid() const
151 {
152 if(LevelName == "Default"){return false;}
153 if(LevelLocation == "/Levels/x.map"){return false;}
154 return true;
155 }
156};
157
158// USTRUCT(BlueprintType)
159// struct FTeamScoreData
160// {
161// GENERATED_BODY()
162//
163// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Score")
164// int32 TeamID = 0;
165//
166// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Score")
167// int32 TeamScore = 0;
168// };
169
170
171// USTRUCT(BlueprintType)
172// struct FPlayerDeath
173// {
174// GENERATED_BODY()
175//
176// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Kill Feed")
177// FString Attacker = "Attacker";
178// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Kill Feed")
179// FString Victim = "Victim";
180// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Kill Feed")
181// AActor* AttackerActor = nullptr;
182// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Kill Feed")
183// AActor* VictimActor = nullptr;
184//
185// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
186// class APlayerState* AttackerPlayerState = nullptr;
187// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
188// class APlayerState* VictimPlayerState = nullptr;
189//
190// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
191// int32 AttackerTeamID = 0;
192// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
193// int32 VictimTeamID = 0;
194//
195// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
196// EDeathType CauseOfDeath = EDeathType::Default;
197// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
198// FString WeaponID = "Weapon";
199//
200// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
201// bool bAIAttacker = false;
202// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
203// bool bAIVictim = false;
204//
205// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
206// bool bSelfDeath = false;
207// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
208// bool bTeamKill = false;
209// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Kill Feed")
210// bool bStealthKill = false;
211// };
212
213USTRUCT(BlueprintType)
215{
216 GENERATED_BODY()
217
218 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
219 int32 ID = 1;
220 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
221 USkeletalMesh* CharacterModel;
222 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
224};
225
226
227
228USTRUCT(BlueprintType)
230{
231 GENERATED_BODY()
232
233 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
234 USkeletalMesh* CharacterModel;
235 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
236 UMaterialInterface* CharacterSkin;
237 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
238 UAnimInstance* Emote;
239 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Custom Character")
240 UStaticMesh* Hat;
241};
242
243
244
245UENUM(Blueprintable, BlueprintType)
246enum class EMenuSystemModalType : uint8
247{
248 Popup1,
249 Popup2,
250 Popup3,
251 Popup4,
253};
254
255UENUM(Blueprintable, BlueprintType)
256enum class EMenuSystemModalAlert : uint8
257{
258 General,
259 System,
260 Warning,
261 Error
262};
263
264USTRUCT(BlueprintType)
266{
267 GENERATED_BODY()
268
269 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
271 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
273 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
274 FString Title = "Quit";
275 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
276 FString Description = "Are you sure you want to quit?";
277 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
278 FString MainButtonText = "Confirm";
279 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
280 FString CloseButtonText = "Cancel";
281
282 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modal")
283 TArray<FString> ExtraButtons;
284 //- Only Applies to The extra Buttons //
285 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Modal")
286 TArray<bool> DisabledExtraButtons;
287
289 {
290
291 }
292 explicit FModalData(const EMenuSystemModalAlert AlertType, const EMenuSystemModalType StyleType,
293 const FString& TitleText, const FString& DescriptionText, const FString& MainButton, const FString& CloseButton)
294 {
295 Alert = AlertType;
296 Style = StyleType;
297 Title = TitleText;
298 Description = DescriptionText;
299 MainButtonText = MainButton;
300 CloseButtonText = CloseButton;
301 }
302
303 explicit FModalData(const bool bStandardConfirm)
304 {
307 Title = "Quit";
308 Description = "Are you sure you want to quit?";
309 MainButtonText = "Confirm";
310 CloseButtonText = "Cancel";
311 }
312
313};
314
315USTRUCT(BlueprintType)
317{
318 GENERATED_BODY()
319
320 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
321 FString ReplayName = "Replay";
322
323 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
324 FString FriendlyName = "ReplayFriendlyName";
325
326 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
327 FDateTime Timestamp = FDateTime::MinValue();
328
329 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
330 int32 LengthInMS = 0;
331
332 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
333 bool bIsValid = false;
334
335 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Replay")
336 int64 SizeInBytes = 0;
337
338 FReplayInfo(FString NewName, FString NewFriendlyName, const FDateTime NewTimestamp, const int32 NewLengthInMS, const int64 Size)
339 {
340 ReplayName = NewName;
341 FriendlyName = NewFriendlyName;
342 Timestamp = NewTimestamp;
343 LengthInMS = NewLengthInMS;
344 SizeInBytes = Size;
345 bIsValid = true;
346 }
347
349 {
350 ReplayName = "Replay";
351 FriendlyName = "ReplayFriendlyName";
352 Timestamp = FDateTime::MinValue();
353 LengthInMS = 0;
354 bIsValid = false;
355 }
356 bool operator==(const FReplayInfo& Other) const
357 {
358 return ReplayName == Other.ReplayName;
359 }
360 bool operator!=(const FReplayInfo& Other) const
361 {
362 return ReplayName != Other.ReplayName;
363 }
364 bool IsValid() const
365 {
366 if(ReplayName == "Replay"){return false;}
367 if(LengthInMS == 0){return false;}
368 if(!bIsValid){return false;}
369 return true;
370 }
371};
372
373
374UCLASS()
375class MENUSYSTEM_API UMenuData : public UObject
376{
377 GENERATED_BODY()
378};
EUnlockableCategory
Definition BaseData.h:1042
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
EOnlineSubsystem
Definition MenuData.h:49
DECLARE_LOG_CATEGORY_EXTERN(LogMenuSystem, Display, All)
EMenuSystemModalAlert
Definition MenuData.h:257
EGameplayMode
Definition MenuData.h:40
EMenuSystemModalType
Definition MenuData.h:247
Definition MenuData.h:376
Definition MenuData.h:215
Definition MenuData.h:230
Definition MenuData.h:115
FString LevelName
Definition MenuData.h:119
bool IsValid() const
Definition MenuData.h:150
Definition MenuData.h:266
FModalData(const EMenuSystemModalAlert AlertType, const EMenuSystemModalType StyleType, const FString &TitleText, const FString &DescriptionText, const FString &MainButton, const FString &CloseButton)
Definition MenuData.h:292
FModalData(const bool bStandardConfirm)
Definition MenuData.h:303
Definition MenuData.h:317
FReplayInfo()
Definition MenuData.h:348
bool operator!=(const FReplayInfo &Other) const
Definition MenuData.h:360
bool IsValid() const
Definition MenuData.h:364
bool operator==(const FReplayInfo &Other) const
Definition MenuData.h:356
Definition MenuData.h:90
Definition MenuData.h:69