mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r21505) -Change: generalise the lost_train_warning setting to lost_vehicle_warning
This commit is contained in:
parent
49a77e89c4
commit
e3b391249d
@ -1456,7 +1456,6 @@ static SettingEntry _settings_vehicles_trains[] = {
|
|||||||
SettingEntry("vehicle.train_acceleration_model"),
|
SettingEntry("vehicle.train_acceleration_model"),
|
||||||
SettingEntry("vehicle.train_slope_steepness"),
|
SettingEntry("vehicle.train_slope_steepness"),
|
||||||
SettingEntry("vehicle.mammoth_trains"),
|
SettingEntry("vehicle.mammoth_trains"),
|
||||||
SettingEntry("gui.lost_train_warn"),
|
|
||||||
SettingEntry("vehicle.wagon_speed_limits"),
|
SettingEntry("vehicle.wagon_speed_limits"),
|
||||||
SettingEntry("vehicle.disable_elrails"),
|
SettingEntry("vehicle.disable_elrails"),
|
||||||
SettingEntry("vehicle.freight_trains"),
|
SettingEntry("vehicle.freight_trains"),
|
||||||
@ -1474,6 +1473,7 @@ static SettingEntry _settings_vehicles[] = {
|
|||||||
SettingEntry("gui.new_nonstop"),
|
SettingEntry("gui.new_nonstop"),
|
||||||
SettingEntry("gui.order_review_system"),
|
SettingEntry("gui.order_review_system"),
|
||||||
SettingEntry("gui.vehicle_income_warn"),
|
SettingEntry("gui.vehicle_income_warn"),
|
||||||
|
SettingEntry("gui.lost_vehicle_warn"),
|
||||||
SettingEntry("vehicle.never_expire_vehicles"),
|
SettingEntry("vehicle.never_expire_vehicles"),
|
||||||
SettingEntry("vehicle.max_trains"),
|
SettingEntry("vehicle.max_trains"),
|
||||||
SettingEntry("vehicle.max_roadveh"),
|
SettingEntry("vehicle.max_roadveh"),
|
||||||
|
@ -43,7 +43,7 @@ struct DifficultySettings {
|
|||||||
struct GUISettings {
|
struct GUISettings {
|
||||||
bool vehicle_speed; ///< show vehicle speed
|
bool vehicle_speed; ///< show vehicle speed
|
||||||
bool sg_full_load_any; ///< new full load calculation, any cargo must be full read from pre v93 savegames
|
bool sg_full_load_any; ///< new full load calculation, any cargo must be full read from pre v93 savegames
|
||||||
bool lost_train_warn; ///< if a train can't find its destination, show a warning
|
bool lost_vehicle_warn; ///< if a vehicle can't find its destination, show a warning
|
||||||
uint8 order_review_system; ///< perform order reviews on vehicles
|
uint8 order_review_system; ///< perform order reviews on vehicles
|
||||||
bool vehicle_income_warn; ///< if a vehicle isn't generating income, show a warning
|
bool vehicle_income_warn; ///< if a vehicle isn't generating income, show a warning
|
||||||
bool status_long_date; ///< always show long date in status bar
|
bool status_long_date; ///< always show long date in status bar
|
||||||
|
@ -593,7 +593,7 @@ const SettingDesc _settings[] = {
|
|||||||
SDTC_VAR(gui.semaphore_build_before, SLE_INT32, S, NC, 1950, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE, ResetSignalVariant),
|
SDTC_VAR(gui.semaphore_build_before, SLE_INT32, S, NC, 1950, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE, ResetSignalVariant),
|
||||||
SDTC_BOOL(gui.vehicle_income_warn, S, 0, true, STR_CONFIG_SETTING_WARN_INCOME_LESS, NULL),
|
SDTC_BOOL(gui.vehicle_income_warn, S, 0, true, STR_CONFIG_SETTING_WARN_INCOME_LESS, NULL),
|
||||||
SDTC_VAR(gui.order_review_system, SLE_UINT8, S, MS, 2, 0, 2, 0, STR_CONFIG_SETTING_ORDER_REVIEW, NULL),
|
SDTC_VAR(gui.order_review_system, SLE_UINT8, S, MS, 2, 0, 2, 0, STR_CONFIG_SETTING_ORDER_REVIEW, NULL),
|
||||||
SDTC_BOOL(gui.lost_train_warn, S, 0, true, STR_CONFIG_SETTING_WARN_LOST_TRAIN, NULL),
|
SDTC_BOOL(gui.lost_vehicle_warn, S, 0, true, STR_CONFIG_SETTING_WARN_LOST_TRAIN, NULL),
|
||||||
SDTC_BOOL(gui.always_build_infrastructure, S, 0, false, STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE, RedrawScreen),
|
SDTC_BOOL(gui.always_build_infrastructure, S, 0, false, STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE, RedrawScreen),
|
||||||
SDTC_BOOL(gui.new_nonstop, S, 0, false, STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT, NULL),
|
SDTC_BOOL(gui.new_nonstop, S, 0, false, STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT, NULL),
|
||||||
SDTC_VAR(gui.stop_location, SLE_UINT8, S, MS, 2, 0, 2, 1, STR_CONFIG_SETTING_STOP_LOCATION, NULL),
|
SDTC_VAR(gui.stop_location, SLE_UINT8, S, MS, 2, 0, 2, 1, STR_CONFIG_SETTING_STOP_LOCATION, NULL),
|
||||||
|
@ -2417,7 +2417,7 @@ static Track ChooseTrainTrack(Train *v, TileIndex tile, DiagDirection enterdir,
|
|||||||
SetBit(v->vehicle_flags, VF_PATHFINDER_LOST);
|
SetBit(v->vehicle_flags, VF_PATHFINDER_LOST);
|
||||||
/* and notify user about the event */
|
/* and notify user about the event */
|
||||||
AI::NewEvent(v->owner, new AIEventVehicleLost(v->index));
|
AI::NewEvent(v->owner, new AIEventVehicleLost(v->index));
|
||||||
if (_settings_client.gui.lost_train_warn && v->owner == _local_company) {
|
if (_settings_client.gui.lost_vehicle_warn && v->owner == _local_company) {
|
||||||
SetDParam(0, v->index);
|
SetDParam(0, v->index);
|
||||||
AddVehicleNewsItem(
|
AddVehicleNewsItem(
|
||||||
STR_NEWS_TRAIN_IS_LOST,
|
STR_NEWS_TRAIN_IS_LOST,
|
||||||
@ -3609,7 +3609,7 @@ static bool TrainLocoHandler(Train *v, bool mode)
|
|||||||
|
|
||||||
if (HasBit(v->flags, VRF_TRAIN_STUCK) && v->wait_counter > 2 * _settings_game.pf.wait_for_pbs_path * DAY_TICKS) {
|
if (HasBit(v->flags, VRF_TRAIN_STUCK) && v->wait_counter > 2 * _settings_game.pf.wait_for_pbs_path * DAY_TICKS) {
|
||||||
/* Show message to player. */
|
/* Show message to player. */
|
||||||
if (_settings_client.gui.lost_train_warn && v->owner == _local_company) {
|
if (_settings_client.gui.lost_vehicle_warn && v->owner == _local_company) {
|
||||||
SetDParam(0, v->index);
|
SetDParam(0, v->index);
|
||||||
AddVehicleNewsItem(
|
AddVehicleNewsItem(
|
||||||
STR_NEWS_TRAIN_IS_STUCK,
|
STR_NEWS_TRAIN_IS_STUCK,
|
||||||
|
Loading…
Reference in New Issue
Block a user