Add current day/month to tracerestrict and conditional order conditionals
This commit is contained in:
@@ -346,12 +346,16 @@ static const StringID _time_date_value_str[] = {
|
||||
STR_TRACE_RESTRICT_TIME_MINUTE,
|
||||
STR_TRACE_RESTRICT_TIME_HOUR,
|
||||
STR_TRACE_RESTRICT_TIME_HOUR_MINUTE,
|
||||
STR_TRACE_RESTRICT_TIME_DAY,
|
||||
STR_TRACE_RESTRICT_TIME_MONTH,
|
||||
INVALID_STRING_ID
|
||||
};
|
||||
static const uint _time_date_value_val[] = {
|
||||
TRTDVF_MINUTE,
|
||||
TRTDVF_HOUR,
|
||||
TRTDVF_HOUR_MINUTE,
|
||||
TRTDVF_DAY,
|
||||
TRTDVF_MONTH,
|
||||
};
|
||||
|
||||
/** value drop down list for time/date types strings and values */
|
||||
@@ -543,7 +547,6 @@ static const TraceRestrictDropDownListSet *GetTypeDropDownListSet(TraceRestrictG
|
||||
} else {
|
||||
*hide_mask = is_conditional ? 0x1FE0000 : 0x6F0;
|
||||
}
|
||||
if (is_conditional && !_settings_game.game_time.time_in_minutes) *hide_mask |= 0x800000;
|
||||
if (is_conditional && _settings_game.vehicle.train_braking_model != TBM_REALISTIC) *hide_mask |= 0x1040000;
|
||||
}
|
||||
return is_conditional ? &set_cond : &set_action;
|
||||
@@ -1858,7 +1861,7 @@ public:
|
||||
}
|
||||
|
||||
case TRVT_TIME_DATE_INT: {
|
||||
this->ShowDropDownListWithValue(&_time_date_value, GetTraceRestrictValue(item), false, TR_WIDGET_LEFT_AUX_DROPDOWN, 0, 0, UINT_MAX);
|
||||
this->ShowDropDownListWithValue(&_time_date_value, GetTraceRestrictValue(item), false, TR_WIDGET_LEFT_AUX_DROPDOWN, _settings_game.game_time.time_in_minutes ? 0 : 7, 0, UINT_MAX);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user