mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 12:02:40 +00:00
[+] SelfMadeChartsWhiteListUsers
This commit is contained in:
parent
9ca7949bf0
commit
1ad4ac2d63
@ -86,12 +86,6 @@ public class HideSelfMadeCharts
|
||||
[HarmonyPatch(typeof(MusicSelectProcess), "OnStart")]
|
||||
public static void MusicSelectProcessOnStart(ref MusicSelectProcess __instance)
|
||||
{
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "LocalAssets", "DisableSelfMadeCharts.txt")))
|
||||
{
|
||||
isForceDisable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "LocalAssets", "SelfMadeChartsDenyUsers.txt")))
|
||||
{
|
||||
var userIds = File.ReadAllLines(Path.Combine(Environment.CurrentDirectory, "LocalAssets", "SelfMadeChartsDenyUsers.txt"));
|
||||
@ -105,6 +99,19 @@ public class HideSelfMadeCharts
|
||||
}
|
||||
}
|
||||
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "LocalAssets", "SelfMadeChartsWhiteListUsers.txt")))
|
||||
{
|
||||
var userIds = File.ReadAllLines(Path.Combine(Environment.CurrentDirectory, "LocalAssets", "SelfMadeChartsWhiteListUsers.txt"));
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var user = Singleton<UserDataManager>.Instance.GetUserData(i);
|
||||
if (!user.IsEntry) continue;
|
||||
if (userIds.Contains(user.Detail.UserID.ToString())) continue;
|
||||
isForceDisable = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
isForceDisable = false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user