Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
74badcca9b | ||
|
0b4b8c5e07 | ||
|
9b59c2bc05 | ||
|
01283bc50a | ||
|
39ecb1df11 | ||
|
a5a89443de | ||
|
e5583a3b92 | ||
|
a89cbbf2c8 | ||
|
db848b428f | ||
|
2e78f37d54 | ||
|
c1cbe82bcd | ||
|
0aea87dcea | ||
|
385dc543ad | ||
|
b309136b5c | ||
|
f8a322d5c1 | ||
|
75daf25f1c | ||
|
f1b737439d | ||
|
0d976de526 | ||
|
8e6378208c | ||
|
6b2b12cf2a |
@ -19,12 +19,22 @@ jobs:
|
||||
steps:
|
||||
- name: Setup SML
|
||||
run: |
|
||||
if (!(Test-Path ${{env.SML_DIR}} -PathType Container)) {git clone --branch master https://github.com/satisfactorymodding/SatisfactoryModLoader.git ${{env.SML_DIR}}}
|
||||
if (!(Test-Path ${{env.SML_DIR}} -PathType Container)) {git clone --branch dev https://github.com/satisfactorymodding/SatisfactoryModLoader.git ${{env.SML_DIR}}}
|
||||
- name: Install WWise
|
||||
run: |
|
||||
cd ${{env.SML_DIR}}
|
||||
if ((Test-Path ${{env.SML_DIR}}/Plugins/Wwise) -eq $true){ echo "WWise already Installed Skipping.."; exit 0 }
|
||||
S:/SF/Scripts/wwise-cli.exe integrate-ue --integration-version "2022.1.5.2714" --project "${{env.SML_DIR}}/FactoryGame.uproject"
|
||||
- name: Pull WWise Project
|
||||
run: |
|
||||
cd ${{env.SML_DIR}}/SML_WwiseProject
|
||||
git fetch --all
|
||||
git reset --hard origin/main
|
||||
git lfs fetch --all
|
||||
git lfs pull
|
||||
git lfs checkout
|
||||
& "C:/Program Files (x86)/Audiokinetic/Wwise2023.1.3.8471/Authoring/x64/Release/bin/WwiseConsole.exe" generate-soundbank "${{env.SML_DIR}}/SML_WwiseProject/SML_WwiseProject.wproj" --platform Windows Mac --verbose
|
||||
echo "Done"
|
||||
- name: "SML Headers"
|
||||
run: |
|
||||
cd S:/SF/Scripts/sml-fixer
|
||||
@ -68,7 +78,7 @@ jobs:
|
||||
($UPlugin | convertto-json -Depth 100) -replace '\\u0026', '&' | Set-Content ${{env.SML_DIR}}/Mods/${{matrix.value}}/${{matrix.value}}.uplugin
|
||||
echo "Done"
|
||||
CompileEditor:
|
||||
needs: UpdateModUPluginDependencies
|
||||
needs: UpdateUPlugins
|
||||
runs-on: windows-2022
|
||||
outputs:
|
||||
version: ${{steps.getversion.outputs.version}}
|
||||
|
28
CHANGELOG.md
28
CHANGELOG.md
@ -1,3 +1,31 @@
|
||||
## 1.0.7 (June 16, 2025)
|
||||
- chore: Bump game version
|
||||
- chore: Bump SML Version
|
||||
- chore: Bump SML Version
|
||||
- feat(SP): New buildings data assets
|
||||
|
||||
## 1.0.6 (March 06, 2025)
|
||||
- feat: SML Bump
|
||||
- feat: Bump SML
|
||||
|
||||
## 1.0.5 (January 10, 2025)
|
||||
- ci: LFS Changes
|
||||
- ci: wwise project
|
||||
|
||||
## 1.0.4 (December 17, 2024)
|
||||
- feat: Bump sml version
|
||||
- feat: Mod Adapter struct updates
|
||||
|
||||
## 1.0.3 (November 30, 2024)
|
||||
- feat: Changed forms to array
|
||||
|
||||
## 1.0.2 (November 29, 2024)
|
||||
- feat: Item filters
|
||||
- feat: Additional DS Options
|
||||
|
||||
## 1.0.1 (November 25, 2024)
|
||||
|
||||
|
||||
## 1.0.0 (November 25, 2024)
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"Version": 1,
|
||||
"VersionName": "1.0.0",
|
||||
"SemVersion": "1.0.0",
|
||||
"VersionName": "1.0.7",
|
||||
"SemVersion": "1.0.7",
|
||||
"FriendlyName": "Refined R&D Api",
|
||||
"Description": "This Lib can be used to create Mod Compatability with Refined R&D Mods",
|
||||
"Category": "Modding",
|
||||
@ -26,8 +26,8 @@
|
||||
{
|
||||
"Name": "SML",
|
||||
"Enabled": true,
|
||||
"SemVersion": "^3.8.0"
|
||||
"SemVersion": "^3.11.1"
|
||||
}
|
||||
],
|
||||
"GameVersion": ">=377620"
|
||||
"GameVersion": ">=416835"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DataAssets/RRDADataAssetDSItemFilter.h"
|
||||
|
@ -0,0 +1,3 @@
|
||||
//
|
||||
|
||||
#include "DataAssets/RRDADataAssetSolarPower.h"
|
@ -67,8 +67,11 @@ void URRDADataAssetSubsystem::StartScanForDataAssets() {
|
||||
ReCacheGeneratorDataAssets();
|
||||
|
||||
mDSBuildingData.Empty();
|
||||
ReCacheDSItemFilters();
|
||||
ReCacheDSModAdapterDataAssets();
|
||||
ReCacheDSAdapterCoversDataAssets();
|
||||
|
||||
ReCacheSolarPowerDataAssets();
|
||||
}
|
||||
|
||||
void URRDADataAssetSubsystem::ReCacheDirtDataAssets() {
|
||||
@ -178,6 +181,8 @@ void URRDADataAssetSubsystem::ReCacheDSModAdapterDataAssets() {
|
||||
TSet<URRDADataAssetDSModAdapter*> DataAssets;
|
||||
if (FindAllDataAssetsOfClass(DataAssets)) {
|
||||
for (URRDADataAssetDSModAdapter* DataAsset : DataAssets) {
|
||||
if (DataAsset->mBuildingClass == nullptr) continue;
|
||||
|
||||
FRRDADataHolderDSBuildingData* existingData = mDSBuildingData.Find(DataAsset->mBuildingClass);
|
||||
if (existingData == nullptr) {
|
||||
FRRDADataHolderDSBuildingData newData = FRRDADataHolderDSBuildingData();
|
||||
@ -197,6 +202,8 @@ void URRDADataAssetSubsystem::ReCacheDSAdapterCoversDataAssets() {
|
||||
TSet<URRDADataAssetDSAdapterCovers*> DataAssets;
|
||||
if (FindAllDataAssetsOfClass(DataAssets)) {
|
||||
for (URRDADataAssetDSAdapterCovers* DataAsset : DataAssets) {
|
||||
if (DataAsset->mBuildingClass == nullptr) continue;
|
||||
|
||||
FRRDADataHolderDSBuildingData* existingData = mDSBuildingData.Find(DataAsset->mBuildingClass);
|
||||
if (existingData == nullptr) {
|
||||
FRRDADataHolderDSBuildingData newData = FRRDADataHolderDSBuildingData();
|
||||
@ -211,6 +218,44 @@ void URRDADataAssetSubsystem::ReCacheDSAdapterCoversDataAssets() {
|
||||
UE_LOGFMT(LogRRDApi, Log, "ReCacheDSAdapterCoversDataAssets: {0}", mDSBuildingData.Num());
|
||||
}
|
||||
|
||||
void URRDADataAssetSubsystem::ReCacheDSItemFilters() {
|
||||
TSet<URRDADataAssetDSItemFilter*> DataAssets;
|
||||
if (FindAllDataAssetsOfClass(DataAssets)) {
|
||||
for (URRDADataAssetDSItemFilter* DataAsset : DataAssets) {
|
||||
if (DataAsset->mBuildingClass == nullptr) continue;
|
||||
|
||||
FRRDADataHolderDSBuildingData* existingData = mDSBuildingData.Find(DataAsset->mBuildingClass);
|
||||
if (existingData == nullptr) {
|
||||
FRRDADataHolderDSBuildingData newData = FRRDADataHolderDSBuildingData();
|
||||
newData.ItemFilters.AddUnique(DataAsset);
|
||||
mDSBuildingData.Add(DataAsset->mBuildingClass, newData);
|
||||
}
|
||||
else {
|
||||
existingData->ItemFilters.AddUnique(DataAsset);
|
||||
}
|
||||
}
|
||||
}
|
||||
UE_LOGFMT(LogRRDApi, Log, "ReCacheDSItemFilters: {0}", mDSBuildingData.Num());
|
||||
}
|
||||
|
||||
void URRDADataAssetSubsystem::ReCacheSolarPowerDataAssets()
|
||||
{
|
||||
mSolarPowerAssets.Empty();
|
||||
TSet<URRDADataAssetSolarPower*> DataAssets;
|
||||
|
||||
if (FindAllDataAssetsOfClass(DataAssets)) {
|
||||
for (URRDADataAssetSolarPower* DataAsset : DataAssets) {
|
||||
fgcheckf(DataAsset->mInput.ItemClass, TEXT("SolarPowerDataAsset %s has no ItemClass"), *DataAsset->GetPathName());
|
||||
|
||||
if (!mSolarPowerAssets.Contains(DataAsset)) {
|
||||
mSolarPowerAssets.AddUnique(DataAsset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UE_LOG(LogRRDApi, Log, TEXT("ReCacheSolarPowerDataAssets: %d"), mSolarPowerAssets.Num());
|
||||
}
|
||||
|
||||
int32 URRDADataAssetSubsystem::GetAllDirtItems(TArray<TSubclassOf<UFGItemDescriptor>>& Items) const {
|
||||
if (!mDirtAssets.Num()) {
|
||||
UE_LOG(LogRRDApi, Error, TEXT("No Dirts found!"));
|
||||
@ -308,6 +353,27 @@ bool URRDADataAssetSubsystem::HasDSAdaperCoversForBuildingClass(TSubclassOf<AFGB
|
||||
return IsValid(GetDSAdapterCoverDataAssetForBuildingClass(BuildingClass));
|
||||
}
|
||||
|
||||
TArray<URRDADataAssetDSItemFilter*> URRDADataAssetSubsystem::GetDSItemFiltersDataAssetsForBuildingClass(TSubclassOf<AFGBuildableFactory> BuildingClass) const {
|
||||
if (!BuildingClass) return TArray<URRDADataAssetDSItemFilter*>{};
|
||||
|
||||
const FRRDADataHolderDSBuildingData* data = mDSBuildingData.Find(BuildingClass);
|
||||
if (data == nullptr) return TArray<URRDADataAssetDSItemFilter*>{};
|
||||
|
||||
return data->ItemFilters;
|
||||
}
|
||||
|
||||
TArray<URRDADataAssetDSItemFilter*> URRDADataAssetSubsystem::GetAllDSItemFiltersDataAssets() const {
|
||||
TArray<URRDADataAssetDSItemFilter*> Assets;
|
||||
TArray<FRRDADataHolderDSBuildingData> buildingDatas;
|
||||
|
||||
mDSBuildingData.GenerateValueArray(buildingDatas);
|
||||
|
||||
for (FRRDADataHolderDSBuildingData& buildingData : buildingDatas) {
|
||||
Assets.Append(buildingData.ItemFilters);
|
||||
}
|
||||
return Assets;
|
||||
}
|
||||
|
||||
bool URRDADataAssetSubsystem::GetAllTurbineItems(TArray<TSubclassOf<UFGItemDescriptor>>& Items, int32 Tier) const {
|
||||
if (!mTurbineAssets.Contains(Tier)) {
|
||||
return false;
|
||||
@ -470,3 +536,8 @@ TArray<URRDAHeaterDataAsset*> URRDADataAssetSubsystem::GetAllHeaterAssets(ERRDAH
|
||||
|
||||
return Assets;
|
||||
}
|
||||
|
||||
TArray<URRDADataAssetSolarPower*> URRDADataAssetSubsystem::GetAllSolarPowerAssets() const
|
||||
{
|
||||
return mSolarPowerAssets;
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DataAssets/RRDADataAssetBase.h"
|
||||
#include "Resources/FGItemDescriptor.h"
|
||||
#include "RRDADataAssetDSItemFilter.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class REFINEDRDAPI_API URRDADataAssetDSItemFilter : public URRDADataAssetBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/* The Building class this item filter should be used on */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="ItemFilter")
|
||||
TSubclassOf<AFGBuildableFactory> mBuildingClass;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="ItemFilter")
|
||||
int mInventoryIndex = 0;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="ItemFilter")
|
||||
int mInventorySlotIndex = 0;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="ItemFilter")
|
||||
TArray<TSubclassOf<UFGItemDescriptor>> mItemFilterClasses;
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "RRDADataAssetBase.h"
|
||||
#include "ItemAmount.h"
|
||||
|
||||
#include "RRDADataAssetSolarPower.generated.h"
|
||||
|
||||
UCLASS( BlueprintType )
|
||||
class REFINEDRDAPI_API URRDADataAssetSolarPower : public URRDADataAssetBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Fuel item that this uses
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SolarPower")
|
||||
FItemAmount mInput;
|
||||
|
||||
/**
|
||||
* What this produces
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SolarPower")
|
||||
FItemAmount mOutput;
|
||||
|
||||
/**
|
||||
* What the min heat is needed to produce
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SolarPower")
|
||||
float mMinHeatValue = 0.0f;
|
||||
};
|
@ -8,4 +8,5 @@ enum class ERRDADSInventorySlotAccessInteraction : uint8
|
||||
Ignore,
|
||||
ImportToNetworkFromSlot,
|
||||
ExportFromNetworkToSlot,
|
||||
};
|
||||
LetPlayerDecide,
|
||||
};
|
||||
|
@ -42,11 +42,11 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
ERRDADSInventorySlotAccessInteraction mInteraction = ERRDADSInventorySlotAccessInteraction::Ignore;
|
||||
|
||||
/* Select the item resource form that will be displayed in the digital storage UI
|
||||
This will only display items of this form when players search for an item.
|
||||
/* Select the item resource forms that will be displayed in the digital storage UI
|
||||
This will only display items of these forms when players search for an item.
|
||||
*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
EResourceForm mSlotItemForm = EResourceForm::RF_SOLID;
|
||||
TArray<EResourceForm> mSlotItemForms;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, meta=(NoAutoJson = true))
|
||||
bool mOverrideItemFilter = false;
|
||||
@ -55,12 +55,20 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta=(EditCondition = mOverrideItemFilter))
|
||||
TArray<TSubclassOf<UFGItemDescriptor>> mItemFilter;
|
||||
|
||||
/* Adds only the filtered item from the slot to the Item Selection dropdown. */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
bool mCheckSlotItemFilter = false;
|
||||
|
||||
/* Should check if the inventory slot has an Item Filter set
|
||||
This will override the item class that the player selects with the allowed item class on the slot.
|
||||
Also disables item selection in the UI.
|
||||
*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
bool mCheckSlotItemFilter = false;
|
||||
bool mAutomaticallySetFromSlotItemFilter = false;
|
||||
|
||||
/* This slot will represent the full inventory and will access all inventory slots */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
bool mSlotRepresentsFullInventory = false;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@ -84,4 +92,8 @@ public:
|
||||
/* The Inventory slots to allow access to Digital Storage */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
TArray<FRRDADSModAdapterInventorySlotAccess> mInventorySlots;
|
||||
|
||||
/* Use the inventory on the universal adapter instead of the building adapter */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
bool mUseAdapterInventory = false;
|
||||
};
|
||||
|
@ -13,7 +13,9 @@
|
||||
#include "DataAssets/RRDAHeaterDataAsset.h"
|
||||
#include "DataAssets/RRDATurbineDataAsset.h"
|
||||
#include "DataAssets/RRDACoolerDataAsset.h"
|
||||
#include "DataAssets/RRDADataAssetDSItemFilter.h"
|
||||
#include "DataAssets/RRDADataAssetDSModAdapter.h"
|
||||
#include "DataAssets/RRDADataAssetSolarPower.h"
|
||||
#include "Enums/RRDARPEnums.h"
|
||||
#include "Resources/FGItemDescriptor.h"
|
||||
|
||||
@ -66,6 +68,9 @@ struct FRRDADataHolderDSBuildingData
|
||||
|
||||
UPROPERTY()
|
||||
URRDADataAssetDSModAdapter* ModAdapter;
|
||||
|
||||
UPROPERTY()
|
||||
TArray<URRDADataAssetDSItemFilter*> ItemFilters;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
@ -98,6 +103,8 @@ public:
|
||||
void ReCacheGeneratorDataAssets();
|
||||
void ReCacheDSModAdapterDataAssets();
|
||||
void ReCacheDSAdapterCoversDataAssets();
|
||||
void ReCacheDSItemFilters();
|
||||
void ReCacheSolarPowerDataAssets();
|
||||
|
||||
public:
|
||||
// Dirt Functions
|
||||
@ -133,6 +140,14 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category = "RRDA|DataAsset|DS")
|
||||
bool HasDSAdaperCoversForBuildingClass(TSubclassOf<AFGBuildableFactory> BuildingClass);
|
||||
|
||||
// DS Item Filters
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "RRDA|DataAsset|DS")
|
||||
TArray<URRDADataAssetDSItemFilter*> GetDSItemFiltersDataAssetsForBuildingClass(TSubclassOf<AFGBuildableFactory> BuildingClass) const;
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "RRDA|DataAsset|DS")
|
||||
TArray<URRDADataAssetDSItemFilter*> GetAllDSItemFiltersDataAssets() const;
|
||||
|
||||
// Turbine Functions
|
||||
UFUNCTION(BlueprintPure, Category = "RRDA|DataAsset|RP|MP")
|
||||
bool GetAllTurbineItems(TArray<TSubclassOf<UFGItemDescriptor>>& Items, int32 Tier) const;
|
||||
@ -198,6 +213,9 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category = "RRDA|DataAsset|RP|MP")
|
||||
TArray<URRDAHeaterDataAsset*> GetAllHeaterAssets(ERRDAHeaterType Type) const;
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "RRDA|DataAsset|RP|Solar")
|
||||
TArray<URRDADataAssetSolarPower*> GetAllSolarPowerAssets() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Find all data assets of a specific class
|
||||
@ -229,6 +247,9 @@ public:
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TMap<ERRDAHeaterType, FRRDADataHolderHeaterData> mHeaterAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TArray<URRDADataAssetSolarPower*> mSolarPowerAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TSet<URRDADataAssetBase*> mDisabledDataAssets;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user