1
0
mirror of https://github.com/HarukaKinen/Sinmai-Internal-Damage.git synced 2024-11-28 00:20:50 +01:00

Add DXPass

This commit is contained in:
Moe Kotoki 2022-04-07 01:08:32 +08:00
parent 2c469d16a4
commit c45e6d8b3e
3 changed files with 111 additions and 20 deletions

View File

@ -6,6 +6,7 @@ using System.Globalization;
using System.Reflection;
using UnityEngine;
namespace Sinmai.Functions
{
public class Skins
@ -14,9 +15,12 @@ namespace Sinmai.Functions
private const BindingFlags iBindFlags = BindingFlags.Instance;
private const BindingFlags sBindFlags = BindingFlags.Static;
public static TitleData title = GetTitle(int.Parse(Settings.TitleValueOriginal));
public static TitleData title = GetTitle(int.Parse(Settings.TitleIndexOriginal));
public static Sprite titleBg = Resources.Load<Sprite>("Process/Common/Sprites/UpperMonitor/UI_CMN_Shougou_" + Settings.TitleType);
public static Sprite pass = Resources.Load<Sprite>("Process/Common/Sprites/UpperMonitor/UI_CMN_DXPass_" + Settings.DXPassType);
public static string userName = Settings.NameValue;
private static UserInformationController getUserInformationController()
{
UserInformationController UserInformationController = GameObject
@ -26,9 +30,17 @@ namespace Sinmai.Functions
return UserInformationController;
}
public static void PlayerOneOnly()
{
}
// public static void NameChanger()
// {
// if (!Settings.NameCheckBox) return;
//
// UserInformationController UserInformationController = getUserInformationController();
//
// if (UserInformationController != null)
// {
// UserInformationController.userNameText.text = userName;
// }
// }
public static void RateChanger()
{
@ -50,7 +62,7 @@ namespace Sinmai.Functions
UserInformationController UserInformationController = getUserInformationController();
int udemaeId = int.Parse(Settings.UdemaeValue);
int udemaeId = int.Parse(Settings.UdemaeIndex);
var udemae = (UdemaeID)udemaeId;
@ -60,6 +72,34 @@ namespace Sinmai.Functions
}
}
public static void IconChanger()
{
if (!Settings.IconCheckBox) return;
UserInformationController UserInformationController = getUserInformationController();
Texture2D iconTexture2D = AssetManager.Instance().GetIconTexture2D(0, int.Parse(Settings.IconIndex));
if (UserInformationController != null)
{
UserInformationController.SetUserIcon(iconTexture2D);
}
}
public static void PlateChanger()
{
if (!Settings.PlateCheckBox) return;
UserInformationController UserInformationController = getUserInformationController();
Texture2D plateTexture2D = AssetManager.Instance().GetPlateTexture2D(int.Parse(Settings.PlateIndex));
if (UserInformationController != null)
{
UserInformationController.SetNamePlate(plateTexture2D);
}
}
public static void TitleChanger()
{
if (!Settings.TitleCheckBox) return;
@ -75,12 +115,24 @@ namespace Sinmai.Functions
}
else if (Settings.TitleMethodInt == 1)
{
UserInformationController.SetTitle(Settings.TitleValueCustom, titleBg);
UserInformationController.SetTitle(Settings.TitleIndexCustom, titleBg);
}
}
}
public static void DXPassChanger()
{
if (!Settings.DXPassCheckBox) return;
UserInformationController UserInformationController = getUserInformationController();
if (UserInformationController != null)
{
UserInformationController.SetPass(pass);
}
}
public static TitleData GetTitle(int id)
{
return Singleton<DataManager>.Instance.GetTitle(id);

View File

@ -27,14 +27,17 @@ namespace Sinmai.UI
if (MenuToggle)
Window = GUILayout.Window(0, Window, RenderMenu, "Internal Damage for Sinmai");
Render.DrawString(new Vector2(100, 170), "Sinmai-Internal-Damage");
Render.DrawString(new Vector2(100, 185), "Local Client: " + Functions.Version.CheckClientVersion());
Render.DrawString(new Vector2(100, 200), "Build: b20220406-C");
Render.DrawString(new Vector2(100, 185), $"Local Client: {Functions.Version.CheckClientVersion()}");
Render.DrawString(new Vector2(100, 200), $"Build: {Settings.Version}");
// Call Functions in Functions
// what the fuck is this named
Skins.RateChanger();
Skins.UdemaeChanger();
Skins.IconChanger();
Skins.PlateChanger();
Skins.TitleChanger();
Skins.DXPassChanger();
Timer.InfinityFreedomTime();
Timer.InfinityPrepareTime();
@ -97,20 +100,41 @@ namespace Sinmai.UI
GUILayout.BeginVertical("Skins");
// Skin Changer
GUILayout.Label("Skin Changer");
// Settings.NameCheckBox = GUILayout.Toggle(Settings.NameCheckBox, "Name Changer");
// if (Settings.NameCheckBox)
// {
// GUILayout.Label("Rating:");
// Settings.NameValue = GUILayout.TextField(Settings.NameValue, 5);
// GUILayout.Space(10);
// }
Settings.RateCheckBox = GUILayout.Toggle(Settings.RateCheckBox, "でらっくす Rating");
if (Settings.RateCheckBox)
{
GUILayout.Label("Rating:");
Settings.RatingValue = GUILayout.TextField(Settings.RatingValue, 5);
GUILayout.Space(10);
}
Settings.UdemaeCheckBox = GUILayout.Toggle(Settings.UdemaeCheckBox, "段位認定");
if (Settings.UdemaeCheckBox)
{
GUILayout.Label("Index:");
Settings.UdemaeValue = GUILayout.TextField(Settings.UdemaeValue, 2);
Settings.UdemaeIndex = GUILayout.TextField(Settings.UdemaeIndex, 2);
GUILayout.Space(10);
}
Settings.IconCheckBox = GUILayout.Toggle(Settings.IconCheckBox, "Icon");
if (Settings.IconCheckBox)
{
GUILayout.Label("Index:");
Settings.IconIndex = GUILayout.TextField(Settings.IconIndex, 6);
GUILayout.Space(10);
}
Settings.PlateCheckBox = GUILayout.Toggle(Settings.PlateCheckBox, "Plate");
Settings.FrameCheckBox = GUILayout.Toggle(Settings.FrameCheckBox, "Frame");
if (Settings.PlateCheckBox)
{
GUILayout.Label("Index:");
Settings.PlateIndex = GUILayout.TextField(Settings.PlateIndex, 6);
GUILayout.Space(10);
}
Settings.TitleCheckBox = GUILayout.Toggle(Settings.TitleCheckBox, "Title");
if (Settings.TitleCheckBox)
{
@ -120,22 +144,29 @@ namespace Sinmai.UI
{
case 0:
GUILayout.Label("Title index:");
Settings.TitleValueOriginal = GUILayout.TextField(Settings.TitleValueOriginal, 255);
Settings.TitleIndexOriginal = GUILayout.TextField(Settings.TitleIndexOriginal, 255);
GUILayout.Label("Title type:");
Settings.TitleType = GUILayout.TextField(Settings.TitleType, 7);
GUILayout.Space(10);
break;
case 1:
GUILayout.Label("Title name:");
Settings.TitleValueCustom = GUILayout.TextField(Settings.TitleValueCustom, 255);
Settings.TitleIndexCustom = GUILayout.TextField(Settings.TitleIndexCustom, 255);
GUILayout.Label("Title type:");
Settings.TitleType = GUILayout.TextField(Settings.TitleType, 7);
break;
default:
GUILayout.Space(10);
break;
}
}
Settings.FrameCheckBox = GUILayout.Toggle(Settings.FrameCheckBox, "Frame");
Settings.DXPassCheckBox = GUILayout.Toggle(Settings.DXPassCheckBox, "DX Pass");
if (Settings.DXPassCheckBox)
{
GUILayout.Label("DXPass type:");
Settings.DXPassType = GUILayout.TextField(Settings.DXPassType, 8);
GUILayout.Space(10);
}
GUILayout.EndVertical();
break;
case 2:

View File

@ -2,6 +2,8 @@
{
class Settings
{
public static string Version = "b20220407-B";
public static int MainToolbarInt = 0;
public static string[] MainToolbarStrings = { "Legit", "Skins", "Misc" };
@ -21,27 +23,33 @@
public static bool GreatToggle = false;
public static bool GoodToggle = false;
public static bool MissToggle = false;
// Rage Autoplay
// Some cool part idk
// Skin Changer
public static bool NameCheckBox = false;
public static string NameValue = "舞萌";
public static bool RateCheckBox = false;
public static string RatingValue = "13370";
public static bool UdemaeCheckBox = false;
public static string UdemaeValue = "24";
public static string UdemaeIndex = "24";
public static bool IconCheckBox = false;
public static string IconIndex = "1";
public static bool PlateCheckBox = false;
public static bool FrameCheckBox = false;
public static string PlateIndex = "1";
public static bool TitleCheckBox = false;
public static int TitleMethodInt = 0;
public static string[] TitleMethod = { "Original", "Custom" };
public static string TitleValueOriginal = "1";
public static string TitleValueCustom = "skeet.cc";
public static string TitleIndexOriginal = "1";
public static string TitleIndexCustom = "skeet.cc";
public static string TitleType = "Rainbow";
public static bool FrameCheckBox = false;
public static bool DXPassCheckBox = false;
public static string DXPassType = "Platinum";
// Misc
public static bool InfinityFreedomTimeCheckBox = false;
public static bool InfinityPrepareTimeCheckBox = false;