|
|
@ -72,8 +72,8 @@ struct RailStationGUISettings {
|
|
|
|
|
|
|
|
|
|
|
|
bool newstations; ///< Are custom station definitions available?
|
|
|
|
bool newstations; ///< Are custom station definitions available?
|
|
|
|
StationClassID station_class; ///< Currently selected custom station class (if newstations is \c true )
|
|
|
|
StationClassID station_class; ///< Currently selected custom station class (if newstations is \c true )
|
|
|
|
byte station_type; ///< %Station type within the currently selected custom station class (if newstations is \c true )
|
|
|
|
uint16 station_type; ///< %Station type within the currently selected custom station class (if newstations is \c true )
|
|
|
|
byte station_count; ///< Number of custom stations (if newstations is \c true )
|
|
|
|
uint16 station_count; ///< Number of custom stations (if newstations is \c true )
|
|
|
|
};
|
|
|
|
};
|
|
|
|
static RailStationGUISettings _railstation; ///< Settings of the station builder GUI
|
|
|
|
static RailStationGUISettings _railstation; ///< Settings of the station builder GUI
|
|
|
|
|
|
|
|
|
|
|
@ -212,13 +212,15 @@ static void PlaceRail_Station(TileIndex tile)
|
|
|
|
VpSetPlaceSizingLimit(_settings_game.station.station_spread);
|
|
|
|
VpSetPlaceSizingLimit(_settings_game.station.station_spread);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
uint32 p1 = _cur_railtype | _railstation.orientation << 6 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24;
|
|
|
|
uint32 p1 = _cur_railtype | _railstation.orientation << 6 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24;
|
|
|
|
uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
|
|
|
|
uint32 p2 = _railstation.station_class | INVALID_STATION << 16;
|
|
|
|
|
|
|
|
uint64 p3 = _railstation.station_type;
|
|
|
|
|
|
|
|
|
|
|
|
int w = _settings_client.gui.station_numtracks;
|
|
|
|
int w = _settings_client.gui.station_numtracks;
|
|
|
|
int h = _settings_client.gui.station_platlength;
|
|
|
|
int h = _settings_client.gui.station_platlength;
|
|
|
|
if (!_railstation.orientation) Swap(w, h);
|
|
|
|
if (!_railstation.orientation) Swap(w, h);
|
|
|
|
|
|
|
|
|
|
|
|
CommandContainer cmdcont = NewCommandContainerBasic(tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation);
|
|
|
|
CommandContainer cmdcont = NewCommandContainerBasic(tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation);
|
|
|
|
|
|
|
|
cmdcont.p3 = p3;
|
|
|
|
ShowSelectStationIfNeeded(cmdcont, TileArea(tile, w, h));
|
|
|
|
ShowSelectStationIfNeeded(cmdcont, TileArea(tile, w, h));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1028,9 +1030,11 @@ static void HandleStationPlacement(TileIndex start, TileIndex end)
|
|
|
|
if (_railstation.orientation == AXIS_X) Swap(numtracks, platlength);
|
|
|
|
if (_railstation.orientation == AXIS_X) Swap(numtracks, platlength);
|
|
|
|
|
|
|
|
|
|
|
|
uint32 p1 = _cur_railtype | _railstation.orientation << 6 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24;
|
|
|
|
uint32 p1 = _cur_railtype | _railstation.orientation << 6 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24;
|
|
|
|
uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
|
|
|
|
uint32 p2 = _railstation.station_class | INVALID_STATION << 16;
|
|
|
|
|
|
|
|
uint64 p3 = _railstation.station_type;
|
|
|
|
|
|
|
|
|
|
|
|
CommandContainer cmdcont = NewCommandContainerBasic(ta.tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation);
|
|
|
|
CommandContainer cmdcont = NewCommandContainerBasic(ta.tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation);
|
|
|
|
|
|
|
|
cmdcont.p3 = p3;
|
|
|
|
ShowSelectStationIfNeeded(cmdcont, ta);
|
|
|
|
ShowSelectStationIfNeeded(cmdcont, ta);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|