diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-02-13 22:48:46 +0000 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-03-03 09:15:39 +0100 |
commit | 5d3ccae6c5bd3f328ad0d8e68ae7c69451b9ca48 (patch) | |
tree | d2b9f27857cd3fe841607b9ad444e04d89c205e0 /src/script/api/script_group.hpp | |
parent | e0c2ad1b6591859a1a30216e396cdab6e6bb028f (diff) | |
download | openttd-5d3ccae6c5bd3f328ad0d8e68ae7c69451b9ca48.tar.xz |
Add: AI function to get current usage of a group.
Diffstat (limited to 'src/script/api/script_group.hpp')
-rw-r--r-- | src/script/api/script_group.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/api/script_group.hpp b/src/script/api/script_group.hpp index c5f41cdb6..a41196718 100644 --- a/src/script/api/script_group.hpp +++ b/src/script/api/script_group.hpp @@ -205,6 +205,14 @@ public: * @return The current profit the group had last year. */ static Money GetProfitLastYear(GroupID group_id); + + /** + * Get the current vehicle usage of a group. + * @param group_id The group to get the current usage of. + * @pre IsValidGroup(group_id). + * @return The current usage of the group. + */ + static uint32 GetCurrentUsage(GroupID group_id); }; #endif /* SCRIPT_GROUP_HPP */ |