Skip to content

Commit

Permalink
增加对不同语言游戏的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
XcantloadX committed Aug 4, 2024
1 parent 891780c commit 880c6f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"name": "Entry Native (Debug Mode)",
"type": "debugpy",
"request": "launch",
"module": "app.native_ui.entry",
"module": "app.entry_native",
"args": [ "--debug" ]
},
]
Expand Down
5 changes: 3 additions & 2 deletions app/editor/save_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ def get_slots(self) -> list[SaveSlot]:
"""
assert self.__check_save_loaded(self.__preside_data)
slots = []
# TODO 存档槽位的开始位置似乎与游戏语言有关
for i in range(50, 60):
start = self.preside_data.system_data_.option_work_.language_type * 10
end = start + 10
for i in range(start, end):
slot = self.__preside_data.system_data_.slot_data_.save_data_[i]
time = slot.time.decode()
title = TitleId(slot.title)
Expand Down
6 changes: 4 additions & 2 deletions app/structs/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ class SystemData(Struct):
class SaveSlotData(Struct):
save_data_: FixedArray['SaveData', Literal[100]]
"""
存档数据
TODO 100 个存档位。游戏内可见存档槽位的开始位置似乎与游戏语言有关。
存档槽位数据,共 100 个槽位。
实际存档槽位的开始位置取决于当前语言,即 OptionWork.language_type 的值。
例如简体中文 `language_type` 的值为 5,则实际存档槽位为 50~59。
"""

@dataclass(init=False)
Expand Down

0 comments on commit 880c6f5

Please sign in to comment.