Skip to content

Commit 6f514a7

Browse files
authored
Merge pull request #542 from bojidar-bg/x-day-count-pr
Add day/night count in sunrise/sunset messages
2 parents 25ac1e5 + 840f856 commit 6f514a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

messages/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@
626626
"sunset_vote": "The sun sets.",
627627
"night_idle_notice": "[b]You have not yet acted with all of your roles tonight. Please read the messages sent to you at beginning of night and ensure that you have successfully used every command you are able to use.[/b]",
628628
"twilight_warning": "[b]A few villagers awake early and notice it is still dark outside. The night is almost over and there are still whispers heard in the village.[/b]",
629-
"sunrise": "Night lasted [b]{0:0>2}:{1:0>2}[/b]. It is now daytime. The villagers awake, thankful for surviving the night, and search the village... ",
629+
"sunrise": "Night lasted [b]{0:0>2}:{1:0>2}[/b]. It is now daytime of day {2}. The villagers awake, thankful for surviving the night, and search the village... ",
630630
"not_daytime": "It is not daytime.",
631631
"not_nighttime": "It is not nighttime.",
632632
"player_meek_abstain": "{0:@} meekly abstains from voting anyone today.",
@@ -1063,7 +1063,7 @@
10631063
"gunner_overnight_fail_totem": "{0:@} had bullets and tried to shoot their assailant, but a blinding flash of light from a nearby totem caused the attack to miss.",
10641064
"gunner_overnight_fail_angel": "{0:@} had bullets and tried to shoot their assailant, but {=guardian angel!role:article} {=guardian angel!role} was on duty and foiled the attempt.",
10651065
"gunner_overnight_fail_bodyguard": "{0:@} had bullets and tried to shoot their assailant, but {2:@} intervened and received the gunshot instead.",
1066-
"night_begin": "It is now nighttime. All players check for PMs from me for instructions.",
1066+
"night_begin": "It is now nighttime of night {0}. All players check for PMs from me for instructions.",
10671067
"first_night_begin": "If you did not receive one, simply sit back, relax, and wait patiently for morning.",
10681068
"game_mode_not_found": "Mode {0:bold} not found.",
10691069
"werewolf_already_running": "Werewolf is already in play.",

src/trans.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def transition_day(var: GameState, game_id: int = 0):
224224
killers: dict[UserOrLocation, list[UserOrSpecialTag]] = defaultdict(list)
225225
kill_priorities: dict[UserOrSpecialTag, int] = defaultdict(int)
226226
message: dict[UserOrSpecialTag, list[str]] = defaultdict(list)
227-
message["*"].append(messages["sunrise"].format(minimum, sec))
227+
message["*"].append(messages["sunrise"].format(minimum, sec, var.day_count))
228228
dead: set[User] = set()
229229
novictmsg = True
230230
howl_count = 0
@@ -430,7 +430,7 @@ def transition_night(var: GameState):
430430
event_end = Event("transition_night_end", {})
431431
event_end.dispatch(var)
432432

433-
dmsg.append(messages["night_begin"])
433+
dmsg.append(messages["night_begin"].format(var.night_count))
434434

435435
if var.night_count:
436436
dmsg.append(messages["first_night_begin"])

0 commit comments

Comments
 (0)