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);
}