This commit is contained in:
2024-03-14 17:49:43 +05:00
parent b9a1f27817
commit 5f7dd88557
33 changed files with 113 additions and 72 deletions
+15 -15
View File
@@ -17,64 +17,64 @@ struct FcppflatStruct
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "FlatId", MakeStructureDefaultValue = "-1"))
int32 FlatId;
int32 FlatId=-1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "flatType", MakeStructureDefaultValue = "0"))
int32 flatType;
int32 flatType=0;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Flat#", MakeStructureDefaultValue = "-1"))
int32 FlatN;
int32 FlatN=-1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Zone", MakeStructureDefaultValue = "-1"))
int32 Zone;
int32 Zone=-1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "House", MakeStructureDefaultValue = "-1"))
int32 House;
int32 House=-1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Section", MakeStructureDefaultValue = "-1"))
int32 Section;
int32 Section = -1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Floor", MakeStructureDefaultValue = "-1"))
int32 Floor;
int32 Floor = -1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Rooms", MakeStructureDefaultValue = "-1"))
int32 Rooms;
int32 Rooms = -1;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Square", MakeStructureDefaultValue = "0.000000"))
double Square;
double Square = 0;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Price", MakeStructureDefaultValue = "0"))
int32 Price;
int32 Price=0;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "whitePrice", MakeStructureDefaultValue = "0"))
int32 whitePrice;
int32 whitePrice=0;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "price-meter", MakeStructureDefaultValue = "0"))
int32 price_meter;
int32 price_meter=0;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "available", MakeStructureDefaultValue = "True"))
bool available;
bool available=false;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "tags"))
TArray<bool> tags;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "deadline"))
FIntPoint deadline;
FIntPoint deadline=FIntPoint(0);
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "comment"))
FString comment;
FString comment="";
};
+52 -44
View File
@@ -7,7 +7,7 @@
#include "cppGI.generated.h"
/**
*
*
*/
USTRUCT(BlueprintType)
@@ -15,18 +15,18 @@ struct Fcppcoords
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, category = "default")
int32 flat = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 type = 0;
int32 flat = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 zone = 1;
int32 type = 0;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 house = -1;
int32 zone = 1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 section = -1;
int32 house = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 floor = -1;
int32 section = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 floor = -1;
};
@@ -35,18 +35,18 @@ struct FcppLevelStruct
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite)
Fcppcoords coords;
UPROPERTY(BlueprintReadWrite)
bool dontUnload = false;
Fcppcoords coords;
UPROPERTY(BlueprintReadWrite)
FString path;
bool dontUnload = false;
UPROPERTY(BlueprintReadWrite)
float Z = 0;
FString path;
UPROPERTY(BlueprintReadWrite)
int32 anotherLvl = -1;
float Z = 0;
UPROPERTY(BlueprintReadWrite)
FName uniqName;
int32 anotherLvl = -1;
UPROPERTY(BlueprintReadWrite)
FName uniqName;
};
UCLASS()
@@ -54,53 +54,61 @@ class GRAFFMODULE_API UcppGI : public UGameInstance
{
GENERATED_BODY()
public:
UFUNCTION(blueprintcallable, category = "cppFuncLib")
static void cppCoordsEq(Fcppcoords coords, Fcppcoords coords1, bool relevantMinus2, bool fastEq, bool& flat_, bool& type_, bool& zone_, bool& house_, bool& section_, bool& floor_, bool& fullEq);
UFUNCTION(blueprintcallable, category = "cppFuncLib")
static void cppCoordsEq(Fcppcoords coords, Fcppcoords coords1, bool relevantMinus2, bool fastEq, bool& flat_, bool& type_, bool& zone_, bool& house_, bool& section_, bool& floor_, bool& fullEq);
/*returns array of levels for binding*/
/*returns array of levels for binding*/
UFUNCTION(blueprintcallable, Category = "LevelLoading", meta = (WorldContext = "WorldContextObject"))
TArray<ULevelStreaming*> cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords, uint8 currentState);
/*return array filtered by coords, coord<0 for floor and <1 for other is ignore the one*/
UFUNCTION(blueprintcallable, category = "Data")
TArray<FcppflatStruct> getFlatArr_(Fcppcoords coords, int& len);
TArray<ULevelStreaming*> cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords, uint8 currentState);
UFUNCTION(blueprintcallable, category = "Data")
FcppflatStruct findFlatByCoords_(Fcppcoords coords, bool& success);
/*return array filtered by coords, coord<0 for (floor,flat,type) and <1 for other is ignore the one*/
UFUNCTION(blueprintcallable, category = "Data")
TArray<FcppflatStruct> getFlatArr_(Fcppcoords coords, int& len);
/*return array with flats with specified number
(may be from different houses if not sequetnal numeration)*/
UFUNCTION(blueprintcallable, category = "Data")
TArray<FcppflatStruct> findFlatsByN_(int num, bool& success);
/*coord=-2 is ignore the one, price is millions*/
UFUNCTION(blueprintcallable, category = "Data")
void countFreeApartments(Fcppcoords coords,int& free,int& all,float& minPrice);
UFUNCTION(blueprintcallable, category = "Data")
FcppflatStruct findFlatByCoords_(Fcppcoords coords, bool& success);
/*flatId is ignoring, filter is optional*/
UFUNCTION(blueprintcallable, category = "Data")
FcppflatStruct findFlatByN_(Fcppcoords filter, int num, bool& success);
/*coord<0 for (floor,flat,type) and <1 for other is ignore the one, price is millions*/
UFUNCTION(blueprintcallable, category = "Data")
void countFreeApartments(Fcppcoords coords, int& free, int& all, float& minPrice);
UFUNCTION(blueprintcallable,blueprintPure, category = "Data",meta=( BlueprintAutocast))
static void cppFlatTocppCoords(FcppflatStruct flat, Fcppcoords& coords);
/*if onlyCoords false then same as find flat by coords*/
UFUNCTION(blueprintcallable, blueprintPure, category = "Data", meta = (WorldContext = "WorldContextObject", BlueprintAutocast))
static void cppCoordsToCppFlat(UObject* WorldContextObject,Fcppcoords coords,FcppflatStruct& flat,bool onlyCoords=true );
/*list of lvls for anyway loading*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "levelLoading")
TArray<FcppLevelStruct> cppWhiteList;
TArray<FcppLevelStruct> cppWhiteList;
/*list of lvls for anyway not loading*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "levelLoading")
TArray<FcppLevelStruct> cppBlackList;
TArray<FcppLevelStruct> cppBlackList;
/*list of coords for regular loading*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "LevelLoading")
TArray<Fcppcoords> cppLoadList;
TArray<Fcppcoords> cppLoadList;
/*list of created level names*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "LevelLoading")
TArray<FName> cppCreatedList;
TArray<FName> cppCreatedList;
/*list of loaded/loading right now level names*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "LevelLoading")
TArray<FName> cpploadedList;
TArray<FName> cpploadedList;
/*list of lvls struct created by levelloader*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "levelLoading")
TArray<FcppLevelStruct> cppLevels;
/*list of all flats in project*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Data")
TArray<FcppflatStruct> flatArray;
TArray<FcppLevelStruct> cppLevels;
/*list of all flats in project*/
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Data")
TArray<FcppflatStruct> flatArray;
private:
bool boolDummy;
int intDummy;
};