summaryrefslogtreecommitdiff
path: root/src/script/api/script_rail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/script_rail.cpp')
-rw-r--r--src/script/api/script_rail.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/api/script_rail.cpp b/src/script/api/script_rail.cpp
index 1ebeb74ec..6f0ce7255 100644
--- a/src/script/api/script_rail.cpp
+++ b/src/script/api/script_rail.cpp
@@ -492,3 +492,10 @@ static bool IsValidSignalType(int signal_type)
return ::GetRailTypeInfo((::RailType)railtype)->max_speed;
}
+
+/* static */ uint16 ScriptRail::GetMaintenanceCostFactor(RailType railtype)
+{
+ if (!ScriptRail::IsRailTypeAvailable(railtype)) return 0;
+
+ return ::GetRailTypeInfo((::RailType)railtype)->maintenance_multiplier;
+}