diff options
author | PeterN <peter@fuzzle.org> | 2019-03-08 18:13:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 18:13:33 +0000 |
commit | 41563a871b175f3469254d57dc019fda5210f8a9 (patch) | |
tree | e5117ce96dd17d50a4005496e8716a03ff77ef4e /src/script/api/script_group.hpp | |
parent | 7ca1793ec4d75c99de41dc27431c3b9c8353d7a1 (diff) | |
download | openttd-41563a871b175f3469254d57dc019fda5210f8a9.tar.xz |
Add: AI API for vehicle group colours (#7336)
Diffstat (limited to 'src/script/api/script_group.hpp')
-rw-r--r-- | src/script/api/script_group.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/script/api/script_group.hpp b/src/script/api/script_group.hpp index 9e88eaff1..6e7deb0b7 100644 --- a/src/script/api/script_group.hpp +++ b/src/script/api/script_group.hpp @@ -214,6 +214,36 @@ public: * @return The current usage of the group. */ static uint32 GetCurrentUsage(GroupID group_id); + + /** + * Set primary colour for a group. + * @param group_id The group id to set the colour of. + * @param colour Colour to set. + * @pre IsValidGroup(group_id). + */ + static bool SetPrimaryColour(GroupID group_id, ScriptCompany::Colours colour); + + /** + * Set secondary colour for a group. + * @param group_id The group id to set the colour of. + * @param colour Colour to set. + * @pre IsValidGroup(group_id). + */ + static bool SetSecondaryColour(GroupID group_id, ScriptCompany::Colours colour); + + /** + * Get primary colour of a group. + * @param group_id The group id to get the colour of. + * @pre IsValidGroup(group_id). + */ + static ScriptCompany::Colours GetPrimaryColour(GroupID group_id); + + /** + * Get secondary colour for a group. + * @param group_id The group id to get the colour of. + * @pre IsValidGroup(group_id). + */ + static ScriptCompany::Colours GetSecondaryColour(GroupID group_id); }; #endif /* SCRIPT_GROUP_HPP */ |