Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "error.h"
|
||||
#include "strings_func.h"
|
||||
#include "core/random_func.hpp"
|
||||
#include "timer/timer_game_calendar.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -403,7 +404,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout
|
||||
case 0xB0: return Clamp(this->industry->construction_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Date when built since 1920 (in days)
|
||||
case 0xB3: return this->industry->construction_type; // Construction type
|
||||
case 0xB4: {
|
||||
Date *latest = std::max_element(this->industry->last_cargo_accepted_at, endof(this->industry->last_cargo_accepted_at));
|
||||
TimerGameCalendar::Date *latest = std::max_element(this->industry->last_cargo_accepted_at, endof(this->industry->last_cargo_accepted_at));
|
||||
return Clamp((*latest) - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Date last cargo accepted since 1920 (in days)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user