src/order_cmd.cpp
changeset 8707 55835d8fbfcd
parent 8640 1e93b81e96d2
child 8710 52015340050c
--- a/src/order_cmd.cpp	Mon Jan 07 00:45:05 2008 +0000
+++ b/src/order_cmd.cpp	Mon Jan 07 00:57:19 2008 +0000
@@ -21,6 +21,7 @@
 #include "core/alloc_func.hpp"
 #include "functions.h"
 #include "window_func.h"
+#include "settings_type.h"
 
 DEFINE_OLD_POOL_GENERIC(Order, Order)
 
@@ -1251,6 +1252,11 @@
 	}
 }
 
+Date GetServiceIntervalClamped(uint index)
+{
+	return (_patches.servint_ispercent) ? Clamp(index, MIN_SERVINT_PERCENT, MAX_SERVINT_PERCENT) : Clamp(index, MIN_SERVINT_DAYS, MAX_SERVINT_DAYS);
+}
+
 /**
  *
  * Check if we share our orders with an other vehicle