Skip to content

Commit

Permalink
Cap logs at one entry
Browse files Browse the repository at this point in the history
This is only a temporary fix for this release. Otherwise, large save files will stay large forever. Logs are effectively broken for this release anyway so hopefully it won't cause any issues.
  • Loading branch information
larkgz committed Dec 23, 2022
1 parent 5baac84 commit 2dbddd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts/cats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2621,6 +2621,10 @@ def save_relationship_of_cat(self):

rel = []
for r in self.relationships:
if r.log:
log = [r.log[-1]]
else:
log = []
r_data = {
"cat_from_id": r.cat_from.ID,
"cat_to_id": r.cat_to.ID,
Expand All @@ -2633,7 +2637,7 @@ def save_relationship_of_cat(self):
"comfortable": r.comfortable,
"jealousy": r.jealousy,
"trust": r.trust,
"log": r.log
"log": log
}
rel.append(r_data)

Expand Down
2 changes: 1 addition & 1 deletion scripts/relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def __init__(self, cat_from, cat_to, mates=False, family=False, romantic_love=0,
self.current_action_str = ''
self.triggerd_event = False
if log:
self.log = log
self.log = [log[-1]]
else:
self.log = []

Expand Down

0 comments on commit 2dbddd3

Please sign in to comment.