Skip to content

Commit 283758e

Browse files
Banane9goaaats
andcommitted
Use User cloud home template for groups
Adds the proposed workaround / fix for Yellow-Dog-Man/Resonite-Issues#1144 Co-authored-by: goat <[email protected]>
1 parent 3753fd6 commit 283758e

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

CommunityBugFixCollection/Contributors.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ internal static class Contributors
1111

1212
public static string[] Banane9 { get; } = ["Banane9"];
1313

14+
public static string[] Goat { get; } = ["goat"];
15+
1416
public static string[] LeCloutPanda { get; } = ["LeCloutPanda"];
1517

1618
public static string[] Nytra { get; } = ["Nytra"];
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using FrooxEngine;
2+
using HarmonyLib;
3+
using MonkeyLoader.Resonite;
4+
using SkyFrost.Base;
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Text;
8+
9+
// Initially done by https://github.com/goaaats
10+
11+
namespace CommunityBugFixCollection
12+
{
13+
[HarmonyPatchCategory(nameof(GroupCloudHomeTemplate))]
14+
[HarmonyPatch(typeof(Userspace), nameof(Userspace.GetHomeTemplateUri))]
15+
internal sealed class GroupCloudHomeTemplate : ResoniteMonkey<GroupCloudHomeTemplate>
16+
{
17+
public override IEnumerable<string> Authors => Contributors.Goat;
18+
19+
public override bool CanBeDisabled => true;
20+
21+
private static void Prefix(ref OwnerType ownerType)
22+
{
23+
// The template URL for group homes currently does not resolve.
24+
// We change the owner type to User, so that we can create a group home with the standard cloud home template.
25+
if (ownerType == OwnerType.Group)
26+
ownerType = OwnerType.User;
27+
}
28+
}
29+
}

CommunityBugFixCollection/Locale/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"CommunityBugFixCollection.FireBrushToolDequipEvents.Description": "Sorgt dafür, dass von BrushTool abgeleitete Werkzeuge OnDequipped Events abschicken.",
2222
"CommunityBugFixCollection.FixMigratedItemMessages.Description": "Sorgt dafür, dass migrierte Objekte aus Nachrichten gespawnt werden können, obwohl sie noch auf die alte Platform verweisen.",
2323
"CommunityBugFixCollection.GammaCorrectedColorXLuminance.Description": "Korrigiert die Berechnung der Luminanz bei nicht-linearen ColorX Farbprofilen.",
24+
"CommunityBugFixCollection.GroupCloudHomeTemplate.Description": "Verwendet das Benutzertemplate des Cloud Homes statt des fehlenden Gruppentemplates.",
2425
"CommunityBugFixCollection.HighlightHomeWorldInInventory.Description": "Sorgt dafür, dass die ausgewählte Heimatwelt im Inventar korrekt hervorgehoben wird.",
2526
"CommunityBugFixCollection.ImportMultipleAudioFiles.Description": "Macht es möglich mehrere Audiodateien auf einmal zu importieren.",
2627
"CommunityBugFixCollection.ImportWebFilesAsUrls.Description": "Sorgt dafür, dass URLs zu Textdateien oder Resonite Packages nicht importiert werden, statt als Hyperlink aufzutauchen.",

CommunityBugFixCollection/Locale/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"CommunityBugFixCollection.FireBrushToolDequipEvents.Description": "Fixes tools derived from BrushTool not firing OnDequipped events.",
2222
"CommunityBugFixCollection.FixMigratedItemMessages.Description": "Fixes migrated items sent as messages not spawning because they still point to the old platform.",
2323
"CommunityBugFixCollection.GammaCorrectedColorXLuminance.Description": "Fixes ColorX Luminance calculations being incorrect for non-linear color profiles.",
24+
"CommunityBugFixCollection.GroupCloudHomeTemplate.Description": "Uses the User Cloud Home template instead of the missing Group template.",
2425
"CommunityBugFixCollection.HighlightHomeWorldInInventory.Description": "Fixes the selected Home World in the Inventory not being highlighted as a favorite.",
2526
"CommunityBugFixCollection.ImportMultipleAudioFiles.Description": "Fixes it not being possible to import multiple audio clips at once.",
2627
"CommunityBugFixCollection.ImportWebFilesAsUrls.Description": "Fixes URLs to text files or Resonite Packages failing to import instead of appearing as a hyperlink.",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ If any of them have been closed and not removed from the mod,
6262
just disable them in the settings in the meantime.
6363

6464
* Sliders and Joints snapping in sessions hosted by a headless (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/399)
65+
* Missing Cloud Home template for Groups (fallback to User Cloud Home) (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1144)
6566

6667

6768
## Features

0 commit comments

Comments
 (0)