Skip to content

Commit

Permalink
修正部分内容
Browse files Browse the repository at this point in the history
- 声音包调用的 tips
- 删除语言文件冲突
  • Loading branch information
TartaricAcid committed Oct 31, 2023
1 parent e17488a commit 4ffa708
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ private void drawTooltips(PoseStack poseStack, int mouseX, int mouseY, int middl
str.addAll(modelItem.getDescription());
// 转换为 ITextComponent
List<Component> tooltips = ParseI18n.parse(str);
// 添加额外的提示
addModelCustomTips(modelItem, tooltips);
// 塞入提示语
if (!modelItem.getName().equals(ENCRYPT_EGG_NAME) && !modelItem.getName().equals(NORMAL_EGG_NAME)) {
tooltips.add(new TranslatableComponent("gui.touhou_little_maid.skin.tooltips.show_details")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ private static void readLanguageFile(ZipFile zipFile, String namespace) throws I
String currentLangPath = String.format("assets/%s/lang/%s.lang", namespace, language.getCode());
getLanguageMap(zipFile, newLangData, defaultLangPath);
getLanguageMap(zipFile, newLangData, currentLangPath);
removeOldLanguageKey(newLangData);

languageMapMerge(oldLangData, newLangData);
if (Language.getInstance() instanceof ClientLanguage) {
Expand All @@ -798,6 +799,7 @@ private static void readLanguageFile(Path rootPath, String namespace) throws IOE
String currentLangPath = String.format("assets/%s/lang/%s.lang", namespace, language.getCode());
getLanguageMap(rootPath, newLangData, defaultLangPath);
getLanguageMap(rootPath, newLangData, currentLangPath);
removeOldLanguageKey(newLangData);

languageMapMerge(oldLangData, newLangData);
if (Language.getInstance() instanceof ClientLanguage) {
Expand Down Expand Up @@ -848,4 +850,8 @@ private static void languageMapMerge(Map<String, String> oldLangData, Map<String
}
}
}

private static void removeOldLanguageKey(Map<String, String> langData) {
langData.remove("subtitle.touhou_little_maid.other.credit");
}
}

0 comments on commit 4ffa708

Please sign in to comment.