diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 21:00:40 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 21:00:40 +0000 |
commit | d85a628dde5eed0a0a2deb0b6bc199ba939e307f (patch) | |
tree | 50edb777ea125e3d0bb8f271fa05a7a1c405f45c /src/script/api/script_vehicle.hpp | |
parent | 3a535690d4e9aaa896a062e7b5b5454b1b07ac47 (diff) | |
download | openttd-d85a628dde5eed0a0a2deb0b6bc199ba939e307f.tar.xz |
(svn r23624) -Add: ScriptVehicle/ScriptStation/ScriptSign::GetOwner, to get the owner of those objects (GameScript only)
Diffstat (limited to 'src/script/api/script_vehicle.hpp')
-rw-r--r-- | src/script/api/script_vehicle.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp index 4d0debb4a..f9cf71876 100644 --- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -132,6 +132,15 @@ public: static char *GetName(VehicleID vehicle_id); /** + * Get the owner of a vehicle. + * @param vehicle_id The vehicle to get the owner of. + * @pre IsValidVehicle(vehicle_id). + * @return The owner the vehicle has. + * @api -ai + */ + static ScriptCompany::CompanyID GetOwner(VehicleID vehicle_id); + + /** * Get the current location of a vehicle. * @param vehicle_id The vehicle to get the location of. * @pre IsValidVehicle(vehicle_id). |