Skip to content
This repository was archived by the owner on Jun 7, 2025. It is now read-only.

Commit 082a3e1

Browse files
committed
Rename function
1 parent 4caa931 commit 082a3e1

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

Source/TrickyKeyringSystem/Private/KeyringLibrary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bool UKeyringLibrary::AddKey(const AActor* OtherActor, const TSubclassOf<UKeyTyp
5050
return KeyringComponent->AddKey(KeyType);
5151
}
5252

53-
bool UKeyringLibrary::ActorUseKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType)
53+
bool UKeyringLibrary::UseKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType)
5454
{
5555
if (!IsValid(OtherActor) || !KeyType)
5656
{

Source/TrickyKeyringSystem/Public/KeyringLibrary.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,49 @@
1010
class UKeyType;
1111
class AActor;
1212
class UKeyringComponent;
13+
1314
/**
14-
*
15+
* A library with useful functions to work with KeyringComponent.
1516
*/
1617
UCLASS()
1718
class TRICKYKEYRINGSYSTEM_API UKeyringLibrary : public UBlueprintFunctionLibrary
1819
{
1920
GENERATED_BODY()
2021

2122
public:
23+
/**Returns KeyringComponent if the given actor has it.*/
2224
UFUNCTION(BlueprintPure, Category="KeyringSystem")
2325
static UKeyringComponent* GetKeyringComponent(const AActor* OtherActor);
2426

27+
/**Checks if the given actor has key in KeyringComponent.*/
2528
UFUNCTION(BlueprintPure, Category="KeyringSystem")
2629
static bool ActorHasKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
2730

31+
/**Adds key to KeyringComponent.*/
2832
UFUNCTION(BlueprintCallable, Category="KeyringSystem")
2933
static bool AddKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
30-
34+
35+
/**Force the given actor to use the give key class.*/
3136
UFUNCTION(BlueprintCallable, Category="KeyringSystem")
32-
static bool ActorUseKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
37+
static bool UseKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
3338

39+
/**Returns a key object from KeyringComponent of the given actor.*/
3440
UFUNCTION(BlueprintPure, Category="KeyringSystem")
3541
static UKeyType* GetKeyObject(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
3642

43+
/**Returns key data from `KeyringComponent` of the given actor.*/
3744
UFUNCTION(BlueprintPure, Category="KeyringSystem")
3845
static FKeyData GetKeyData(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
3946

47+
/**Checks if the given key class is destroyable.*/
4048
UFUNCTION(BlueprintPure, Category="KeyringSystem")
4149
static bool IsKeyDestroyable(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
4250

51+
/**Removes key from KeyringComponent.*/
4352
UFUNCTION(BlueprintPure, Category="KeyringSystem")
4453
static bool RemoveKey(const AActor* OtherActor, const TSubclassOf<UKeyType> KeyType);
45-
54+
55+
/**Removes all keys form `KeyringComponent` of the given actor.*/
4656
UFUNCTION(BlueprintCallable, Category="KeyringSystem")
4757
static bool RemoveAllKeys(const AActor* OtherActor);
4858
};

0 commit comments

Comments
 (0)