-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature save game #123
Feature save game #123
Conversation
- remove `time_range_end_of_day_text` template - fix text when using `zombie` command
- fill empty data into saved_game.json file when a game is ended - todo: load saved game (if any) when starting a game
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you describe how we use this feature?
How did you test it?
@classmethod | ||
def new(cls, interface, player_id, status, **kwargs): | ||
obj = cls(interface, player_id, interface.get_user_display_name(player_id), status) | ||
if "mana" in kwargs: | ||
obj.mana = int(kwargs["mana"]) | ||
if "yesterday_target" in kwargs: | ||
obj.set_guard_target(None if kwargs["yesterday_target"] == "None" else int(kwargs["yesterday_target"])) | ||
|
||
return obj | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this to character.py? Also for other roles
@@ -232,6 +235,11 @@ async def parse_command(client, game, message): | |||
res = game.set_mode(mode, on) | |||
await message.reply(res) | |||
|
|||
elif cmd == "restart": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command should be reboot
-> reboot the bot.
I want to use cmd restart
as start a new game with previous people. So we don't need to ask people to join
ref to issue #116