Skip to content

Commit 1445825

Browse files
committed
Adjust contents for RML 4.2.0
1 parent 3324175 commit 1445825

6 files changed

Lines changed: 74 additions & 29 deletions

File tree

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using FrooxEngine;
2-
using MonkeyLoader.Logging;
3-
using MonkeyLoader.Meta;
42
using System;
53
using System.Collections.Generic;
64
using System.Linq;
@@ -10,43 +8,52 @@
108

119
namespace ResoniteModLoader
1210
{
13-
// Why is this public
11+
/// <summary>
12+
/// Dummy execution hook class for compatibility.
13+
/// </summary>
14+
/// <remarks>
15+
/// Why is this public now? :C
16+
/// </remarks>
1417
public class ExecutionHook : IPlatformConnector
1518
{
16-
1719
#pragma warning disable CS1591
18-
public PlatformInterface Platform { get; private set; }
20+
public PlatformInterface Platform { get; private set; } = null!;
1921
public int Priority => -10;
2022
public string PlatformName => "ResoniteModLoader";
21-
public string Username => null;
22-
public string PlatformUserId => null;
23+
public string Username => null!;
24+
public string PlatformUserId => null!;
2325
public bool IsPlatformNameUnique => false;
24-
public void SetCurrentStatus(World world, bool isPrivate, int totalWorldCount) { }
25-
public void ClearCurrentStatus() { }
26-
public void Update() { }
26+
27+
public void SetCurrentStatus(World world, bool isPrivate, int totalWorldCount)
28+
{ }
29+
30+
public void ClearCurrentStatus()
31+
{ }
32+
33+
public void Update()
34+
{ }
35+
2736
public void Dispose()
28-
{
29-
GC.SuppressFinalize(this);
30-
}
31-
public void NotifyOfLocalUser(User user) { }
32-
public void NotifyOfFile(string file, string name) { }
33-
public void NotifyOfScreenshot(World world, string file, ScreenshotType type, DateTime time) { }
37+
=> GC.SuppressFinalize(this);
3438

35-
public async Task<bool> Initialize(PlatformInterface platformInterface)
39+
public void NotifyOfLocalUser(User user)
40+
{ }
41+
42+
public void NotifyOfFile(string file, string name)
43+
{ }
44+
45+
public void NotifyOfScreenshot(World world, string file, ScreenshotType type, DateTime time)
46+
{ }
47+
48+
public Task<bool> Initialize(PlatformInterface platformInterface)
3649
{
3750
ModLoader.Logger.Debug(() => "Initialize() from platformInterface");
3851
Platform = platformInterface;
39-
return true;
52+
return Task.FromResult(true);
4053
}
41-
#pragma warning restore CS1591
4254

43-
#pragma warning disable CA2255
44-
[ModuleInitializer]
55+
// [ModuleInitializer]
4556
public static void Init()
46-
{
47-
//ModLoader.Logger.Debug(() => "Init() from ModuleInitializer"); // throws for some reason
48-
}
49-
#pragma warning restore CA2255
50-
57+
{ }
5158
}
52-
}
59+
}

MonkeyLoader.GamePacks.ResoniteModLoader/ModLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public sealed class ModLoader : ResoniteMonkey<ModLoader>
3030
/// </summary>
3131
public static readonly string VERSION = VERSION_CONSTANT;
3232

33-
internal const string VERSION_CONSTANT = "4.0.0";
33+
internal const string VERSION_CONSTANT = "4.2.0";
3434

3535
private static readonly Lazy<bool> _isHeadless = new(()
3636
=> AppDomain.CurrentDomain.GetAssemblies()

MonkeyLoader.GamePacks.ResoniteModLoader/MonkeyLoader.GamePacks.ResoniteModLoader.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageId>MonkeyLoader.GamePacks.ResoniteModLoader</PackageId>
1212
<Title>ResoniteModLoader</Title>
1313
<Authors>Banane9, Nytra</Authors>
14-
<Version>4.0.0</Version> <!-- We use the last digit for updates since RML uses the first three -->
14+
<Version>4.2.0</Version> <!-- We use the last digit for updates since RML uses the first three -->
1515
<Description>This MonkeyLoader Game Pack for Resonite enables loading ResoniteModLoader mods as MonkeyLoader mods.</Description>
1616
<PackageReadmeFile>README.md</PackageReadmeFile>
1717
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>

MonkeyLoader.GamePacks.ResoniteModLoader/ResoniteMod.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
namespace ResoniteModLoader
1414
{
1515
/// <summary>
16+
/// Base class for all mods.<br/>
1617
/// Contains members that only the <see cref="ModLoader"/> or the Mod itself are intended to access.
1718
/// </summary>
19+
/// <remarks>
20+
/// Inherit from this class when creating a new mod.
21+
/// </remarks>
1822
public abstract class ResoniteMod : ResoniteModBase
1923
{
2024
private readonly Lazy<ModConfiguration?> _configuration;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
Not implemented because it involves creating FrooxEngine components
3+
and the ML Resonite Integration already has a Settings Category anyways.
4+
5+
using FrooxEngine;
6+
using System;
7+
using System.Collections.Generic;
8+
using System.Text;
9+
10+
namespace ResoniteModLoader
11+
{
12+
public sealed class ModLoaderSettings : SettingComponent<ModLoaderSettings>
13+
{
14+
}
15+
}
16+
*/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
Not implemented because it involves creating FrooxEngine components
3+
and the ML Resonite Integration already has a Settings Category anyways.
4+
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Text;
8+
9+
namespace ResoniteModLoader
10+
{
11+
[AutoRegisterSetting]
12+
[SettingCategory("ResoniteModLoader")]
13+
public sealed class ModSettings : SettingComponent<ModSettings>
14+
{
15+
public override bool UserspaceOnly => true;
16+
}
17+
}
18+
*/

0 commit comments

Comments
 (0)