diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 21:03:17 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 21:03:17 +0000 |
commit | 3ada3b9cc5b63a593c2b2655aafedbcbdedcd041 (patch) | |
tree | 0b51e7b529ea4eabc3cd74a3a6b749a6526bca32 /src/script/api/script_object.cpp | |
parent | 084f4e6aacc9b3ad8f6ac319a55027307cfa5f00 (diff) | |
download | openttd-3ada3b9cc5b63a593c2b2655aafedbcbdedcd041.tar.xz |
(svn r23630) -Add: a Goal GUI to show your current goals
Diffstat (limited to 'src/script/api/script_object.cpp')
-rw-r--r-- | src/script/api/script_object.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index d9a432b44..72185c786 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -16,6 +16,7 @@ #include "../../network/network.h" #include "../../tunnelbridge.h" #include "../../genworld.h" +#include "../../goal_type.h" #include "../script_storage.hpp" #include "../script_instance.hpp" @@ -142,6 +143,7 @@ ScriptObject::ActiveInstance::~ActiveInstance() SetNewVehicleID(_new_vehicle_id); SetNewSignID(_new_sign_id); SetNewGroupID(_new_group_id); + SetNewGoalID(_new_goal_id); } /* static */ bool ScriptObject::GetLastCommandRes() @@ -179,6 +181,16 @@ ScriptObject::ActiveInstance::~ActiveInstance() return GetStorage()->new_group_id; } +/* static */ void ScriptObject::SetNewGoalID(GoalID goal_id) +{ + GetStorage()->new_goal_id = goal_id; +} + +/* static */ GroupID ScriptObject::GetNewGoalID() +{ + return GetStorage()->new_goal_id; +} + /* static */ void ScriptObject::SetAllowDoCommand(bool allow) { GetStorage()->allow_do_command = allow; |