From 1f194eb94e156821fea29bbfb92cc25b937b4795 Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Wed, 1 Feb 2023 22:35:51 +0000 Subject: [PATCH] Fix: [Script] Incorrect value for GOAL_INVALID (#10436) * Fix: [Script] Incorrect value for GOAL_INVALID * Cleanup: Remove unused static variable --- src/goal_type.h | 3 +-- src/script/api/script_goal.hpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/goal_type.h b/src/goal_type.h index 27ec758a9d..2db04b9f0a 100644 --- a/src/goal_type.h +++ b/src/goal_type.h @@ -32,8 +32,7 @@ enum GoalType : byte { GT_STORY_PAGE, ///< Destination is a story page }; -typedef uint32 GoalTypeID; ///< Contains either tile, industry ID, town ID or company ID (or INVALID_GOALTYPE) -static const GoalTypeID INVALID_GOALTYPE = 0xFFFFFFFF; ///< Invalid/unknown index of GoalType +typedef uint32 GoalTypeID; ///< Contains either tile, industry ID, town ID, company ID, or story page ID typedef uint16 GoalID; ///< ID of a goal struct Goal; diff --git a/src/script/api/script_goal.hpp b/src/script/api/script_goal.hpp index 69f8c38f66..9367ab7753 100644 --- a/src/script/api/script_goal.hpp +++ b/src/script/api/script_goal.hpp @@ -28,9 +28,9 @@ public: /** * The goal IDs. */ - enum GoalID { + enum GoalID : uint16 { /* Note: these values represent part of the in-game GoalID enum */ - GOAL_INVALID = ::INVALID_GOALTYPE, ///< An invalid goal id. + GOAL_INVALID = ::INVALID_GOAL, ///< An invalid goal id. }; /**