summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2020-03-22 14:05:10 +0000
committerGitHub <noreply@github.com>2020-03-22 15:05:10 +0100
commit3e680c50ca2db1fcf4103eb0ee2ac7f7b0c545c6 (patch)
treeed1d8adf2f6489f004e665dc2f09237f620d0326
parent3a08a7e99d4fada983ff78c4e104efae1151b4f8 (diff)
downloadopenttd-3e680c50ca2db1fcf4103eb0ee2ac7f7b0c545c6.tar.xz
Change: Open company window when clicking on a company goal (#8033)
-rw-r--r--src/goal_gui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp
index 19a432753..faab18c8e 100644
--- a/src/goal_gui.cpp
+++ b/src/goal_gui.cpp
@@ -19,6 +19,7 @@
#include "core/geometry_func.hpp"
#include "company_func.h"
#include "company_base.h"
+#include "company_gui.h"
#include "story_base.h"
#include "command_func.h"
#include "string_func.h"
@@ -106,7 +107,12 @@ struct GoalListWindow : public Window {
TileIndex xy;
switch (s->type) {
case GT_NONE: return;
- case GT_COMPANY: return;
+
+ case GT_COMPANY:
+ /* s->dst here is not a tile, but a CompanyID.
+ * Show the window with the overview of the company instead. */
+ ShowCompany((CompanyID)s->dst);
+ return;
case GT_TILE:
if (!IsValidTile(s->dst)) return;