2009-08-21 22:21:05 +02:00
/*
* This file is part of OpenTTD .
* OpenTTD is free software ; you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , version 2.
* OpenTTD is distributed in the hope that it will be useful , but WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
* See the GNU General Public License for more details . You should have received a copy of the GNU General Public License along with OpenTTD . If not , see < http : //www.gnu.org/licenses/>.
*/
2008-05-06 17:11:33 +02:00
/** @file road_cmd.h Road related functions. */
2007-03-28 22:41:35 +02:00
2006-08-03 08:44:54 +02:00
# ifndef ROAD_CMD_H
# define ROAD_CMD_H
2007-12-18 20:52:14 +01:00
# include "direction_type.h"
2010-01-15 17:41:15 +01:00
# include "road_type.h"
2021-10-05 22:02:27 +02:00
# include "command_type.h"
2006-08-03 08:44:54 +02:00
2007-05-21 23:58:31 +02:00
void DrawRoadDepotSprite ( int x , int y , DiagDirection dir , RoadType rt ) ;
2009-07-05 15:21:51 +02:00
void UpdateNearestTownForRoadTiles ( bool invalidate ) ;
2006-08-03 08:44:54 +02:00
2021-10-05 22:02:27 +02:00
CommandProc CmdBuildLongRoad ;
CommandProc CmdRemoveLongRoad ;
CommandProc CmdBuildRoad ;
CommandProc CmdBuildRoadDepot ;
CommandProc CmdConvertRoad ;
DEF_CMD_TRAIT ( CMD_BUILD_LONG_ROAD , CmdBuildLongRoad , CMD_AUTO | CMD_NO_WATER | CMD_DEITY , CMDT_LANDSCAPE_CONSTRUCTION )
DEF_CMD_TRAIT ( CMD_REMOVE_LONG_ROAD , CmdRemoveLongRoad , CMD_AUTO | CMD_NO_TEST , CMDT_LANDSCAPE_CONSTRUCTION ) // towns may disallow removing road bits (as they are connected) in test, but in exec they're removed and thus removing is allowed.
DEF_CMD_TRAIT ( CMD_BUILD_ROAD , CmdBuildRoad , CMD_AUTO | CMD_NO_WATER | CMD_DEITY , CMDT_LANDSCAPE_CONSTRUCTION )
DEF_CMD_TRAIT ( CMD_BUILD_ROAD_DEPOT , CmdBuildRoadDepot , CMD_AUTO | CMD_NO_WATER , CMDT_LANDSCAPE_CONSTRUCTION )
DEF_CMD_TRAIT ( CMD_CONVERT_ROAD , CmdConvertRoad , 0 , CMDT_LANDSCAPE_CONSTRUCTION )
2006-09-28 20:42:35 +02:00
# endif /* ROAD_CMD_H */