diff --git a/data b/data index 4fc2f61..9761bc1 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 4fc2f61c3dbda6442fbfd2723d6670b97b5f9d42 +Subproject commit 9761bc1cd4801f5140e2f6bb0772ea82b16e8db6 diff --git a/data_model/actual_data/_story/story_part_auto.py b/data_model/actual_data/_story/story_part_auto.py index e3a1a5e..1bb100b 100644 --- a/data_model/actual_data/_story/story_part_auto.py +++ b/data_model/actual_data/_story/story_part_auto.py @@ -111,6 +111,16 @@ def load(self): self._bg_to_char[bg_id] = char_id + # char to char + for (char_id, data) in self.data["char_to_char"].items(): + char1 = self.data_all.character[char_id] + + for char2_id in data: + char2 = self.data_all.character[char2_id] + + char1.register(char2) + char2.register(char1) + def to_json(self): return { "all": self.data_all.to_json(), @@ -120,6 +130,7 @@ def to_json(self): "bg_to_track": self._bg_to_track.to_json(), "char_to_track": self._char_to_track.to_json(), "char_to_bg": self.data["char_to_bg"], + "char_to_char": self.data["char_to_char"], "special": { "flag": self.data_special["flag"], "track": None if self.data_special["track"] is None else self.data_special["track"].to_json_basic() diff --git a/data_model/loader/manager_i18n.py b/data_model/loader/manager_i18n.py index 593ecb8..e45691a 100644 --- a/data_model/loader/manager_i18n.py +++ b/data_model/loader/manager_i18n.py @@ -58,7 +58,9 @@ def __getitem__(self, item) -> LangStringModel: # 降级到 LangStringModel 进行处置 if temp["zh_cn_cn"] == temp["zh_cn_jp"] == temp["zh_cn_tw"]: # 如果三者全部都一样,那不就是单语言? - temp["zh_cn"] = temp["zh_cn_cn"] + if temp["zh_cn_cn"] != "": + + temp["zh_cn"] = temp["zh_cn_cn"] m = LangStringModel() m.load(temp) else: