forked from akanyan/mu3-mods
feat: add 4 things
* DisableEncryption * LoadBoost * UnlockFrameRate * UnlockMasterDifficulty WIP, not fully reviewed/tested yet.
This commit is contained in:
11
UnlockFrameRate/MU3.Notes/patch_NotesManager.cs
Normal file
11
UnlockFrameRate/MU3.Notes/patch_NotesManager.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace MU3.Notes;
|
||||
|
||||
class patch_NotesManager: NotesManager {
|
||||
private float _frame;
|
||||
|
||||
private float _frameReal;
|
||||
|
||||
private void progressFrameAndFrameReal() {
|
||||
_frame = _frameReal;
|
||||
}
|
||||
}
|
19
UnlockFrameRate/MU3.Sys/patch_Config.cs
Normal file
19
UnlockFrameRate/MU3.Sys/patch_Config.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3.Sys;
|
||||
|
||||
class patch_Config: Config {
|
||||
public extern void orig_initialize();
|
||||
|
||||
public new void initialize() {
|
||||
orig_initialize();
|
||||
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
|
||||
if(iniFile.getIntValue("Video", "VSync", 0) != 0) {
|
||||
QualitySettings.vSyncCount = 1;
|
||||
} else {
|
||||
Application.targetFrameRate = iniFile.getIntValue("Video", "Framerate", 60);
|
||||
}
|
||||
}
|
||||
}
|
20
UnlockFrameRate/MU3.Sys/patch_Time.cs
Normal file
20
UnlockFrameRate/MU3.Sys/patch_Time.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace MU3.Sys;
|
||||
|
||||
class patch_Time: Time {
|
||||
private static bool _init;
|
||||
|
||||
private static float _deltaTime;
|
||||
|
||||
private static float _adjustAccumlation;
|
||||
|
||||
private static float _realtimeSinceStartup;
|
||||
|
||||
public static new void update() {
|
||||
if(!_init) {
|
||||
_adjustAccumlation = 0f;
|
||||
_init = true;
|
||||
}
|
||||
_deltaTime = UnityEngine.Time.deltaTime;
|
||||
_realtimeSinceStartup = UnityEngine.Time.realtimeSinceStartup;
|
||||
}
|
||||
}
|
7
UnlockFrameRate/UnlockFrameRate.csproj
Normal file
7
UnlockFrameRate/UnlockFrameRate.csproj
Normal file
@ -0,0 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Assembly-CSharp.UnlockFramerate.mm</AssemblyName>
|
||||
<Description>Unlock framerate</Description>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\Mu3Mods.csproj" />
|
||||
</Project>
|
Reference in New Issue
Block a user