обновы какие то
This commit is contained in:
@@ -8,13 +8,13 @@ public class GraffModule : ModuleRules
|
||||
{
|
||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore","UMG" });
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||
|
||||
// Uncomment if you are using Slate UI
|
||||
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
||||
|
||||
//Uncomment if you are using Slate UI
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
||||
|
||||
// Uncomment if you are using online features
|
||||
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "RichTextBlockPerc.h"
|
||||
|
||||
|
||||
|
||||
void URichTextBlockPerc::setLineHeightPercentage(float newPerc)
|
||||
{
|
||||
LineHeightPercentage = newPerc;
|
||||
SynchronizeProperties();
|
||||
}
|
||||
@@ -2,9 +2,29 @@
|
||||
|
||||
|
||||
#include "cppFuncLibrary.h"
|
||||
#include "cppGI.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Kismet/KismetStringLibrary.h"
|
||||
#include "Kismet/KismetTextLibrary.h"
|
||||
#include "Kismet/KismetmathLibrary.h"
|
||||
|
||||
bool operator==(const Fcppcoords c1, const Fcppcoords c2) {
|
||||
return c1.flat == c2.flat &&
|
||||
c1.floor == c2.floor &&
|
||||
c1.house == c2.house &&
|
||||
c1.section == c2.section &&
|
||||
c1.type == c2.type &&
|
||||
c1.zone == c2.zone;
|
||||
}
|
||||
//
|
||||
//bool operator==(const FcppLevelStruct& c1, const FcppLevelStruct& c2) {
|
||||
// return c1.anotherLvl == c2.anotherLvl &&
|
||||
// c1.coords == c2.coords &&
|
||||
// c1.dontUnload == c2.dontUnload &&
|
||||
// c1.path == c2.path &&
|
||||
// c1.uniqName == c2.uniqName &&
|
||||
// c1.Z == c2.Z;
|
||||
//}
|
||||
|
||||
TArray<FString> UcppFuncLibrary::cppUniversalParser(FString string, TArray<FString> keys, FString delimiter, bool caseSensitive)
|
||||
{
|
||||
@@ -201,7 +221,7 @@ FString UcppFuncLibrary::multiRemove(FString source, UPARAM(ref)TArray<FString>&
|
||||
|
||||
FString UcppFuncLibrary::quoteString(FString string)
|
||||
{
|
||||
return FString("""").Append(string).Append("""");
|
||||
return FString("\"").Append(string).Append("\"");
|
||||
}
|
||||
|
||||
void UcppFuncLibrary::getRange(double value, double minMult, double maxMult, double& bMin, double& bValue, double& bMax)
|
||||
@@ -211,18 +231,48 @@ void UcppFuncLibrary::getRange(double value, double minMult, double maxMult, dou
|
||||
bValue = value;
|
||||
}
|
||||
|
||||
void UcppFuncLibrary::updateFilterList(TArray<FcppflatStruct> flats, int floorMin, int floorMax, float sqMin, float sqMax, int priceMin, int priceMax, TArray<bool> houses, TArray<bool> sections, TArray<bool> rooms, int sortType, bool onlyAvailable, TArray<FcppflatStruct>& filtered, int& count)
|
||||
void UcppFuncLibrary::updateFilterList(UObject* WorldContextObject, int floorMin, int floorMax, float sqMin, float sqMax, int priceMin, int priceMax, TArray<bool> houses, TArray<bool> sections, TArray<bool> rooms, TArray<bool> Tags, int sortType, bool onlyAvailable, TArray<FcppflatStruct>& filtered, int& count, TArray<FIntPoint> houseMap)
|
||||
{
|
||||
for (auto& hm : houseMap) {
|
||||
|
||||
}
|
||||
|
||||
auto gi = StaticCastPtr<UcppGI, UGameInstance>(UGameplayStatics::GetGameInstance(WorldContextObject));
|
||||
if (!gi) return;
|
||||
TArray<int> tempfloor, tempprice;
|
||||
TArray<float> tempsq;
|
||||
for (auto& flat : flats) {
|
||||
for (auto& flat : gi->flatArray) {
|
||||
if (inRange(flat.Floor, floorMin, floorMax)
|
||||
&& inRange(flat.Price, priceMin, priceMax)
|
||||
&& inRange(flat.Square, sqMin, sqMax)
|
||||
&& boolGet(houses, flat.House)
|
||||
&& boolGet(sections, flat.Section)
|
||||
&& boolGet(rooms, flat.Rooms)
|
||||
&& (onlyAvailable?flat.available:true)) {
|
||||
//&& boolGet(houses, flat.House)
|
||||
//&& boolGet(sections, flat.Section)
|
||||
&& [](TArray<FIntPoint>& houseMap_, TArray<bool>& houses_, TArray<bool>& sections_, FcppflatStruct& flat_) {
|
||||
if (houseMap_.IsEmpty()) return boolGet(houses_, flat_.House) && boolGet(sections_, flat_.Section); //if no map use classic
|
||||
if (!houses_.Contains(true)) return true; //if no select then pass
|
||||
for (int n = 0; n < houses_.Num(); n++) {
|
||||
if (houseMap_.IsValidIndex(n)) {
|
||||
if (houseMap_[n].X == flat_.House && houseMap_[n].Y == flat_.Section) return houses_[n];
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}(houseMap, houses, sections, flat)
|
||||
&& boolGet(rooms, flat.Rooms)
|
||||
&& [](TArray<bool> tags, TArray<bool> ftags) {
|
||||
int n = 0;
|
||||
for (auto& t : tags) {
|
||||
if (ftags.IsValidIndex(n))
|
||||
{
|
||||
if (t && !ftags[n]) return false;
|
||||
}
|
||||
n++;
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}(Tags, flat.tags)
|
||||
&& (onlyAvailable ? flat.available : true)) {
|
||||
filtered.Add(flat);
|
||||
tempfloor.Add(flat.Floor);
|
||||
tempprice.Add(flat.Price);
|
||||
@@ -274,6 +324,73 @@ void UcppFuncLibrary::updateFilterList(TArray<FcppflatStruct> flats, int floorMi
|
||||
}
|
||||
}
|
||||
|
||||
void UcppFuncLibrary::groupFiltered(UPARAM(ref)TArray<FcppflatStruct>& filtered, UPARAM(ref)TArray<FcppflatStruct>& filtered_grouped)
|
||||
{
|
||||
|
||||
TArray<Fcppcoords> filteredCoords;
|
||||
for (auto& f : filtered) {
|
||||
filteredCoords.Add(Fcppcoords(f.FlatId, f.flatType, f.Zone, f.House, f.Section));
|
||||
}
|
||||
TArray<Fcppcoords> filtered_grCoords;
|
||||
//for (auto& f : filtered_grouped) {
|
||||
// Fcppcoords ff;
|
||||
// ff.flat = f.FlatId;
|
||||
// ff.house = f.House;
|
||||
// ff.section = f.Section;
|
||||
// ff.type = f.flatType;
|
||||
// ff.zone = f.Zone;
|
||||
// //skip floor
|
||||
// filtered_grCoords.Add(ff);
|
||||
//}
|
||||
filtered_grouped.Empty();
|
||||
int nn = 0;
|
||||
for (auto& obj : filtered) {
|
||||
if (filtered_grCoords.Contains(filteredCoords[nn])) {
|
||||
auto fc = filtered_grCoords.Find(filteredCoords[nn]);
|
||||
FJsonSerializableArray opts;
|
||||
filtered_grouped[fc].comment.ParseIntoArray(opts, L";");
|
||||
FString l;
|
||||
FString r;
|
||||
opts[0].Split(L"=", &l, &r);
|
||||
//auto cn = FCString::Atoi(*r); //current N
|
||||
auto cn = UKismetStringLibrary::Conv_StringToInt(r);
|
||||
opts[1].Split(L"=", &l, &r);
|
||||
//auto csqf=FCString::Atof(*r);// current sqfrom
|
||||
auto csqf = UKismetStringLibrary::Conv_StringToFloat(r);
|
||||
opts[2].Split(L"=", &l, &r);
|
||||
//auto csqt=FCString::Atof(*r);// current sqto
|
||||
auto csqt = UKismetStringLibrary::Conv_StringToFloat(r);
|
||||
cn++;
|
||||
|
||||
csqt = obj.Square > csqt ? obj.Square : csqt;
|
||||
csqf = obj.Square < csqf ? obj.Square : csqf;
|
||||
if (filtered_grouped[fc].Price > obj.Price) filtered_grouped[fc].Price = obj.Price;
|
||||
filtered_grouped[fc].comment =
|
||||
L"n="
|
||||
+ FString::FromInt(cn)
|
||||
+ L";sqfrom="
|
||||
+ UKismetTextLibrary::Conv_FloatToText(csqf, ERoundingMode::HalfToEven, false, false, 1, 5, 2, 2).ToString()
|
||||
+ L";sqto="
|
||||
+ UKismetTextLibrary::Conv_FloatToText(csqt, ERoundingMode::HalfToEven, false, false, 1, 5, 2, 2).ToString();
|
||||
filtered_grouped[fc].comment.ReplaceCharInline(*L",", *L".");
|
||||
obj.comment = filtered_grouped[fc].comment;
|
||||
//here is place for your commercial
|
||||
|
||||
}
|
||||
else {
|
||||
obj.comment = L"n=1;sqfrom="
|
||||
+ UKismetTextLibrary::Conv_FloatToText(obj.Square, ERoundingMode::HalfToEven, false, false, 1, 5, 2, 2).ToString()
|
||||
+ L";sqto="
|
||||
+ UKismetTextLibrary::Conv_FloatToText(obj.Square, ERoundingMode::HalfToEven, false, false, 1, 5, 2, 2).ToString();
|
||||
obj.comment.ReplaceCharInline(*L",", *L"."); //parser dont understand , lol
|
||||
//UE_LOG(LogTemp, Warning, TEXT("start sq %f, txt %s"), obj.Square, *obj.comment);
|
||||
filtered_grouped.Add(obj);
|
||||
filtered_grCoords.Add(Fcppcoords(obj.FlatId, obj.flatType, obj.Zone, obj.House, obj.Section));
|
||||
}
|
||||
nn++;
|
||||
}
|
||||
}
|
||||
|
||||
bool UcppFuncLibrary::inRange(float in, float min, float max)
|
||||
{
|
||||
return (in >= min) && (in <= max);
|
||||
@@ -324,4 +441,3 @@ void UcppFuncLibrary::minmaxInRange(TArray<float> arr, int min, int max, int& mi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -145,15 +145,15 @@ TArray<FcppflatStruct> UcppGI::getFlatArr_(Fcppcoords coords, int& len)
|
||||
auto output = TArray<FcppflatStruct>();
|
||||
for (auto& flat : flatArray) {
|
||||
auto flatcoords = Fcppcoords();
|
||||
flatcoords.flat = coords.flat < 0 ? -2 : flat.FlatId; //ignore flat
|
||||
flatcoords.floor = coords.floor < 0 ? -2 : flat.Floor;
|
||||
flatcoords.flat = coords.floor < 0 ? -2 : flat.FlatId; //ignore flat
|
||||
flatcoords.floor =coords.floor<0?-2: flat.Floor;
|
||||
flatcoords.house = coords.house < 1 ? -2 : flat.House;
|
||||
flatcoords.section = coords.section < 1 ? -2 : flat.Section;
|
||||
flatcoords.type = coords.type < 0 ? -2 : flat.flatType;
|
||||
flatcoords.zone = coords.zone < 1 ? -2 : flat.Zone;
|
||||
|
||||
bool dummy[6];
|
||||
bool eq;
|
||||
cppCoordsEq(coords, flatcoords, true, false, boolDummy, boolDummy, boolDummy, boolDummy, boolDummy, boolDummy, eq);
|
||||
cppCoordsEq(coords, flatcoords, true, false, dummy[0], dummy[1], dummy[2], dummy[3], dummy[4], dummy[5], eq);
|
||||
if (eq) output.Add(flat);
|
||||
}
|
||||
len = output.Num();
|
||||
@@ -166,27 +166,21 @@ FcppflatStruct UcppGI::findFlatByCoords_(Fcppcoords coords, bool& success)
|
||||
if (coords.flat < 0) return FcppflatStruct();
|
||||
int len;
|
||||
auto tt = getFlatArr_(coords, len);
|
||||
if (len > 1) UE_LOG(LogCore, Warning, TEXT("UcppGI::findFlatByCoords: found more than one flat"));
|
||||
if (len == 0) return FcppflatStruct();
|
||||
if (len>1) UE_LOG(LogCore, Warning, TEXT("UcppGI::findFlatByCoords: found more than one flat: GP%d-S%d-F%d-A%d"),coords.house,coords.section,coords.floor,coords.flat);
|
||||
if (len==0) return FcppflatStruct();
|
||||
success = true;
|
||||
return tt[0];
|
||||
}
|
||||
|
||||
FcppflatStruct UcppGI::findFlatByN_(Fcppcoords filter, int num, bool& success)
|
||||
TArray<FcppflatStruct> UcppGI::findFlatsByN_(int num, bool& success)
|
||||
{
|
||||
success = false;
|
||||
filter.flat = -2;
|
||||
auto output = FcppflatStruct();
|
||||
|
||||
auto arr = getFlatArr_(filter, intDummy);
|
||||
for (auto& flat : arr) {
|
||||
if (flat.FlatN == num) {
|
||||
if (!success) output = flat;
|
||||
else UE_LOG(LogCore, Warning, TEXT("UcppGI::findFlatByN_: found more than one flat"));
|
||||
success = true;
|
||||
}
|
||||
auto output = TArray<FcppflatStruct>();
|
||||
for (auto& flat : flatArray) {
|
||||
if (flat.FlatN == num) output.Add(flat);
|
||||
}
|
||||
|
||||
|
||||
success = !output.IsEmpty();
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -195,7 +189,7 @@ void UcppGI::countFreeApartments(Fcppcoords coords, int& free, int& all, float&
|
||||
int len;
|
||||
free = 0;
|
||||
minPrice = 0;
|
||||
bool temp = false;
|
||||
bool temp=false;
|
||||
for (auto& flat : getFlatArr_(coords, len)) {
|
||||
if (flat.available) {
|
||||
if (!temp) {
|
||||
@@ -211,30 +205,3 @@ void UcppGI::countFreeApartments(Fcppcoords coords, int& free, int& all, float&
|
||||
return;
|
||||
}
|
||||
|
||||
void UcppGI::cppFlatTocppCoords(FcppflatStruct flat, Fcppcoords& coords)
|
||||
{
|
||||
coords.flat = flat.FlatId;
|
||||
coords.floor = flat.Floor;
|
||||
coords.house = flat.House;
|
||||
coords.section = flat.Section;
|
||||
coords.type = flat.flatType;
|
||||
coords.zone = flat.Zone;
|
||||
}
|
||||
|
||||
void UcppGI::cppCoordsToCppFlat(UObject* WorldContextObject, Fcppcoords coords, FcppflatStruct& flat, bool onlyCoords)
|
||||
{
|
||||
if (onlyCoords) {
|
||||
flat.FlatId = coords.flat;
|
||||
flat.Floor = coords.floor;
|
||||
flat.House = coords.house;
|
||||
flat.Section = coords.section;
|
||||
flat.flatType = coords.type;
|
||||
flat.Zone = coords.zone;
|
||||
return;
|
||||
}
|
||||
bool dum;
|
||||
|
||||
flat = StaticCastPtr<UcppGI,UGameInstance>(UGameplayStatics::GetGameInstance(WorldContextObject))->findFlatByCoords_(coords, dum);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/RichTextBlock.h"
|
||||
#include "RichTextBlockPerc.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(MinimalAPI)
|
||||
class URichTextBlockPerc : public URichTextBlock
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Appearance")
|
||||
void setLineHeightPercentage(float newPerc);
|
||||
|
||||
|
||||
|
||||
};
|
||||
@@ -17,64 +17,64 @@ struct FcppflatStruct
|
||||
public:
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "FlatId", MakeStructureDefaultValue = "-1"))
|
||||
int32 FlatId=-1;
|
||||
int32 FlatId;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "flatType", MakeStructureDefaultValue = "0"))
|
||||
int32 flatType=0;
|
||||
int32 flatType;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Flat#", MakeStructureDefaultValue = "-1"))
|
||||
int32 FlatN=-1;
|
||||
int32 FlatN;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Zone", MakeStructureDefaultValue = "-1"))
|
||||
int32 Zone=-1;
|
||||
int32 Zone;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "House", MakeStructureDefaultValue = "-1"))
|
||||
int32 House=-1;
|
||||
int32 House;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Section", MakeStructureDefaultValue = "-1"))
|
||||
int32 Section = -1;
|
||||
int32 Section;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Floor", MakeStructureDefaultValue = "-1"))
|
||||
int32 Floor = -1;
|
||||
int32 Floor;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Rooms", MakeStructureDefaultValue = "-1"))
|
||||
int32 Rooms = -1;
|
||||
int32 Rooms;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Square", MakeStructureDefaultValue = "0.000000"))
|
||||
double Square = 0;
|
||||
double Square;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "Price", MakeStructureDefaultValue = "0"))
|
||||
int32 Price=0;
|
||||
int32 Price;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "whitePrice", MakeStructureDefaultValue = "0"))
|
||||
int32 whitePrice=0;
|
||||
int32 whitePrice;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "price-meter", MakeStructureDefaultValue = "0"))
|
||||
int32 price_meter=0;
|
||||
int32 price_meter;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "available", MakeStructureDefaultValue = "True"))
|
||||
bool available=false;
|
||||
bool available;
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "tags"))
|
||||
TArray<bool> tags;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "deadline"))
|
||||
FIntPoint deadline=FIntPoint(0);
|
||||
FIntPoint deadline;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (DisplayName = "comment"))
|
||||
FString comment="";
|
||||
FString comment;
|
||||
};
|
||||
|
||||
|
||||
@@ -165,9 +165,14 @@ class GRAFFMODULE_API UcppFuncLibrary : public UBlueprintFunctionLibrary
|
||||
UFUNCTION(blueprintcallable, BlueprintPure, category = "Math|Float", meta = (Keywords = "minmax"))
|
||||
static void getRange(double value, double minMult, double maxMult, double& bMin, double& bValue, double& bMax);
|
||||
|
||||
/*sortType: 0.price min-to-max 1. max-to-min 2.square min-to-max 3. max-to-min 4.floor min-to-max 5. max-to-min*/
|
||||
/*sortType: 0.price min-to-max 1. max-to-min 2.square min-to-max 3. max-to-min 4.floor min-to-max 5. max-to-min
|
||||
use housemap to remap houses array to house-section pair. example: 0:1,1 1:2,1 2:2,2...
|
||||
sections array will be ignored if using housemap*/
|
||||
UFUNCTION(blueprintcallable, category = "Widget|Search", meta = (WorldContext = "WorldContextObject"))
|
||||
static void updateFilterList(UObject* WorldContextObject, int floorMin, int floorMax, float sqMin, float sqMax, int priceMin, int priceMax, TArray<bool> houses, TArray<bool> sections, TArray<bool> rooms, TArray<bool> Tags, int sortType, bool onlyAvailable, TArray<FcppflatStruct>& filtered, int& count, TArray<FIntPoint> houseMap);
|
||||
/*additional info in comment: n=int;sqFrom=float;sqTo=float*/
|
||||
UFUNCTION(blueprintcallable, category = "Widget|Search")
|
||||
static void updateFilterList(TArray<FcppflatStruct> flats, int floorMin, int floorMax, float sqMin, float sqMax, int priceMin, int priceMax, TArray<bool> houses, TArray<bool> sections, TArray<bool> rooms, int sortType, bool onlyAvailable, TArray<FcppflatStruct>& filtered, int& count);
|
||||
static void groupFiltered(UPARAM(ref) TArray<FcppflatStruct>& filtered, UPARAM(ref) TArray<FcppflatStruct>& filtered_grouped);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -7,26 +7,35 @@
|
||||
#include "cppGI.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct Fcppcoords
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
Fcppcoords(int32 flat_=-1, int32 type_=0, int32 zone_=-1, int32 house_=-1, int32 section_=-1, int32 floor_=-1) {
|
||||
flat = flat_;
|
||||
type = type_;
|
||||
zone = zone_;
|
||||
house = house_;
|
||||
section = section_;
|
||||
floor = floor_;
|
||||
}
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 flat;
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 flat = -1;
|
||||
int32 type;
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 type = 0;
|
||||
int32 zone;
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 zone = 1;
|
||||
int32 house;
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 house = -1;
|
||||
int32 section;
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 section = -1;
|
||||
UPROPERTY(BlueprintReadWrite, category = "default")
|
||||
int32 floor = -1;
|
||||
int32 floor;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,18 +44,18 @@ struct FcppLevelStruct
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
Fcppcoords coords;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
Fcppcoords coords;
|
||||
bool dontUnload = false;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
bool dontUnload = false;
|
||||
FString path;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
FString path;
|
||||
float Z = 0;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
float Z = 0;
|
||||
int32 anotherLvl = -1;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
int32 anotherLvl = -1;
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
FName uniqName;
|
||||
FName uniqName;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
@@ -54,61 +63,53 @@ 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);
|
||||
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);
|
||||
|
||||
/*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);
|
||||
|
||||
UFUNCTION(blueprintcallable, category = "Data")
|
||||
FcppflatStruct findFlatByCoords_(Fcppcoords coords, bool& success);
|
||||
|
||||
/*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);
|
||||
|
||||
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 );
|
||||
/*coord=-2 is ignore the one, price is millions*/
|
||||
UFUNCTION(blueprintcallable, category = "Data")
|
||||
void countFreeApartments(Fcppcoords coords,int& free,int& all,float& minPrice);
|
||||
|
||||
/*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;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user