-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f200d57
commit 5133b68
Showing
8 changed files
with
163 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
namespace SinmaiAssist { | ||
public static partial class BuildInfo { | ||
public const string CommitHash = "ac87265"; | ||
public const string BuildDate = "2024-10-14T22:53:59.7667374+08:00"; | ||
public const string CommitHash = "f200d57"; | ||
public const string BuildDate = "2024-10-17T02:02:06.5635344+08:00"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using DB; | ||
using HarmonyLib; | ||
using Manager; | ||
using MelonLoader; | ||
using Monitor.ModeSelect; | ||
using SinmaiAssist.Utils; | ||
using UnityEngine; | ||
|
||
namespace SinmaiAssist.Common; | ||
|
||
public class ChangeGameSettings | ||
{ | ||
private static readonly List<bool> SettingEnable = new List<bool> { false,false,false,false }; | ||
private static readonly List<bool> UserSettingToggleState = new List<bool> { false, false, false, false }; | ||
|
||
[HarmonyPostfix] | ||
[HarmonyPatch(typeof(ModeSelectMonitor), "Initialize")] | ||
public static void SetSettings(ModeSelectMonitor __instance, int monIndex) | ||
{ | ||
try | ||
{ | ||
UserData userData = User.GetUserData(monIndex); | ||
InitSettings(userData); | ||
SetUserFlag(userData); | ||
AccessTools.Field(typeof(ModeSelectMonitor), "_isSettingEnable").SetValue(__instance, SettingEnable); | ||
AccessTools.Field(typeof(ModeSelectMonitor), "_isSettingToggleState").SetValue(__instance, UserSettingToggleState); | ||
var nullSetting = (List<GameObject>) AccessTools.Field(typeof(ModeSelectMonitor), "_nullSetting").GetValue(__instance); | ||
var animSetting = (List<Animator>) AccessTools.Field(typeof(ModeSelectMonitor), "_animSetting").GetValue(__instance); | ||
for (int i = 0; i < SettingEnable.Count; i++) | ||
{ | ||
nullSetting[i].transform.GetChild(0).GetChild(5).gameObject.SetActive(!SettingEnable[i]); | ||
if (UserSettingToggleState[i]) | ||
{ | ||
animSetting[i].Play("On_Loop", 0, 0f); | ||
__instance._settingMiniWindow.transform.GetChild(i).GetChild(0).GetChild(0).gameObject.SetActive(value: true); | ||
__instance._settingMiniWindow.transform.GetChild(i).GetChild(0).GetChild(1).gameObject.SetActive(value: false); | ||
} | ||
else | ||
{ | ||
animSetting[i].Play("Off_Loop", 0, 0f); | ||
__instance._settingMiniWindow.transform.GetChild(i).GetChild(0).GetChild(0).gameObject.SetActive(value: false); | ||
__instance._settingMiniWindow.transform.GetChild(i).GetChild(0).GetChild(1).gameObject.SetActive(value: true); | ||
} | ||
nullSetting[i].transform.GetChild(0).GetChild(4).GetChild(2).gameObject.SetActive(value: false); | ||
} | ||
} | ||
catch (Exception e) | ||
{ | ||
MelonLogger.Error(e); | ||
} | ||
} | ||
|
||
private static void InitSettings(UserData userData) | ||
{ | ||
SettingEnable[0] = SinmaiAssist.config.Common.ChangeGameSettings.CodeRead; | ||
SettingEnable[1] = SinmaiAssist.config.Common.ChangeGameSettings.IconPhoto; | ||
SettingEnable[2] = SinmaiAssist.config.Common.ChangeGameSettings.CharaSelect; | ||
SettingEnable[3] = SinmaiAssist.config.Common.ChangeGameSettings.UploadPhoto; | ||
UserSettingToggleState[0] = userData.Extend.ExtendContendBit.IsFlagOn(ExtendContentBitID.GotoCodeRead) && SettingEnable[0]; | ||
UserSettingToggleState[1] = userData.Extend.ExtendContendBit.IsFlagOn(ExtendContentBitID.GotoIconPhotoShoot) && SettingEnable[1]; | ||
UserSettingToggleState[2] = userData.Extend.ExtendContendBit.IsFlagOn(ExtendContentBitID.GotoCharaSelect) && SettingEnable[2]; | ||
UserSettingToggleState[3] = userData.Extend.ExtendContendBit.IsFlagOn(ExtendContentBitID.PhotoAgree) && SettingEnable[3]; | ||
MelonLogger.Msg("\n[ChangeGameSettings] SettingEnable:" + string.Join(",", SettingEnable) +"\n[ChangeGameSettings] UserSettingToggleState:" + string.Join(",", UserSettingToggleState)); | ||
} | ||
|
||
private static void SetUserFlag(UserData userData) | ||
{ | ||
if (!SettingEnable[0]) | ||
{ | ||
userData.Extend.ExtendContendBit.SetFlag(ExtendContentBitID.GotoCodeRead, false); | ||
} | ||
if (!SettingEnable[1]) | ||
{ | ||
userData.Extend.ExtendContendBit.SetFlag(ExtendContentBitID.GotoIconPhotoShoot, false); | ||
} | ||
if (!SettingEnable[2]) | ||
{ | ||
userData.Extend.ExtendContendBit.SetFlag(ExtendContentBitID.GotoCharaSelect, false); | ||
} | ||
if (!SettingEnable[3]) | ||
{ | ||
userData.Extend.ExtendContendBit.SetFlag(ExtendContentBitID.PhotoAgree, false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,69 @@ | ||
common: | ||
infinityTimer: false #无限计时器 | ||
disableMask: false #禁用遮罩 | ||
disableBackground: false #禁用背景 | ||
showFPS: false #显示FPS | ||
singlePlayer: #单人模式 | ||
infinityTimer: false # 无限计时器 | ||
disableMask: false # 禁用遮罩 | ||
disableBackground: false # 禁用背景 | ||
showFPS: false # 显示FPS | ||
singlePlayer: # 单人模式 | ||
enable: false # 是否启用 | ||
hideSubMonitor: false # 隐藏副屏 | ||
forceQuickRetry: false #强制开启Freedom模式的快速重试功能 | ||
forwardATouchRegionToButton: false #将触摸区域的操作转发到按钮 | ||
skipFade: false #跳过过场动画 | ||
skipWarningScreen: false #跳过警告界面 | ||
quickBoot: false #快速启动 | ||
blockCoin: false #禁用点数消耗 | ||
forceQuickRetry: false # 强制开启Freedom模式的快速重试功能 | ||
forwardATouchRegionToButton: false # 将触摸区域的操作转发到按钮 | ||
skipFade: false # 跳过过场动画 | ||
skipWarningScreen: false # 跳过警告界面 | ||
quickBoot: false # 快速启动 | ||
blockCoin: false # 禁用点数消耗 | ||
ignoreAnyGameInformation: false # 忽略之后所有的游戏公告信息提示 | ||
changeDefaultOption: false # 覆写游客模式默认设置 | ||
networkLogger: #网络日志 | ||
enable: false #是否启用 | ||
printToConsole: false #是否输出到控制台 | ||
customVersionText: #自定义版本文本 | ||
enable: false #是否启用 | ||
versionText: "" #版本文本 | ||
dummyLogin: # 虚拟登录 | ||
enable: false #是否启用 | ||
defaultUserId: 0 #默认用户ID | ||
customCameraId: #自定义摄像头ID | ||
enable: false #是否启用 | ||
chimeCameraId: 0 #Chime摄像头ID | ||
leftQrCameraId: 0 #左侧二维码识别摄像头ID | ||
rightQrCameraId: 0 #右侧二维码识别摄像头ID | ||
photoCameraId: 0 #玩家摄像头ID | ||
changeFadeStyle: false # 切换过场动画的样式(例如BUDDiES开启此选项后会使用BUDDiES PLUS的过场动画,BUDDiES PLUS开启此选项后会使用BUDDiES的过场动画) | ||
networkLogger: # 网络日志 | ||
enable: false # 是否启用 | ||
printToConsole: false # 是否输出到控制台 | ||
customVersionText: # 自定义版本文本 | ||
enable: false # 是否启用 | ||
versionText: "" # 版本文本 | ||
dummyLogin: # 虚拟登录 | ||
enable: false # 是否启用 | ||
defaultUserId: 0 # 默认用户ID | ||
customCameraId: # 自定义摄像头ID | ||
enable: false # 是否启用 | ||
chimeCameraId: 0 # Chime摄像头ID | ||
leftQrCameraId: 0 # 左侧二维码识别摄像头ID | ||
rightQrCameraId: 0 # 右侧二维码识别摄像头ID | ||
photoCameraId: 0 # 玩家摄像头ID | ||
changeGameSettings: # 覆盖游戏的设置 | ||
enable: false # 是否启用 | ||
codeRead: false # 是否启用二维码识别(DX Pass) | ||
iconPhoto: false # 是否启用拍摄头像功能 | ||
uploadPhoto: false # 是否启用拍摄纪念照上传 | ||
charaSelect: false # 是否启用角色选择界面 | ||
|
||
|
||
cheat: | ||
autoPlay: false #自动游玩 | ||
fastSkip: false #快速跳过 | ||
chartTimer: false #铺面计时器(歌曲进度控制) | ||
allCollection: false #解锁全部收藏品 | ||
unlockMusic: false #解锁全部歌曲 | ||
unlockMaster: false #解锁全部歌曲Master难度 | ||
unlockEvent: false #解锁全部活动 | ||
resetLoginBonusRecord: false #重置登录奖励记录 | ||
forceCurrentIsBest: false #强制当前游玩成绩为新成绩(可能会对Best50造成改动) | ||
autoPlay: false # 自动游玩 | ||
fastSkip: false # 快速跳过 | ||
chartTimer: false # 铺面计时器(歌曲进度控制) | ||
allCollection: false # 解锁全部收藏品 | ||
unlockMusic: false # 解锁全部歌曲 | ||
unlockMaster: false # 解锁全部歌曲Master难度 | ||
unlockEvent: false # 解锁全部活动 | ||
resetLoginBonusRecord: false # 重置登录奖励记录 | ||
forceCurrentIsBest: false # 强制当前游玩成绩为新成绩(可能会对Best50造成改动) | ||
setAllCharacterAsSameAndLock: false # 设置5个相同的旅行伙伴并锁定设置(以队长为准) | ||
rewriteLoginBonusStamp: # 重写每日登录奖励记录 | ||
enable: false # 是否启用 | ||
point: 0 # 登录奖励点数 | ||
|
||
fix: | ||
disableEncryption: false #禁用加密 | ||
disableReboot: false #禁用自动重启 | ||
skipVersionCheck: false #登录时跳过版本检查 | ||
rewriteNoteJudgeTiming: #重写覆盖游戏音符判定 (如填10,则游戏内+1.0) | ||
enable: false #是否启用 | ||
adjustTiming: 0.0 #音频延迟(单位:ms) | ||
judgeTiming: 0.0 #判定延迟(单位:帧) | ||
disableEncryption: false # 禁用加密 | ||
disableReboot: false # 禁用自动重启 | ||
skipVersionCheck: false # 登录时跳过版本检查 | ||
rewriteNoteJudgeTiming: # 重写覆盖游戏音符判定 (如填10,则游戏内+1.0) | ||
enable: false # 是否启用 | ||
adjustTiming: 0.0 # 音频延迟(单位:ms) | ||
judgeTiming: 0.0 # 判定延迟(单位:帧) | ||
|
||
modSetting: | ||
showInfo: false #显示信息 | ||
showPanel: false #显示面板 | ||
forceIsChinaBuild: false #强制加载SDGB only的补丁 | ||
safeMode: false #启用安全模式 | ||
showInfo: false # 显示信息 | ||
showPanel: false # 显示面板 | ||
forceIsChinaBuild: false # 强制以SDGB版本的方式加载补丁 | ||
safeMode: false # 启用安全模式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters