Skip to content

Commit 99fe7ac

Browse files
committed
Update for SDK and latest Resonite version
1 parent 813e02a commit 99fe7ac

10 files changed

Lines changed: 57 additions & 110 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,9 @@ jobs:
4343
- name: Setup Dotnet
4444
uses: actions/setup-dotnet@v4
4545
with:
46-
dotnet-version: 8.x
46+
dotnet-version: 10.x
4747
source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json
48-
49-
- name: Add MonkeyLoader NuGet Source
50-
run: dotnet nuget add source https://pkg.munally.com/MonkeyModdingTroop/index.json
51-
48+
5249
- name: Restore NuGet Package Cache
5350
uses: actions/cache/restore@v4
5451
with:
@@ -98,7 +95,7 @@ jobs:
9895
- name: Setup Dotnet
9996
uses: actions/setup-dotnet@v4
10097
with:
101-
dotnet-version: 8.x
98+
dotnet-version: 10.x
10299
source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json
103100

104101
- name: Add MonkeyLoader NuGet Source

.github/workflows/publish.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ jobs:
6868
- name: Setup Dotnet
6969
uses: actions/setup-dotnet@v4
7070
with:
71-
dotnet-version: 8.x
71+
dotnet-version: 10.x
7272
source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json
73-
74-
- name: Add MonkeyLoader NuGet Source
75-
run: dotnet nuget add source https://pkg.munally.com/MonkeyModdingTroop/index.json
7673

7774
# Publish all NuGet packages to the GitHub feed
7875
# Use --skip-duplicate to prevent errors if a package with the same version already exists.

Directory.Build.props

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,22 @@
11
<Project>
22
<PropertyGroup>
3-
<OutputType>Library</OutputType>
4-
<TargetFramework>net462</TargetFramework>
5-
<AssemblyFileName>$(AssemblyTitle).dll</AssemblyFileName>
6-
<LangVersion>12.0</LangVersion>
7-
<Nullable>enable</Nullable>
8-
<Deterministic>true</Deterministic>
9-
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
10-
<DebugType>portable</DebugType>
11-
<GenerateDocumentationFile>True</GenerateDocumentationFile>
12-
13-
<CopyToLibraries Condition="'$(CopyToLibraries)'==''">true</CopyToLibraries>
3+
<ResoniteInstallOnBuild Condition="'$(ResoniteInstallOnBuild)'==''">true</ResoniteInstallOnBuild>
144

155
<RestoreAdditionalProjectSources>
16-
https://pkg.munally.com/MonkeyModdingTroop/index.json;
176
https://nuget.pkg.github.com/ResoniteModdingGroup/index.json
187
</RestoreAdditionalProjectSources>
198
</PropertyGroup>
209

2110
<PropertyGroup>
2211
<PackageReadmeFile>README.md</PackageReadmeFile>
23-
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
24-
<RepositoryType>git</RepositoryType>
25-
<IncludeSymbols>False</IncludeSymbols>
26-
<EmbedAllSources>True</EmbedAllSources>
27-
<EmbedUntrackedSources>True</EmbedUntrackedSources>
28-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
29-
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
3012
</PropertyGroup>
3113

3214
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
3315
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
34-
<CopyToLibraries>false</CopyToLibraries>
16+
<ResoniteInstallOnBuild>false</ResoniteInstallOnBuild>
3517
</PropertyGroup>
3618

3719
<PropertyGroup Condition="'$(ResonitePath)'==''">
38-
<ResonitePath>$(MSBuildThisFileDirectory)Resonite</ResonitePath>
39-
<ResonitePath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\Resonite\')">C:\Program Files (x86)\Steam\steamapps\common\Resonite</ResonitePath>
40-
<ResonitePath Condition="Exists('$(HOME)/.steam/steam/steamapps/common/Resonite/')">$(HOME)/.steam/steam/steamapps/common/Resonite</ResonitePath>
4120
<ResonitePath Condition="Exists('D:/Files/Games/Resonite/app/')">D:/Files/Games/Resonite/app</ResonitePath>
4221
</PropertyGroup>
4322
</Project>

WikiIntegration.ComponentSelectorCompatibility/CategoryWikiArticleButtons.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using FrooxEngine.UIX;
44
using FrooxEngine;
55
using MonkeyLoader.Resonite;
6-
using System;
76
using MonkeyLoader.Resonite.UI;
87
using MonkeyLoader.Resonite.Configuration;
98
using ComponentSelectorAdditions;

WikiIntegration.ComponentSelectorCompatibility/WikiIntegration.ComponentSelectorCompatibility.csproj

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Remora.Resonite.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
4-
<AssemblyTitle>WikiIntegration.ComponentSelectorCompatibility</AssemblyTitle>
5-
<AssemblyFileName>$(AssemblyTitle).dll</AssemblyFileName>
63
<RootNamespace>WikiIntegration</RootNamespace>
7-
<MainProjectPath>..\WikiIntegration\</MainProjectPath>
4+
<MainProjectPath>../WikiIntegration/</MainProjectPath>
85
</PropertyGroup>
96

107
<PropertyGroup>
11-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
128
<PackageId>WikiIntegration</PackageId>
139
<Title>Wiki Integration</Title>
1410
<Authors>Banane9; E1int</Authors>
@@ -17,40 +13,28 @@
1713
<PackageReadmeFile>README.md</PackageReadmeFile>
1814
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
1915
<PackageProjectUrl>https://github.com/ResoniteModdingGroup/WikiIntegration</PackageProjectUrl>
16+
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
2017
<PackageTags>mod; mods; monkeyloader; resonite; component; components; inspector; protoflux; node; nodes; wiki; help; link</PackageTags>
2118
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddMainProjectToPackage</TargetsForTfmSpecificContentInPackage>
2219
</PropertyGroup>
2320

2421
<Target Name="AddMainProjectToPackage">
2522
<ItemGroup>
26-
<TfmSpecificPackageFile Include="$(MainProjectPath)bin\$(Configuration)\$(TargetFramework)\WikiIntegration*" PackagePath="lib/$(TargetFramework)/" Exclude="$(MainProjectPath)bin\$(Configuration)\$(TargetFramework)\*.json" />
23+
<TfmSpecificPackageFile Include="$(MainProjectPath)bin/$(Configuration)/mod/client/WikiIntegration*" PackagePath="lib/$(TargetFramework)/" Exclude="$(MainProjectPath)bin/$(Configuration)/$(TargetFramework)/*.json" />
2724
</ItemGroup>
2825
</Target>
29-
30-
<Target Name="CopyPackage" AfterTargets="Pack">
31-
<Copy Condition="'$(CopyToLibraries)'=='true'" SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFiles="$(ResonitePath)\MonkeyLoader\Mods\$(PackageId).nupkg" />
32-
<Message Condition="'$(CopyToLibraries)'=='true'" Text="Copied '$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg' to '$(ResonitePath)\MonkeyLoader\Mods\$(PackageId).nupkg'" Importance="high" />
33-
</Target>
34-
26+
3527
<ItemGroup>
36-
<None Include="..\README.md" Pack="true" PackagePath="" />
37-
<None Include="$(MainProjectPath)Locale\*" Pack="true" PackagePath="content/Locale/" LinkBase="Locale" />
28+
<None Include="../README.md" Pack="true" PackagePath="" />
29+
<None Include="$(MainProjectPath)Locale/*" Pack="true" PackagePath="content/Locale/" LinkBase="Locale" />
3830
</ItemGroup>
3931

4032
<ItemGroup>
41-
<PackageReference Include="ComponentSelectorAdditions" Version="0.8.0-beta" PrivateAssets="all" />
42-
<PackageReference Include="MicroUtils.HarmonyAnalyzers" Version="1.4.0">
43-
<PrivateAssets>all</PrivateAssets>
44-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
45-
</PackageReference>
46-
<PackageReference Include="MonkeyLoader.GamePacks.Resonite" Version="0.22.1-beta" />
47-
<PackageReference Include="PolySharp" Version="1.15.0">
48-
<PrivateAssets>all</PrivateAssets>
49-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
50-
</PackageReference>
51-
<PackageReference Include="Resonite.Elements.Core" Version="1.4.3" />
52-
<PackageReference Include="Resonite.FrooxEngine" Version="2025.3.21.23" />
53-
<PackageReference Include="Resonite.ProtoFlux.Core" Version="1.2.0" />
33+
<PackageReference Include="ComponentSelectorAdditions" Version="0.9.0-beta" PrivateAssets="all" />
34+
35+
<ResoniteReference Include="Elements.Core" />
36+
<ResoniteReference Include="FrooxEngine" />
37+
<ResoniteReference Include="ProtoFlux.Core" />
5438
</ItemGroup>
5539

5640
<ItemGroup>

WikiIntegration.sln

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
EndProject
1414
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WikiIntegration.ComponentSelectorCompatibility", "WikiIntegration.ComponentSelectorCompatibility\WikiIntegration.ComponentSelectorCompatibility.csproj", "{4BDFB622-5F49-49F2-8E80-378134D7C5AE}"
1515
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
17+
ProjectSection(SolutionItems) = preProject
18+
.github\workflows\build.yml = .github\workflows\build.yml
19+
.github\workflows\publish.yml = .github\workflows\publish.yml
20+
EndProjectSection
21+
EndProject
1622
Global
1723
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1824
Debug|Any CPU = Debug|Any CPU
@@ -31,6 +37,9 @@ Global
3137
GlobalSection(SolutionProperties) = preSolution
3238
HideSolutionNode = FALSE
3339
EndGlobalSection
40+
GlobalSection(NestedProjects) = preSolution
41+
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {07124CF9-EE3D-4A7E-A2F8-8FD07966E423}
42+
EndGlobalSection
3443
GlobalSection(ExtensibilityGlobals) = postSolution
3544
SolutionGuid = {7D505B2E-FBA2-4F50-BC1C-838BC8DF0D5C}
3645
EndGlobalSection

WikiIntegration/OpenWikiArticleButton.cs

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
using MonkeyLoader.Resonite.UI;
1212
using MonkeyLoader.Resonite.UI.Inspectors;
1313
using ProtoFlux.Core;
14-
using System;
15-
using System.Collections.Generic;
16-
using System.IO;
17-
using System.Linq;
18-
using System.Text;
19-
using System.Threading.Tasks;
2014

2115
namespace WikiIntegration
2216
{
@@ -69,7 +63,7 @@ protected override void Handle(BuildInspectorHeaderEvent eventData)
6963
AddHyperlink(button.Slot, eventData.Worker);
7064

7165
ConfigSection.Components.DriveFromVariable(button.Slot.ActiveSelf_Field);
72-
ConfigSection.ComponentOffset.DriveFromVariable(button.Slot._orderOffset);
66+
ConfigSection.ComponentOffset.DriveFromVariable(button.Slot.OrderOffset_Field);
7367

7468
ui.PopStyle();
7569
}
@@ -130,6 +124,23 @@ private static void AddHyperlink(Slot slot, Worker worker)
130124
hyperlink.Reason.AssignLocaleString(reason);
131125
}
132126

127+
private static void CreateConfigKeyNames(FallbackLocaleGenerationEvent eventData, string descriptionFormat, CategoryNode<Type> category, string path)
128+
{
129+
if (category.Elements.Any())
130+
{
131+
var trimmedPath = path.Replace(ProtoFluxCategoryConfig.ProtoFluxPath, "");
132+
133+
var id = $"{_categoryConfig.FullId}.{ProtoFluxCategoryConfig.GetToggleId(path)}";
134+
var description = string.Format(descriptionFormat, trimmedPath);
135+
136+
eventData.AddMessage($"{id}.Name", trimmedPath);
137+
eventData.AddMessage($"{id}.Description", description);
138+
}
139+
140+
foreach (var subcategory in category.Subcategories)
141+
CreateConfigKeyNames(eventData, descriptionFormat, subcategory, $"{path}/{subcategory.Name}");
142+
}
143+
133144
private static void Postfix(ProtoFluxNodeVisual __instance, ProtoFluxNode node)
134145
{
135146
if (!Engine.IsAprilFools && node.SupressHeaderAndFooter && node.NodeName.Contains("Relay", StringComparison.OrdinalIgnoreCase))
@@ -155,22 +166,5 @@ private static void Postfix(ProtoFluxNodeVisual __instance, ProtoFluxNode node)
155166
if (_categoryConfig[node.GetType()] is ConfigKeySessionShare<bool> categoryShare)
156167
categoryShare.DriveFromVariable(button.Slot.ActiveSelf_Field);
157168
}
158-
159-
private void CreateConfigKeyNames(FallbackLocaleGenerationEvent eventData, string descriptionFormat, CategoryNode<Type> category, string path)
160-
{
161-
if (category.Elements.Any())
162-
{
163-
var trimmedPath = path.Replace(ProtoFluxCategoryConfig.ProtoFluxPath, "");
164-
165-
var id = $"{_categoryConfig.FullId}.{ProtoFluxCategoryConfig.GetToggleId(path)}";
166-
var description = string.Format(descriptionFormat, trimmedPath);
167-
168-
eventData.AddMessage($"{id}.Name", trimmedPath);
169-
eventData.AddMessage($"{id}.Description", description);
170-
}
171-
172-
foreach (var subcategory in category.Subcategories)
173-
CreateConfigKeyNames(eventData, descriptionFormat, subcategory, $"{path}/{subcategory.Name}");
174-
}
175169
}
176170
}

WikiIntegration/ProtoFluxCategoryConfig.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@
22
using MonkeyLoader.Components;
33
using MonkeyLoader.Configuration;
44
using MonkeyLoader.Resonite.Configuration;
5-
using System;
6-
using System.Collections.Generic;
7-
using System.IO;
8-
using System.Linq;
95
using System.Reflection;
10-
using System.Text;
116

127
namespace WikiIntegration
138
{
149
internal sealed class ProtoFluxCategoryConfig : ExpandoConfigSection
1510
{
1611
internal const string ProtoFluxPath = "ProtoFlux/Runtimes/Execution/Nodes";
1712

18-
private static readonly Dictionary<string, ConfigKeySessionShare<bool>> _sessionSharesByCategory = new();
13+
private static readonly Dictionary<string, ConfigKeySessionShare<bool>> _sessionSharesByCategory = [];
1914

2015
/// <inheritdoc/>
2116
public override string Description => "Contains settings for the Resonite Wiki buttons on specific categories of ProtoFlux nodes.";
Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Remora.Resonite.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
4-
<AssemblyTitle>WikiIntegration</AssemblyTitle>
5-
<AssemblyFileName>$(AssemblyTitle).dll</AssemblyFileName>
6-
<RootNamespace>WikiIntegration</RootNamespace>
73
<PackageId>WikiIntegration.Main</PackageId>
4+
<ResoniteInstallOnBuild>false</ResoniteInstallOnBuild>
85
</PropertyGroup>
96

107
<ItemGroup>
11-
<None Include="..\README.md" />
8+
<None Include="..\README.md" Pack="true" PackagePath="" />
129
<None Include="Locale\*" />
1310
</ItemGroup>
1411

1512
<ItemGroup>
16-
<PackageReference Include="MicroUtils.HarmonyAnalyzers" Version="1.4.0">
17-
<PrivateAssets>all</PrivateAssets>
18-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19-
</PackageReference>
20-
<PackageReference Include="MonkeyLoader.GamePacks.Resonite" Version="0.22.1-beta" />
21-
<PackageReference Include="PolySharp" Version="1.15.0">
22-
<PrivateAssets>all</PrivateAssets>
23-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
</PackageReference>
25-
<PackageReference Include="Resonite.Elements.Core" Version="1.4.3" />
26-
<PackageReference Include="Resonite.FrooxEngine" Version="2025.3.21.23" />
27-
<PackageReference Include="Resonite.ProtoFlux.Core" Version="1.2.0" />
13+
<ResoniteReference Include="Elements.Core" />
14+
<ResoniteReference Include="FrooxEngine" />
15+
<ResoniteReference Include="ProtoFlux.Core" />
2816
</ItemGroup>
2917
</Project>

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"msbuild-sdks": {
3+
"Remora.Resonite.Sdk": "2.0.4"
4+
}
5+
}

0 commit comments

Comments
 (0)