Skip to content

Commit 4aa0937

Browse files
committed
重构,移除 Compat.cs
1 parent 5caea0d commit 4aa0937

File tree

7 files changed

+81
-224
lines changed

7 files changed

+81
-224
lines changed

mod/BuildInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace WorldLink;
22

33
public static partial class BuildInfo
44
{
5-
public const string Name = "WorldLink";
5+
public const string Name = "NyanLink";
66
public const string Author = "Azalea & Clansty & Japerz";
77
}
88

mod/Compat.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

mod/Core.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,20 @@ public class Config
99
public string RelayUrl { get; set; }
1010
public bool Debug { get; set; }
1111
}
12-
1312
public class Core : MelonMod
1413
{
1514
public static Config Config;
16-
15+
1716
public override void OnInitializeMelon()
1817
{
1918
// Load config
2019
LoggerInstance.Msg("Loading config...");
2120
Config = TomletMain.To<Config>(File.ReadAllText("WorldLink.toml"));
22-
21+
2322
LoggerInstance.Msg("Patching...");
2423
Futari.OnBeforePatch();
2524
HarmonyLib.Harmony.CreateAndPatchAll(typeof(Futari));
26-
27-
if (Config.Debug)
28-
{
29-
LoggerInstance.Msg("Patching debug...");
30-
HarmonyLib.Harmony.CreateAndPatchAll(typeof(Futari.FutariDebug));
31-
}
32-
25+
3326
LoggerInstance.Msg("Initialized.");
3427
}
3528
}

mod/WorldLink.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# NyaLink configuration file
1+
# NyanLink configuration file
22
#
33
# The Lobby URL can be one of {asia, euro, usw, use, cn}.link.aquadx.net
44
# Please select one that is closest to your location.

mod/WorldLink/FutariClient.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616

1717
public class FutariClient
1818
{
19-
public static string LOBBY_BASE => AquaMai.ReadString("Mods.WorldLink.LobbyUrl");
20-
public static string RELAY_BASE => AquaMai.ReadString("Mods.WorldLink.RelayUrl");
21-
// public const string LOBBY_BASE = "https://aquadx.net/aqua/mai2-futari";
19+
public static string LOBBY_BASE => WorldLink.Core.Config.LobbyUrl;
20+
public static string RELAY_BASE => WorldLink.Core.Config.RelayUrl;
2221
public static FutariClient Instance { get; private set; }
2322

2423
public FutariClient(string keychip, string host, int port, int _)

0 commit comments

Comments
 (0)