feat: add the remaining things

* DisableMaintenance
* UnlockAllMusic
* UnlockGameEvents
* UnlockMemoryChapters
This commit is contained in:
あかニャン 2024-07-08 02:10:46 +09:00
parent 42cf65bdb7
commit cc7bc8613b
17 changed files with 263 additions and 1 deletions

View File

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<AssemblyName>Assembly-CSharp.DisableMaintenance.mm</AssemblyName>
<Description>Disable maintenance</Description>
</PropertyGroup>
<Import Project="..\Mu3Mods.csproj" />
</Project>

View File

@ -0,0 +1,27 @@
namespace MU3.Operation;
class patch_ClosingManager: ClosingManager {
public new int getRemainingMinutes() {
return int.MaxValue;
}
public new int getClosedRemainingMinutes() {
return int.MaxValue;
}
public new bool isShowRemainingMinutes() {
return false;
}
public new bool isReceptionClosed() {
return false;
}
public new bool isForceLogout() {
return false;
}
public new CreditUseRestriction getCreditUseRestriction() {
return CreditUseRestriction.None;
}
}

View File

@ -0,0 +1,47 @@
namespace MU3.Operation;
class patch_MaintenanceTimer: MaintenanceTimer {
public new bool isUnderServerMaintenance() {
return false;
}
public new int getServerMaintenanceSec() {
return int.MaxValue;
}
public new int getAutoRebootSec() {
return int.MaxValue;
}
public new bool isAutoRebootNeeded() {
return false;
}
public new int getRemainingMinutes() {
return int.MaxValue;
}
public new int getClosedRemainingMinutes() {
return int.MaxValue;
}
public new bool isShowRemainingMinutes() {
return false;
}
public new bool isClosed() {
return false;
}
public new bool isForceLogout() {
return false;
}
public new ClosingManager.CreditUseRestriction getCreditUseRestriction() {
return ClosingManager.CreditUseRestriction.None;
}
public new bool isCoinAcceptable() {
return true;
}
}

View File

@ -25,6 +25,22 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockAndSetJewelBoostNine"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SortByInternalDifficulty", "SortByInternalDifficulty\SortByInternalDifficulty.csproj", "{0BF799DF-8837-4372-9F36-705CDC22374C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SortByInternalDifficulty", "SortByInternalDifficulty\SortByInternalDifficulty.csproj", "{0BF799DF-8837-4372-9F36-705CDC22374C}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoadBoost", "LoadBoost\LoadBoost.csproj", "{56B75395-ED26-479B-B59F-DABB74513335}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DisableEncryption", "DisableEncryption\DisableEncryption.csproj", "{3F05931E-4444-4616-A0AC-047809821B0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockMasterDifficulty", "UnlockMasterDifficulty\UnlockMasterDifficulty.csproj", "{965FCDBC-12EA-4F31-AAF6-9C4C3B9F7022}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockFrameRate", "UnlockFrameRate\UnlockFrameRate.csproj", "{0C3E8145-F91B-4F1F-97D1-17E12D49891B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockAllMusic", "UnlockAllMusic\UnlockAllMusic.csproj", "{C8948C3E-0434-429E-AFE6-4FB2DF246872}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DisableMaintenance", "DisableMaintenance\DisableMaintenance.csproj", "{6C91EB92-3A30-43B5-8954-E84C610C1D67}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockGameEvents", "UnlockGameEvents\UnlockGameEvents.csproj", "{3B9B843D-DCA0-41FE-B642-6BCB187BBD5D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockMemoryChapters", "UnlockMemoryChapters\UnlockMemoryChapters.csproj", "{3A217A12-6082-491B-89F6-C1D13AD69A19}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64 Debug|x64 = Debug|x64
@ -75,6 +91,38 @@ Global
{0BF799DF-8837-4372-9F36-705CDC22374C}.Debug|x64.Build.0 = Debug|x64 {0BF799DF-8837-4372-9F36-705CDC22374C}.Debug|x64.Build.0 = Debug|x64
{0BF799DF-8837-4372-9F36-705CDC22374C}.Release|x64.ActiveCfg = Release|x64 {0BF799DF-8837-4372-9F36-705CDC22374C}.Release|x64.ActiveCfg = Release|x64
{0BF799DF-8837-4372-9F36-705CDC22374C}.Release|x64.Build.0 = Release|x64 {0BF799DF-8837-4372-9F36-705CDC22374C}.Release|x64.Build.0 = Release|x64
{56B75395-ED26-479B-B59F-DABB74513335}.Debug|x64.ActiveCfg = Debug|x64
{56B75395-ED26-479B-B59F-DABB74513335}.Debug|x64.Build.0 = Debug|x64
{56B75395-ED26-479B-B59F-DABB74513335}.Release|x64.ActiveCfg = Release|x64
{56B75395-ED26-479B-B59F-DABB74513335}.Release|x64.Build.0 = Release|x64
{3F05931E-4444-4616-A0AC-047809821B0E}.Debug|x64.ActiveCfg = Debug|x64
{3F05931E-4444-4616-A0AC-047809821B0E}.Debug|x64.Build.0 = Debug|x64
{3F05931E-4444-4616-A0AC-047809821B0E}.Release|x64.ActiveCfg = Release|x64
{3F05931E-4444-4616-A0AC-047809821B0E}.Release|x64.Build.0 = Release|x64
{965FCDBC-12EA-4F31-AAF6-9C4C3B9F7022}.Debug|x64.ActiveCfg = Debug|x64
{965FCDBC-12EA-4F31-AAF6-9C4C3B9F7022}.Debug|x64.Build.0 = Debug|x64
{965FCDBC-12EA-4F31-AAF6-9C4C3B9F7022}.Release|x64.ActiveCfg = Release|x64
{965FCDBC-12EA-4F31-AAF6-9C4C3B9F7022}.Release|x64.Build.0 = Release|x64
{0C3E8145-F91B-4F1F-97D1-17E12D49891B}.Debug|x64.ActiveCfg = Debug|x64
{0C3E8145-F91B-4F1F-97D1-17E12D49891B}.Debug|x64.Build.0 = Debug|x64
{0C3E8145-F91B-4F1F-97D1-17E12D49891B}.Release|x64.ActiveCfg = Release|x64
{0C3E8145-F91B-4F1F-97D1-17E12D49891B}.Release|x64.Build.0 = Release|x64
{C8948C3E-0434-429E-AFE6-4FB2DF246872}.Debug|x64.ActiveCfg = Debug|x64
{C8948C3E-0434-429E-AFE6-4FB2DF246872}.Debug|x64.Build.0 = Debug|x64
{C8948C3E-0434-429E-AFE6-4FB2DF246872}.Release|x64.ActiveCfg = Release|x64
{C8948C3E-0434-429E-AFE6-4FB2DF246872}.Release|x64.Build.0 = Release|x64
{6C91EB92-3A30-43B5-8954-E84C610C1D67}.Debug|x64.ActiveCfg = Debug|x64
{6C91EB92-3A30-43B5-8954-E84C610C1D67}.Debug|x64.Build.0 = Debug|x64
{6C91EB92-3A30-43B5-8954-E84C610C1D67}.Release|x64.ActiveCfg = Release|x64
{6C91EB92-3A30-43B5-8954-E84C610C1D67}.Release|x64.Build.0 = Release|x64
{3B9B843D-DCA0-41FE-B642-6BCB187BBD5D}.Debug|x64.ActiveCfg = Debug|x64
{3B9B843D-DCA0-41FE-B642-6BCB187BBD5D}.Debug|x64.Build.0 = Debug|x64
{3B9B843D-DCA0-41FE-B642-6BCB187BBD5D}.Release|x64.ActiveCfg = Release|x64
{3B9B843D-DCA0-41FE-B642-6BCB187BBD5D}.Release|x64.Build.0 = Release|x64
{3A217A12-6082-491B-89F6-C1D13AD69A19}.Debug|x64.ActiveCfg = Debug|x64
{3A217A12-6082-491B-89F6-C1D13AD69A19}.Debug|x64.Build.0 = Debug|x64
{3A217A12-6082-491B-89F6-C1D13AD69A19}.Release|x64.ActiveCfg = Release|x64
{3A217A12-6082-491B-89F6-C1D13AD69A19}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -0,0 +1,24 @@
namespace MU3.DataStudio;
class patch_MusicData: MusicData {
public new int CostToUnlock {
get {
return 0;
}
private set { /* nop */ }
}
public new bool PossessingFromTheBeginning {
get {
return true;
}
private set { /* nop */ }
}
public new bool IsLockedAtTheBeginning {
get {
return false;
}
private set { /* nop */ }
}
}

View File

@ -0,0 +1,20 @@
using MU3.User;
using MU3.Util;
namespace MU3;
class patch_Scene_25_Login: Scene_25_Login {
private enum State {
GetUserRatinglog = 24
}
private Mode<Scene_25_Login, State> mode_;
private void GetUserActivityMusic_Init() {
// nop
}
private void GetUserActivityMusic_Proc() {
Singleton<UserManager>.instance.updateUserActivityInLoginEnd();
mode_.set(State.GetUserRatinglog);
}
}

View File

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<AssemblyName>Assembly-CSharp.UnlockAllMusic.mm</AssemblyName>
<Description>Unlock all music</Description>
</PropertyGroup>
<Import Project="..\Mu3Mods.csproj" />
</Project>

View File

@ -12,8 +12,10 @@ class patch_Config: Config {
if(iniFile.getIntValue("Video", "VSync", 0) != 0) { if(iniFile.getIntValue("Video", "VSync", 0) != 0) {
QualitySettings.vSyncCount = 1; QualitySettings.vSyncCount = 1;
Debug.Log("[UnlockFrameRate] VSync on");
} else { } else {
Application.targetFrameRate = iniFile.getIntValue("Video", "Framerate", 60); Application.targetFrameRate = iniFile.getIntValue("Video", "Framerate", 60);
Debug.Log("[UnlockFrameRate] Framerate lock: " + Application.targetFrameRate);
} }
} }
} }

View File

@ -0,0 +1,35 @@
using MU3.Data;
using MU3.Operation;
using MU3.Util;
using System;
using System.Linq;
namespace MU3.Client;
class patch_PacketGetGameEvent: Packet {
public Operation.GameEvent _gameEvent;
public Operation.GameEvent gameEvent => _gameEvent;
public extern State orig_proc();
public override State proc() {
State state = orig_proc();
if(state == State.Done) {
DateTime endDate = DateTime.Parse("2099-01-01 05:00:00.0");
_gameEvent ??= new Operation.GameEvent();
foreach(EventData eventData in SingletonStateMachine<DataManager, DataManager.EState>.instance.allEventData) {
IdPeriod idPeriod = Enumerable.FirstOrDefault(_gameEvent.list, (IdPeriod e) => e.id == eventData.id);
if(idPeriod != null) {
if(idPeriod.period.endDate < CustomDateTime.Now) {
idPeriod.period.endDate = endDate;
}
} else {
idPeriod = new();
idPeriod.id = eventData.id;
idPeriod.period = new Period(DateTime.MinValue.Date, endDate);
_gameEvent.list.Add(idPeriod);
_gameEvent.lastUpdate = CustomDateTime.Now;
}
}
}
return state;
}
}

View File

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<AssemblyName>Assembly-CSharp.UnlockGameEvents.mm</AssemblyName>
<Description>Unlock game events</Description>
</PropertyGroup>
<Import Project="..\Mu3Mods.csproj" />
</Project>

View File

@ -2,7 +2,6 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>Assembly-CSharp.UnlockMasterDifficulty.mm</AssemblyName> <AssemblyName>Assembly-CSharp.UnlockMasterDifficulty.mm</AssemblyName>
<Description>Unlock master difficulty</Description> <Description>Unlock master difficulty</Description>
<ProjectGuid>{965FCDBC-12EA-4F31-AAF6-9C4C3B9F7022}</ProjectGuid>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Mu3Mods.csproj" /> <Import Project="..\Mu3Mods.csproj" />
</Project> </Project>

View File

@ -0,0 +1,32 @@
using MU3.Data;
using MU3.User;
using MU3.Util;
using System.Collections.Generic;
using System.Linq;
namespace MU3.Client;
class patch_PacketGetUserMemoryChapter: Packet {
private Dictionary<int, User.UserMemoryChapter> userMemoryChapter_;
public override State proc() {
switch(procImpl()) {
case State.Done: {
GetUserMemoryChapterResponse response_ = (query_ as GetUserMemoryChapter).response_;
foreach(MemoryChapterData memoryChapterData in SingletonStateMachine<DataManager, DataManager.EState>.instance.allMemoryChapterData) {
UserMemoryChapter userMemoryChapter = Enumerable.FirstOrDefault(response_.userMemoryChapterList, (UserMemoryChapter c) => c.chapterId == memoryChapterData.id);
if(userMemoryChapter != null) {
User.UserMemoryChapter userMemoryChapter2 = new User.UserMemoryChapter();
userMemoryChapter2.copyFrom(userMemoryChapter);
userMemoryChapter_[userMemoryChapter2.ChapterId] = userMemoryChapter2;
} else {
User.UserMemoryChapter userMemoryChapter3 = new User.UserMemoryChapter(memoryChapterData.id);
userMemoryChapter_[userMemoryChapter3.ChapterId] = userMemoryChapter3;
}
}
Singleton<UserManager>.instance.UserMemoryChapter = userMemoryChapter_;
break;
}
}
return state_;
}
}

View File

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<AssemblyName>Assembly-CSharp.UnlockMemoryChapters.mm</AssemblyName>
<Description>Unlock memory chapters</Description>
</PropertyGroup>
<Import Project="..\Mu3Mods.csproj" />
</Project>