MarvellousSoft / MarvInc

Zachlike with an immersive storyline told through emails.
https://marvellous.itch.io/marvellous-inc
GNU General Public License v3.0
56 stars 7 forks source link

Bot talk option resets sometimes #207

Closed ghost closed 6 years ago

ghost commented 6 years ago

Sometimes, with the bot talk option disabled in preferences, the bot still talks. I am not sure, but I think it happens whenever a bot is replaced.

A workaround is to re-enable and re-disable it every time it happens. Edit: Actually that workaround doesn't help. The one that helps is to hit "reply" in the email again.

yancouto commented 6 years ago

The introductory messages still show up, that's intended. Maybe we should disable those too? Or maybe add a different option.

rilifon commented 6 years ago

Lets just add another seettings option. One for "Remove regular bot messages", other for "Remove introductory bot messages"

ghost commented 6 years ago

If it was just these introductory messages it would be OK, but actually the bot continues with more messages after a while. I wouldn't need such an option, I just want them to at least stay quiet after they have introduced themselves, when I have disabled bot messages.

Try this patch to see it more quickly:

diff --git a/marv/classes/room.lua b/marv/classes/room.lua
index b39db22..0fe4a98 100644
--- a/marv/classes/room.lua
+++ b/marv/classes/room.lua
@@ -13,7 +13,7 @@ local Reader = require "classes.reader"

 --LOCAL VARIABLES--

-local max_time_between_bot_messages = 200
+local max_time_between_bot_messages = 3
 local min_time_between_bot_messages = 2
 local bot_message_timer_handle = nil
ghost commented 6 years ago

There seems to be something else broken. It seems the setting isn't saved or restored properly.

On reflection, the setting's name is "Robot Messages Popup" - I wouldn't expect any messages from bots at all if that is disabled. If that setting is supposed to only affect some messages, maybe it could be renamed to "Extra Robot Messages".

oprypin commented 6 years ago

I think this setting is just forgotten when the game restarts

yancouto commented 6 years ago

I'll look into that. Thank you for the report. (By the way, this setting is supposed to be stored for each user, so if you open a new user it will "reset" for that user, but it seems the problem is bigger than that).

RenatoGeh commented 6 years ago

All settings are (seemingly) being properly stored and retrieved on login. The problem is the settings page is reading values before they are set by save_manager, so they are shown as their defaults instead. This might be only part of the problem, though. We'll investigate this issue further.

yancouto commented 6 years ago

The problem was the intro message was sent multiple times. I fixed that. I also added an option to disable the intro messages.