From 4458d2e85ed7f9e373af290dbe8063a52d2824b5 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:09:57 +1100 Subject: only decline offered quests if the player explicitly pressed the decline button --- source/frontend/StarQuestInterface.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/frontend/StarQuestInterface.hpp') diff --git a/source/frontend/StarQuestInterface.hpp b/source/frontend/StarQuestInterface.hpp index d825b86..f4d523c 100644 --- a/source/frontend/StarQuestInterface.hpp +++ b/source/frontend/StarQuestInterface.hpp @@ -51,6 +51,7 @@ protected: void commonSetup(Json config, String bodyText, String const& portraitName); virtual void close(); + virtual void decline(); virtual void accept(); virtual PanePtr createTooltip(Vec2I const& screenPosition) override; @@ -60,16 +61,23 @@ protected: class NewQuestInterface : public QuestPane { public: + enum class QuestDecision { + Declined, + Accepted, + Cancelled + }; + NewQuestInterface(QuestManagerPtr const& manager, QuestPtr const& quest, PlayerPtr player); protected: void close() override; + void decline() override; void accept() override; void dismissed() override; private: QuestManagerPtr m_manager; - bool m_declined; + QuestDecision m_decision; }; class QuestCompleteInterface : public QuestPane { -- cgit v1.2.3