LEAP Documentation 40220
Documentation for the LEAP project
VoteInstanceMap.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/VoteInstance.h"
8#include "VoteInstanceMap.generated.h"
9
13UCLASS(Config = Game)
14class PROJECTX_API UVoteInstanceMap : public UVoteInstance
15{
16 GENERATED_UCLASS_BODY()
17
18//~ Begin UVoteInstance Interface
19public:
20 virtual void BeginPlay() override;
21 virtual bool AllowUserVoteOptions(APlayerState* VoteInstigator, const FName& Option) const override;
22 virtual void OnVoteResult_Implementation(const FVoteOption& VoteOption) override;
23 virtual bool CheckVoteResult_Implementation() override;
24//~ End UVoteInstance Interface
25
26public:
27 UFUNCTION(BlueprintCallable, Category = VoteInstanceMap)
28 virtual void GetMapList(TArray<FString>& OutMapList) const;
29 virtual void CloseVote() override;
30
31protected:
32 virtual void BroadcastVoteWarning(int32 Warning) override;
33 virtual void VoteTimerComplete() override;
34
35 //If true, the server will transition to the next map as soon as this vote is over
36 UPROPERTY(EditDefaultsOnly, Category = VoteInstanceMap, GlobalConfig)
37 bool bTravelOnVoteEnd = false;
38 //If true, the server will travel to the best voted map if we haven't reached the min percentage
39 UPROPERTY(EditDefaultsOnly, Category = VoteInstanceMap, GlobalConfig)
40 bool bTravelToBestVotedMap = true;
41};
Definition: VoteInstanceMap.h:15