forked from akanyan/mu3-mods
fix: misc cleanup
Also set HideVersion default to false Also fix the new skipper crashing on tutorial
This commit is contained in:
@ -6,13 +6,11 @@ class patch_GameLED: GameLED {
|
||||
private patch_ButtonList _buttonList = new();
|
||||
|
||||
public extern void orig_initialize();
|
||||
|
||||
public new void initialize() {
|
||||
_buttonList.Clear();
|
||||
orig_initialize();
|
||||
}
|
||||
|
||||
private class patch_ButtonParam { }
|
||||
|
||||
private class patch_ButtonList: List<patch_ButtonParam> { }
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3.Notes;
|
||||
|
||||
class patch_FieldObject: FieldObject {
|
||||
class patch_BarNotes {
|
||||
class patch_Bar: BarNotes.Bar {
|
||||
public extern void orig_update(NotesManager mgr, float width = 1f);
|
||||
|
||||
public new void update(NotesManager mgr, float width = 1f) {
|
||||
orig_update(mgr, width);
|
||||
if(frameAppear <= (double)mgr.getCurrentFrame() || itemBar == null) {
|
||||
|
@ -3,14 +3,12 @@
|
||||
namespace MU3.Notes;
|
||||
|
||||
class patch_NotesManager: NotesManager {
|
||||
public extern void orig_reset();
|
||||
|
||||
public extern Vector3 orig_getEnemyPos();
|
||||
|
||||
public Vector3 enemyOffset { get; set; }
|
||||
|
||||
public extern Vector3 orig_getEnemyPos();
|
||||
public new Vector3 getEnemyPos() => orig_getEnemyPos() + enemyOffset;
|
||||
|
||||
public extern void orig_reset();
|
||||
public new void reset() {
|
||||
enemyOffset = Vector3.zero;
|
||||
orig_reset();
|
||||
|
@ -1,3 +1,4 @@
|
||||
using MonoMod;
|
||||
using MU3.Sequence;
|
||||
using MU3.Util;
|
||||
|
||||
@ -5,21 +6,13 @@ namespace MU3;
|
||||
|
||||
class patch_Scene_37_Result: Scene_37_Result {
|
||||
private Mode<Scene_37_Result, State> mode_;
|
||||
private extern void orig_Init_Init();
|
||||
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
Init,
|
||||
Score,
|
||||
Assignment,
|
||||
ReleaseMaster,
|
||||
GetMusic,
|
||||
UnlockScenario,
|
||||
Event,
|
||||
MemoryChapterEvent,
|
||||
CardCharaUp,
|
||||
CardCharaWaitSkip,
|
||||
CardCharaEnd,
|
||||
End
|
||||
End = 11
|
||||
}
|
||||
|
||||
private extern void orig_Init_Init();
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
using MonoMod;
|
||||
using MU3.Sequence;
|
||||
using MU3.Util;
|
||||
|
||||
@ -8,15 +9,10 @@ class patch_Scene_38_End: Scene_38_End {
|
||||
private extern void orig_Init_Init();
|
||||
private int result_;
|
||||
private UICommonWindow commonWindow_;
|
||||
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
Init,
|
||||
Continue,
|
||||
SendResultContinue,
|
||||
EndContinue,
|
||||
ForceLogout,
|
||||
ConsumeGP,
|
||||
End,
|
||||
WaitDestroy
|
||||
End = 6
|
||||
}
|
||||
|
||||
private void Init_Init() {
|
||||
|
@ -1,6 +1,7 @@
|
||||
using MU3.DataStudio;
|
||||
|
||||
namespace MU3.User;
|
||||
|
||||
class patch_UserManager: UserManager {
|
||||
private bool _loadedBlacklistData = false;
|
||||
private int _blacklistMin = -1;
|
||||
|
@ -5,7 +5,6 @@ namespace MU3;
|
||||
[MonoModPatch("global::MU3.NetConfig")]
|
||||
public static class patch_NetConfig {
|
||||
private static int encryptVersion_;
|
||||
|
||||
private static bool useTLS_;
|
||||
|
||||
public static int EncryptVersion {
|
||||
|
@ -1,20 +1,21 @@
|
||||
|
||||
using MonoMod;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_25_Login: Scene_25_Login {
|
||||
[MonoModIgnore]
|
||||
public enum State {
|
||||
Login = 2
|
||||
}
|
||||
private Mode<Scene_25_Login, State> mode_;
|
||||
private extern void orig_invokeOnFinish(int status);
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern void invokeOnFinish(int status);
|
||||
private void PurchaseGP_Init() {
|
||||
mode_.set(State.Login);
|
||||
}
|
||||
private void invokeOnFinish(int status) {
|
||||
orig_invokeOnFinish(status);
|
||||
}
|
||||
private void ExchangeGP_Init() {
|
||||
invokeOnFinish(1);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class patch_UICredit: UICredit {
|
||||
groupIcon_.image.rectTransform.pivot = new Vector2(0f, 0.5f);
|
||||
}
|
||||
|
||||
if(iniFile.getValue("Extra", "HideVersion", true)) {
|
||||
if(iniFile.getValue("Extra", "HideVersion", false)) {
|
||||
version_.transform.localScale = new Vector3(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,6 @@ public class patch_DataStudioManager: DataStudioManager {
|
||||
private static string _fileName;
|
||||
private static Dictionary<string, object> _dataCache;
|
||||
|
||||
private static extern bool orig_Deserialize<T>(string filePath, out T dsr) where T : new();
|
||||
|
||||
private static void initCache() {
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
var dir = iniFile.getValue("Extra", "CacheDir", ".");
|
||||
@ -37,6 +35,7 @@ public class patch_DataStudioManager: DataStudioManager {
|
||||
new BinaryFormatter().Serialize(serializationStream, _dataCache);
|
||||
}
|
||||
|
||||
private static extern bool orig_Deserialize<T>(string filePath, out T dsr) where T : new();
|
||||
private static bool Deserialize<T>(string filePath, out T dsr) where T : new() {
|
||||
if(_dataCache == null) {
|
||||
initCache();
|
||||
@ -54,7 +53,6 @@ public class patch_DataStudioManager: DataStudioManager {
|
||||
}
|
||||
|
||||
public extern bool orig_IsLoaded();
|
||||
|
||||
public new bool IsLoaded() {
|
||||
if(orig_IsLoaded()) {
|
||||
if(needSave) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
using MU3.Notes;
|
||||
|
||||
namespace MU3.Battle;
|
||||
|
||||
class patch_Counters: Counters {
|
||||
public int PlatinumFastCount { get; private set; } = 0;
|
||||
public int PlatinumLateCount { get; private set; } = 0;
|
||||
|
@ -1,6 +1,7 @@
|
||||
using MU3.Game;
|
||||
|
||||
namespace MU3.Battle;
|
||||
|
||||
class patch_GameEngine: GameEngine {
|
||||
private patch_Counters _counters;
|
||||
public extern void orig_calcCurrentBattleResult(SessionResult sessionResult);
|
||||
|
@ -1,4 +1,5 @@
|
||||
namespace MU3.Game;
|
||||
|
||||
class patch_SessionResult: SessionResult {
|
||||
public int PlatinumFastCount { get; set; }
|
||||
public int PlatinumLateCount { get; set; }
|
||||
|
@ -6,6 +6,7 @@ using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_UIResultTechScore: UIResultTechScore {
|
||||
private MU3UICounter counterFast_;
|
||||
private MU3UICounter counterLate_;
|
||||
|
@ -4,6 +4,7 @@ using MU3.Util;
|
||||
using System;
|
||||
|
||||
namespace MU3.Sequence;
|
||||
|
||||
class patch_Play: Play {
|
||||
private LocalSessionInfo _localSessionInfo;
|
||||
|
||||
|
@ -4,6 +4,7 @@ using MU3.Util;
|
||||
using MU3.ViewData;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_32_PrePlayMusic_ChapterSelect: Scene_32_PrePlayMusic_ChapterSelect {
|
||||
private ChapterSelectorItemViewData _selectItemViewData;
|
||||
private extern void orig_onChangeElement(int index, int indexRaw);
|
||||
@ -13,9 +14,7 @@ class patch_Scene_32_PrePlayMusic_ChapterSelect: Scene_32_PrePlayMusic_ChapterSe
|
||||
patch_GameBGM.WithholdPlay = false;
|
||||
|
||||
int selectorID = (
|
||||
(_selectItemViewData.memoryChapterViewData == null)
|
||||
? null
|
||||
: _selectItemViewData.memoryChapterViewData.memoryChapterData
|
||||
_selectItemViewData.memoryChapterViewData?.memoryChapterData
|
||||
)?.getMemoryChapterSelectorID() ?? patch_Play.RecentID;
|
||||
Singleton<GameSound>.instance.gameBGM.playBGM(233, selectorID);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_DailyBonus: DailyBonus {
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
|
@ -1,9 +1,12 @@
|
||||
using MonoMod;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_30_NoticeReward: Scene_30_NoticeReward {
|
||||
private Mode<Scene_30_NoticeReward, State> _mode;
|
||||
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
RankingReward = 2,
|
||||
FadeOut = 8,
|
||||
|
@ -27,6 +27,8 @@ class patch_PlayMusic: PlayMusic {
|
||||
_nuclearSkip = true;
|
||||
}
|
||||
if(_nuclearSkip) {
|
||||
bool isTutorial = SingletonMonoBehaviour<GameEngine>.instance.sessionInfo.isTutorial;
|
||||
if(!isTutorial) {
|
||||
if(state < EState.CalcResult) {
|
||||
setNextState(EState.CalcResult);
|
||||
}
|
||||
@ -36,6 +38,7 @@ class patch_PlayMusic: PlayMusic {
|
||||
setNextState(EState.End);
|
||||
}
|
||||
}
|
||||
}
|
||||
return orig_updateState(deltaTime);
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3.CustomUI;
|
||||
|
||||
class patch_MU3UIImageChanger: MU3UIImageChanger {
|
||||
private Sprite[] _sprites;
|
||||
|
||||
public Sprite[] sprites {
|
||||
get { return _sprites; }
|
||||
set { _sprites = value; }
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@ namespace MU3.DB;
|
||||
[MonoModPatch("global::MU3.DB.MusicSort2IDEnum")]
|
||||
public static class patch_MusicSort2IDEnum {
|
||||
private static MusicSort2TableRecord[] records;
|
||||
public static extern bool orig_loadFromFile(string filename);
|
||||
|
||||
public static extern bool orig_loadFromFile(string filename);
|
||||
public static bool loadFromFile(string filename) {
|
||||
var rv = orig_loadFromFile(filename);
|
||||
records[4].Name = "譜面定数";
|
||||
|
@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace MU3.User;
|
||||
|
||||
class patch_UserDetail: UserDetail {
|
||||
public extern void orig_copyTo(UserData userDetail);
|
||||
public new void copyTo(UserData userDetail) {
|
||||
|
@ -46,7 +46,6 @@ class patch_MusicSelectViewDataList: MusicSelectViewDataList {
|
||||
}
|
||||
|
||||
public extern void orig_create(GameViewData gameViewData, ChapterSelection chapterSelection, FumenDifficulty difficulty, MusicSort1ID sort1, MusicSort2ID sort2);
|
||||
|
||||
public new void create(GameViewData gameViewData, ChapterSelection chapterSelection, FumenDifficulty difficulty, MusicSort1ID sort1, MusicSort2ID sort2) {
|
||||
_reMasterPi = typeof(Data.MusicData).GetProperty("isReMaster");
|
||||
orig_create(gameViewData, chapterSelection, difficulty, sort1, sort2);
|
||||
|
@ -5,8 +5,8 @@ namespace MU3;
|
||||
public class patch_Scene_32_PrePlayMusic_MusicSelect: Scene_32_PrePlayMusic_MusicSelect {
|
||||
private static patch_MusicSort1ID[] _sort1SettingList;
|
||||
private static MusicSort2ID[] _sort2SettingList;
|
||||
private extern void orig_Awake();
|
||||
|
||||
private extern void orig_Awake();
|
||||
private new void Awake() {
|
||||
_sort1SettingList = new[] {
|
||||
patch_MusicSort1ID.Genre,
|
||||
|
@ -1,4 +1,5 @@
|
||||
using MU3.CustomUI;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3;
|
||||
@ -9,19 +10,22 @@ class patch_UISortButton: UISortButton {
|
||||
protected override void Awake() {
|
||||
base.Awake();
|
||||
|
||||
var changer = (patch_MU3UIImageChanger)_selectPreviewImageChanger;
|
||||
var n = changer.sprites.Length;
|
||||
var sprites = new Sprite[n + 1];
|
||||
var spritesFi = typeof(MU3UIImageChanger).GetField("_sprites", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
var changer = _selectPreviewImageChanger;
|
||||
|
||||
var oldSprites = (Sprite[])spritesFi.GetValue(changer);
|
||||
var n = oldSprites.Length;
|
||||
var newSprites = new Sprite[n + 1];
|
||||
|
||||
for(int i = 0; i < n; ++i) {
|
||||
sprites[i] = changer.sprites[i];
|
||||
newSprites[i] = oldSprites[i];
|
||||
}
|
||||
|
||||
Texture2D tex = new Texture2D(2, 2);
|
||||
tex.LoadImage(InternalSortPreview.Bytes);
|
||||
|
||||
sprites[n] = Sprite.Create(tex, new Rect(0, 0, 254, 121), sprites[0].pivot);
|
||||
newSprites[n] = Sprite.Create(tex, new Rect(0, 0, 254, 121), newSprites[0].pivot);
|
||||
|
||||
changer.sprites = sprites;
|
||||
spritesFi.SetValue(changer, newSprites);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
using MonoMod;
|
||||
using MU3.User;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_25_Login: Scene_25_Login {
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
GetUserRatinglog = 24
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ using MU3.Util;
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_32_PrePlayMusic_Confirm: Scene_32_PrePlayMusic_Confirm {
|
||||
private extern void orig_createSelector();
|
||||
private JewelBoostID getMaxBoost() {
|
||||
return JewelBoostID.Nine;
|
||||
}
|
||||
|
||||
private extern void orig_createSelector();
|
||||
private void createSelector() {
|
||||
Singleton<UserManager>.instance.userLocal.boost = JewelBoostID.Nine;
|
||||
orig_createSelector();
|
||||
|
@ -3,10 +3,10 @@
|
||||
namespace MU3.Sys;
|
||||
|
||||
class patch_Config: Config {
|
||||
public extern void orig_initialize();
|
||||
public int framerate { get; private set; }
|
||||
public bool isVsync { get; private set; }
|
||||
|
||||
public extern void orig_initialize();
|
||||
public new void initialize() {
|
||||
orig_initialize();
|
||||
|
||||
|
Reference in New Issue
Block a user