Added weapons radivolver and bazoucorn

added bp radivolver and bazoucorn
added dt weapon data
This commit is contained in:
sSebster 2025-01-20 18:42:26 +01:00
parent f39f90b411
commit 6da5f75089
13 changed files with 140 additions and 5 deletions

BIN
Binaries/Win64/UnrealEditor-LegumeMix.exp (Stored with Git LFS)

Binary file not shown.

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:857367d1cbd5cf6e376a48fdc7e5322bcb5ac0fb89152955790a09ce2bae9bb9
size 60223488
oid sha256:c9a69dc83569b529cbab9a41a0b4a673d1954c0706a7d4fa86941384f9f7ec04
size 60411904

BIN
Content/Legumix/Weapon/BP_Bazoucorn.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Legumix/Weapon/BP_Radivolver.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Legumix/Weapon/DT_WeaponData.uasset (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "Weapon/Bazoucorn.h"

View File

@ -0,0 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "Weapon/LMRadivolver.h"

View File

@ -1 +1,33 @@
#include "Weapon/LMWeapon.h"
#include "Weapon/LMWeaponDataStructure.h"
void ULMWeapon::Initialize()
{
WeaponDataStructure =* WeaponRow.GetRow<FLMWeaponDataStructure>(TEXT(""));
}
bool ULMWeapon::HasAmmoInClip()
{
if(CurrentClipAmmo > 0)
{
return true;
}
return false;
}
bool ULMWeapon::HasAmmoInInventory()
{
if (CurrentAmmoInInventory > 0)
{
return true;
}
return false;
}
void ULMWeapon::Reload()
{
//Do design reload logic
OnReload();
}

View File

@ -0,0 +1 @@
#include "Weapon/LMWeaponDataStructure.h"

View File

@ -0,0 +1,16 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "LMWeapon.h"
#include "Bazoucorn.generated.h"
/**
*
*/
UCLASS(BlueprintType, Blueprintable)
class LEGUMEMIX_API UBazoucorn : public ULMWeapon
{
GENERATED_BODY()
};

View File

@ -0,0 +1,16 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "LMWeapon.h"
#include "LMRadivolver.generated.h"
/**
*
*/
UCLASS(BlueprintType, Blueprintable)
class LEGUMEMIX_API ULMRadivolver : public ULMWeapon
{
GENERATED_BODY()
};

View File

@ -1,9 +1,38 @@
#pragma once
#include "CoreMinimal.h"
#include "LMWeaponDataStructure.h"
#include "LMWeapon.generated.h"
UCLASS()
struct FLMWeaponDataStructure;
UCLASS(BlueprintType, Blueprintable)
class LEGUMEMIX_API ULMWeapon : public UObject
{
GENERATED_BODY()
public:
UPROPERTY()
FLMWeaponDataStructure WeaponDataStructure;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Legumix")
FDataTableRowHandle WeaponRow;
UPROPERTY()
int CurrentClipAmmo;
UPROPERTY()
int CurrentAmmoInInventory;
void Initialize();
void Fire();
UFUNCTION(BlueprintCallable)
void Reload();
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void OnReload(); //To call in blueprint for design utilities
void AddAmmo();
bool HasAmmoInClip();
bool HasAmmoInInventory();
};

View File

@ -0,0 +1,24 @@
#pragma once
#include "AnimationBlueprintEditorSettings.h"
#include "LMWeaponDataStructure.generated.h"
USTRUCT(BlueprintType)
struct FLMWeaponDataStructure : public FTableRowBase
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int MaxAmmo; // Max ammo in "inventory"
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int MaxClipAmmo; // Max ammo in clip
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TObjectPtr<UStaticMesh> MeshWeapon; //Mesh of the weapon display in the scene
//UPROPERTY(EditAnywhere, BlueprintReadWrite)
//enum AmmoType; //Type of ammo, which ammo this weapon is using
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TObjectPtr<UAnimBlueprint> AnimationBluePrint; //The animation blueprint to animate the mesh
};