Codechange: Use constants for service interval max/min/default values (#10611)

This commit is contained in:
Tyler Trahan
2023-04-08 14:04:30 -04:00
committed by GitHub
parent 1691640603
commit 0de5eb53fa
3 changed files with 40 additions and 25 deletions

View File

@@ -26,10 +26,16 @@ uint GetOrderDistance(const Order *prev, const Order *cur, const Vehicle *v, int
void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int y, bool selected, bool timetable, int left, int middle, int right);
#define MIN_SERVINT_PERCENT 5
#define MAX_SERVINT_PERCENT 90
#define MIN_SERVINT_DAYS 30
#define MAX_SERVINT_DAYS 800
static const uint DEF_SERVINT_DAYS_TRAINS = 150;
static const uint DEF_SERVINT_DAYS_ROADVEH = 150;
static const uint DEF_SERVINT_DAYS_AIRCRAFT = 100;
static const uint DEF_SERVINT_DAYS_SHIPS = 360;
static const uint MIN_SERVINT_DAYS = 30;
static const uint MAX_SERVINT_DAYS = 800;
static const uint DEF_SERVINT_PERCENT = 50;
static const uint MIN_SERVINT_PERCENT = 5;
static const uint MAX_SERVINT_PERCENT = 90;
uint16 GetServiceIntervalClamped(uint interval, bool ispercent);