Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 55fbd46

Browse files
fix: calendar object error (#84)
1 parent 8179871 commit 55fbd46

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

game/script.rpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ label stage7_complete_curriculum:
13421342
player "It says {bt}Congratulations!{/bt}...?"
13431343
$ has_completed_curriculum = True
13441344

1345-
$ completed_curriculum_date = date(calendar.year, calendar.month, calendar.day)
1345+
$ completed_curriculum_date = date(calendar.get_year(), calendar.get_month(), calendar.get_day())
13461346
$ days_between_start_and_curriculum_completion = (completed_curriculum_date - start_date).days
13471347

13481348
$ add_achievement(
@@ -1525,7 +1525,7 @@ label stage8:
15251525
play sound 'audio/sfx/applause.ogg'
15261526
$ todo_list.complete_todo(todo_get_job)
15271527
player "Can't forget to check that off the To-Do list."
1528-
$ accepted_offer_date = date(calendar.year, calendar.month, calendar.day)
1528+
$ accepted_offer_date = date(calendar.get_year(), calendar.get_month(), calendar.get_day())
15291529
$ days_between_start_and_offer = (accepted_offer_date - start_date).days
15301530
$ days_between_curriculum_completion_and_offer = (accepted_offer_date - completed_curriculum_date).days
15311531

game/scripts/calendar.rpy

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ init python:
3131
self.date += timedelta(days=30)
3232
renpy.call_screen('text_over_black_bg_screen', _('Fast-forwarding a month...'))
3333

34+
def get_year(self):
35+
return self.date.year
36+
37+
def get_month(self):
38+
return self.date.month
39+
40+
def get_day(self):
41+
return self.date.day
42+
3443
# this screen should always show
3544
screen calendar_screen():
3645
## Ensure this appears on top of other screens like quick_menu and player_stats

0 commit comments

Comments
 (0)