mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r18975) -Cleanup: CMD_REMOVE_ROAD is unused.
This commit is contained in:
parent
cbbe311cea
commit
5f4f562d53
@ -65,7 +65,6 @@ CommandProc CmdRemoveRoadStop;
|
||||
CommandProc CmdBuildLongRoad;
|
||||
CommandProc CmdRemoveLongRoad;
|
||||
CommandProc CmdBuildRoad;
|
||||
CommandProc CmdRemoveRoad;
|
||||
|
||||
CommandProc CmdBuildRoadDepot;
|
||||
|
||||
@ -222,7 +221,6 @@ static const Command _command_proc_table[] = {
|
||||
{CmdBuildLongRoad, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_LONG_ROAD
|
||||
{CmdRemoveLongRoad, CMD_NO_TEST | CMD_AUTO}, // CMD_REMOVE_LONG_ROAD; towns may disallow removing road bits (as they are connected) in test, but in exec they're removed and thus removing is allowed.
|
||||
{CmdBuildRoad, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD
|
||||
{CmdRemoveRoad, 0}, // CMD_REMOVE_ROAD
|
||||
{CmdBuildRoadDepot, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD_DEPOT
|
||||
|
||||
{CmdBuildAirport, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_AIRPORT
|
||||
|
@ -188,7 +188,6 @@ enum {
|
||||
CMD_BUILD_LONG_ROAD, ///< build a complete road (not a "half" one)
|
||||
CMD_REMOVE_LONG_ROAD, ///< remove a complete road (not a "half" one)
|
||||
CMD_BUILD_ROAD, ///< build a "half" road
|
||||
CMD_REMOVE_ROAD, ///< remove a "half" road
|
||||
CMD_BUILD_ROAD_DEPOT, ///< build a road depot
|
||||
|
||||
CMD_BUILD_AIRPORT, ///< build an airport
|
||||
|
@ -351,25 +351,6 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
||||
}
|
||||
|
||||
|
||||
/** Delete a piece of road.
|
||||
* @param tile tile where to remove road from
|
||||
* @param flags operation to perform
|
||||
* @param p1 bit 0..3 road pieces to remove (RoadBits)
|
||||
* bit 4..5 road type
|
||||
* @param p2 unused
|
||||
* @param text unused
|
||||
* @return the cost of this operation or an error
|
||||
*/
|
||||
CommandCost CmdRemoveRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
RoadType rt = (RoadType)GB(p1, 4, 2);
|
||||
if (!IsValidRoadType(rt)) return CMD_ERROR;
|
||||
|
||||
RoadBits pieces = Extract<RoadBits, 0>(p1);
|
||||
|
||||
return RemoveRoad(tile, flags, pieces, rt, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the costs for roads on slopes
|
||||
* Aside modify the RoadBits to fit on the slopes
|
||||
|
Loading…
Reference in New Issue
Block a user