Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0614aa6526 | ||
|
|
b89a41dfb5 | ||
|
|
7d8d80e6a9 | ||
|
|
33a1201424 | ||
|
|
dbcd107343 | ||
|
|
74badcca9b | ||
|
|
0b4b8c5e07 | ||
|
|
9b59c2bc05 | ||
|
|
01283bc50a | ||
|
|
39ecb1df11 | ||
|
|
a5a89443de | ||
|
|
e5583a3b92 | ||
|
|
a89cbbf2c8 | ||
|
|
db848b428f | ||
|
|
2e78f37d54 | ||
|
|
c1cbe82bcd | ||
|
|
0aea87dcea | ||
|
|
385dc543ad | ||
|
|
b309136b5c |
+193
-97
@@ -1,140 +1,236 @@
|
||||
name: Mod Build
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
on: push
|
||||
env:
|
||||
MOD_NAME: "RefinedRDApi"
|
||||
MOD_ID: "7q2RnptXynYzEX"
|
||||
SML_DIR: "S:/SF/SML"
|
||||
ENGINE_DIR: "F:/5.3.2-CSS"
|
||||
SML_DIR: "S:/SML"
|
||||
ENGINE_DIR: "S:/UE"
|
||||
BUILT_MODS_DIR: "${{ gitea.workspace }}/BuiltMods"
|
||||
DEV_BUILDS_DIR: "${{ gitea.workspace }}/DevBuilds"
|
||||
MODS_TO_BUILD: "RefinedRDApi"
|
||||
MOD_DEPENDENCIES: ""
|
||||
IS_GAME_FEATURE_PLUGIN: "false"
|
||||
|
||||
jobs:
|
||||
Setup:
|
||||
runs-on: windows-2022
|
||||
Details:
|
||||
runs-on: ubuntu-docker
|
||||
steps:
|
||||
- run: |
|
||||
echo "DEPLOY: ${{vars.DEPLOY}}"
|
||||
echo "DEVBUILD: ${{vars.DEVBUILD}}"
|
||||
echo "Branch/Tag: ${{gitea.ref_name}}"
|
||||
echo "Mod Name: ${{env.MOD_NAME}}"
|
||||
echo "SML Directory: ${{env.SML_DIR}}"
|
||||
echo "Engine Directory: ${{env.ENGINE_DIR}}"
|
||||
echo "Built Mods Directory: ${{env.BUILT_MODS_DIR}}"
|
||||
echo "Dev Build Directory: ${{env.DEV_BUILDS_DIR}}"
|
||||
echo "Change Log: ${{vars.CHANGELOG}}"
|
||||
|
||||
Build:
|
||||
runs-on: windows-ue
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
outputs:
|
||||
version: ${{steps.version.outputs.version}}
|
||||
steps:
|
||||
- name: Compute Version
|
||||
id: version
|
||||
run: |
|
||||
$year = (Get-Date).Year
|
||||
$month = (Get-Date).Month
|
||||
$quarter = [math]::Ceiling($month / 3)
|
||||
$quarterKey = "$year.$quarter"
|
||||
|
||||
$response = curl -s -X POST `
|
||||
-H "x-rp-key: ${{secrets.RRD_API_KEY}}" `
|
||||
-H "Content-Type: application/json" `
|
||||
-d "{`"quarter`":`"$quarterKey`"}" `
|
||||
"${{secrets.RRD_API_URL}}/api/v1/mods/buildnumber/${{env.MOD_NAME}}/increment" | ConvertFrom-Json
|
||||
|
||||
if (-not $response.build) {
|
||||
Write-Error "Failed to get build number from API"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$version = "$quarterKey.$($response.build)"
|
||||
Write-Output "version=$version" >> $Env:GITHUB_OUTPUT
|
||||
echo "Computed version: $version"
|
||||
|
||||
- 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}}}
|
||||
- name: Install WWise
|
||||
run: |
|
||||
if (Test-Path "${{env.SML_DIR}}/.git" -PathType Container) {
|
||||
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: "SML Headers"
|
||||
git fetch origin dev
|
||||
git reset --hard origin/dev
|
||||
} else {
|
||||
git clone --branch dev https://github.com/satisfactorymodding/SatisfactoryModLoader.git ${{env.SML_DIR}}
|
||||
}
|
||||
|
||||
- name: Pull Wwise Project
|
||||
run: |
|
||||
cd S:/SF/Scripts/sml-fixer
|
||||
./sml-fixer.exe
|
||||
PullMods:
|
||||
needs: Setup
|
||||
strategy:
|
||||
matrix:
|
||||
value: ["RefinedRDApi"]
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- name: "Clone Mod"
|
||||
run: |
|
||||
echo "Cloning Mod ${{matrix.value}}"
|
||||
cd ${{env.SML_DIR}}/Mods
|
||||
if (!(Test-Path ${{env.SML_DIR}}/Mods/${{matrix.value}} -PathType Container)) {git clone --branch main git@10.10.10.14:RefinedRD/sf_mod_${{matrix.value}}.git ${{env.SML_DIR}}/Mods/${{matrix.value}}}
|
||||
cd ${{env.SML_DIR}}/Mods/${{matrix.value}}
|
||||
if (!(Test-Path "${{env.SML_DIR}}/SML_WwiseProject" -PathType Container)) {
|
||||
git clone --branch main git@10.10.10.14:RefinedRD/WwiseProject.git "${{env.SML_DIR}}/SML_WwiseProject"
|
||||
}
|
||||
cd ${{env.SML_DIR}}/SML_WwiseProject
|
||||
git fetch --all
|
||||
git reset --hard origin/main
|
||||
git lfs fetch --all
|
||||
git lfs pull
|
||||
git lfs checkout
|
||||
$wwiseConsole = "C:/Program Files (x86)/Audiokinetic/Wwise2023.1.14.8770/Authoring/x64/Release/bin/WwiseConsole.exe"
|
||||
if (!(Test-Path $wwiseConsole)) {
|
||||
Write-Error "WwiseConsole not found at $wwiseConsole"
|
||||
exit 1
|
||||
}
|
||||
& $wwiseConsole generate-soundbank "${{env.SML_DIR}}/SML_WwiseProject/SML_WwiseProject.wproj" --platform Windows Mac --verbose
|
||||
echo "Done"
|
||||
UpdateUPlugins:
|
||||
needs: PullMods
|
||||
strategy:
|
||||
matrix:
|
||||
value: ["RefinedRDApi"]
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- name: "Update Mod UPlugin Version"
|
||||
|
||||
- name: Pull Mods
|
||||
run: |
|
||||
echo "Updating ${{env.SML_DIR}}/Mods/${{matrix.value}}/${{matrix.value}}.uplugin"
|
||||
$Uplugin = (Get-Content ${{env.SML_DIR}}/Mods/${{matrix.value}}/${{matrix.value}}.uplugin | convertfrom-json)
|
||||
$UPlugin.SemVersion = $(Get-Content "${{env.SML_DIR}}/Mods/${{matrix.value}}/VERSION")
|
||||
$UPlugin.VersionName = $(Get-Content "${{env.SML_DIR}}/Mods/${{matrix.value}}/VERSION")
|
||||
$Version = $Uplugin.SemVersion
|
||||
($UPlugin | convertto-json -Depth 100) -replace '\\u0026', '&' | Set-Content ${{env.SML_DIR}}/Mods/${{matrix.value}}/${{matrix.value}}.uplugin
|
||||
echo "Done"
|
||||
CompileEditor:
|
||||
needs: UpdateUPlugins
|
||||
runs-on: windows-2022
|
||||
outputs:
|
||||
version: ${{steps.getversion.outputs.version}}
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
env:
|
||||
BUILD_TOOL_EXE: ${{env.ENGINE_DIR}}/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe
|
||||
steps:
|
||||
- name: Get Version
|
||||
id: getversion
|
||||
$modPath = "${{env.SML_DIR}}/Mods/${{env.MOD_NAME}}"
|
||||
$repoName = "sf_mod_${{env.MOD_NAME}}"
|
||||
|
||||
if ("${{env.IS_GAME_FEATURE_PLUGIN}}" -eq "true") {
|
||||
$modPath = "${{env.SML_DIR}}/Mods/GameFeatures/${{env.MOD_NAME}}"
|
||||
}
|
||||
|
||||
if (!(Test-Path $modPath -PathType Container)) {
|
||||
git clone git@10.10.10.14:RefinedRD/$repoName.git $modPath
|
||||
}
|
||||
|
||||
cd $modPath
|
||||
$ref = "${{gitea.ref_name}}"
|
||||
git fetch --all --tags
|
||||
if (git rev-parse --verify --quiet "refs/tags/$ref") {
|
||||
git reset --hard $ref
|
||||
} else {
|
||||
git reset --hard "origin/$ref"
|
||||
}
|
||||
echo "Pulled ${{env.MOD_NAME}} @ latest (${{gitea.ref_name}})"
|
||||
|
||||
- name: Update UPlugin Versions
|
||||
run: |
|
||||
$Version = $(Get-Content "${{env.SML_DIR}}/Mods/${{env.MOD_NAME}}/VERSION")
|
||||
Write-Output "version=$($Version)" >> $Env:GITHUB_OUTPUT
|
||||
- name: "Gen-VS-Files"
|
||||
run: |
|
||||
cd ${{env.SML_DIR}}
|
||||
${{env.BUILD_TOOL_EXE}} -projectfiles -project="${{env.SML_DIR}}/FactoryGame.uproject" -game -rocket -progress
|
||||
$newVersion = "${{steps.version.outputs.version}}"
|
||||
|
||||
$mod = "${{env.MOD_NAME}}"
|
||||
$modPath = "${{env.SML_DIR}}/Mods/$mod"
|
||||
|
||||
if ("${{env.IS_GAME_FEATURE_PLUGIN}}" -eq "true") {
|
||||
$modPath = "${{env.SML_DIR}}/Mods/GameFeatures/$mod"
|
||||
}
|
||||
|
||||
$upluginPath = "$modPath/$mod.uplugin"
|
||||
$UPlugin = (Get-Content $upluginPath | ConvertFrom-Json)
|
||||
|
||||
$majorVersion = [int]($newVersion -split '\.')[0]
|
||||
|
||||
$UPlugin.Version = $majorVersion
|
||||
$UPlugin.SemVersion = $newVersion
|
||||
$UPlugin.VersionName = $newVersion
|
||||
echo "Set $mod version to $newVersion (Version=$majorVersion)"
|
||||
|
||||
($UPlugin | ConvertTo-Json -Depth 100) -replace '\\u0026', '&' | Set-Content $upluginPath
|
||||
|
||||
- name: Compile Editor
|
||||
run: |
|
||||
$buildTool = "${{env.ENGINE_DIR}}/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe"
|
||||
cd ${{env.SML_DIR}}
|
||||
${{env.BUILD_TOOL_EXE}} Development Win64 -project="${{env.SML_DIR}}/FactoryGame.uproject" -TargetType="Editor" -progress
|
||||
BuildMods:
|
||||
needs: CompileEditor
|
||||
strategy:
|
||||
matrix:
|
||||
value: ["RefinedRDApi"]
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- name: "Build Mod"
|
||||
& $buildTool -projectfiles -project="${{env.SML_DIR}}/FactoryGame.uproject" -game -rocket -progress
|
||||
& $buildTool Development Win64 -project="${{env.SML_DIR}}/FactoryGame.uproject" -TargetType="Editor" -progress
|
||||
|
||||
- name: Build Mods
|
||||
run: |
|
||||
$Version = $(Get-Content "${{env.SML_DIR}}/Mods/${{matrix.value}}/VERSION")
|
||||
& "${{env.ENGINE_DIR}}/Engine/Build/BatchFiles/RunUAT.bat" -ScriptsForProject="${{env.SML_DIR}}/FactoryGame.uproject" PackagePlugin -Project="${{env.SML_DIR}}/FactoryGame.uproject" -dlcname="${{matrix.value}}" -build -server -clientconfig=Shipping -serverconfig=Shipping -platform=Win64 -serverplatform=Win64+Linux -nocompileeditor -installed -merge
|
||||
if (!(Test-Path ${{env.BUILT_MODS_DIR}})) {New-Item -ItemType Directory -Force -Path ${{env.BUILT_MODS_DIR}}}
|
||||
Copy-Item ${{env.SML_DIR}}/Saved/ArchivedPlugins/${{matrix.value}}/${{matrix.value}}.zip ${{env.BUILT_MODS_DIR}}/${{matrix.value}}.$Version.zip -Force
|
||||
$newVersion = "${{steps.version.outputs.version}}"
|
||||
|
||||
if (!(Test-Path ${{env.BUILT_MODS_DIR}})) {
|
||||
New-Item -ItemType Directory -Force -Path ${{env.BUILT_MODS_DIR}}
|
||||
}
|
||||
$mod = "${{env.MOD_NAME}}"
|
||||
if (Test-Path "${{env.SML_DIR}}/Saved/ArchivedPlugins/$mod") {
|
||||
Remove-Item -Recurse "${{env.SML_DIR}}/Saved/ArchivedPlugins/$mod"
|
||||
}
|
||||
|
||||
if ("${{env.IS_GAME_FEATURE_PLUGIN}}" -eq "true") {
|
||||
$modPath = "${{env.SML_DIR}}/Mods/GameFeatures/$mod"
|
||||
}else {
|
||||
$modPath = "${{env.SML_DIR}}/Mods/$mod"
|
||||
}
|
||||
|
||||
$version = $newVersion
|
||||
|
||||
& "${{env.ENGINE_DIR}}/Engine/Build/BatchFiles/RunUAT.bat" `
|
||||
-ScriptsForProject="${{env.SML_DIR}}/FactoryGame.uproject" `
|
||||
PackagePlugin `
|
||||
-Project="${{env.SML_DIR}}/FactoryGame.uproject" `
|
||||
-dlcname="$mod" `
|
||||
-build -server `
|
||||
-clientconfig=Shipping -serverconfig=Shipping `
|
||||
-platform=Win64 -serverplatform=Win64+Linux `
|
||||
-nocompileeditor -installed -merge
|
||||
|
||||
Copy-Item "${{env.SML_DIR}}/Saved/ArchivedPlugins/$mod/$mod.zip" "${{env.BUILT_MODS_DIR}}/$mod.$version.zip" -Force
|
||||
|
||||
echo "Done $mod @ $version"
|
||||
|
||||
- name: Publish Built Version
|
||||
run: |
|
||||
$version = "${{steps.version.outputs.version}}"
|
||||
$modPath = "${{env.SML_DIR}}/Mods/${{env.MOD_NAME}}"
|
||||
if ("${{env.IS_GAME_FEATURE_PLUGIN}}" -eq "true") {
|
||||
$modPath = "${{env.SML_DIR}}/Mods/GameFeatures/${{env.MOD_NAME}}"
|
||||
}
|
||||
$commit = (git -C $modPath rev-parse HEAD)
|
||||
$body = "{`"version`":`"$version`",`"commit`":`"$commit`"}"
|
||||
curl -s -X POST `
|
||||
-H "x-rp-key: ${{secrets.RRD_API_KEY}}" `
|
||||
-H "Content-Type: application/json" `
|
||||
-d $body `
|
||||
"${{secrets.RRD_API_URL}}/api/v1/mods/version/${{env.MOD_NAME}}"
|
||||
echo ""
|
||||
echo "Published ${{env.MOD_NAME}} @ $version ($commit)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: built-mods
|
||||
path: ${{env.BUILT_MODS_DIR}}/${{matrix.value}}.*.zip
|
||||
path: |
|
||||
${{env.BUILT_MODS_DIR}}/*.zip
|
||||
${{env.BUILT_MODS_DIR}}/Install-DevBuild.ps1
|
||||
overwrite: true
|
||||
|
||||
SMRDeploy:
|
||||
if: ${{ vars.DEPLOY != 'false' }}
|
||||
needs: BuildMods
|
||||
runs-on: windows-2022
|
||||
if: ${{ vars.DEPLOY == 'true' }}
|
||||
needs: Build
|
||||
runs-on: windows-ue
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- name: Download a artifact
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: built-mods
|
||||
path: ${{env.BUILT_MODS_DIR}}
|
||||
- name: "Deploy to SMR"
|
||||
|
||||
- name: Deploy to SMR
|
||||
run: |
|
||||
echo "Deploying to SMR"
|
||||
$Version = $(Get-Content "${{env.SML_DIR}}/Mods/${{env.MOD_NAME}}/VERSION")
|
||||
$Version = "${{needs.Build.outputs.version}}"
|
||||
$query = '{ "query": "query { getModByReference(modReference:\"${{env.MOD_NAME}}\"){ versions(filter:{limit: 1}){ version } }}"}'
|
||||
echo $query
|
||||
$SMRVersion = (Invoke-RestMethod -Method POST -uri "https://api.ficsit.app/v2/query" -body $query -ContentType "application/json").data.getModByReference.versions[0].version
|
||||
if($Version -eq $SMRVersion) { echo "SMR Mod Version Already Exists.. Skip"; exit 0 }
|
||||
$SMRVersion = (Invoke-RestMethod `
|
||||
-Method POST `
|
||||
-Uri "https://api.ficsit.app/v2/query" `
|
||||
-Body $query `
|
||||
-ContentType "application/json").data.getModByReference.versions[0].version
|
||||
if ($Version -eq $SMRVersion) {
|
||||
echo "SMR Mod Version Already Exists.. Skip"
|
||||
exit 0
|
||||
}
|
||||
$File = (Get-ChildItem "${{env.BUILT_MODS_DIR}}/${{env.MOD_NAME}}*").FullName
|
||||
$APIURL = "https://api.ficsit.app"
|
||||
write-host "$File, $APIURL"
|
||||
& "S:/SF/Scripts/ficsit_windows_amd64.exe" smr upload --api-base "$APIURL" --api-key "${{secrets.FICSIT_TOKEN}}" "${{env.MOD_ID}}" "$File" "${{vars.CHANGELOG}}"
|
||||
Write-Host "Uploading $File to $APIURL"
|
||||
& "S:/ficsit_windows_amd64.exe" smr upload `
|
||||
--api-base "$APIURL" `
|
||||
--api-key "${{secrets.FICSIT_TOKEN}}" `
|
||||
"${{env.MOD_ID}}" "$File" "${{vars.CHANGELOG}}"
|
||||
echo "Done"
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
## 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,8 +1,8 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"Version": 1,
|
||||
"VersionName": "1.0.3",
|
||||
"SemVersion": "1.0.3",
|
||||
"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.12.0"
|
||||
}
|
||||
],
|
||||
"GameVersion": ">=377620"
|
||||
"GameVersion": ">=491125"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
//
|
||||
|
||||
#include "DataAssets/RRDADataAssetSolarPower.h"
|
||||
@@ -70,6 +70,8 @@ void URRDADataAssetSubsystem::StartScanForDataAssets() {
|
||||
ReCacheDSItemFilters();
|
||||
ReCacheDSModAdapterDataAssets();
|
||||
ReCacheDSAdapterCoversDataAssets();
|
||||
|
||||
ReCacheSolarPowerDataAssets();
|
||||
}
|
||||
|
||||
void URRDADataAssetSubsystem::ReCacheDirtDataAssets() {
|
||||
@@ -236,6 +238,24 @@ void URRDADataAssetSubsystem::ReCacheDSItemFilters() {
|
||||
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!"));
|
||||
@@ -245,13 +265,13 @@ int32 URRDADataAssetSubsystem::GetAllDirtItems(TArray<TSubclassOf<UFGItemDescrip
|
||||
|
||||
URRDADirtDataAsset* URRDADataAssetSubsystem::GetDataForDirtItem(TSubclassOf<UFGItemDescriptor> Item) const {
|
||||
if (!Item) return nullptr;
|
||||
URRDADirtDataAsset* const* Desc = mDirtAssets.Find(Item);
|
||||
TObjectPtr<URRDADirtDataAsset> const* Desc = mDirtAssets.Find(Item);
|
||||
if (!Desc) return nullptr;
|
||||
return *Desc;
|
||||
}
|
||||
|
||||
TArray<URRDADirtDataAsset*> URRDADataAssetSubsystem::GetAllDirtAssets() const {
|
||||
TArray<URRDADirtDataAsset*> Assets;
|
||||
TArray<TObjectPtr<URRDADirtDataAsset>> Assets;
|
||||
mDirtAssets.GenerateValueArray(Assets);
|
||||
return Assets;
|
||||
}
|
||||
@@ -382,13 +402,14 @@ TArray<URRDATurbineDataAsset*> URRDADataAssetSubsystem::GetAllTurbineAssets(int3
|
||||
return TArray<URRDATurbineDataAsset*>();
|
||||
}
|
||||
|
||||
TArray<URRDATurbineDataAsset*> Assets;
|
||||
TArray<TObjectPtr<URRDATurbineDataAsset>> Assets;
|
||||
mTurbineAssets[Tier].Data.GenerateValueArray(Assets);
|
||||
return Assets;
|
||||
}
|
||||
|
||||
URRDATurbineDataAsset* URRDADataAssetSubsystem::GetDefaultTurbineAsset(int32 Tier) const {
|
||||
return GetAllTurbineAssets(Tier).Top();
|
||||
TArray<URRDATurbineDataAsset*> Assets = GetAllTurbineAssets(Tier);
|
||||
return Assets.Num() > 0 ? Assets.Top() : nullptr;
|
||||
}
|
||||
|
||||
URRDATurbineDataAsset* URRDADataAssetSubsystem::GetTurbineItemData(TSubclassOf<UFGItemDescriptor> Item, int32 Tier) const {
|
||||
@@ -415,7 +436,8 @@ URRDACoolerDataAsset* URRDADataAssetSubsystem::GetCoolerItemData(TSubclassOf<UFG
|
||||
}
|
||||
|
||||
URRDACoolerDataAsset* URRDADataAssetSubsystem::GetDefaultCoolerAsset(ERRDACoolerType Type) const {
|
||||
return GetAllCoolerAssets(Type).Top();
|
||||
TArray<URRDACoolerDataAsset*> Assets = GetAllCoolerAssets(Type);
|
||||
return Assets.Num() > 0 ? Assets.Top() : nullptr;
|
||||
}
|
||||
|
||||
TArray<URRDACoolerDataAsset*> URRDADataAssetSubsystem::GetAllCoolerAssets(ERRDACoolerType Type) const {
|
||||
@@ -424,7 +446,7 @@ TArray<URRDACoolerDataAsset*> URRDADataAssetSubsystem::GetAllCoolerAssets(ERRDAC
|
||||
return TArray<URRDACoolerDataAsset*>();
|
||||
}
|
||||
|
||||
TArray<URRDACoolerDataAsset*> Assets;
|
||||
TArray<TObjectPtr<URRDACoolerDataAsset>> Assets;
|
||||
mCoolerAssets[Type].Data.GenerateValueArray(Assets);
|
||||
|
||||
return Assets;
|
||||
@@ -461,7 +483,8 @@ bool URRDADataAssetSubsystem::GetAllBoilerRelevantItems(TArray<TSubclassOf<UFGIt
|
||||
}
|
||||
|
||||
URRDABoilerDataAsset* URRDADataAssetSubsystem::GetDefaultBoilerAsset(int32 Tier) const {
|
||||
return GetAllBoilerAssets(Tier).Top();
|
||||
TArray<URRDABoilerDataAsset*> Assets = GetAllBoilerAssets(Tier);
|
||||
return Assets.Num() > 0 ? Assets.Top() : nullptr;
|
||||
}
|
||||
|
||||
TArray<URRDABoilerDataAsset*> URRDADataAssetSubsystem::GetAllBoilerAssets(int32 Tier) const {
|
||||
@@ -470,7 +493,7 @@ TArray<URRDABoilerDataAsset*> URRDADataAssetSubsystem::GetAllBoilerAssets(int32
|
||||
return TArray<URRDABoilerDataAsset*>();
|
||||
}
|
||||
|
||||
TArray<URRDABoilerDataAsset*> Assets;
|
||||
TArray<TObjectPtr<URRDABoilerDataAsset>> Assets;
|
||||
mBoilerAssets[Tier].Data.GenerateValueArray(Assets);
|
||||
|
||||
return Assets;
|
||||
@@ -502,7 +525,8 @@ bool URRDADataAssetSubsystem::GetAllHeaterRelevantItems(TArray<TSubclassOf<UFGIt
|
||||
}
|
||||
|
||||
URRDAHeaterDataAsset* URRDADataAssetSubsystem::GetDefaultHeaterAsset(ERRDAHeaterType Type) const {
|
||||
return GetAllHeaterAssets(Type).Top();
|
||||
TArray<URRDAHeaterDataAsset*> Assets = GetAllHeaterAssets(Type);
|
||||
return Assets.Num() > 0 ? Assets.Top() : nullptr;
|
||||
}
|
||||
|
||||
TArray<URRDAHeaterDataAsset*> URRDADataAssetSubsystem::GetAllHeaterAssets(ERRDAHeaterType Type) const {
|
||||
@@ -511,8 +535,13 @@ TArray<URRDAHeaterDataAsset*> URRDADataAssetSubsystem::GetAllHeaterAssets(ERRDAH
|
||||
return TArray<URRDAHeaterDataAsset*>();
|
||||
}
|
||||
|
||||
TArray<URRDAHeaterDataAsset*> Assets;
|
||||
TArray<TObjectPtr<URRDAHeaterDataAsset>> Assets;
|
||||
mHeaterAssets[Type].Data.GenerateValueArray(Assets);
|
||||
|
||||
return Assets;
|
||||
}
|
||||
|
||||
TArray<URRDADataAssetSolarPower*> URRDADataAssetSubsystem::GetAllSolarPowerAssets() const
|
||||
{
|
||||
return mSolarPowerAssets;
|
||||
}
|
||||
|
||||
@@ -42,5 +42,5 @@ public:
|
||||
* Curve for the production to Heat
|
||||
*/
|
||||
UPROPERTY( EditDefaultsOnly, BlueprintReadOnly, Category = "Boiler" )
|
||||
UCurveFloat* mBoilerCurve;
|
||||
TObjectPtr<UCurveFloat> mBoilerCurve;
|
||||
};
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
|
||||
/* The Adapter Cover Asset */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="ModAdapter")
|
||||
URRDADataAssetDSAdapterCovers* mAdapterCoversAsset;
|
||||
TObjectPtr<URRDADataAssetDSAdapterCovers> mAdapterCoversAsset;
|
||||
|
||||
/* Select which inventories can be accessed by Digital Storage */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="ModAdapter")
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
@@ -36,5 +36,5 @@ public:
|
||||
* Curve that defines the power output of the generator
|
||||
*/
|
||||
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Generator" )
|
||||
UCurveFloat* mGeneratorCurve;
|
||||
TObjectPtr<UCurveFloat> mGeneratorCurve;
|
||||
};
|
||||
@@ -8,4 +8,5 @@ enum class ERRDADSInventorySlotAccessInteraction : uint8
|
||||
Ignore,
|
||||
ImportToNetworkFromSlot,
|
||||
ExportFromNetworkToSlot,
|
||||
LetPlayerDecide,
|
||||
};
|
||||
@@ -65,6 +65,10 @@ public:
|
||||
*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
bool mAutomaticallySetFromSlotItemFilter = false;
|
||||
|
||||
/* This slot will represent the full inventory and will access all inventory slots */
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||
bool mSlotRepresentsFullInventory = false;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@@ -88,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;
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "DataAssets/RRDACoolerDataAsset.h"
|
||||
#include "DataAssets/RRDADataAssetDSItemFilter.h"
|
||||
#include "DataAssets/RRDADataAssetDSModAdapter.h"
|
||||
#include "DataAssets/RRDADataAssetSolarPower.h"
|
||||
#include "Enums/RRDARPEnums.h"
|
||||
#include "Resources/FGItemDescriptor.h"
|
||||
|
||||
@@ -27,7 +28,7 @@ struct FRRDADataHolderTurbineData
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, URRDATurbineDataAsset*> Data;
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, TObjectPtr<URRDATurbineDataAsset>> Data;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@@ -36,7 +37,7 @@ struct FRRDADataHolderBoilerData
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, URRDABoilerDataAsset*> Data;
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, TObjectPtr<URRDABoilerDataAsset>> Data;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@@ -45,7 +46,7 @@ struct FRRDADataHolderCoolerData
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, URRDACoolerDataAsset*> Data;
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, TObjectPtr<URRDACoolerDataAsset>> Data;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@@ -54,7 +55,7 @@ struct FRRDADataHolderHeaterData
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, URRDAHeaterDataAsset*> Data;
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, TObjectPtr<URRDAHeaterDataAsset>> Data;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@@ -63,13 +64,13 @@ struct FRRDADataHolderDSBuildingData
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY()
|
||||
URRDADataAssetDSAdapterCovers* AdapterCovers;
|
||||
TObjectPtr<URRDADataAssetDSAdapterCovers> AdapterCovers;
|
||||
|
||||
UPROPERTY()
|
||||
URRDADataAssetDSModAdapter* ModAdapter;
|
||||
TObjectPtr<URRDADataAssetDSModAdapter> ModAdapter;
|
||||
|
||||
UPROPERTY()
|
||||
TArray<URRDADataAssetDSItemFilter*> ItemFilters;
|
||||
TArray<TObjectPtr<URRDADataAssetDSItemFilter>> ItemFilters;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
@@ -103,6 +104,7 @@ public:
|
||||
void ReCacheDSModAdapterDataAssets();
|
||||
void ReCacheDSAdapterCoversDataAssets();
|
||||
void ReCacheDSItemFilters();
|
||||
void ReCacheSolarPowerDataAssets();
|
||||
|
||||
public:
|
||||
// Dirt Functions
|
||||
@@ -211,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
|
||||
@@ -222,13 +227,13 @@ public:
|
||||
|
||||
public:
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, URRDADirtDataAsset*> mDirtAssets;
|
||||
TMap<TSubclassOf<UFGItemDescriptor>, TObjectPtr<URRDADirtDataAsset>> mDirtAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TMap<TSubclassOf<AFGBuildableFactory>, FRRDADataHolderDSBuildingData> mDSBuildingData;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TMap<int32, URRDAGeneratorDataAsset*> mGeneratorAssets;
|
||||
TMap<int32, TObjectPtr<URRDAGeneratorDataAsset>> mGeneratorAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TMap<int32, FRRDADataHolderTurbineData> mTurbineAssets;
|
||||
@@ -243,10 +248,13 @@ public:
|
||||
TMap<ERRDAHeaterType, FRRDADataHolderHeaterData> mHeaterAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TSet<URRDADataAssetBase*> mDisabledDataAssets;
|
||||
TArray<TObjectPtr<URRDADataAssetSolarPower>> mSolarPowerAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TSet<URRDADataAssetBase*> mEnabledDataAssets;
|
||||
TSet<TObjectPtr<URRDADataAssetBase>> mDisabledDataAssets;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "RRDA|DataAsset")
|
||||
TSet<TObjectPtr<URRDADataAssetBase>> mEnabledDataAssets;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RefinedRDApi : ModuleRules
|
||||
PublicDependencyModuleNames.AddRange(new[]
|
||||
{
|
||||
"AbstractInstance",
|
||||
"InstancedSplinesComponent",
|
||||
//"InstancedSplinesComponent",
|
||||
"SignificanceISPC"
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user