diff --git a/AsaApi/AsaApi.vcxproj b/AsaApi/AsaApi.vcxproj
index 9d3ff60..6ddd901 100644
--- a/AsaApi/AsaApi.vcxproj
+++ b/AsaApi/AsaApi.vcxproj
@@ -396,8 +396,6 @@ copy "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\$(ProjectName).pdb" "F:
-
-
diff --git a/AsaApi/Core/Private/UE/UE.cpp b/AsaApi/Core/Private/UE/UE.cpp
index d7b3e74..bc19797 100644
--- a/AsaApi/Core/Private/UE/UE.cpp
+++ b/AsaApi/Core/Private/UE/UE.cpp
@@ -1,3 +1,4 @@
+// ReSharper disable CppInconsistentNaming
#include "API/ARK/Ark.h"
#include "API/ARK/UE.h"
@@ -9,4 +10,9 @@ ARK_API FProperty* UObject::FindProperty(FName name)
return Property;
}
return nullptr;
-}
\ No newline at end of file
+}
+
+bool UObjectBaseUtility::IsA(const UClass* base)
+{
+ return this->ClassPrivateField()->IsChildOf(base);
+}
diff --git a/AsaApi/Core/Public/API/ARK/Actor.h b/AsaApi/Core/Public/API/ARK/Actor.h
index ed23460..0b86834 100644
--- a/AsaApi/Core/Public/API/ARK/Actor.h
+++ b/AsaApi/Core/Public/API/ARK/Actor.h
@@ -1377,8 +1377,24 @@ struct UInstancedStaticMeshComponent : UStaticMeshComponent
void ReceiveComponentDamage(float DamageAmount, const FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { NativeCall(this, "UInstancedStaticMeshComponent.ReceiveComponentDamage(float,FDamageEvent&,AController*,AActor*)", DamageAmount, DamageEvent, EventInstigator, DamageCauser); }
};
-struct AActor : UPrimalActor, ActorExtensions
+struct AActor : UPrimalActor
{
+ // Start AsaApi Extensions
+ FORCEINLINE FVector GetActorForwardVector()
+ {
+ if (USceneComponent* root_component = RootComponentField())
+ return root_component->ComponentToWorldField().GetUnitAxis(EAxis::X);
+ return FVector::ZeroVector;
+ }
+
+ FORCEINLINE FVector GetLocation()
+ {
+ if (const auto& root = RootComponentField())
+ return root->ComponentToWorldField().GetLocation();
+ return FVector::ZeroVector;
+ }
+ // End AsaApi Extensions
+
// Fields
FActorTickFunction& PrimaryActorTickField() { return *GetNativePointerField(this, "AActor.PrimaryActorTick"); }
@@ -1957,7 +1973,15 @@ struct AInfo : AActor
};
struct UPlayer : UObject {
- TObjectPtr& PlayerControllerField() { return *GetNativePointerField*>(this, "UPlayer.PlayerController"); }
+ // Start AsaApi Extensions
+ FString ConsoleCommand(const FString& Command, bool bWriteToLog)
+ {
+ FString result = *ConsoleCommand(&result, &Command, bWriteToLog);
+ return result;
+ }
+ // End AsaApi Extensions
+
+ TObjectPtr& PlayerControllerField() { return *GetNativePointerField*>(this, "UPlayer.PlayerController"); }
// int CurrentNetSpeed;
// int ConfiguredInternetSpeed;
// int ConfiguredLanSpeed;
@@ -2584,7 +2608,7 @@ struct APrimalController : AController
};
-struct APlayerController : APrimalController, PlayerControllerExtensions
+struct APlayerController : APrimalController
{
// Fields
@@ -3056,8 +3080,45 @@ struct ABasePlayerController : APrimalPlayerController
struct AShooterPlayerController : ABasePlayerController
{
- // Fields
+public:
+ // Start AsaApi Extensions
+ FString GetPlayerCharacterName()
+ {
+ FString player_name = *GetPlayerCharacterName(&player_name);
+ return player_name;
+ }
+
+ FString GetUniqueNetIdAsString()
+ {
+ FString unique_id = *GetUniqueNetIdAsString(&unique_id);
+ return unique_id;
+ }
+ void ClientServerChatDirectMessage(const FString& MessageText, FLinearColor MessageColor, bool bIsBold, const FString& SenderId)
+ {
+ ClientServerChatDirectMessage(&MessageText, MessageColor, bIsBold, &SenderId);
+ }
+
+ void ClientServerNotification(const FString& MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay, int Priority)
+ {
+ ClientServerNotification(&MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay, Priority);
+ }
+
+ FString ConsoleCommand(const FString& Command, bool bWriteToLog)
+ {
+ FString result = *ConsoleCommand(&result, &Command, bWriteToLog);
+ return result;
+ }
+
+ void RunHiddenCommand(const FString& Command)
+ {
+ this->PlayerField().Get()->ConsoleCommand(Command, false);
+ }
+
+
+ // End AsaApi Extensions
+
+ // Fields
UPaintingStreamingComponent*& PaintingStreamingComponentField() { return *GetNativePointerField(this, "AShooterPlayerController.PaintingStreamingComponent"); }
FieldArray HeldItemSlotField() { return { this, "AShooterPlayerController.HeldItemSlot" }; }
FieldArray UsedItemSlotField() { return { this, "AShooterPlayerController.UsedItemSlot" }; }
diff --git a/AsaApi/Core/Public/API/ARK/Ark.h b/AsaApi/Core/Public/API/ARK/Ark.h
index 4cb84c4..0508753 100644
--- a/AsaApi/Core/Public/API/ARK/Ark.h
+++ b/AsaApi/Core/Public/API/ARK/Ark.h
@@ -25,7 +25,6 @@
#include "../UE/Math/ColorList.h"
#include "UE.h"
-#include "ExtensionsDeclaration.h"
//#include "Tribe.h"
#include "Actor.h"
#include "Other.h"
@@ -40,4 +39,3 @@
#include "../../ICommands.h"
#include "IHooks.h"
#include "Tools.h"
-#include "ExtensionsDefinition.h"
diff --git a/AsaApi/Core/Public/API/ARK/ExtensionsDeclaration.h b/AsaApi/Core/Public/API/ARK/ExtensionsDeclaration.h
deleted file mode 100644
index 236ef5b..0000000
--- a/AsaApi/Core/Public/API/ARK/ExtensionsDeclaration.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#pragma once
-
-#include "UE.h"
-#include