submodule fix

This commit is contained in:
SoulliesOfficial
2025-05-09 22:49:50 -04:00
parent a06bb76d28
commit 440ffc183e
3 changed files with 10 additions and 3839 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
@@ -16,6 +17,14 @@ namespace Ichni.RhythmGame
public SubmoduleBase(GameElement attachedGameElement)
{
this.attachedGameElement = attachedGameElement;
if (attachedGameElement.submoduleList.Any(x => x.GetType() == this.GetType()))
{
Debug.LogWarning("存在重复的Submodule");
LogWindow.Log($"There are repeated submodule on Game Element {attachedGameElement.elementName}", Color.yellow);
return;
}
this.attachedGameElement.submoduleList.Add(this);
}

View File

@@ -99,7 +99,7 @@ namespace Ichni.RhythmGame
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Judge Submodule");
var container = inspector.GenerateContainer("Audio Submodule");
var submoduleSettings = container.GenerateSubcontainer(3);
var generalJudgeAudioListButton = inspector.GenerateButton(this, submoduleSettings, "General Judge", () =>
{

File diff suppressed because it is too large Load Diff