Skip to content

Commit

Permalink
#335 修复部分角色识别错误导致模拟宇宙无法运行的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Jun 16, 2024
1 parent e329581 commit 319bdb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sr/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ def same_as_current(self, new_character_list: List[Character]):
return False
else:
for i in range(len(self.character_list)):
if self.character_list[i].id != new_character_list[i].id:
if self.character_list[i] is None and new_character_list[i] is None:
return True
elif self.character_list[i] is None or new_character_list[i] is None:
return False
elif self.character_list[i].id != new_character_list[i].id:
return False
return True

Expand Down

0 comments on commit 319bdb1

Please sign in to comment.