Merge branch 'develop' into feature/dialogUI

This commit is contained in:
2025-05-19 22:49:39 +08:00
5 changed files with 12 additions and 4 deletions
+3
View File
@@ -1,3 +1,4 @@
using AibisDream.Framework;
using UnityEngine;
public enum ClueType
@@ -10,6 +11,8 @@ public abstract class Clue
{
public string Category { get; set; }
public string ClueName { get; set; }
public string YarnNodeName => LocalizationKit.GetL10NParamKey(ClueName);
public string LocaleClueName => LocalizationKit.LocalizeParam(ClueName);
public ClueType ClueType { get; protected set; }
public Clue(string category, string name)
{
+1 -2
View File
@@ -46,8 +46,7 @@ public class ClueManager : MonoBehaviour
public void GeneratePunchTapeWindow(string clueName, string category, string memoryIndex,
bool directlyAddToFavorites = false)
{
var l10nClueName = LocalizationKit.LocalizeParam(clueName);
PunchTape punchTape = new PunchTape(category, l10nClueName, memoryIndex);
PunchTape punchTape = new PunchTape(category, clueName, memoryIndex);
if (directlyAddToFavorites)
{
+1 -1
View File
@@ -39,7 +39,7 @@ public class PunchTape : Clue
if (clueItem.categoryText != null) clueItem.categoryText.text = "分类:" + Category;
if (clueItem.nameText != null)
{
clueItem.nameText.StringReference.Arguments = new object[] { ClueName };
clueItem.nameText.StringReference.Arguments = new object[] { LocaleClueName };
clueItem.nameText.RefreshString();
}
}
@@ -292,7 +292,7 @@ public class MemoryProcess : MonoBehaviour
// Set material properties
MemoryClarityVloume.weight=0;
Memoryfrequencyloume.weight=0;
DialogController.Instance.StartDialogNode(clueSlot.punchTape.ClueName);
DialogController.Instance.StartDialogNode(clueSlot.punchTape.YarnNodeName);
}
}
@@ -95,6 +95,12 @@ namespace AibisDream.Framework
{
return LocalizeParam(param, _paramTable);
}
public static string GetL10NParamKey(string key)
{
// 本地化参数则去除前缀,非本地化参数直接返回
return key.StartsWith(LocalizationPrefix) ? key[LocalizationPrefix.Length..] : key;
}
}
public class LocalizationTable