diff options
Diffstat (limited to 'src/gui/dialogsmanager.cpp')
-rw-r--r-- | src/gui/dialogsmanager.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp index 2383d2bb0..655ef0c2c 100644 --- a/src/gui/dialogsmanager.cpp +++ b/src/gui/dialogsmanager.cpp @@ -26,6 +26,8 @@ #include "configuration.h" #include "settings.h" +#include "being/localplayer.h" + #include "being/playerinfo.h" #include "const/sound.h" @@ -192,6 +194,11 @@ void DialogsManager::attributeChanged(const AttributesT id, const int total = CAST_S32(oldVal); if (newVal >= max && total < max) { + const std::string overweightMessage( + // TRANSLATORS: overweight message in speech bubble + _("Warning: You are overburdened," + " you have difficulty regenerating.")); + /* weightNoticeTime = cur_time + 5; CREATEWIDGETV(weightNotice, OkDialog, std::string(), @@ -208,9 +215,17 @@ void DialogsManager::attributeChanged(const AttributesT id, 260); weightNotice->addActionListener( &weightListener); + */ + if (localPlayer != nullptr) + localPlayer->setSpeech(overweightMessage); } else if (newVal < max && total >= max) { + const std::string underweightMessage( + // TRANSLATORS: overweight message in speech bubble + _("You are no longer overburdened," + " regeneration back to normal.")); + /* weightNoticeTime = cur_time + 5; CREATEWIDGETV(weightNotice, OkDialog, std::string(), @@ -227,6 +242,9 @@ void DialogsManager::attributeChanged(const AttributesT id, 260); weightNotice->addActionListener( &weightListener); + */ + if (localPlayer != nullptr) + localPlayer->setSpeech(underweightMessage); } } } |