Space Plunder
Loading...
Searching...
No Matches
WeaponBPLib.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"
7#include "Kismet/BlueprintFunctionLibrary.h"
8#include "WeaponBPLib.generated.h"
9
10
11
12UCLASS()
13class WEAPONSYSTEM_API UWeaponBPLib : public UBlueprintFunctionLibrary
14{
15 GENERATED_BODY()
16
17public:
18
20 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System")
21 static UDataTable* LoadDefaultWeaponDataTable();
23 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
24 static UDataTable* LoadWeaponDataTableFromGameState(const UObject* WorldContextObject);
25
26
27 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
28 static UDataTable* LoadWeaponEffectsDataTableFromGameState(const UObject* WorldContextObject);
29
31 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System")
32 static UDataTable* LoadDefaultWeaponPickupDataTable();
34 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
35 static UDataTable* LoadWeaponPickupDataTableFromGameState(const UObject* WorldContextObject);
36
38 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System")
39 static UDataTable* LoadDefaultWeaponAttachmentDataTable();
40 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
41 static UDataTable* LoadWeaponAttachmentDataTableFromGameState(const UObject* WorldContextObject);
42
43
44 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
45 static FWeaponData_T GetDefaultWeaponData(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
46
47 //- Returns Weapon info Based on ID in specified DataTable, Returns WeaponStats and if Succeeded //
48 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
49 static FWeaponStats_T GetWeaponStats(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
50
51 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
52 static FWeaponEffects_T GetWeaponEffects(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
53
54 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
55 static FWeaponAttachment GetWeaponAttachment(const UObject* WorldContextObject, const FString& WeaponAttachmentID, bool& bSuccess, UDataTable* DataTable = nullptr);
56
57 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
58 static TArray<EAttachmentType> GetWeaponAttachmentTypes(const UObject* WorldContextObject, const TArray<FString>& WeaponAttachmentIDs, UDataTable* DataTable = nullptr);
59
60 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
61 static FString GetWeaponDisplayName(const UObject* WorldContextObject, const FString& WeaponID, UDataTable* DataTable = nullptr);
62
63 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
64 static UTexture2D* GetWeaponThumbnail(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
65
66 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
67 static USkeletalMesh* GetWeaponMesh(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
68
69 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
70 static bool GetIsWeaponNonLethal(const UObject* WorldContextObject, const FString& WeaponID, UDataTable* DataTable = nullptr);
71
72 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
73 static bool GetDoesWeaponHaveAutoMode(const UObject* WorldContextObject, const FString& WeaponID, UDataTable* DataTable = nullptr);
74
75 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
76 static bool GetDoesWeaponHaveBurstMode(const UObject* WorldContextObject, const FString& WeaponID, UDataTable* DataTable = nullptr);
77
78 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
79 static float GetWeaponReloadTime(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
80
81 UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
82 static int32 GetWeaponMaxAmmo(const UObject* WorldContextObject, const FString& WeaponID, bool& bSuccess, UDataTable* DataTable = nullptr);
83
84 //@TODO test if it works
85 UFUNCTION(BlueprintCallable, Category="Weapon System", meta=(WorldContext="WorldContextObject"))
86 static int32 AddWeaponAmmo(const UObject* WorldContextObject, const FString& WeaponID, int32 AmmoToAdd, int32& TotalAmmo, bool& bSuccess, UDataTable* DataTable = nullptr);
87
88 // UFUNCTION(BlueprintPure, BlueprintCallable, Category="Weapon System")
89 // static TArray<FWeaponAttachment> GetWeaponAvailableAttachments(FString WeaponID, UDataTable* DataTable, bool& bSuccess);
90};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition WeaponBPLib.h:14
Definition WeaponStructs.h:501
Struct representing data of a weapon that changes.
Definition WeaponStructs.h:861
Definition WeaponStructs.h:386
Represents statistics for a weapon.
Definition WeaponStructs.h:622